package com.crm.globex.controller;


import com.crm.globex.service.AccountApplyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: houn
 * @create: 2020-07-24 11:06
 **/
@RestController
@RequestMapping("/account/apply")
public class AccountApplyController {
    @Autowired
    private AccountApplyService accountApplyService;

    /**
     * 定时器 修改申请的demo记录的操作人
     *
     * @throws Exception
     */
    @Scheduled(fixedDelay = 5000)
    public void scheduleUpdateAccountOperationType() throws Exception {
        accountApplyService.scheduleUpdateAccountOperationType();
    }

    /**
     * 定时器 注册需要注册的demo交易账号
     *
     * @throws Exception
     */
    @Scheduled(fixedDelay = 5000)
    public void scheduleAutomaticAccount() throws Exception {
        accountApplyService.scheduleAutomaticAccount();
    }

}
