增加字段 所属管理区域
This commit is contained in:
@@ -1,8 +1,10 @@
|
|||||||
package com.cool.store.dao;
|
package com.cool.store.dao;
|
||||||
|
|
||||||
|
import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils;
|
||||||
import com.cool.store.dto.RegionNode;
|
import com.cool.store.dto.RegionNode;
|
||||||
import com.cool.store.entity.RegionDO;
|
import com.cool.store.entity.RegionDO;
|
||||||
import com.cool.store.mapper.RegionMapper;
|
import com.cool.store.mapper.RegionMapper;
|
||||||
|
import com.cool.store.response.RegionResponse;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.google.common.collect.Maps;
|
import com.google.common.collect.Maps;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
@@ -187,4 +189,10 @@ public class RegionDao {
|
|||||||
}
|
}
|
||||||
return regionMapper.getRegionByStoreId(storeId);
|
return regionMapper.getRegionByStoreId(storeId);
|
||||||
}
|
}
|
||||||
|
public List<RegionResponse> getSubRegionByParentIdAndRegionType (Long regionId, String regionType){
|
||||||
|
if (Objects.isNull(regionId)|| StringUtils.isBlank(regionType)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return regionMapper.getSubRegionByParentIdAndRegionType(regionId, regionType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.mapper;
|
|||||||
|
|
||||||
import com.cool.store.dto.RegionNode;
|
import com.cool.store.dto.RegionNode;
|
||||||
import com.cool.store.entity.RegionDO;
|
import com.cool.store.entity.RegionDO;
|
||||||
|
import com.cool.store.response.RegionResponse;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@@ -110,4 +111,6 @@ public interface RegionMapper {
|
|||||||
List<RegionDO> getFightRegionByRegionIds(@Param("regionIds") List<String> regionIds);
|
List<RegionDO> getFightRegionByRegionIds(@Param("regionIds") List<String> regionIds);
|
||||||
|
|
||||||
RegionDO getRegionInfoBySynDingDeptId(@Param("synDingDeptId") Long synDingDeptId);
|
RegionDO getRegionInfoBySynDingDeptId(@Param("synDingDeptId") Long synDingDeptId);
|
||||||
|
|
||||||
|
List<RegionResponse> getSubRegionByParentIdAndRegionType( @Param("regionId")Long regionId, @Param("regionType")String regionType);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -420,6 +420,14 @@
|
|||||||
</if>
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getSubRegionByParentIdAndRegionType" resultType="com.cool.store.response.RegionResponse">
|
||||||
|
select
|
||||||
|
<include refid="fields"></include>
|
||||||
|
from region_${enterpriseId}
|
||||||
|
where deleted = 0
|
||||||
|
and parent_id = #{regionId}
|
||||||
|
and region_type = #{regionType}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
<result column="city_code" jdbcType="INTEGER" property="cityCode"/>
|
<result column="city_code" jdbcType="INTEGER" property="cityCode"/>
|
||||||
<result column="district" jdbcType="VARCHAR" property="district"/>
|
<result column="district" jdbcType="VARCHAR" property="district"/>
|
||||||
<result column="district_code" jdbcType="INTEGER" property="districtCode"/>
|
<result column="district_code" jdbcType="INTEGER" property="districtCode"/>
|
||||||
<result column="manager_supervisor" jdbcType="VARCHAR" property="managerSupervisor"/>
|
<result column="manager_region_id" jdbcType="BIGINT" property="managerRegionId"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="allColumn">
|
<sql id="allColumn">
|
||||||
@@ -44,7 +44,7 @@
|
|||||||
shop_code, store_num, shop_manager_user_id, supervisor_user_id,
|
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,
|
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
|
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_supervisor
|
, province,province_code,city,city_code,district,district_code,manager_region_id
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
<insert id="batchAddShop" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||||
@@ -303,6 +303,7 @@
|
|||||||
a.franchise_brand as franchiseBrand,
|
a.franchise_brand as franchiseBrand,
|
||||||
a.shop_status as shopStatus,
|
a.shop_status as shopStatus,
|
||||||
a.detail_address as shopAddress
|
a.detail_address as shopAddress
|
||||||
|
a.manager_region_id as managerRegionId
|
||||||
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
from xfsg_shop_info a left join xfsg_line_info b on a.line_id = b.id
|
||||||
<if test="request.contractStartTime !=null and request.contractEndTime != null">
|
<if test="request.contractStartTime !=null and request.contractEndTime != null">
|
||||||
left join xfsg_sign_franchise c on a.id = c.shop_id
|
left join xfsg_sign_franchise c on a.id = c.shop_id
|
||||||
|
|||||||
@@ -53,5 +53,7 @@ public class PreparationDTO {
|
|||||||
|
|
||||||
private Long pointId;
|
private Long pointId;
|
||||||
|
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -149,6 +149,7 @@ public class ShopInfoDO {
|
|||||||
//区code
|
//区code
|
||||||
@Column(name = "district_code")
|
@Column(name = "district_code")
|
||||||
private Integer districtCode;
|
private Integer districtCode;
|
||||||
@Column(name = "manager_supervisor")
|
//所属管理区域
|
||||||
private String managerSupervisor;
|
@Column(name = "manager_region_id")
|
||||||
|
private Long managerRegionId;
|
||||||
}
|
}
|
||||||
@@ -44,6 +44,10 @@ public class AddBranchShopRequest {
|
|||||||
@ApiModelProperty("所属大区")
|
@ApiModelProperty("所属大区")
|
||||||
private Long regionId;
|
private Long regionId;
|
||||||
|
|
||||||
|
@NotNull
|
||||||
|
@ApiModelProperty("所属管理区域id")
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
public ShopInfoDO toDO(AddBranchShopRequest request, LineInfoDO lineInfo) {
|
public ShopInfoDO toDO(AddBranchShopRequest request, LineInfoDO lineInfo) {
|
||||||
ShopInfoDO shopInfoDO = new ShopInfoDO();
|
ShopInfoDO shopInfoDO = new ShopInfoDO();
|
||||||
shopInfoDO.setLineId(request.getLineId());
|
shopInfoDO.setLineId(request.getLineId());
|
||||||
@@ -60,6 +64,7 @@ public class AddBranchShopRequest {
|
|||||||
shopInfoDO.setShopStage(ShopStageEnum.SHOP_STAGE_1.getShopStage());
|
shopInfoDO.setShopStage(ShopStageEnum.SHOP_STAGE_1.getShopStage());
|
||||||
shopInfoDO.setPartnerId(lineInfo.getPartnerId());
|
shopInfoDO.setPartnerId(lineInfo.getPartnerId());
|
||||||
shopInfoDO.setFranchiseBrand(request.getFranchiseBrand());
|
shopInfoDO.setFranchiseBrand(request.getFranchiseBrand());
|
||||||
|
shopInfoDO.setManagerRegionId(request.getManagerRegionId());
|
||||||
return shopInfoDO;
|
return shopInfoDO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -141,6 +141,11 @@ public class AddSignFranchiseRequest {
|
|||||||
@ApiModelProperty("区code")
|
@ApiModelProperty("区code")
|
||||||
private Integer districtCode;
|
private Integer districtCode;
|
||||||
|
|
||||||
|
@NotNull(message = "所属管理区域id不能为空")
|
||||||
|
@ApiModelProperty("所属管理区域id")
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public SignFranchiseDO toSignFranchiseDO() {
|
public SignFranchiseDO toSignFranchiseDO() {
|
||||||
SignFranchiseDO signFranchiseDO = new SignFranchiseDO();
|
SignFranchiseDO signFranchiseDO = new SignFranchiseDO();
|
||||||
|
|||||||
@@ -36,5 +36,7 @@ public class BranchShopDetailRequest {
|
|||||||
@ApiModelProperty("店铺类型:0-无展示门店、1-餐厅店、2-普通门店")
|
@ApiModelProperty("店铺类型:0-无展示门店、1-餐厅店、2-普通门店")
|
||||||
@NotNull(message = "门店类型不能为空")
|
@NotNull(message = "门店类型不能为空")
|
||||||
private Integer storeType;
|
private Integer storeType;
|
||||||
|
@ApiModelProperty("所属管理区域id")
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,5 +229,10 @@ public class AddSignFranchiseResponse {
|
|||||||
@ApiModelProperty("区code")
|
@ApiModelProperty("区code")
|
||||||
private Integer districtCode;
|
private Integer districtCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属管理区域id")
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属管理区域name")
|
||||||
|
private String managerRegionName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -73,4 +73,11 @@ public class BranchShopDetailResponse {
|
|||||||
@ApiModelProperty("店铺类型:0-无展示门店、1-餐厅店、2-普通门店")
|
@ApiModelProperty("店铺类型:0-无展示门店、1-餐厅店、2-普通门店")
|
||||||
private Integer storeType;
|
private Integer storeType;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属管理区域id")
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属管理区域name")
|
||||||
|
private String managerRegionName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -55,6 +55,12 @@ public class BranchShopResponse {
|
|||||||
private Date createTime;
|
private Date createTime;
|
||||||
@ApiModelProperty("开业活动完成时间")
|
@ApiModelProperty("开业活动完成时间")
|
||||||
private Date openingActivityEndTime;
|
private Date openingActivityEndTime;
|
||||||
|
@ApiModelProperty("所属管理区域id")
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属管理区域name")
|
||||||
|
private String managerRegionName;
|
||||||
|
|
||||||
|
|
||||||
public void setDays() {
|
public void setDays() {
|
||||||
if (this.openingActivityEndTime==null){
|
if (this.openingActivityEndTime==null){
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.response;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2025/07/11/11:25
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class RegionResponse {
|
||||||
|
@ApiModelProperty("区域id")
|
||||||
|
private String regionId;
|
||||||
|
@ApiModelProperty("区域名称")
|
||||||
|
private String name;
|
||||||
|
}
|
||||||
@@ -62,6 +62,13 @@ public class MiniShopPageVO {
|
|||||||
private String wantRegionName;
|
private String wantRegionName;
|
||||||
@ApiModelProperty("门店状态'0.跟进中 1.已完成 2.已放弃',")
|
@ApiModelProperty("门店状态'0.跟进中 1.已完成 2.已放弃',")
|
||||||
private Integer shopStatus;
|
private Integer shopStatus;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属管理区域id")
|
||||||
|
private Long managerRegionId;
|
||||||
|
|
||||||
|
@ApiModelProperty("所属管理区域name")
|
||||||
|
private String managerRegionName;
|
||||||
|
|
||||||
public MiniShopPageVO(Long shopId, String shopName, String shopCode, Boolean flag, Long pointId, Long regionId, String regionName) {
|
public MiniShopPageVO(Long shopId, String shopName, String shopCode, Boolean flag, Long pointId, Long regionId, String regionName) {
|
||||||
this.shopId = shopId;
|
this.shopId = shopId;
|
||||||
this.shopName = shopName;
|
this.shopName = shopName;
|
||||||
@@ -101,6 +108,8 @@ public class MiniShopPageVO {
|
|||||||
miniShopPageVO.setWantRegionName(wantRegionMap.get(shopInfo.getWantShopAreaId()));
|
miniShopPageVO.setWantRegionName(wantRegionMap.get(shopInfo.getWantShopAreaId()));
|
||||||
}
|
}
|
||||||
miniShopPageVO.setShopStatus(shopInfo.getShopStatus());
|
miniShopPageVO.setShopStatus(shopInfo.getShopStatus());
|
||||||
|
miniShopPageVO.setManagerRegionId(shopInfo.getManagerRegionId());
|
||||||
|
miniShopPageVO.setManagerRegionName(regionNameMap.getOrDefault(shopInfo.getManagerRegionId(), ""));
|
||||||
resultList.add(miniShopPageVO);
|
resultList.add(miniShopPageVO);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,4 +76,10 @@ public interface DataHandlerServer {
|
|||||||
*/
|
*/
|
||||||
Boolean batchStatusRefreshYls(BatchStatusRefreshDTO batchStatusRefreshDTO);
|
Boolean batchStatusRefreshYls(BatchStatusRefreshDTO batchStatusRefreshDTO);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/7/11
|
||||||
|
* @description:处理老数据 已经建店并且在标品中也建店的数据 处理所属管理区域
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
import com.cool.store.entity.RegionDO;
|
import com.cool.store.entity.RegionDO;
|
||||||
|
import com.cool.store.response.RegionResponse;
|
||||||
import com.cool.store.vo.RegionPathNameVO;
|
import com.cool.store.vo.RegionPathNameVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -40,4 +41,11 @@ public interface RegionService {
|
|||||||
*/
|
*/
|
||||||
List<String> getSubRegionIdsByRegionIds(List<String> regionIds);
|
List<String> getSubRegionIdsByRegionIds(List<String> regionIds);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2025/7/11
|
||||||
|
* @description:获取某区域下的所有子区域
|
||||||
|
*/
|
||||||
|
List<RegionResponse> getSubRegionByParentId(Long regionId);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.cool.store.enums.ErrorCodeEnum;
|
|||||||
import com.cool.store.enums.ThirdRegionTypeEnum;
|
import com.cool.store.enums.ThirdRegionTypeEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.RegionMapper;
|
import com.cool.store.mapper.RegionMapper;
|
||||||
|
import com.cool.store.response.RegionResponse;
|
||||||
import com.cool.store.service.RegionService;
|
import com.cool.store.service.RegionService;
|
||||||
import com.cool.store.utils.RedisConstantUtil;
|
import com.cool.store.utils.RedisConstantUtil;
|
||||||
import com.cool.store.utils.RedisUtilPool;
|
import com.cool.store.utils.RedisUtilPool;
|
||||||
@@ -158,4 +159,13 @@ public class RegionServiceImpl implements RegionService {
|
|||||||
}
|
}
|
||||||
return regionIds;
|
return regionIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RegionResponse> getSubRegionByParentId(Long regionId) {
|
||||||
|
if (Objects.isNull(regionId)){
|
||||||
|
return Lists.newArrayList();
|
||||||
|
}
|
||||||
|
return regionMapper.getSubRegionByParentIdAndRegionType(regionId,"path");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -196,6 +196,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_8.getShopSubStage());
|
||||||
Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
Map<Long, ShopStageInfoDO> stageMap = subStageList.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, Function.identity()));
|
||||||
List<Long> regionIds = shopList.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toList());
|
List<Long> regionIds = shopList.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toList());
|
||||||
|
regionIds.addAll(Optional.of(shopList).orElse(Collections.emptyList()).stream().map(ShopInfoDO::getManagerRegionId).collect(Collectors.toList()));
|
||||||
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
Map<Long, String> regionNameMap = regionDao.getRegionNameMap(regionIds);
|
||||||
List<String> investmentManagerIds = shopList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toList());
|
List<String> investmentManagerIds = shopList.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||||
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(investmentManagerIds);
|
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(investmentManagerIds);
|
||||||
@@ -391,9 +392,14 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
EnterpriseUserDO invest = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
EnterpriseUserDO invest = enterpriseUserDAO.getUserInfoById(shopInfo.getInvestmentManager());
|
||||||
List<ScheduleDTO> shopContractActualCompletionTime = shopStageInfoDAO.getScheduleList(Collections.singletonList(shopId));
|
List<ScheduleDTO> shopContractActualCompletionTime = shopStageInfoDAO.getScheduleList(Collections.singletonList(shopId));
|
||||||
RegionNode shopRegion = regionMapper.getRegionByRegionId(shopInfo.getRegionId().toString());
|
RegionNode shopRegion = regionMapper.getRegionByRegionId(shopInfo.getRegionId().toString());
|
||||||
|
RegionNode mapperRegionByRegionId = regionMapper.getRegionByRegionId(shopInfo.getManagerRegionId().toString());
|
||||||
String wantShopArea = hyOpenAreaInfoDAO.selectNameMapById(shopInfo.getWantShopAreaId());
|
String wantShopArea = hyOpenAreaInfoDAO.selectNameMapById(shopInfo.getWantShopAreaId());
|
||||||
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(shopInfo.getWantShopAreaId());
|
HyOpenAreaInfoDO hyOpenAreaInfoDO = hyOpenAreaInfoDAO.selectById(shopInfo.getWantShopAreaId());
|
||||||
BranchShopDetailResponse response = new BranchShopDetailResponse();
|
BranchShopDetailResponse response = new BranchShopDetailResponse();
|
||||||
|
response.setManagerRegionId(shopInfo.getManagerRegionId());
|
||||||
|
if (Objects.nonNull(mapperRegionByRegionId)) {
|
||||||
|
response.setManagerRegionName(mapperRegionByRegionId.getName());
|
||||||
|
}
|
||||||
response.setUsername(lineInfo.getUsername());
|
response.setUsername(lineInfo.getUsername());
|
||||||
response.setMobile(lineInfo.getMobile());
|
response.setMobile(lineInfo.getMobile());
|
||||||
response.setShopId(shopId);
|
response.setShopId(shopId);
|
||||||
@@ -433,6 +439,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
shopInfo.setJoinMode(request.getJoinMode());
|
shopInfo.setJoinMode(request.getJoinMode());
|
||||||
shopInfo.setFranchiseBrand(request.getFranchiseBrand());
|
shopInfo.setFranchiseBrand(request.getFranchiseBrand());
|
||||||
shopInfo.setStoreType(request.getStoreType());
|
shopInfo.setStoreType(request.getStoreType());
|
||||||
|
shopInfo.setManagerRegionId(request.getManagerRegionId());
|
||||||
return shopInfoDAO.updateShopInfo(shopInfo);
|
return shopInfoDAO.updateShopInfo(shopInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -514,6 +521,7 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
return new PageInfo<>();
|
return new PageInfo<>();
|
||||||
}
|
}
|
||||||
List<Long> regionIds = preparations.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
|
List<Long> regionIds = preparations.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
|
||||||
|
regionIds.addAll(Optional.of(preparations).orElse(Collections.emptyList()).stream().map(PreparationDTO::getManagerRegionId).collect(Collectors.toList()))
|
||||||
List<Long> wantShopAreaIds = preparations.stream().map(PreparationDTO::getWantShopAreaId).collect(Collectors.toList());
|
List<Long> wantShopAreaIds = preparations.stream().map(PreparationDTO::getWantShopAreaId).collect(Collectors.toList());
|
||||||
List<String> investmentManagerIds = preparations.stream().map(PreparationDTO::getInvestmentManager).collect(Collectors.toList());
|
List<String> investmentManagerIds = preparations.stream().map(PreparationDTO::getInvestmentManager).collect(Collectors.toList());
|
||||||
List<Long> shopIds = preparations.stream().map(PreparationDTO::getId).collect(Collectors.toList());
|
List<Long> shopIds = preparations.stream().map(PreparationDTO::getId).collect(Collectors.toList());
|
||||||
@@ -548,6 +556,8 @@ public class ShopServiceImpl implements ShopService {
|
|||||||
response.setShopStatus(ShopStatusEnum.getDesc(dto.getShopStatus()));
|
response.setShopStatus(ShopStatusEnum.getDesc(dto.getShopStatus()));
|
||||||
response.setCreateTime(dto.getCreateTime());
|
response.setCreateTime(dto.getCreateTime());
|
||||||
response.setDays();
|
response.setDays();
|
||||||
|
response.setManagerRegionId(dto.getManagerRegionId());
|
||||||
|
response.setManagerRegionName(regionNameMap.getOrDefault(dto.getManagerRegionId(), ""));
|
||||||
responses.add(response);
|
responses.add(response);
|
||||||
}
|
}
|
||||||
pageInfo.setList(responses);
|
pageInfo.setList(responses);
|
||||||
|
|||||||
@@ -267,6 +267,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
|
|
||||||
private void updateShopAndPoint(AddSignFranchiseRequest request, ShopInfoDO shopInfoDO, PointInfoDO pointInfoById) {
|
private void updateShopAndPoint(AddSignFranchiseRequest request, ShopInfoDO shopInfoDO, PointInfoDO pointInfoById) {
|
||||||
//店铺信息
|
//店铺信息
|
||||||
|
shopInfoDO.setManagerRegionId(request.getManagerRegionId());
|
||||||
shopInfoDO.setRegionId(request.getRegionId());
|
shopInfoDO.setRegionId(request.getRegionId());
|
||||||
shopInfoDO.setShopName(request.getShopName());
|
shopInfoDO.setShopName(request.getShopName());
|
||||||
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
||||||
@@ -462,6 +463,9 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
|
|
||||||
RegionDO regionInfo = regionMapper.getByRegionId(shopInfoDO.getRegionId());
|
RegionDO regionInfo = regionMapper.getByRegionId(shopInfoDO.getRegionId());
|
||||||
|
|
||||||
|
RegionDO managerRegion = regionMapper.getByRegionId(shopInfoDO.getManagerRegionId());
|
||||||
|
|
||||||
|
|
||||||
// if (Objects.nonNull(pointInfoDO)) {
|
// if (Objects.nonNull(pointInfoDO)) {
|
||||||
// // addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
// // addSignFranchiseResponse.setStoreAddress(pointInfoDO.getAddress());
|
||||||
// if (StringUtils.isNoneBlank(pointInfoDO.getLatitude(), pointInfoDO.getLongitude())) {
|
// if (StringUtils.isNoneBlank(pointInfoDO.getLatitude(), pointInfoDO.getLongitude())) {
|
||||||
@@ -478,6 +482,10 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
addSignFranchiseResponse.setProvinceCode(shopInfoDO.getProvinceCode());
|
addSignFranchiseResponse.setProvinceCode(shopInfoDO.getProvinceCode());
|
||||||
addSignFranchiseResponse.setCityCode(shopInfoDO.getCityCode());
|
addSignFranchiseResponse.setCityCode(shopInfoDO.getCityCode());
|
||||||
addSignFranchiseResponse.setDistrictCode(shopInfoDO.getDistrictCode());
|
addSignFranchiseResponse.setDistrictCode(shopInfoDO.getDistrictCode());
|
||||||
|
addSignFranchiseResponse.setManagerRegionId(shopInfoDO.getManagerRegionId());
|
||||||
|
if (Objects.nonNull(managerRegion)){
|
||||||
|
addSignFranchiseResponse.setManagerRegionName(managerRegion.getName());
|
||||||
|
}
|
||||||
if (Objects.nonNull(signFranchiseDO)) {
|
if (Objects.nonNull(signFranchiseDO)) {
|
||||||
addSignFranchiseResponse.setId(signFranchiseDO.getId());
|
addSignFranchiseResponse.setId(signFranchiseDO.getId());
|
||||||
addSignFranchiseResponse.setShopId(signFranchiseDO.getShopId());
|
addSignFranchiseResponse.setShopId(signFranchiseDO.getShopId());
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.cool.store.controller.webb;
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
import com.cool.store.entity.RegionDO;
|
import com.cool.store.entity.RegionDO;
|
||||||
|
import com.cool.store.response.RegionResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
import com.cool.store.service.RegionService;
|
import com.cool.store.service.RegionService;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
@@ -46,4 +47,11 @@ public class RegionController {
|
|||||||
return ResponseResult.success(regionService.getBelongWarRegionName(regionId));
|
return ResponseResult.success(regionService.getBelongWarRegionName(regionId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("过去下级区域")
|
||||||
|
@GetMapping("/getSubRegionByParentId")
|
||||||
|
public ResponseResult<List<RegionResponse>> getSubRegionByParentId(@RequestParam(value = "regionId", required = true) Long regionId) {
|
||||||
|
return ResponseResult.success(regionService.getSubRegionByParentId(regionId));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user