增加接口

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;
/**
* @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);
}