package com.crm.globex.controller;


import com.crm.globex.service.AccountApplyAssetManagementService;
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/demo")
public class AccountApplyAssetManagementController {
    @Autowired
    private AccountApplyAssetManagementService accountApplyService;

    @Scheduled(fixedDelay = 5000)
    public void scheduleUpdateAccountOperationType() throws Exception {
        accountApplyService.scheduleUpdateAccountOperationType();
    }


    @Scheduled(fixedDelay = 5000)
    public void scheduleAutomaticAccount() throws Exception {
        accountApplyService.scheduleAutomaticAccount();
    }


    @Scheduled(fixedDelay = 5000)
    public void scheduleAutomaticAccountBalance() throws ServiceException {
        accountApplyService.scheduleAutomaticAccountBalance();
    }
}
