Merge branch 'hxd/feat/interviewSelect' into dev/feat/partner1.1_20230727
This commit is contained in:
@@ -73,19 +73,19 @@
|
|||||||
AND hoai.deleted = 0
|
AND hoai.deleted = 0
|
||||||
<where>
|
<where>
|
||||||
<if test="userId !=null and userId !=''">
|
<if test="userId !=null and userId !=''">
|
||||||
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})
|
||||||
</if>
|
</if>
|
||||||
<if test="interviewerName !=null and interviewerName !=''">
|
<if test="interviewerName !=null and interviewerName !=''">
|
||||||
and eu.`name` like concat('%',#{interviewerName},'%')
|
and eu.`name` like concat('%',#{interviewerName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="interviewerMobile !=null and interviewerMobile !=''">
|
<if test="interviewerMobile !=null and interviewerMobile !=''">
|
||||||
and eu.mobile=#{interviewerMobile}
|
and eu.mobile like concat('%',#{interviewerMobile},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
<if test="intervieweeName !=null and intervieweeName !=''">
|
||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
and hpui.username like concat('%',#{intervieweeName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
||||||
and hpui.mobile=#{intervieweeMobile}
|
and hpui.mobile like concat('%',#{intervieweeMobile},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="status !=null">
|
<if test="status !=null">
|
||||||
and hi.`status`=#{status}
|
and hi.`status`=#{status}
|
||||||
@@ -140,7 +140,7 @@
|
|||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
and hpui.username like concat('%',#{intervieweeName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
||||||
and hpui.mobile=#{intervieweeMobile}
|
and hpui.mobile like concat('%',#{intervieweeMobile},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="status !=null">
|
<if test="status !=null">
|
||||||
and hi.`status`=#{status}
|
and hi.`status`=#{status}
|
||||||
@@ -196,19 +196,19 @@
|
|||||||
and mdd.id is not null
|
and mdd.id is not null
|
||||||
</if>
|
</if>
|
||||||
<if test="userId !=null and userId !=''">
|
<if test="userId !=null and userId !=''">
|
||||||
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})
|
||||||
</if>
|
</if>
|
||||||
<if test="interviewerName !=null and interviewerName !=''">
|
<if test="interviewerName !=null and interviewerName !=''">
|
||||||
and eu.`name` like concat('%',#{interviewerName},'%')
|
and eu.`name` like concat('%',#{interviewerName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="interviewerMobile !=null and interviewerMobile !=''">
|
<if test="interviewerMobile !=null and interviewerMobile !=''">
|
||||||
and eu.mobile=#{interviewerMobile}
|
and eu.mobile like concat('%',#{interviewerMobile},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="intervieweeName !=null and intervieweeName !=''">
|
<if test="intervieweeName !=null and intervieweeName !=''">
|
||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
and hpui.username like concat('%',#{intervieweeName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
||||||
and hpui.mobile=#{intervieweeMobile}
|
and hpui.mobile like concat('%',{intervieweeMobile},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="status !=null">
|
<if test="status !=null">
|
||||||
and hi.`status`=#{status}
|
and hi.`status`=#{status}
|
||||||
@@ -260,7 +260,7 @@
|
|||||||
and hpui.username like concat('%',#{intervieweeName},'%')
|
and hpui.username like concat('%',#{intervieweeName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
<if test="intervieweeMobile !=null and intervieweeMobile !=''">
|
||||||
and hpui.mobile=#{intervieweeMobile}
|
and hpui.mobile like concat('%',#{intervieweeMobile},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="status !=null">
|
<if test="status !=null">
|
||||||
and hi.`status`=#{status}
|
and hi.`status`=#{status}
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
</select>
|
</select>
|
||||||
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
|
<select id="interviewInspectionGetHistoryDetail" resultType="com.cool.store.vo.interview.InterviewInspectionHistoryInfo">
|
||||||
SELECT a.id, b.`name` as operatorUserName, b.mobile as operatorUserMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr
|
SELECT a.id, b.`name` as operatorUserName, b.mobile as operatorUserMobile,operation_time as inspectionTime, operation_type as operationType ,description,files as filesStr
|
||||||
FROM hy_interview_inspection_log a left join enterprise_user b on a.operator_user_id=b.user_id and b.deleted=0 WHERE inspection_id=#{inspectionId} ORDER BY a.id
|
FROM hy_interview_inspection_log a left join enterprise_user b on a.operator_user_id=b.user_id and b.deleted=0 WHERE inspection_id=#{inspectionId} ORDER BY operation_time desc
|
||||||
</select>
|
</select>
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
delete from hy_interview_inspection_log
|
delete from hy_interview_inspection_log
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import com.cool.store.mapper.HyPartnerUserInfoMapper;
|
|||||||
import com.cool.store.sdk.ec.EcClient;
|
import com.cool.store.sdk.ec.EcClient;
|
||||||
import com.cool.store.sdk.ec.request.SyncEcCustomerRequest;
|
import com.cool.store.sdk.ec.request.SyncEcCustomerRequest;
|
||||||
import com.cool.store.service.EcSyncService;
|
import com.cool.store.service.EcSyncService;
|
||||||
|
import com.cool.store.utils.StringUtil;
|
||||||
import com.xxl.job.core.context.XxlJobHelper;
|
import com.xxl.job.core.context.XxlJobHelper;
|
||||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -59,8 +60,18 @@ public class EcSyncDataJob {
|
|||||||
|
|
||||||
//定时同步小程序数据到ec
|
//定时同步小程序数据到ec
|
||||||
private void syncAppletToEcExecute() {
|
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;
|
int counts = size / count;
|
||||||
//取余,如果大于1,就再加一
|
//取余,如果大于1,就再加一
|
||||||
@@ -68,8 +79,10 @@ public class EcSyncDataJob {
|
|||||||
if (yu > 0) {
|
if (yu > 0) {
|
||||||
counts += 1;
|
counts += 1;
|
||||||
}
|
}
|
||||||
|
XxlJobHelper.log("开始时间为:" + startTime+",结束时间为:"+endTime);
|
||||||
for (int i = 1; i <= counts; i++) {
|
for (int i = 1; i <= counts; i++) {
|
||||||
List<SyncEcCustomerDO> list = hyPartnerUserInfoMapper.selectByHourDate(getHourDayDate(-5, 0), DateUtil.now(),count * (i - 1),count);
|
XxlJobHelper.log("执行limit1:" + count * (i - 1)+",执行limit2:"+count);
|
||||||
|
List<SyncEcCustomerDO> list = hyPartnerUserInfoMapper.selectByHourDate(startTime, endTime,count * (i - 1),count);
|
||||||
SyncEcCustomerRequest syncEcCustomerRequest = new SyncEcCustomerRequest();
|
SyncEcCustomerRequest syncEcCustomerRequest = new SyncEcCustomerRequest();
|
||||||
syncEcCustomerRequest.setParameter(list);
|
syncEcCustomerRequest.setParameter(list);
|
||||||
EcClient ecClient = new EcClient();
|
EcClient ecClient = new EcClient();
|
||||||
|
|||||||
Reference in New Issue
Block a user