Merge branch 'cc_20250916_new' into 'master'

fix:获取门店信息开放接口新增收货信息字段

See merge request hangzhou/java/custom_zxjp!162
This commit is contained in:
苏竹红
2025-09-19 09:10:23 +00:00
4 changed files with 35 additions and 10 deletions

View File

@@ -45,6 +45,10 @@
<result column="store_type" property="storeType" jdbcType="TINYINT"/> <result column="store_type" property="storeType" jdbcType="TINYINT"/>
<result column="mini_program_order_store_name" property="miniProgramOrderStoreName"/> <result column="mini_program_order_store_name" property="miniProgramOrderStoreName"/>
<result column="is_iot" property="isIot" jdbcType="TINYINT"/> <result column="is_iot" property="isIot" jdbcType="TINYINT"/>
<result column="addressee_name" property="addresseeName" jdbcType="VARCHAR"/>
<result column="addressee_mobile" property="addresseeMobile" jdbcType="VARCHAR"/>
<result column="addressee_area" property="addresseeArea" jdbcType="VARCHAR"/>
<result column="addressee_address" property="addresseeAddress" jdbcType="VARCHAR"/>
</resultMap> </resultMap>
<select id="getByStoreId" resultMap="BaseResultMap"> <select id="getByStoreId" resultMap="BaseResultMap">

View File

@@ -43,4 +43,13 @@ public class StoreDTO {
private String longitude; private String longitude;
private String latitude; private String latitude;
@ApiModelProperty("订货人")
private String addresseeName;
@ApiModelProperty("手机号")
private String addresseeMobile;
@ApiModelProperty("收件省市区")
private String addresseeArea;
@ApiModelProperty("订货地址")
private String addresseeAddress;
} }

View File

@@ -242,4 +242,24 @@ public class StoreDO {
* 是否接入物联网 * 是否接入物联网
*/ */
private Integer isIot; private Integer isIot;
/**
* 收件人
*/
private String addresseeName;
/**
* 手机号
*/
private String addresseeMobile;
/**
* 收件省市区
*/
private String addresseeArea;
/**
* 收件详细地址
*/
private String addresseeAddress;
} }

View File

@@ -1,5 +1,6 @@
package com.cool.store.service.impl; package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil; import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
@@ -362,22 +363,13 @@ public class StoreServiceImpl implements StoreService {
public static List<StoreDTO> processStores(List<StoreDO> stores) { public static List<StoreDTO> processStores(List<StoreDO> stores) {
// 处理每个门店 // 处理每个门店
return stores.stream().map(store -> { return stores.stream().map(store -> {
StoreDTO dto = new StoreDTO(); StoreDTO dto = BeanUtil.toBean(store, StoreDTO.class);
dto.setStoreName(store.getStoreName());
dto.setStoreCode(store.getStoreNum()); dto.setStoreCode(store.getStoreNum());
dto.setStoreAddress(store.getStoreAddress());
dto.setStoreAvatar(store.getAvatar()); dto.setStoreAvatar(store.getAvatar());
dto.setTelephone(store.getTelephone());
dto.setMonthlyRent(store.getMonthlyRent());
dto.setMonthlyPersonnelSalary(store.getMonthlyPersonnelSalary());
dto.setMonthlyOtherExpenses(store.getMonthlyOtherExpenses());
dto.setUnifiedManagement(store.getUnifiedManagement());
dto.setStoreType(StoreTypeEnum.getMessage(store.getStoreType())); dto.setStoreType(StoreTypeEnum.getMessage(store.getStoreType()));
dto.setJoinMode(JoinModeEnum.getByCode(store.getJoinModel())); dto.setJoinMode(JoinModeEnum.getByCode(store.getJoinModel()));
dto.setBrand(FranchiseBrandEnum.getDescByCode(store.getJoinBrand())); dto.setBrand(FranchiseBrandEnum.getDescByCode(store.getJoinBrand()));
dto.setOrderMiniProgramName(store.getMiniProgramOrderStoreName()); dto.setOrderMiniProgramName(store.getMiniProgramOrderStoreName());
dto.setLongitude(store.getLongitude());
dto.setLatitude(store.getLatitude());
return dto; return dto;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
} }