Commit b79ed83f by jinxin

Merge remote-tracking branch 'origin/master' into bugfix/2023-07-25

parents 2207a9aa df21c235
...@@ -11,8 +11,8 @@ import com.gic.haoban.manage.service.pojo.bo.content.InteractRecordBO; ...@@ -11,8 +11,8 @@ import com.gic.haoban.manage.service.pojo.bo.content.InteractRecordBO;
import com.gic.haoban.manage.service.pojo.bo.content.InteractRecordExtendInfoBO; import com.gic.haoban.manage.service.pojo.bo.content.InteractRecordExtendInfoBO;
import com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerBO; import com.gic.haoban.manage.service.pojo.bo.content.PotentialCustomerBO;
import com.gic.haoban.manage.service.pojo.bo.content.context.InteractRecordMessageContext; import com.gic.haoban.manage.service.pojo.bo.content.context.InteractRecordMessageContext;
import com.gic.store.goods.dto.goods.mall.MallGoodsInfoDTO; import com.gic.store.goods.dto.goods.GoodsSpuInfoDTO;
import com.gic.store.goods.dto.qdto.mall.MallGoodsListQDTO; import com.gic.store.goods.dto.qdto.GoodsListQDTO;
import com.gic.store.goods.service.GoodsCenterApiService; import com.gic.store.goods.service.GoodsCenterApiService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
...@@ -117,12 +117,13 @@ public class InteractRecordBuilder { ...@@ -117,12 +117,13 @@ public class InteractRecordBuilder {
if (CollectionUtils.isEmpty(visitGoodsIds)) { if (CollectionUtils.isEmpty(visitGoodsIds)) {
return Collections.emptyList(); return Collections.emptyList();
} }
MallGoodsListQDTO goodsListQDTO = new MallGoodsListQDTO(); GoodsListQDTO goodsListQDTO = new GoodsListQDTO();
goodsListQDTO.setEnterpriseId(enterpriseId); goodsListQDTO.setEnterpriseId(enterpriseId);
goodsListQDTO.setIncludeGoodsIds(visitGoodsIds); goodsListQDTO.setIncludeGoodsIds(visitGoodsIds);
goodsListQDTO.setPageSize(visitGoodsIds.size() + 1); goodsListQDTO.setPageSize(visitGoodsIds.size() + 1);
// 0删除 1仓库 2上架 3回收站 ServiceResponse<Page<GoodsSpuInfoDTO>> serviceResponse =
ServiceResponse<Page<MallGoodsInfoDTO>> serviceResponse = goodsCenterApiService.queryMallGoodsList(goodsListQDTO); goodsCenterApiService.queryStoreGoodsList(goodsListQDTO);
// 1:已上线,2:未上线,3:回收站
if (!serviceResponse.isSuccess()) { if (!serviceResponse.isSuccess()) {
log.info("查询商品异常 {}", JSON.toJSONString(serviceResponse)); log.info("查询商品异常 {}", JSON.toJSONString(serviceResponse));
return Collections.emptyList(); return Collections.emptyList();
......
...@@ -705,7 +705,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -705,7 +705,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
String clerkId = staffClerkRelationDTO.getClerkId(); String clerkId = staffClerkRelationDTO.getClerkId();
String clerkCode = staffClerkRelationDTO.getClerkCode(); String clerkCode = staffClerkRelationDTO.getClerkCode();
String enterpriseId = staffClerkRelationDTO.getEnterpriseId(); String enterpriseId = staffClerkRelationDTO.getEnterpriseId();
ClerkDTO clerk = clerkService.getClerkByClerkCode(enterpriseId, clerkCode); //统一根据导购id查询
ClerkDTO clerk = clerkService.getClerkByClerkId(clerkId);
log.info("【新增外部联系人】创建member,clerkCode={},unionid:{}", clerkCode, unionId); log.info("【新增外部联系人】创建member,clerkCode={},unionid:{}", clerkCode, unionId);
if (clerk == null) { if (clerk == null) {
log.info("【新增外部联系人】创建member,导购为空返回:{}", clerkCode); log.info("【新增外部联系人】创建member,导购为空返回:{}", clerkCode);
...@@ -1850,14 +1851,14 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -1850,14 +1851,14 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
log.info("好友不同开平:{}", JSONObject.toJSONString(externalUserDTO)); log.info("好友不同开平:{}", JSONObject.toJSONString(externalUserDTO));
return this.saveExternalUser(externalUserDTO); return this.saveExternalUser(externalUserDTO);
} }
String clerkCode = staffClerkRelationDTO.getClerkCode(); //统一根据导购id查询
ClerkDTO clerk = clerkService.getClerkByClerkCode(staffClerkRelationDTO.getEnterpriseId(), clerkCode); ClerkDTO clerk = clerkService.getClerkByClerkId(clerkId);
if (clerk == null) { if (clerk == null) {
return "导购不存在:" + clerkCode; return "导购不存在:" + clerkId;
} }
String qrcodeParam = clerk.getQrcodeParam(); String qrcodeParam = clerk.getQrcodeParam();
if (StringUtils.isBlank(qrcodeParam)) { if (StringUtils.isBlank(qrcodeParam)) {
log.info("导购码不存在:" + clerkCode); log.info("导购码不存在:" + clerkId);
qrcodeParam = "clerk_clerk_"+clerk.getClerkId() ; qrcodeParam = "clerk_clerk_"+clerk.getClerkId() ;
} }
String memberId = this.getMeberId(enterpriseId, externalUserDTO.getUnionId(), externalUserDTO.getName(), externalUserDTO.getAvatar(), qrcodeParam, externalUserDTO.getExternalUserId(), wxEnterpriseRelated.getWxEnterpriseType(), 1) ; String memberId = this.getMeberId(enterpriseId, externalUserDTO.getUnionId(), externalUserDTO.getName(), externalUserDTO.getAvatar(), qrcodeParam, externalUserDTO.getExternalUserId(), wxEnterpriseRelated.getWxEnterpriseType(), 1) ;
......
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
import com.gic.enterprise.api.dto.StoreDTO; import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService; import com.gic.enterprise.api.service.StoreService;
...@@ -47,7 +48,8 @@ public class MaidianLogController extends WebBaseController { ...@@ -47,7 +48,8 @@ public class MaidianLogController extends WebBaseController {
} }
StoreDTO store = storeService.getStore(maidianLogDTO.getStoreId()); StoreDTO store = storeService.getStore(maidianLogDTO.getStoreId());
if (store != null) { if (store != null) {
com.gic.clerk.api.dto.ClerkDTO clerkDTO = clerkService.getClerkByClerkCode(store.getEnterpriseId(), maidianLogDTO.getClerkCode()); //统一根据导购id查询
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(maidianLogDTO.getClerkId());
maidianLogDTO.setEnterpriseId(store.getEnterpriseId()); maidianLogDTO.setEnterpriseId(store.getEnterpriseId());
if (clerkDTO != null) { if (clerkDTO != null) {
//导购变更门店 //导购变更门店
......
...@@ -114,7 +114,8 @@ public class StoreController extends WebBaseController { ...@@ -114,7 +114,8 @@ public class StoreController extends WebBaseController {
logger.info("非当前商户,直接跳过={},{}", gicEnterpriseId, enterpriseId); logger.info("非当前商户,直接跳过={},{}", gicEnterpriseId, enterpriseId);
continue; continue;
} }
ClerkDTO clerk = clerkService.getClerkByClerkCode(enterpriseId, staffClerkRelationDTO.getClerkCode()); //统一根据导购id查询
ClerkDTO clerk = clerkService.getClerkByClerkId(staffClerkRelationDTO.getClerkId());
if (clerk == null) { if (clerk == null) {
continue; continue;
} }
......
...@@ -234,7 +234,7 @@ public class WxStaffController extends WebBaseController { ...@@ -234,7 +234,7 @@ public class WxStaffController extends WebBaseController {
List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId, List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId,
enterpriseId, clerkCodeList); enterpriseId, clerkCodeList);
Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream() Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream()
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s)); .collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
List<StoreClerkVO> resultList = new ArrayList<>(); List<StoreClerkVO> resultList = new ArrayList<>();
for (ClerkDTO dto : clerkDTOS) { for (ClerkDTO dto : clerkDTOS) {
String clerkCode = dto.getClerkCode(); String clerkCode = dto.getClerkCode();
...@@ -244,7 +244,7 @@ public class WxStaffController extends WebBaseController { ...@@ -244,7 +244,7 @@ public class WxStaffController extends WebBaseController {
vo.setClerkType(dto.getClerkType()); vo.setClerkType(dto.getClerkType());
vo.setClerkImg(dto.getImageUrl()); vo.setClerkImg(dto.getImageUrl());
vo.setClerkName(dto.getClerkName()); vo.setClerkName(dto.getClerkName());
StaffClerkRelationDTO related = bindCodeMap.get(clerkCode); StaffClerkRelationDTO related = bindCodeMap.get(dto.getClerkId());
if (related != null) { if (related != null) {
vo.setStaffId(related.getStaffId()); vo.setStaffId(related.getStaffId());
vo.setBindFlag(1); vo.setBindFlag(1);
...@@ -1097,13 +1097,13 @@ public class WxStaffController extends WebBaseController { ...@@ -1097,13 +1097,13 @@ public class WxStaffController extends WebBaseController {
List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId, List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId,
enterpriseId, clerkCodeList); enterpriseId, clerkCodeList);
Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream() Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream()
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s)); .collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
List<BindClerkVO> bindList = new ArrayList<>(); List<BindClerkVO> bindList = new ArrayList<>();
List<BindClerkVO> unBindList = new ArrayList<>(); List<BindClerkVO> unBindList = new ArrayList<>();
for (ClerkDTO dto : list) { for (ClerkDTO dto : list) {
BindClerkVO vo = EntityUtil.changeEntityNew(BindClerkVO.class, dto); BindClerkVO vo = EntityUtil.changeEntityNew(BindClerkVO.class, dto);
if (bindCodeMap.containsKey(dto.getClerkCode())) { if (bindCodeMap.containsKey(dto.getClerkId())) {
String staffId = bindCodeMap.get(dto.getClerkCode()).getStaffId(); String staffId = bindCodeMap.get(dto.getClerkId()).getStaffId();
StaffDTO staffDTO = staffApiService.selectById(staffId); StaffDTO staffDTO = staffApiService.selectById(staffId);
vo.setStaffId(staffId); vo.setStaffId(staffId);
String phoneNumber = dto.getPhoneNumber(); String phoneNumber = dto.getPhoneNumber();
...@@ -1146,13 +1146,13 @@ public class WxStaffController extends WebBaseController { ...@@ -1146,13 +1146,13 @@ public class WxStaffController extends WebBaseController {
List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId, List<StaffClerkRelationDTO> bindRelationList = staffClerkRelationApiService.listBindCode(wxEnterpriseId,
enterpriseId, clerkCodeList); enterpriseId, clerkCodeList);
Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream() Map<String, StaffClerkRelationDTO> bindCodeMap = bindRelationList.stream()
.collect(Collectors.toMap(StaffClerkRelationDTO::getClerkCode, s -> s)); .collect(Collectors.toMap(StaffClerkRelationDTO::getClerkId, s -> s));
List<BindClerkVO> bindList = new ArrayList<>(); List<BindClerkVO> bindList = new ArrayList<>();
List<BindClerkVO> unBindList = new ArrayList<>(); List<BindClerkVO> unBindList = new ArrayList<>();
for (ClerkDTO dto : list) { for (ClerkDTO dto : list) {
BindClerkVO vo = EntityUtil.changeEntityByJSON(BindClerkVO.class, dto); BindClerkVO vo = EntityUtil.changeEntityByJSON(BindClerkVO.class, dto);
if (bindCodeMap.containsKey(dto.getClerkCode())) { if (bindCodeMap.containsKey(dto.getClerkId())) {
String staffId = bindCodeMap.get(dto.getClerkCode()).getStaffId(); String staffId = bindCodeMap.get(dto.getClerkId()).getStaffId();
StaffDTO staffDTO = staffApiService.selectById(staffId); StaffDTO staffDTO = staffApiService.selectById(staffId);
vo.setStaffId(staffId); vo.setStaffId(staffId);
vo.setNationCode(dto.getNationcode()); vo.setNationCode(dto.getNationcode());
...@@ -1193,8 +1193,8 @@ public class WxStaffController extends WebBaseController { ...@@ -1193,8 +1193,8 @@ public class WxStaffController extends WebBaseController {
staffId); staffId);
String storeId = mainDTO == null ? "" : mainDTO.getStoreId(); String storeId = mainDTO == null ? "" : mainDTO.getStoreId();
for (StaffClerkRelationDTO staffClerkRelationDTO : bindRelationList) { for (StaffClerkRelationDTO staffClerkRelationDTO : bindRelationList) {
ClerkDTO clerk = clerkService.getClerkByClerkCode(staffClerkRelationDTO.getEnterpriseId(), //统一根据导购id查询
staffClerkRelationDTO.getClerkCode()); ClerkDTO clerk = clerkService.getClerkByClerkId(staffClerkRelationDTO.getClerkId());
if (clerk != null) { if (clerk != null) {
StoreDTO store = storeService.getStore(clerk.getStoreId()); StoreDTO store = storeService.getStore(clerk.getStoreId());
// 主门店标志 // 主门店标志
...@@ -1606,7 +1606,8 @@ public class WxStaffController extends WebBaseController { ...@@ -1606,7 +1606,8 @@ public class WxStaffController extends WebBaseController {
logger.info("非当前商户,直接跳过={},{}", gicEnterpriseId, enterpriseId); logger.info("非当前商户,直接跳过={},{}", gicEnterpriseId, enterpriseId);
continue; continue;
} }
ClerkDTO clerk = clerkService.getClerkByClerkCode(enterpriseId, staffClerkRelationDTO.getClerkCode()); //统一根据导购id查询
ClerkDTO clerk = clerkService.getClerkByClerkId(staffClerkRelationDTO.getClerkId());
if (clerk == null) { if (clerk == null) {
continue; continue;
} }
......
...@@ -47,8 +47,6 @@ public class GoodsInfoAdaptor { ...@@ -47,8 +47,6 @@ public class GoodsInfoAdaptor {
GoodsListQDTO searchQdto = new GoodsListQDTO(); GoodsListQDTO searchQdto = new GoodsListQDTO();
searchQdto.setEnterpriseId(enterpriseId); searchQdto.setEnterpriseId(enterpriseId);
searchQdto.setGoodsNameText(search); searchQdto.setGoodsNameText(search);
// 只查询ERP的
searchQdto.setSourceType(1);
searchQdto.setPageNum(1); searchQdto.setPageNum(1);
searchQdto.setPageSize(1000); searchQdto.setPageSize(1000);
ServiceResponse<Page<GoodsSpuInfoDTO>> serviceResponse = goodsInfoOutApiService.queryGoodsInfoList(searchQdto); ServiceResponse<Page<GoodsSpuInfoDTO>> serviceResponse = goodsInfoOutApiService.queryGoodsInfoList(searchQdto);
......
...@@ -99,6 +99,13 @@ public class ContentMaterialInfoVO implements Serializable { ...@@ -99,6 +99,13 @@ public class ContentMaterialInfoVO implements Serializable {
private Integer duration; private Integer duration;
/**
* 商品来源
* @see com.gic.store.goods.enums.GoodsSourceTypeEnum
*/
private Integer sourceType;
public Long getContentMaterialId() { public Long getContentMaterialId() {
return contentMaterialId; return contentMaterialId;
} }
...@@ -226,4 +233,12 @@ public class ContentMaterialInfoVO implements Serializable { ...@@ -226,4 +233,12 @@ public class ContentMaterialInfoVO implements Serializable {
public void setDuration(Integer duration) { public void setDuration(Integer duration) {
this.duration = duration; this.duration = duration;
} }
public Integer getSourceType() {
return sourceType;
}
public void setSourceType(Integer sourceType) {
this.sourceType = sourceType;
}
} }
...@@ -66,5 +66,11 @@ public class SimpleGoodsInfoVO implements Serializable { ...@@ -66,5 +66,11 @@ public class SimpleGoodsInfoVO implements Serializable {
*/ */
private BigDecimal commission; private BigDecimal commission;
/**
* 商品来源
* @see com.gic.store.goods.enums.GoodsSourceTypeEnum
*/
private Integer sourceType;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment