Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner

This commit is contained in:
俞扬
2023-07-02 21:15:40 +08:00
6 changed files with 25 additions and 8 deletions

View File

@@ -132,7 +132,7 @@ public class EcSyncServiceImpl implements EcSyncService {
String followUserName = customerInfoItem.getFollowUserName();
String followUserMobile = customerInfoItem.getFollowUserMobile();
//传递过来有跟进人的情况下查询跟进人是否存在
if (StringUtil.isNotEmpty(followUserMobile)&&StringUtil.isNotEmpty(followUserMobile)) {
if (StringUtil.isNotEmpty(followUserMobile)&&StringUtil.isNotEmpty(followUserName)) {
String userId = enterpriseUserDAO.selectByMobile("+86"+followUserMobile);
if (StringUtil.isEmpty(userId)) {
// 给飞书群发送消息 跟进人找不到

View File

@@ -11,6 +11,7 @@ import com.cool.store.dto.enterprise.*;
import com.cool.store.entity.*;
import com.cool.store.enums.DataSourceEnum;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.FSEventTypeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.http.ISVHttpRequest;
import com.cool.store.service.EnterpriseSyncService;
@@ -168,7 +169,8 @@ public class EnterpriseSyncServiceImpl implements EnterpriseSyncService {
@Override
public void userUpdateEvent(UserEventDTO param) {
switch (parseValue(param.getEventType())){
FSEventTypeEnum eventType = parseValue(param.getEventType());
switch (eventType){
case USER_CREATED:
case USER_UPDATED:
EnterpriseUserDTO userDetail = isvHttpRequest.getUserDetailByUserId(param.getOpenId());
@@ -202,7 +204,7 @@ public class EnterpriseSyncServiceImpl implements EnterpriseSyncService {
}else{
enterpriseUserRoleDAO.deleteUserRole(userDetail.getUserId());
}
EnterpriseUserDO enterpriseUser = EnterpriseUserDTO.transUserDtoToDo(userDetail, regionPathMap, leaderDeptMap);
EnterpriseUserDO enterpriseUser = EnterpriseUserDTO.transUserDtoToDo(userDetail, regionPathMap, leaderDeptMap, eventType);
enterpriseUserDAO.batchInsertOrUpdate(new ArrayList<>(Arrays.asList(enterpriseUser)));
break;
case USER_DELETED:

View File

@@ -267,9 +267,12 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
@Override
public PartnerIntentInfoVO queryPartnerIntentInfo(PartnerUserInfoVO userInfoVO, Long lineId) {
log.info("HyPartnerClerkServiceImpl#queryPartnerIntentInfo userInfoVO:{}", JSONObject.toJSONString(userInfoVO));
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, userInfoVO.getPartnerId(), lineId);
if (StringUtils.isNotBlank(redisUtilPool.getString(cacheKey))) {
PartnerIntentInfoVO intentInfoVO = JSONObject.parseObject(redisUtilPool.getString(cacheKey), PartnerIntentInfoVO.class);
intentInfoVO.setWantShopAreaName(userInfoVO.getWantShopAreaName());
return intentInfoVO;
}
HyPartnerIntentInfoDO intentInfoDO = hyPartnerIntentInfoDAO.getByPartnerIdAndLineId(userInfoVO.getPartnerId(), lineId);
@@ -289,6 +292,8 @@ public class HyPartnerIntentInfoServiceImpl implements HyPartnerIntentInfoServic
intentInfoVO.setAcceptAdjustType(userInfoVO.getAcceptAdjustType());
}
intentInfoVO.setWantShopAreaName(userInfoVO.getWantShopAreaName());
log.info("HyPartnerClerkServiceImpl#queryPartnerIntentInfo intentInfoVO:{}", JSONObject.toJSONString(intentInfoVO));
return intentInfoVO;
}