|
|
|
@@ -1,21 +1,21 @@ |
|
|
|
package com.iformall.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.enums.EnumThirdPartyConfigType; |
|
|
|
import com.iformall.domain.po.msg.FmInsideBasicUserPushMsg; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.mallcoo.MallcooHelper; |
|
|
|
import com.iformall.mallcoo.McUserInfo; |
|
|
|
import com.iformall.mapper.*; |
|
|
|
import com.iformall.mq.MqBaseProducer; |
|
|
|
import com.iformall.service.*; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.LoggerFactory; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.scheduling.annotation.Async; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
|
|
import java.util.Date; |
|
|
|
@@ -34,6 +34,9 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { |
|
|
|
@Autowired |
|
|
|
WxThirdPartyConfigMapper wxThirdPartyConfigMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private MqBaseProducer mqBaseProducer; |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageInfo<MallCooUserInfo> listAsPage(MallCooUserInfo record, Integer pageIndex, Integer pageSize) { |
|
|
|
@@ -54,18 +57,18 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { |
|
|
|
return mallCooUserInfoMapper.selectOne(new QueryWrapper<>(userInfo)); |
|
|
|
} |
|
|
|
|
|
|
|
@Async |
|
|
|
@Override |
|
|
|
public void pullByMobile(TenantEntity tenantEntity, WxCUserBasicInfo basicInfo) { |
|
|
|
public void pullByMobile(TenantEntity tenantEntity, Long basicUserId) { |
|
|
|
try{ |
|
|
|
WxThirdPartyConfig config = getThirdPartyConfig(tenantEntity); |
|
|
|
if(config == null){ |
|
|
|
logger.error("未找到猫酷配置信息"); |
|
|
|
return; |
|
|
|
} |
|
|
|
if(StringUtils.isBlank(basicInfo.getPhone())){ |
|
|
|
basicInfo = wxCUserBasicInfoMapper.selectById(basicInfo.getId(),basicInfo.getFinalTenantId()); |
|
|
|
|
|
|
|
WxCUserBasicInfo basicInfo = wxCUserBasicInfoMapper.selectById(basicUserId, tenantEntity.getFinalTenantId()); |
|
|
|
if(null == basicInfo){ |
|
|
|
logger.error("未找到会员信息"+basicUserId); |
|
|
|
return; |
|
|
|
} |
|
|
|
MallCooUserInfo mallCooUserInfo = this.getByPhone(basicInfo.getPhone(), basicInfo.getFinalTenantId()); |
|
|
|
if(mallCooUserInfo == null){ |
|
|
|
@@ -109,6 +112,16 @@ public class MallCooUserInfoServiceImpl implements MallCooUserInfoService { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void pullByMobileMsg(TenantEntity tenantEntity, Long id) { |
|
|
|
FmInsideBasicUserPushMsg basicUserPushMsg = new FmInsideBasicUserPushMsg(); |
|
|
|
basicUserPushMsg.setMsgType(EnumMsgRecordType.MALL_COO_USER_PUSH.getCode()); |
|
|
|
basicUserPushMsg.updateTenantInfo(tenantEntity); |
|
|
|
basicUserPushMsg.setBasicUserId(id); |
|
|
|
logger.info(">>>>>>>>>>>send pullByMobileMsg :"+basicUserPushMsg); |
|
|
|
mqBaseProducer.sendMessage(basicUserPushMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); |
|
|
|
} |
|
|
|
|
|
|
|
private WxThirdPartyConfig getThirdPartyConfig(TenantEntity tenantEntity){ |
|
|
|
WxThirdPartyConfig configQ = new WxThirdPartyConfig(); |
|
|
|
configQ.updateTenantInfo(tenantEntity); |
|
|
|
|