成功开店代码改造

This commit is contained in:
shuo.wang
2025-07-03 10:58:37 +08:00
parent 80966b3ddb
commit 8a4dd5693e
5 changed files with 62 additions and 40 deletions

View File

@@ -0,0 +1,22 @@
package com.cool.store.request;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @Author: WangShuo
* @Date: 2025/07/03/10:54
* @Version 1.0
* @注释:
*/
@Data
public class ShopListSuccessOpenRequest {
@NotNull
private Long lineId;
private Integer pageNum = 1;
private Integer pageSize = 10 ;
private String storeName;
}

View File

@@ -107,7 +107,7 @@ public interface ShopService {
Boolean dataHandler(Long shopId); Boolean dataHandler(Long shopId);
PageInfo<MiniShopsResponse> getShopListSuccessOpen(Long lineId,Integer pageNum,Integer pageSize,String storeName); PageInfo<MiniShopsResponse> getShopListSuccessOpen(ShopListSuccessOpenRequest request);
ShopResponse getShopNameAndCode(Long shopId,Long lineId); ShopResponse getShopNameAndCode(Long shopId,Long lineId);

View File

@@ -600,7 +600,11 @@ public class ShopServiceImpl implements ShopService {
} }
@Override @Override
public PageInfo<MiniShopsResponse> getShopListSuccessOpen(Long lineId,Integer pageNum,Integer pageSize,String storeName) { public PageInfo<MiniShopsResponse> getShopListSuccessOpen(ShopListSuccessOpenRequest request) {
Long lineId = request.getLineId();
Integer pageNum = request.getPageNum();
Integer pageSize = request.getPageSize();
String storeName = request.getStoreName();
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId); LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(lineId);
PageInfo<MiniShopsResponse> storeListByMobile = storeService.getStoreListByMobile(lineInfoDO.getMobile(), pageNum, pageSize, storeName); PageInfo<MiniShopsResponse> storeListByMobile = storeService.getStoreListByMobile(lineInfoDO.getMobile(), pageNum, pageSize, storeName);
if (CollectionUtils.isEmpty(storeListByMobile.getList())) { if (CollectionUtils.isEmpty(storeListByMobile.getList())) {

View File

@@ -82,7 +82,7 @@ public class StoreServiceImpl implements StoreService {
List<SysRoleDO> sysRoleDOS = roleIds.stream().filter(role -> "store_inside".equals(role.getPositionType())).collect(Collectors.toList()); List<SysRoleDO> sysRoleDOS = roleIds.stream().filter(role -> "store_inside".equals(role.getPositionType())).collect(Collectors.toList());
List<String> regionIds = new ArrayList<>(); List<String> regionIds = new ArrayList<>();
if (CollectionUtils.isNotEmpty(sysRoleDOS)){ if (CollectionUtils.isNotEmpty(sysRoleDOS)){
//获取用户管辖门店 //获取用户管辖区域
List<UserAuthMappingDO> userAuthMapping = userAuthMappingService.listUserAuthMappingByUserId(enterpriseUserDO.getUserId()); List<UserAuthMappingDO> userAuthMapping = userAuthMappingService.listUserAuthMappingByUserId(enterpriseUserDO.getUserId());
if (CollectionUtils.isNotEmpty(userAuthMapping)){ if (CollectionUtils.isNotEmpty(userAuthMapping)){
regionIds.addAll(userAuthMapping.stream().map(UserAuthMappingDO::getMappingId).collect(Collectors.toList())); regionIds.addAll(userAuthMapping.stream().map(UserAuthMappingDO::getMappingId).collect(Collectors.toList()));

View File

@@ -116,13 +116,9 @@ public class MiniShopController {
return ResponseResult.success(pointService.updateRentContract(request)); return ResponseResult.success(pointService.updateRentContract(request));
} }
@ApiOperation("成功开店的门店") @ApiOperation("成功开店的门店")
@GetMapping("/getShopListSuccessOpen") @PostMapping("/getShopListSuccessOpen")
public ResponseResult<PageInfo<MiniShopsResponse>> getShopListSuccessOpen(@RequestParam("lineId")Long lineId, public ResponseResult<PageInfo<MiniShopsResponse>> getShopListSuccessOpen(@RequestBody @Validated ShopListSuccessOpenRequest request ) {
@RequestParam(value = "pageSize",defaultValue = "10")Integer pageSize, return ResponseResult.success(shopService.getShopListSuccessOpen(request));
@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum,
@RequestParam(value = "storeName",required = false,defaultValue = "") String storeName
) {
return ResponseResult.success(shopService.getShopListSuccessOpen(lineId,pageNum,pageSize,storeName));
} }
@ApiOperation("获取推荐铺位和我创建的") @ApiOperation("获取推荐铺位和我创建的")