添加ec操作日志以及飞书通知,以及修复离职查询
This commit is contained in:
@@ -333,12 +333,12 @@
|
|||||||
CAST(SUBSTR(jobnumber,2) AS UNSIGNED) ASC
|
CAST(SUBSTR(jobnumber,2) AS UNSIGNED) ASC
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByMobile" resultType="java.lang.String">
|
<select id="selectByMobile" resultType="java.lang.String">
|
||||||
SELECT user_id FROM enterprise_user WHERE mobile =#{mobile} LIMIT 1
|
SELECT user_id FROM enterprise_user WHERE mobile =#{mobile} and deleted=0 LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
<select id="selectByInvestmentManager" resultMap="BaseResultMap">
|
<select id="selectByInvestmentManager" resultMap="BaseResultMap">
|
||||||
SELECT
|
SELECT
|
||||||
<include refid="Base_Column_List"/>
|
<include refid="Base_Column_List"/>
|
||||||
FROM enterprise_user WHERE mobile like #{investmentManager} or `name` like #{investmentManager} LIMIT 1
|
FROM enterprise_user WHERE ( mobile = #{investmentManager} or `name` = #{investmentManager} ) and deleted=0 LIMIT 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getFeishuUserIdsByUserIds" resultMap="BaseResultMap">
|
<select id="getFeishuUserIdsByUserIds" resultMap="BaseResultMap">
|
||||||
|
|||||||
@@ -248,6 +248,27 @@ public class EcSyncServiceImpl implements EcSyncService {
|
|||||||
resultLine.setLineStatus(partnerLine.getLineStatus().intValue() == LineStatusEnum.BLACKLIST.getCode().intValue()
|
resultLine.setLineStatus(partnerLine.getLineStatus().intValue() == LineStatusEnum.BLACKLIST.getCode().intValue()
|
||||||
? LineStatusEnum.BLACKLIST.getCode() : resultLine.getLineStatus());
|
? LineStatusEnum.BLACKLIST.getCode() : resultLine.getLineStatus());
|
||||||
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(resultLine);
|
hyPartnerLineInfoDAO.updateByPrimaryKeySelective(resultLine);
|
||||||
|
|
||||||
|
//分配招商经理发送消息通知
|
||||||
|
Map<String, String> feishuUserIdsByUserIds = enterpriseUserDAO.getFeishuUserIdsByUserIds(new ArrayList<String>() {{
|
||||||
|
add(resultLine.getInvestmentManager());
|
||||||
|
}});
|
||||||
|
List<String> feishuIds = feishuUserIdsByUserIds.entrySet().stream().map(Map.Entry::getValue).collect(Collectors.toList());
|
||||||
|
try {
|
||||||
|
eventCenterHttpRequest.sendFeiShuNotice(FeiShuNoticeMsgEnum.ALLOCATION_INVESTMENT_MANAGER,feishuIds,operateName,newUserInfo.getUsername(),newUserInfo.getMobile());
|
||||||
|
} catch (ApiException e) {
|
||||||
|
log.error("ec同步至招商发送飞书通知错误" + JSONObject.toJSONString(e));
|
||||||
|
}
|
||||||
|
|
||||||
|
//添加新增线索的ec操作日志
|
||||||
|
LineLogInfo lineLogInfo = new LineLogInfo(partnerLine.getPartnerId(), resultLine.getId(), operateId,
|
||||||
|
operateName, OperateTypeEnum.ALLOCATION_INVESTMENT_MANAGER,
|
||||||
|
WorkflowStageEnum.getWorkflowStageByCode(partnerLine.getWorkflowStage()),
|
||||||
|
partnerLine.getWorkflowStatus(), "");
|
||||||
|
BlackListLogDTO logDTO = BlackListLogDTO.builder().operateUserId(operateId).operateUsername(operateName)
|
||||||
|
.mobile(resultBase.getMobile()).operateTime(DateUtil.format(new Date(), CoolDateUtils.DATE_FORMAT_SEC_2)).build();
|
||||||
|
lineLogInfo.setData(logDTO);
|
||||||
|
hyPartnerTaskInfoLogDAO.addOperateLog(lineLogInfo);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!getFollowLineStatus(partnerLine)) {
|
if (!getFollowLineStatus(partnerLine)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user