Browse Source

修改推月还计提定时任务2

zhanglei
fanzongzhe0036 3 months ago
parent
commit
ca6c41e130
  1. 3
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/FinTempTimePushMapper.java
  2. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/FinTempTimePushMapper.xml
  3. 4
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/FinTempTimePushService.java
  4. 7
      anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/TimingPushService.java

3
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/FinTempTimePushMapper.java

@ -37,4 +37,7 @@ public interface FinTempTimePushMapper extends BaseMapper<FinTempTimePush> {
List<FinTempTimePush> selListByBusType(@Param("busType") String busType); List<FinTempTimePush> selListByBusType(@Param("busType") String busType);
void delBySid(@Param("sid") String sid);
} }

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/FinTempTimePushMapper.xml

@ -1,6 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yxt.anrui.fin.biz.fintemptimepush.FinTempTimePushMapper"> <mapper namespace="com.yxt.anrui.fin.biz.fintemptimepush.FinTempTimePushMapper">
<delete id="delBySid">
DELETE FROM fin_temp_time_push
WHERE sid =#{sid}
</delete>
<!-- <where> ${ew.sqlSegment} </where>--> <!-- <where> ${ew.sqlSegment} </where>-->
<!-- ${ew.customSqlSegment} --> <!-- ${ew.customSqlSegment} -->

4
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/FinTempTimePushService.java

@ -49,4 +49,8 @@ public class FinTempTimePushService extends MybatisBaseService<FinTempTimePushMa
public List<FinTempTimePush> selListByBusType(String busType) { public List<FinTempTimePush> selListByBusType(String busType) {
return baseMapper.selListByBusType(busType); return baseMapper.selListByBusType(busType);
} }
public void delBySid(String sid) {
baseMapper.delBySid(sid);
}
} }

7
anrui-fin/anrui-fin-biz/src/main/java/com/yxt/anrui/fin/biz/fintemptimepush/TimingPushService.java

@ -25,17 +25,16 @@ public class TimingPushService {
/** /**
* 定时推送月还计提凭证 * 定时推送月还计提凭证
*/ */
// @Scheduled(cron = "0 0 3 2,3,4,5,6,7,8,9,10 * ?") //每月2-10号 3点推送 @Scheduled(cron = "0 0 3 2,3,4,5,6,7,8,9,10 * ?") //每月2-10号 3点推送
@Scheduled(cron = "0 0/3 * * * ?") //每月2-10号 3点推送 // @Scheduled(cron = "0 0/3 * * * ?") //每3分钟推送
public void monthlyAccrualVoucher() { public void monthlyAccrualVoucher() {
List<FinTempTimePush> list = finTempTimePushService.selListByBusType("月还计提"); List<FinTempTimePush> list = finTempTimePushService.selListByBusType("月还计提");
list.removeAll(Collections.singleton(null)); list.removeAll(Collections.singleton(null));
if (!list.isEmpty()) { if (!list.isEmpty()) {
for (FinTempTimePush f : list) { for (FinTempTimePush f : list) {
loanMonthlyAccrualApplyFeign.rePushVoucher(f.getBusSid()); loanMonthlyAccrualApplyFeign.rePushVoucher(f.getBusSid());
finTempTimePushService.deleteBySid(f.getSid()); finTempTimePushService.delBySid(f.getSid());
} }
} }
} }
} }

Loading…
Cancel
Save