分店申请列表接口增加

This commit is contained in:
Jack 2026-01-12 18:22:58 +08:00
parent 85846c6b8f
commit 3891469582
10 changed files with 99 additions and 16 deletions

View File

@ -38,11 +38,14 @@ public class ShopMchEntryBranch implements Serializable {
@ApiModelProperty(value = "拉卡拉终端号")
private String lkl_term_no;
@ApiModelProperty(value = "审核关联号", required = true)
private String review_related_id;
@ApiModelProperty(value = "商户登录手机号")
private String login_mobile;
@ApiModelProperty(value = "审核关联号", required = true)
private String review_related_id;
@ApiModelProperty(value = "分店名称")
private String store_name;
@ApiModelProperty(value = "请求拉卡拉参数")
private String lkl_req;

View File

@ -49,6 +49,7 @@ public class SFExpressAdminController {
public CommonResult createSfExpressShopNotify(@RequestBody JSONObject requestBody) {
Pair<Boolean, String> result = sfExpressApiService.createSfExpressShopInner(
requestBody.getInt("store_id"),
"",
requestBody.getStr("shop_name"),
requestBody.getStr("city_name"),
requestBody.getStr("shop_address"),

View File

@ -47,6 +47,7 @@ public interface SFExpressApiService {
* 创建顺丰同城普通型店铺直调顺丰同城的接口脱离我们的业务
*
* @param storeId 商家门店ID
* @param supplierId 商家平台ID
* @param shopName 店名
* @param cityName 城市
* @param shopAddress 店铺详细地址
@ -56,7 +57,7 @@ public interface SFExpressApiService {
* @param latitude 纬度
* @return Pair<Boolean, String> 第一个元素表示是否成功第二个元素表示结果信息或错误信息
*/
Pair<Boolean, String> createSfExpressShopInner(Integer storeId, String shopName, String cityName,
Pair<Boolean, String> createSfExpressShopInner(Integer storeId, String supplierId, String shopName, String cityName,
String shopAddress, String contactName, String contactPhone,
String longitude, String latitude);

View File

@ -379,18 +379,19 @@ public class SFExpressApiServiceImpl implements SFExpressApiService {
/**
* 创建顺丰同城普通型店铺直调顺丰同城的接口脱离我们的业务
*
* @param storeId 商家门店ID
* @param shopName 店名
* @param cityName 城市
* @param shopAddress 店铺详细地址
* @param contactName 店铺联系人
* @param contactPhone 店铺电话
* @param longitude 经度
* @param latitude 纬度
* @param storeId 商家门店ID
* @param optSupplierId 商家平台ID
* @param shopName 店名
* @param cityName 城市
* @param shopAddress 店铺详细地址
* @param contactName 店铺联系人
* @param contactPhone 店铺电话
* @param longitude 经度
* @param latitude 纬度
* @return Pair<Boolean, String> 第一个元素表示是否成功第二个元素表示结果信息或错误信息
*/
@Override
public Pair<Boolean, String> createSfExpressShopInner(Integer storeId, String shopName, String cityName,
public Pair<Boolean, String> createSfExpressShopInner(Integer storeId, String optSupplierId, String shopName, String cityName,
String shopAddress, String contactName, String contactPhone,
String longitude, String latitude) {
logger.info("开始创建顺丰同城店铺, storeId: {}", storeId);
@ -402,9 +403,13 @@ public class SFExpressApiServiceImpl implements SFExpressApiService {
return Pair.of(false, "创建顺丰店铺,缺少必要参数!");
}
if (StrUtil.isBlank(optSupplierId)) {
optSupplierId = supplierId;
}
// 4. 构建请求参数
Map<String, Object> params = buildCommonParams();
params.put("supplier_id", supplierId); // 店铺所属商家id
params.put("supplier_id", optSupplierId); // 店铺所属商家id
params.put("out_shop_id", storeId); // 外部店铺ID
params.put("shop_name", shopName); // 店铺名称
params.put("city_name", cityName); // 城市名称

View File

@ -42,7 +42,7 @@ public class ShopMchEntryBranchAdminController extends BaseControllerImpl {
*/
@ApiOperation(value = "后台-申请总店的分店", notes = "向拉卡拉申请总店的分店")
@RequestMapping(value = "/apply/store", method = RequestMethod.POST)
public CommonResult shopMerchEntryList(@RequestBody JSONObject mainStoreBranchReqJSON) {
public CommonResult appyShopMerchEntry(@RequestBody JSONObject mainStoreBranchReqJSON) {
try {
// 参数校验
if (mainStoreBranchReqJSON == null) {
@ -63,5 +63,28 @@ public class ShopMchEntryBranchAdminController extends BaseControllerImpl {
}
}
@ApiOperation(value = "后台-申请总店分店列表", notes = "申请总店分店列表")
@RequestMapping(value = "/apply/store/list", method = RequestMethod.POST)
public CommonResult shopMerchEntryList(@RequestBody(required = false) JSONObject reqParamsJSON) {
try {
// 处理空参数情况
if (reqParamsJSON == null || reqParamsJSON.isEmpty()) {
reqParamsJSON = new JSONObject();
}
String keyword = reqParamsJSON.getStr("keyword");
String loginMobile = reqParamsJSON.getStr("login_mobile");
Integer pageNum = reqParamsJSON.getInt("pageNum");
Integer pageSize = reqParamsJSON.getInt("pageSize");
return shopMchEntryBranchService.applyBranchStoreList(keyword, loginMobile,
pageNum,
pageSize);
} catch (Exception e) {
log.error("查询分店申请列表异常", e);
return CommonResult.failed("查询分店申请列表失败");
}
}
}

View File

@ -119,6 +119,9 @@ public class ShopStoreBaseController extends BaseControllerImpl {
queryWrapper.eq("store_type", store_type);
}
// 只获取总店的记录
queryWrapper.eq("parent_id", 0);
return CommonResult.success(shopStoreBaseService.getBaseList(queryWrapper, pageNum, pageSize));
}

View File

@ -8,6 +8,7 @@
package com.suisung.mall.shop.store.service;
import com.suisung.mall.common.api.CommonResult;
import com.suisung.mall.common.modules.store.ShopMchEntryBranch;
import com.suisung.mall.common.pojo.dto.MainStoreBranchReqDTO;
import org.springframework.data.util.Pair;
@ -50,6 +51,17 @@ public interface ShopMchEntryBranchService {
*/
Pair<Boolean, String> applyMchEntryBranchStore(MainStoreBranchReqDTO mainStoreBranchReq);
/**
* 查询商户终端入驻申请总店分店列表
*
* @param keyword 关键字
* @param loginMobile 登录手机号
* @param pageNum 页码
* @param pageSize 页面大小
* @return 商户终端入驻申请门店列表
*/
CommonResult applyBranchStoreList(String keyword, String loginMobile, Integer pageNum, Integer pageSize);
/**
* 重要创建商户终端入驻申请门店信息创建商户终端入驻申请门店员工信息创建商户终端入驻申请门店权限信息创建商户终端入驻申请门店入驻信息
*

View File

@ -6,7 +6,10 @@ import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.suisung.mall.common.api.CommonResult;
import com.suisung.mall.common.constant.CommonConstant;
import com.suisung.mall.common.domain.UserDto;
import com.suisung.mall.common.exception.ApiException;
import com.suisung.mall.common.feignService.AccountService;
import com.suisung.mall.common.modules.store.ShopMchEntry;
@ -14,6 +17,7 @@ import com.suisung.mall.common.modules.store.ShopMchEntryBranch;
import com.suisung.mall.common.modules.store.ShopStoreBase;
import com.suisung.mall.common.pojo.dto.MainStoreBranchReqDTO;
import com.suisung.mall.common.utils.CheckUtil;
import com.suisung.mall.common.utils.ContextUtil;
import com.suisung.mall.core.web.service.impl.BaseServiceImpl;
import com.suisung.mall.shop.lakala.service.impl.LklTkServiceImpl;
import com.suisung.mall.shop.store.mapper.ShopMchEntryBranchMapper;
@ -287,6 +291,7 @@ public class ShopMchEntryBranchServiceImpl extends BaseServiceImpl<ShopMchEntryB
shopMchEntryBranch.setLkl_mer_cup_no(mchEntry.getLkl_mer_cup_no());
shopMchEntryBranch.setReview_related_id(lklResp.getStr("reviewRelatedId"));
shopMchEntryBranch.setLogin_mobile(mainStoreBranchReq.getLogin_mobile());
shopMchEntryBranch.setStore_name(mainStoreBranchReq.getStore_name());
shopMchEntryBranch.setStatus(4);// 状态1-审核已成功2-审核未通过3-未处理4-待审核
shopMchEntryBranch.setStatus_text("待审核");
shopMchEntryBranch.setLkl_req(JSONUtil.toJsonStr(mainStoreBranchReq));
@ -304,6 +309,38 @@ public class ShopMchEntryBranchServiceImpl extends BaseServiceImpl<ShopMchEntryB
}
}
@Override
public CommonResult applyBranchStoreList(String keyword, String loginMobile, Integer pageNum, Integer pageSize) {
// 参数验证和默认值设置
UserDto user = ContextUtil.getCurrentUser();
if (user == null || !user.isPlatform()) {
return CommonResult.failed("无权限操作");
}
pageNum = pageNum != null && pageNum >= 1 ? pageNum : 1;
pageSize = Math.max(1, Math.min(pageSize != null ? pageSize : 20, 500)); // 限制最大页面大小
LambdaQueryWrapper<ShopMchEntryBranch> queryWrapper = new LambdaQueryWrapper<>();
if (StrUtil.isNotBlank(keyword)) {
queryWrapper.and(wrapper -> wrapper.like(ShopMchEntryBranch::getStore_name, keyword)
.or()
.like(ShopMchEntryBranch::getLkl_reps, keyword));
}
if (StrUtil.isNotBlank(loginMobile)) {
queryWrapper.eq(ShopMchEntryBranch::getLogin_mobile, loginMobile);
}
queryWrapper.orderByDesc(ShopMchEntryBranch::getId);
Page<ShopMchEntryBranch> page = lists(queryWrapper, pageNum, pageSize);
// 不需要手动设置空集合MyBatis-Plus会自动处理
return CommonResult.success(page);
}
/**
* 重要创建商户终端入驻申请门店信息创建商户终端入驻申请门店员工信息创建商户终端入驻申请门店权限信息创建商户终端入驻申请门店入驻信息
*

View File

@ -1483,7 +1483,6 @@ public class ShopStoreBaseServiceImpl extends BaseServiceImpl<ShopStoreBaseMappe
List<Map> items = (List<Map>) data.get("items");
//经营期限
List<Integer> store_ids = items.stream().map(s -> Convert.toInt(s.get("store_id"))).collect(Collectors.toList());
List<ShopStoreInfo> store_info_rows = shopStoreInfoService.gets(store_ids);
List<Integer> subsite_ids = items.stream().map(s -> Convert.toInt(s.get("subsite_id"))).distinct().collect(Collectors.toList());

View File

@ -606,7 +606,6 @@
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>