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

This commit is contained in:
苏竹红
2025-04-11 21:06:13 +08:00
4 changed files with 23 additions and 14 deletions

View File

@@ -3,6 +3,7 @@ package com.cool.store.dao;
import com.cool.store.entity.HomeTemplateUserMappingDO;
import com.cool.store.mapper.HomeTemplateUserMappingMapper;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.entity.Example;
@@ -24,6 +25,9 @@ public class HomeTemplateUserMappingDAO {
return homeTemplateUserMappingMapper.insertSelective(homeTemplateRoleMappingDO);
}
public HomeTemplateUserMappingDO getHomeTemplateRoleMappingByUserId(String userId) {
if (StringUtils.isBlank(userId)){
return null;
}
Example example = new Example(HomeTemplateUserMappingDO.class);
example.createCriteria().andEqualTo("userId", userId);
return homeTemplateUserMappingMapper.selectOneByExample(example);

View File

@@ -27,12 +27,12 @@ import java.util.*;
import java.util.stream.Collectors;
/**
* @author EDY
* @description 针对表【xfsg_build_information(建店资料表)】的数据库操作Service实现
* @createDate 2024-10-09 14:05:52
*/
* @author EDY
* @description 针对表【xfsg_build_information(建店资料表)】的数据库操作Service实现
* @createDate 2024-10-09 14:05:52
*/
@Service
public class BuildInformationServiceImpl implements BuildInformationService{
public class BuildInformationServiceImpl implements BuildInformationService {
@Resource
private BuildInformationDAO buildInformationDAO;
@@ -56,6 +56,7 @@ public class BuildInformationServiceImpl implements BuildInformationService{
private OrderSysInfoDAO orderSysInfoDAO;
@Resource
private WarehouseInfoMapper warehouseInfoMapper;
@Override
public BuildInformationResponse getBuildInformation(Long shopId) {
BuildInformationResponse response = new BuildInformationResponse();
@@ -78,7 +79,7 @@ public class BuildInformationServiceImpl implements BuildInformationService{
extracted(response, informationDO);
}
OrderSysInfoDO orderSysInfoDO = orderSysInfoDAO.selectByShopId(shopId);
if (Objects.nonNull(orderSysInfoDO)){
if (Objects.nonNull(orderSysInfoDO)) {
response.setAddresseeName(orderSysInfoDO.getAddresseeName());
response.setAddresseeMobile(orderSysInfoDO.getAddresseeMobile());
response.setXgjVicePresident(orderSysInfoDO.getXgjVicePresident());
@@ -95,7 +96,9 @@ public class BuildInformationServiceImpl implements BuildInformationService{
response.setReceivingMsBankBranch(orderSysInfoDO.getReceivingMsBankBranch());
response.setBankUnionPayAccount(orderSysInfoDO.getBankUnionPayAccount());
WarehouseInfoDO warehouseInfoDO = warehouseInfoMapper.getByCode(orderSysInfoDO.getDeclareGoodsLogisticsWarehouse());
response.setDeclareGoodsLogisticsWarehouseName(warehouseInfoDO.getWarehouseName());
if (Objects.nonNull(warehouseInfoDO)) {
response.setDeclareGoodsLogisticsWarehouseName(warehouseInfoDO.getWarehouseName());
}
}
return response;
@@ -145,19 +148,19 @@ public class BuildInformationServiceImpl implements BuildInformationService{
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
HashMap<String, String> map = new HashMap<>();
map.put("partnerUsername",lineInfoDO.getUsername());
map.put("partnerMobile",lineInfoDO.getMobile());
map.put("storeName",shopInfoDO.getShopName());
map.put("partnerUsername", lineInfoDO.getUsername());
map.put("partnerMobile", lineInfoDO.getMobile());
map.put("storeName", shopInfoDO.getShopName());
List<EnterpriseUserDO> logisticsList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.LOGISTICS, shopInfoDO.getRegionId());
List<String> logistics = new ArrayList<>();
if (Objects.nonNull(logisticsList)){
if (Objects.nonNull(logisticsList)) {
logistics.addAll(logisticsList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
}
commonService.sendQWMessage(logistics,
MessageEnum.MESSAGE_52,
map);
return buildInformationDAO.insertSelective(buildInformationDO);
}else {
} else {
buildInformationDO.setUpdateTime(new Date());
return buildInformationDAO.updateByShopIdSelective(buildInformationDO);
}

View File

@@ -7,10 +7,13 @@ import com.cool.store.dao.HomeTemplateUserMappingDAO;
import com.cool.store.entity.HomeTemplateDO;
import com.cool.store.entity.HomeTemplateUserMappingDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.response.HomeTemplateResponse;
import com.cool.store.service.HomeTemplateService;
import com.cool.store.service.HomeTemplateUserMappingService;
import com.cool.store.utils.poi.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

View File

@@ -59,8 +59,7 @@ public class SignValidateFilter implements Filter {
"/zxjp/mini/program/v1/partnerManage/openArea/areaApplyQuery",
"/zxjp/**/api/audit/result",
"/zxjp/**/api/license",
"/zxjp/mini/line/getRegionPayPic",
"/zxjp/mini/**"
"/zxjp/mini/line/getRegionPayPic"
);