package com.crm.globex.controller;


import com.crm.globex.service.AccountApplyFirmOfferService;
import com.crm.rely.backend.core.exception.ServiceException;
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/firm/offer")
public class AccountApplyFirmOfferController {
    @Autowired
    private AccountApplyFirmOfferService service;

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

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

    /**
     * 定时器 入金demo账户初始资金
     *
     * @throws ServiceException
     */
    @Scheduled(fixedDelay = 5000)
    public void scheduleAutomaticAccountBalance() throws ServiceException {
        service.scheduleAutomaticAccountBalance();
    }
}
