Merge branch 'cc_20251029_smz' into 'master'
所属大区新增品牌筛选 See merge request hangzhou/java/custom_zxjp!190
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cool.store.dao;
|
||||
import com.cool.store.dto.region.BigRegionDTO;
|
||||
import com.cool.store.entity.BigRegionDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.FranchiseBrandEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.BigRegionMapper;
|
||||
import com.cool.store.request.QueryBigRegionRequest;
|
||||
@@ -12,6 +13,7 @@ import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -25,8 +27,8 @@ public class BigRegionDAO {
|
||||
@Resource
|
||||
BigRegionMapper bigRegionMapper;
|
||||
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword);
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand){
|
||||
return bigRegionMapper.queryAllBigRegion(keyword, joinBrand);
|
||||
}
|
||||
|
||||
public BigRegionDO queryOrgInfoByBigRegionAndJoinMode(Long regionId, Integer joinMode){
|
||||
|
||||
@@ -15,7 +15,7 @@ public interface BigRegionMapper extends Mapper<BigRegionDO> {
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
List<BigRegionDTO> queryAllBigRegion(String keyword);
|
||||
List<BigRegionDTO> queryAllBigRegion(@Param("keyword") String keyword, @Param("joinBrand") Integer joinBrand);
|
||||
|
||||
/**
|
||||
* 根据所属大区与加盟模式查询新管家信息
|
||||
|
||||
@@ -38,6 +38,9 @@
|
||||
<if test="keyword!=null and keyword !=''">
|
||||
and region_name like CONCAT('%',#{keyword},'%')
|
||||
</if>
|
||||
<if test="joinBrand != null">
|
||||
and join_brand = #{joinBrand}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -70,6 +70,12 @@ public class BigRegionDO {
|
||||
@Column(name = "hqt_region_name")
|
||||
private String hqtRegionName;
|
||||
|
||||
/**
|
||||
* 加盟品牌
|
||||
*/
|
||||
@Column(name = "join_brand")
|
||||
private Integer joinBrand;
|
||||
|
||||
public String getHqtRegionName() {
|
||||
return hqtRegionName;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public interface BigRegionService {
|
||||
* @param keyword 关键字
|
||||
* @return
|
||||
*/
|
||||
List<BigRegionDTO> queryAllBigRegion(String keyword);
|
||||
List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand);
|
||||
|
||||
/**
|
||||
* 根据门店所属大区和加盟模式查询新管家对应组织信息
|
||||
|
||||
@@ -25,8 +25,8 @@ public class BigRegionServiceImpl implements BigRegionService {
|
||||
BigRegionDAO bigRegionDAO;
|
||||
|
||||
@Override
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword){
|
||||
return bigRegionDAO.queryAllBigRegion(keyword);
|
||||
public List<BigRegionDTO> queryAllBigRegion(String keyword, Integer joinBrand){
|
||||
return bigRegionDAO.queryAllBigRegion(keyword, joinBrand);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1170,7 +1170,7 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
||||
shopInfoDO.setManagerRegionId(isCreateStoreDTO.getPid());
|
||||
updateList.add(shopInfoDO);
|
||||
}
|
||||
List<BigRegionDTO> bigRegionDTOS = bigRegionDAO.queryAllBigRegion(null);
|
||||
List<BigRegionDTO> bigRegionDTOS = bigRegionDAO.queryAllBigRegion(null, null);
|
||||
Map<Long, BigRegionDTO> bigRegionDTOMap = bigRegionDTOS.stream().collect(Collectors.toMap(BigRegionDTO::getRegionId, x -> x));
|
||||
//XX大区 正烧鸡
|
||||
List<Long> storeManageIds = bigRegionDTOS.stream().filter(x -> x.getStoreManageRegionId() != null).map(BigRegionDTO::getStoreManageRegionId).collect(Collectors.toList());
|
||||
|
||||
@@ -28,8 +28,9 @@ public class BigRegionController {
|
||||
|
||||
@PostMapping("/queryAllBigRegion")
|
||||
@ApiOperation("获取所有可选择的大区")
|
||||
public ResponseResult<List<BigRegionDTO>> queryContentInfo(@RequestParam(required = false) String keyword) {
|
||||
return ResponseResult.success(bigRegionService.queryAllBigRegion(keyword));
|
||||
public ResponseResult<List<BigRegionDTO>> queryContentInfo(@RequestParam(required = false) String keyword,
|
||||
@RequestParam(required = false) Integer joinBrand) {
|
||||
return ResponseResult.success(bigRegionService.queryAllBigRegion(keyword, joinBrand));
|
||||
}
|
||||
|
||||
@PostMapping("/queryBigRegion")
|
||||
|
||||
Reference in New Issue
Block a user