增加接口

This commit is contained in:
shuo.wang
2025-04-11 19:45:04 +08:00
parent 841dcb1d0d
commit 212b178104

View File

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