添加ec操作日志以及飞书通知,以及修复离职查询

This commit is contained in:
xiaodong.hu
2023-10-31 14:15:35 +08:00
parent bb63eee4fa
commit 01c2ce6b07
2 changed files with 23 additions and 2 deletions

View File

@@ -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">

View File

@@ -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)) {