优化每月5日凌晨三点执行一次,首次可使用接口调用入库最小费额http://ip:port/MinFeeInsertDb/sys/insertMinFee
parent
0df5ed1766
commit
4a93bb68ef
@ -0,0 +1,45 @@
|
||||
package com.nm.gsgl.controller;
|
||||
|
||||
import com.nm.gsgl.common.Constant;
|
||||
import com.nm.gsgl.common.utils.PropertiesUtil;
|
||||
import com.nm.gsgl.common.utils.UuidUtil;
|
||||
import com.nm.gsgl.entity.Res;
|
||||
import com.nm.gsgl.service.MinFeeInsertService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author: shuguang
|
||||
* @date: 2024年04月07日 10:19
|
||||
* @description:
|
||||
*/
|
||||
@RestController
|
||||
@Slf4j
|
||||
public class ManualController {
|
||||
@Resource
|
||||
private MinFeeInsertService minFeeInsertService;
|
||||
@GetMapping("/sys/insertMinFee")
|
||||
public Res queryImageInfo() {
|
||||
String uuid = UuidUtil.getUuid();
|
||||
//获取最小费额文件的位置
|
||||
String UserType = PropertiesUtil.getValue("UserType");
|
||||
if (Constant.STR_TWO.equals(UserType)||Constant.STR_FOUR.equals(UserType)) {
|
||||
log.info("[uuid:{}]总中心或分中心手动执行最小费额文件入库处理,当前时间={}", uuid, LocalDateTime.now());
|
||||
long start = System.currentTimeMillis();
|
||||
minFeeInsertService.fileInsertDatabase(uuid);
|
||||
long end = System.currentTimeMillis();
|
||||
log.info("[uuid:{}]总中心或分中心手动执行最小费额文件入库处理执行完成,耗时:{}毫秒", uuid, end - start);
|
||||
} else {
|
||||
log.info("[uuid:{}]当前服务不是总中心或分中心服务,不执行最小费额文件入库处理", uuid);
|
||||
}
|
||||
return Res.success();
|
||||
}
|
||||
|
||||
}
|
||||
@ -1,4 +0,0 @@
|
||||
序号 日期 版本号 说明
|
||||
1 2023年12月20日 1.0.0 初始版本号
|
||||
|
||||
|
||||
Loading…
Reference in New Issue