fix:新建shop门店新增storeId,建店携带storeId
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user