Merge remote-tracking branch 'origin/cc_20230520_partner' into cc_20230520_partner
This commit is contained in:
@@ -220,4 +220,6 @@ public class RedisConstant {
|
|||||||
|
|
||||||
public static final String DEVICE_OPEN_TOKEN = "device_open_token:{0}:{1}:{2}";
|
public static final String DEVICE_OPEN_TOKEN = "device_open_token:{0}:{1}:{2}";
|
||||||
|
|
||||||
|
public static final String PHONE_NUMBER= "phone_number_";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,4 +90,9 @@ public class RedisConstantUtil {
|
|||||||
public String getRegionNameListKey(String eid, String regionId) {
|
public String getRegionNameListKey(String eid, String regionId) {
|
||||||
return active + "_" + RedisConstant.REGION_ALL_NAME_CACHE + eid + ":" + regionId;
|
return active + "_" + RedisConstant.REGION_ALL_NAME_CACHE + eid + ":" + regionId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPhoneNumber(String phoneNumber) {
|
||||||
|
|
||||||
|
return active + "_" + RedisConstant.PHONE_NUMBER + phoneNumber;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -401,6 +401,7 @@
|
|||||||
|
|
||||||
<select id="getPublicSeaLineList" resultType="com.cool.store.dto.partner.PublicSeaLineDTO">
|
<select id="getPublicSeaLineList" resultType="com.cool.store.dto.partner.PublicSeaLineDTO">
|
||||||
select
|
select
|
||||||
|
a.id as lineId,
|
||||||
a.create_time as createTime,
|
a.create_time as createTime,
|
||||||
b.partner_id as partner_id,
|
b.partner_id as partner_id,
|
||||||
b.mobile as mobile,
|
b.mobile as mobile,
|
||||||
@@ -408,7 +409,7 @@
|
|||||||
b.want_shop_area as wantShopArea,
|
b.want_shop_area as wantShopArea,
|
||||||
b.accept_adjust_type as acceptAdjustType
|
b.accept_adjust_type as acceptAdjustType
|
||||||
FROM hy_partner_line_info a inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
|
FROM hy_partner_line_info a inner JOIN hy_partner_user_info b on a.partner_id = b.partner_id
|
||||||
where a.line_status = 1
|
where a.line_status = 0
|
||||||
<if test="userNameKeyword!=null and userNameKeyword!=''">
|
<if test="userNameKeyword!=null and userNameKeyword!=''">
|
||||||
and b.username like concat('%',#{userNameKeyword},'%')
|
and b.username like concat('%',#{userNameKeyword},'%')
|
||||||
</if>
|
</if>
|
||||||
@@ -519,7 +520,7 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getFollowCountList" resultType="com.cool.store.dto.partner.LineCountDTO">
|
<select id="getFollowCountList" resultType="com.cool.store.dto.partner.LineCountDTO">
|
||||||
SELECT partner_id, COUNT(1) AS num_of_leads
|
SELECT partner_id, IFNULL(COUNT(1), 0) AS followCount
|
||||||
FROM hy_partner_line_info
|
FROM hy_partner_line_info
|
||||||
GROUP BY partner_id;
|
GROUP BY partner_id;
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ public class BlackListVO {
|
|||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
@ApiModelProperty("加盟商用户ID")
|
@ApiModelProperty("加盟商用户ID")
|
||||||
private String partnerUserId;
|
private String partnerId;
|
||||||
|
|
||||||
@ApiModelProperty("加盟商用户名称")
|
@ApiModelProperty("加盟商用户名称")
|
||||||
private String partnerUserName;
|
private String partnerUserName;
|
||||||
|
|||||||
@@ -13,11 +13,14 @@ import com.cool.store.enums.IDCardSideEnum;
|
|||||||
import com.cool.store.exception.ApiException;
|
import com.cool.store.exception.ApiException;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.service.AliyunService;
|
import com.cool.store.service.AliyunService;
|
||||||
|
import com.cool.store.utils.RedisConstantUtil;
|
||||||
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
import com.cool.store.vo.cuser.IdentityCardInfoVO;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.net.MalformedURLException;
|
import java.net.MalformedURLException;
|
||||||
@@ -37,9 +40,18 @@ import java.util.Optional;
|
|||||||
@Service
|
@Service
|
||||||
public class AliyunServiceImpl implements AliyunService {
|
public class AliyunServiceImpl implements AliyunService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
RedisUtilPool redisUtilPool;
|
||||||
|
@Resource
|
||||||
|
RedisConstantUtil redisConstantUtil;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DescribePhoneNumberDTO getPhoneNumberAttribute(String phoneNumber) {
|
public DescribePhoneNumberDTO getPhoneNumberAttribute(String phoneNumber) {
|
||||||
try {
|
try {
|
||||||
|
String phone = redisUtilPool.getString(redisConstantUtil.getPhoneNumber(phoneNumber));
|
||||||
|
if (StringUtils.isNotEmpty(phone)){
|
||||||
|
return JSONObject.parseObject(phone, DescribePhoneNumberDTO.class);
|
||||||
|
}
|
||||||
Config config = new Config();
|
Config config = new Config();
|
||||||
//todo zcb ak sk替换
|
//todo zcb ak sk替换
|
||||||
config.accessKeyId = "LTAI5t9RaXvABZbHvoXjDFJ1";
|
config.accessKeyId = "LTAI5t9RaXvABZbHvoXjDFJ1";
|
||||||
@@ -55,6 +67,8 @@ public class AliyunServiceImpl implements AliyunService {
|
|||||||
log.error("错误信息:" , response.body.message + "");
|
log.error("错误信息:" , response.body.message + "");
|
||||||
throw new ServiceException(ErrorCodeEnum.GET_PHONENUMBER_INFO_ERROR);
|
throw new ServiceException(ErrorCodeEnum.GET_PHONENUMBER_INFO_ERROR);
|
||||||
}
|
}
|
||||||
|
//保存到redis
|
||||||
|
redisUtilPool.setString(redisConstantUtil.getPhoneNumber(phoneNumber),JSONObject.toJSONString(response.body.data));
|
||||||
return JSONObject.parseObject(JSONObject.toJSONString(response.body.data), DescribePhoneNumberDTO.class);
|
return JSONObject.parseObject(JSONObject.toJSONString(response.body.data), DescribePhoneNumberDTO.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取手机号异常:", e);
|
log.error("获取手机号异常:", e);
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.request.CloseFollowRequest;
|
import com.cool.store.request.CloseFollowRequest;
|
||||||
import com.cool.store.request.LineRequest;
|
import com.cool.store.request.LineRequest;
|
||||||
import com.cool.store.request.PrivateSeaLineListRequest;
|
import com.cool.store.request.PrivateSeaLineListRequest;
|
||||||
|
import com.cool.store.service.AliyunService;
|
||||||
import com.cool.store.service.EnterpriseUserService;
|
import com.cool.store.service.EnterpriseUserService;
|
||||||
import com.cool.store.service.HyPartnerLineInfoService;
|
import com.cool.store.service.HyPartnerLineInfoService;
|
||||||
import com.cool.store.utils.CoolDateUtils;
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
@@ -58,6 +59,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
HyOpenAreaInfoDAO hyOpenAreaInfoDAO;
|
||||||
@Resource
|
@Resource
|
||||||
EnterpriseUserService enterpriseUserService;
|
EnterpriseUserService enterpriseUserService;
|
||||||
|
@Resource
|
||||||
|
AliyunService aliyunService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public StageCountVO selectStagePendingCount(String userId) {
|
public StageCountVO selectStagePendingCount(String userId) {
|
||||||
@@ -286,8 +289,8 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
publicSeaLineListVo.setCreateTime(x.getCreateTime());
|
publicSeaLineListVo.setCreateTime(x.getCreateTime());
|
||||||
publicSeaLineListVo.setPartnerUserName(x.getUserName());
|
publicSeaLineListVo.setPartnerUserName(x.getUserName());
|
||||||
publicSeaLineListVo.setPartnerUserPhone(x.getMobile());
|
publicSeaLineListVo.setPartnerUserPhone(x.getMobile());
|
||||||
// TODO: 2023/6/15 手机号归属地
|
DescribePhoneNumberDTO phoneNumberAttribute = aliyunService.getPhoneNumberAttribute(x.getMobile());
|
||||||
publicSeaLineListVo.setPhoneAddress("");
|
publicSeaLineListVo.setPhoneAddress(phoneNumberAttribute.getCity());
|
||||||
publicSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
publicSeaLineListVo.setWantShopArea(x.getWantShopArea());
|
||||||
publicSeaLineListVo.setId(x.getLineId());
|
publicSeaLineListVo.setId(x.getLineId());
|
||||||
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
publicSeaLineListVo.setAcceptAdjustType(x.getAcceptAdjustType());
|
||||||
@@ -445,7 +448,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
|||||||
public BlackListVO convertPartnerBlackListDTOToVo(PartnerBlackListDTO partnerBlackListDTO){
|
public BlackListVO convertPartnerBlackListDTOToVo(PartnerBlackListDTO partnerBlackListDTO){
|
||||||
BlackListVO blackListVO = new BlackListVO();
|
BlackListVO blackListVO = new BlackListVO();
|
||||||
blackListVO.setId(partnerBlackListDTO.getLineId());
|
blackListVO.setId(partnerBlackListDTO.getLineId());
|
||||||
blackListVO.setPartnerUserId(partnerBlackListDTO.getPartnerId());
|
blackListVO.setPartnerId(partnerBlackListDTO.getPartnerId());
|
||||||
blackListVO.setPartnerUserName(partnerBlackListDTO.getPartnerUserName());
|
blackListVO.setPartnerUserName(partnerBlackListDTO.getPartnerUserName());
|
||||||
blackListVO.setPartnerUserPhone(partnerBlackListDTO.getMobile());
|
blackListVO.setPartnerUserPhone(partnerBlackListDTO.getMobile());
|
||||||
blackListVO.setCreateTime(partnerBlackListDTO.getCreateTime());
|
blackListVO.setCreateTime(partnerBlackListDTO.getCreateTime());
|
||||||
|
|||||||
@@ -68,4 +68,8 @@ xxl.job.executor.ip =
|
|||||||
xxl.job.executor.port = 31001
|
xxl.job.executor.port = 31001
|
||||||
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
xxl.job.executor.logpath = logs/xxl-job/jobhandler
|
||||||
xxl.job.executor.logretentiondays = 3
|
xxl.job.executor.logretentiondays = 3
|
||||||
xxl.job.accessToken =
|
xxl.job.accessToken =
|
||||||
|
|
||||||
|
hs.mdm.baseUrl=http://10.56.21.30/
|
||||||
|
hs.mdm.appkey = HSAYPartner
|
||||||
|
hs.mdm.appsec = ab39fedb886fa3587c7f517551976de8b2606f5511fd8f8675266825d74c5cd3
|
||||||
|
|||||||
Reference in New Issue
Block a user