2023年6月27日 修复定时任务删除数据报错的问题
This commit is contained in:
parent
283943cce7
commit
40123b2375
|
@ -1,6 +1,7 @@
|
||||||
package org.jeecg.modules.kc.grab.SynchronizationService;
|
package org.jeecg.modules.kc.grab.SynchronizationService;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.date.DatePattern;
|
||||||
import cn.hutool.core.date.DateTime;
|
import cn.hutool.core.date.DateTime;
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
@ -55,7 +56,6 @@ public class SyncTJwXsxkb extends BaseSync {
|
||||||
|
|
||||||
boolean isAll = false;
|
boolean isAll = false;
|
||||||
boolean isScope = false;
|
boolean isScope = false;
|
||||||
boolean isToday = false;
|
|
||||||
if(param != null){
|
if(param != null){
|
||||||
if(param.containsKey("isAll")){
|
if(param.containsKey("isAll")){
|
||||||
String isAllStr = (String)param.get("isAll");
|
String isAllStr = (String)param.get("isAll");
|
||||||
|
@ -96,7 +96,7 @@ public class SyncTJwXsxkb extends BaseSync {
|
||||||
// dqw.apply("TIMESTAMPS < str_to_date('"+endDate+"','yyyy-MM-dd')");
|
// dqw.apply("TIMESTAMPS < str_to_date('"+endDate+"','yyyy-MM-dd')");
|
||||||
}else{
|
}else{
|
||||||
//按天
|
//按天
|
||||||
String nowStr = DateTime.now().toDateStr();
|
String nowStr = now.toDateStr();
|
||||||
// eqw.between("timestamps","to_date('"+nowStr+" 00:00:00', 'yyyy-MM-dd HH24:MI:SS')","to_date('"+nowStr+" 00:00:00', 'yyyy-MM-dd HH24:MI:SS')");
|
// eqw.between("timestamps","to_date('"+nowStr+" 00:00:00', 'yyyy-MM-dd HH24:MI:SS')","to_date('"+nowStr+" 00:00:00', 'yyyy-MM-dd HH24:MI:SS')");
|
||||||
// dqw.between("timestamps","str_to_date('"+nowStr+"', '%Y-%m-%d')","str_to_date('"+nowStr+"', '%Y-%m-%d')");
|
// dqw.between("timestamps","str_to_date('"+nowStr+"', '%Y-%m-%d')","str_to_date('"+nowStr+"', '%Y-%m-%d')");
|
||||||
eqw.apply("timestamps between to_date('"+nowStr+" 00:00:00', 'yyyy-MM-dd HH24:MI:SS') and to_date('"+nowStr+" 23:59:59', 'yyyy-MM-dd HH24:MI:SS')");
|
eqw.apply("timestamps between to_date('"+nowStr+" 00:00:00', 'yyyy-MM-dd HH24:MI:SS') and to_date('"+nowStr+" 23:59:59', 'yyyy-MM-dd HH24:MI:SS')");
|
||||||
|
@ -136,7 +136,12 @@ public class SyncTJwXsxkb extends BaseSync {
|
||||||
List<Xxhbxsxkb> outDataList = Lists.newArrayList();
|
List<Xxhbxsxkb> outDataList = Lists.newArrayList();
|
||||||
|
|
||||||
//清洗数据
|
//清洗数据
|
||||||
inDataList.forEach(x -> outDataList.add(BeanUtil.toBean(x, Xxhbxsxkb.class)));
|
inDataList.forEach(x -> {
|
||||||
|
Xxhbxsxkb outData = BeanUtil.toBean(x, Xxhbxsxkb.class);
|
||||||
|
outData.setTimestamps(DateUtil.format(x.getTimestamps(), DatePattern.NORM_DATETIME_PATTERN));
|
||||||
|
outDataList.add(outData);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
//保存到胃
|
//保存到胃
|
||||||
int syncnum=0;
|
int syncnum=0;
|
||||||
|
|
|
@ -65,4 +65,10 @@ public class Xxhbldxx implements Serializable {
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private Integer mysqlnum;
|
private Integer mysqlnum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 听课要求(次数)
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String tkyq;
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,4 +5,20 @@
|
||||||
<select id="getSumnum" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbldxx">
|
<select id="getSumnum" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbldxx">
|
||||||
select count(*) as mysqlnum from xxhbldxx
|
select count(*) as mysqlnum from xxhbldxx
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="selectList" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbldxx">
|
||||||
|
select
|
||||||
|
xxhbldxx.*, b.tkyq
|
||||||
|
from xxhbldxx
|
||||||
|
left join kc_tksfyq b on b.zwmc = xxhbldxx.zwmc
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPage" resultType="org.jeecg.modules.kc.grab.imports.entity.Xxhbldxx">
|
||||||
|
select
|
||||||
|
xxhbldxx.*, b.tkyq
|
||||||
|
from xxhbldxx
|
||||||
|
left join kc_tksfyq b on b.zwmc = xxhbldxx.zwmc
|
||||||
|
${ew.customSqlSegment}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue