diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml index b27e9690e..88a951189 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInspectionMapper.xml @@ -73,19 +73,19 @@ AND hoai.deleted = 0 - and (his.inspection_user_id = #{userId} OR hi.operator_user_id = #{userId}) + and ((his.inspection_user_id = #{userId} and hi.`status`=0 ) OR hi.operator_user_id = #{userId}) and eu.`name` like concat('%',#{interviewerName},'%') - and eu.mobile=#{interviewerMobile} + and eu.mobile like concat('%',#{interviewerMobile},'%') and hpui.username like concat('%',#{intervieweeName},'%') - and hpui.mobile=#{intervieweeMobile} + and hpui.mobile like concat('%',#{intervieweeMobile},'%') and hi.`status`=#{status} @@ -140,7 +140,7 @@ and hpui.username like concat('%',#{intervieweeName},'%') - and hpui.mobile=#{intervieweeMobile} + and hpui.mobile like concat('%',#{intervieweeMobile},'%') and hi.`status`=#{status} @@ -196,19 +196,19 @@ and mdd.id is not null - and (his.inspection_user_id = #{userId} OR hi.operator_user_id = #{userId}) + and ((his.inspection_user_id = #{userId} and hi.`status`=0 ) OR hi.operator_user_id = #{userId}) and eu.`name` like concat('%',#{interviewerName},'%') - and eu.mobile=#{interviewerMobile} + and eu.mobile like concat('%',#{interviewerMobile},'%') and hpui.username like concat('%',#{intervieweeName},'%') - and hpui.mobile=#{intervieweeMobile} + and hpui.mobile like concat('%',{intervieweeMobile},'%') and hi.`status`=#{status} @@ -260,7 +260,7 @@ and hpui.username like concat('%',#{intervieweeName},'%') - and hpui.mobile=#{intervieweeMobile} + and hpui.mobile like concat('%',#{intervieweeMobile},'%') and hi.`status`=#{status} diff --git a/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml index e247a8a21..a92ce1949 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/HyInterviewInspectionLogMapper.xml @@ -27,7 +27,7 @@ delete from hy_interview_inspection_log diff --git a/coolstore-partner-service/src/main/java/com/cool/store/job/EcSyncDataJob.java b/coolstore-partner-service/src/main/java/com/cool/store/job/EcSyncDataJob.java index d6254e622..c86786d31 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/job/EcSyncDataJob.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/job/EcSyncDataJob.java @@ -7,6 +7,7 @@ import com.cool.store.mapper.HyPartnerUserInfoMapper; import com.cool.store.sdk.ec.EcClient; import com.cool.store.sdk.ec.request.SyncEcCustomerRequest; import com.cool.store.service.EcSyncService; +import com.cool.store.utils.StringUtil; import com.xxl.job.core.context.XxlJobHelper; import com.xxl.job.core.handler.annotation.XxlJob; import lombok.extern.slf4j.Slf4j; @@ -59,8 +60,18 @@ public class EcSyncDataJob { //定时同步小程序数据到ec private void syncAppletToEcExecute() { + // 获取参数 + String param = XxlJobHelper.getJobParam(); + String startTime = ""; + if (StringUtil.isNotEmpty(param)) { + XxlJobHelper.log("输入参数为:" + param); + startTime = param; + } else { + startTime = getHourDayDate(-5, 0); + } + String endTime = DateUtil.now(); //获取总数 - int size = hyPartnerUserInfoMapper.selectByHourDateCount(getHourDayDate(-5, 0), DateUtil.now()); + int size = hyPartnerUserInfoMapper.selectByHourDateCount(startTime, endTime); //执行数 int counts = size / count; //取余,如果大于1,就再加一 @@ -68,8 +79,10 @@ public class EcSyncDataJob { if (yu > 0) { counts += 1; } + XxlJobHelper.log("开始时间为:" + startTime+",结束时间为:"+endTime); for (int i = 1; i <= counts; i++) { - List list = hyPartnerUserInfoMapper.selectByHourDate(getHourDayDate(-5, 0), DateUtil.now(),count * (i - 1),count); + XxlJobHelper.log("执行limit1:" + count * (i - 1)+",执行limit2:"+count); + List list = hyPartnerUserInfoMapper.selectByHourDate(startTime, endTime,count * (i - 1),count); SyncEcCustomerRequest syncEcCustomerRequest = new SyncEcCustomerRequest(); syncEcCustomerRequest.setParameter(list); EcClient ecClient = new EcClient();