fix:新建shop门店新增storeId,建店携带storeId

This commit is contained in:
wangff
2025-11-12 18:39:52 +08:00
parent c99c4375d7
commit e6e57d6304
5 changed files with 13 additions and 3 deletions

View File

@@ -17,6 +17,7 @@ import com.cool.store.mapper.ShopInfoMapper;
import com.cool.store.request.*;
import com.cool.store.response.MiniShopsResponse;
import com.cool.store.response.PlatformBuildListResponse;
import com.cool.store.utils.UUIDUtils;
import com.cool.store.vo.shop.StageShopCountVO;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
@@ -54,6 +55,7 @@ public class ShopInfoDAO {
if(CollectionUtils.isEmpty(shopInfoList)){
return CommonConstants.ZERO;
}
shopInfoList.forEach(v -> v.setStoreId(UUIDUtils.get32UUID()));
return shopInfoMapper.batchAddShop(shopInfoList);
}
@@ -96,6 +98,7 @@ public class ShopInfoDAO {
*/
public Long addShopInfo(ShopInfoDO shopInfo){
shopInfoMapper.insertSelective(shopInfo);
shopInfo.setStoreId(UUIDUtils.get32UUID());
return shopInfo.getId();
}

View File

@@ -38,6 +38,7 @@
<result column="manager_region_id" jdbcType="BIGINT" property="managerRegionId"/>
<result column="shop_decoration_attributes" jdbcType="INTEGER" property="shopDecorationAttributes"/>
<result column="hqt_shop_id" jdbcType="VARCHAR" property="hqtShopId"/>
<result column="store_id" jdbcType="VARCHAR" property="storeId"/>
</resultMap>
<sql id="allColumn">
@@ -46,17 +47,17 @@
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
plan_open_time, cur_progress, shop_type, shop_stage, deleted, create_time, update_time,
join_mode,detail_address,franchise_brand,development_manager,want_shop_area_id,investment_manager,shop_status,create_user_id,update_user_id,store_type
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id
, province,province_code,city,city_code,district,district_code,manager_region_id,shop_decoration_attributes,hqt_shop_id,store_id
</sql>
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
insert into xfsg_shop_info(region_id, line_id, partner_id, shop_name,
store_num,supervisor_user_id,create_time,join_mode,franchise_brand,
development_manager,want_shop_area_id,investment_manager) values
development_manager,want_shop_area_id,investment_manager,store_id) values
<foreach collection="shopInfoList" item="shop" separator=",">
(#{shop.regionId}, #{shop.lineId}, #{shop.partnerId}, #{shop.shopName},
#{shop.storeNum},#{shop.supervisorUserId},#{shop.createTime},#{shop.joinMode},#{shop.franchiseBrand},#{shop.developmentManager},
#{shop.wantShopAreaId},#{shop.investmentManager})
#{shop.wantShopAreaId},#{shop.investmentManager},#{shop.storeId})
</foreach>
</insert>

View File

@@ -158,4 +158,7 @@ public class ShopInfoDO {
//红圈通门店id
@Column(name = "hqt_shop_id")
private String hqtShopId;
// 门店id
@Column(name = "store_id")
private String storeId;
}

View File

@@ -16,6 +16,8 @@ import java.util.Date;
public class StoreMasterDTO {
private String enterpriseId;
@ApiModelProperty("门店id")
private String storeId;
@ApiModelProperty("门店名称(加盟签约)")
private String storeName;

View File

@@ -103,6 +103,7 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
return;
}
storeMasterDTO.setEnterpriseId(eid);
storeMasterDTO.setStoreId(shopInfo.getStoreId());
storeMasterDTO.setStoreStatus("not_open");
storeMasterDTO.setStoreName(shopInfo.getShopName());
storeMasterDTO.setStoreNum(shopInfo.getShopCode());