getUserInfo
This commit is contained in:
@@ -23,6 +23,7 @@ import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.vo.PartnerBaseInfoVO;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -38,6 +39,7 @@ import java.util.Date;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
|
||||
@Resource
|
||||
@@ -76,6 +78,8 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
*/
|
||||
@Override
|
||||
public Boolean submitPartnerBaseInfo(PartnerBaseInfoRequest request, PartnerUserInfoVO currentUser) {
|
||||
log.info("HyPartnerBaseInfoServiceImpl#submitPartnerBaseInfo request:{}", JSONObject.toJSONString(request));
|
||||
|
||||
String cacheKey = MessageFormat.format(RedisConstant.PARTNER_BASEINFO_CACHE_KEY, request.getPartnerId(), request.getPartnerLineId());
|
||||
if(!request.getSubmitFlag()){
|
||||
// 自动保存时
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
package com.cool.store.service.impl;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.HyOpenAreaInfoDAO;
|
||||
import com.cool.store.dao.HyPartnerUserInfoDAO;
|
||||
@@ -13,6 +14,7 @@ import com.cool.store.service.HyPartnerLineInfoService;
|
||||
import com.cool.store.service.PartnerUserInfoService;
|
||||
import com.cool.store.vo.ApplyBaseInfoVO;
|
||||
import com.cool.store.vo.InviteCodeDetailVO;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@@ -21,6 +23,7 @@ import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
||||
|
||||
@Autowired
|
||||
@@ -76,6 +79,7 @@ public class PartnerUserInfoServiceImpl implements PartnerUserInfoService {
|
||||
|
||||
@Override
|
||||
public ApplyBaseInfoVO updatePartnerUserInfo(PartnerUserInfoRequest partnerUserInfoRequest) {
|
||||
log.info("PartnerUserInfoServiceImpl#updatePartnerUserInfo partnerUserInfoRequest:{}", JSONObject.toJSONString(partnerUserInfoRequest));
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByPartnerId(String.valueOf(partnerUserInfoRequest.getPartnerId()));
|
||||
if (hyPartnerUserInfoDO == null){
|
||||
throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);
|
||||
|
||||
@@ -109,6 +109,9 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
hyPartnerUserPlatformBindDO.setBindTime(new Date());
|
||||
hyPartnerUserPlatformBindDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
hyPartnerUserPlatformBindDAO.insertSelective(hyPartnerUserPlatformBindDO);
|
||||
}else if(!hyPartnerUserPlatformBindDO.getPartnerId().equals(hyPartnerUserInfoDO.getPartnerId())){
|
||||
hyPartnerUserPlatformBindDO.setPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
hyPartnerUserPlatformBindDAO.updateByPrimaryKeySelective(hyPartnerUserPlatformBindDO);
|
||||
}
|
||||
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
||||
HyPartnerLineInfoDO lineInfoDO = hyPartnerLineInfoDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
@@ -171,7 +174,7 @@ public class WechatMiniAppServiceImpl implements WechatMiniAppService {
|
||||
HyPartnerUserInfoDO hyPartnerUserInfoDO = hyPartnerUserInfoDAO.selectByMobile(mobile);
|
||||
BeanUtil.copyProperties(hyPartnerUserInfoDO, userInfoVO);
|
||||
HyPartnerUserPlatformBindDO hyPartnerUserPlatformBindDO = hyPartnerUserPlatformBindDAO.getByPartnerId(hyPartnerUserInfoDO.getPartnerId());
|
||||
userInfoVO.setOpenid(hyPartnerUserPlatformBindDO.getPlatformUserId());
|
||||
userInfoVO.setOpenid(hyPartnerUserPlatformBindDO != null ? hyPartnerUserPlatformBindDO.getPlatformUserId() : "");
|
||||
if(StringUtils.isNotBlank(hyPartnerUserInfoDO.getWantShopArea())){
|
||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(Long.valueOf(hyPartnerUserInfoDO.getWantShopArea()));
|
||||
userInfoVO.setWantShopAreaName(hyOpenAreaInfoDO.getAreaPath().replace("/", " ").trim());
|
||||
|
||||
Reference in New Issue
Block a user