Commit b5750abc by 徐高华

Merge branch 'developer' of http://git.gicdev.com/haoban3.0/haoban-manage3.0.git into developer

parents 1caf0334 57ec403a
......@@ -4,10 +4,8 @@ import com.alibaba.fastjson.JSONObject;
import com.gic.binlog.base.entity.GicField;
import com.gic.binlog.base.entity.GicRecord;
import com.gic.binlog.base.entity.enums.GicRecordType;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.GICMQClientUtil;
import com.gic.dubbo.entity.ProviderLocalTag;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.FlushStoreMqDTO;
......@@ -22,7 +20,6 @@ import com.gic.haoban.manage.service.pojo.GroupSyncPojo;
import com.gic.haoban.manage.service.pojo.StoreSyncPojo;
import com.gic.haoban.manage.service.service.StaffClerkRelationService;
import com.gic.haoban.manage.service.service.StoreRangeService;
import com.gic.haoban.task.api.dto.MqMessageQo;
import org.apache.commons.lang3.time.DateUtils;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.slf4j.Logger;
......@@ -79,39 +76,7 @@ public class KafkaMessageServiceImpl implements MessageListener<String, GicRecor
logger.error("binlog数据为空");
return;
}
if (record.value().getTableName().equals(CLERK)) {
ClerkSyncPojo syncPojo = (ClerkSyncPojo) pojo;
dealClerk(syncPojo);
//发消息处理新增店长,任务重新分配问题
GicRecordType gicRecordType = GicRecordType.valueOf(syncPojo.getRecordType());
if (gicRecordType.equals(GicRecordType.INSERT)
|| gicRecordType.equals(GicRecordType.UPDATE)) {
//新增,更新某个人为店长
String clerkId = syncPojo.getClerkId();
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
if (clerkDTO == null) {
logger.error("导购为空,clerkId:{}", clerkId);
return;
}
Integer clerkType = clerkDTO.getClerkType();
if (clerkType != null && clerkType == 1) {
//发消息处理新增店长,任务重新分配问题
try {
logger.info("待分配任务重分配======>{}", clerkId);
MqMessageQo mqMessageQo = new MqMessageQo();
//任务分配给店长
mqMessageQo.setType(MqMessageQo.DISTRIBUTE_TASK);
mqMessageQo.setData(clerkId);
String s = JSONObject.toJSONString(mqMessageQo);
GICMQClientUtil.getClientInstance().sendCommonMessage(RouterConstant.ROUTERTYPE, s,
"com.gic.haoban.task.api.service.MqAsynApiService", "run");
} catch (Exception e) {
logger.error("任务重新分配问题发送消息队列出错",e);
}
}
}
}
else if (record.value().getTableName().equals(GROUP)) {
if (record.value().getTableName().equals(GROUP)) {
//分组
dealStoreGroup((GroupSyncPojo) pojo);
}
......
......@@ -186,7 +186,7 @@
<select id="listForPage" parameterType="com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO" resultMap="result-map-tabHaobanWxUserAddLog">
select
<include refid="Base_Column_List" />
from tab_haoban_wx_user_add_log where wx_enterprise_id = #{enterpriseId}
from tab_haoban_wx_user_add_log where wx_enterprise_id = #{wxEnterpriseId}
<if test="null != enterpriseId">
and enterprise_id = #{enterpriseId}
</if>
......@@ -199,7 +199,15 @@
<if test="null != clerkId">
and clerk_id = #{clerkId}
</if>
and create_time >= #{startTime} and create_time <![CDATA[<=]]> #{endTime}
<if test="null != startTime">
and create_time <![CDATA[>=]]> #{startTime}
</if>
<if test="null != endTime">
and create_time <![CDATA[<=]]> #{endTime}
</if>
<if test="null != addChannel">
and add_channel = #{addChannel}
</if>
and status_flag != 0 order by #{createTimeOrder}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment