package com.ruoyi.job.controller;

import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.job.service.IInvestJobService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * 信息Controller
 *
 * @author tianyongbao
 * @date 2023-12-11
 */
@Api(tags=" 生成数据信息")
@RestController
@RequestMapping("/job")
public class InvestJob
{
    @Resource
    private IInvestJobService investJobService;

    @PostMapping("/generateUnpaidCreditBill")
    public AjaxResult generateUnpaidCreditBill()
    {
        System.out.println("================================开始生成未出账单数据("+ DateUtils.getTime() +")=================================");
        investJobService.generateUnpaidCreditBill();
        System.out.println("================================结束生成未出账单据("+ DateUtils.getTime() +")=================================");
        return AjaxResult.success();
    }

    @PostMapping("/updateUnpaidInstallmentData")
    public AjaxResult updateUnpaidInstallmentData()
    {
        System.out.println("================================开始更新未出信用卡分期账单入账数据("+ DateUtils.getTime() +")=================================");
        investJobService.updateUnpaidInstallmentData();
        System.out.println("================================结束更新未出信用卡分期账单入账拟数据("+ DateUtils.getTime() +")=================================");
        return AjaxResult.success();
    }



}
