入驻更改 银行结算类型,57 58

This commit is contained in:
Jack 2026-01-15 16:25:47 +08:00
parent 6ea9216d2c
commit d4038dac85
3 changed files with 30 additions and 21 deletions

View File

@ -485,7 +485,12 @@ public class LklTkServiceImpl {
reqJsonBody.set("openningBankName", shopMchEntry.getBank_name());//结算账户开户名称
reqJsonBody.set("clearingBankCode", shopMchEntry.getClearing_bank_code());//结算账户清算
reqJsonBody.set("accountType", isQy ? "57" : "58"); //结算账户类型: 57 对公 58 对私
//结算账户类型: 57 对公 58 对私
String accountType = shopMchEntry.getAccount_type();
if (StrUtil.isBlank(accountType) || (!"57".equals(accountType) && !"58".equals(accountType))) {
accountType = isQy ? "57" : "58";
}
reqJsonBody.set("accountType", accountType);
reqJsonBody.set("accountNo", shopMchEntry.getAccount_number()); //结算人银行卡号
reqJsonBody.set("accountName", shopMchEntry.getAccount_holder_name()); //结算人账户名称
reqJsonBody.set("accountIdCard", larIdCard);//结算法人或小微个人证件号码(身份证)
@ -569,12 +574,14 @@ public class LklTkServiceImpl {
logger.warn("法人身份证国徽面图片添加失败");
}
JSONObject BUSINESS_LICENCE = updatePhoto(shopMchEntry.getBiz_license_image(), "BUSINESS_LICENCE", false);
if (BUSINESS_LICENCE != null) {
attachments.set(BUSINESS_LICENCE); // 营业执照
logger.debug("成功添加营业执照图片");
} else {
logger.warn("营业执照图片添加失败");
if ("57".equals(accountType)) {
JSONObject BUSINESS_LICENCE = updatePhoto(shopMchEntry.getBiz_license_image(), "BUSINESS_LICENCE", false);
if (BUSINESS_LICENCE != null) {
attachments.set(BUSINESS_LICENCE); // 营业执照
logger.debug("成功添加营业执照图片");
} else {
logger.warn("营业执照图片添加失败");
}
}
// 银行对公开户正面

View File

@ -339,10 +339,9 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl<ShopMchEntryMapper,
return CommonResult.failed("缺少法人身份证信息!");
}
// TODO 银行开户许可证明开户账号图片 必填项
if (StrUtil.isBlank(record.getOpening_permit_image())
&& "57".equals(record.getAccount_type())) {
//account_type 结算账号类型不填和 entity_type 匹配企业匹配对公个人匹配对私57-对公 58-对私; 可选项
if ("57".equals(record.getAccount_type()) && StrUtil.isBlank(record.getOpening_permit_image())) {
log.warn("缺少银行开户许可证明图片,手机号: {}", loginMobile);
return CommonResult.failed("缺少银行开户许可证明图片!");
}

View File

@ -2,6 +2,7 @@ package com.suisung.mall.shop.store.service.impl;
import cn.hutool.core.convert.Convert;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.suisung.mall.common.api.CommonResult;
import com.suisung.mall.common.constant.CommonConstant;
@ -18,7 +19,6 @@ import com.suisung.mall.shop.store.service.ShopMchEntryService;
import com.suisung.mall.shop.store.service.ShopStoreSameCityTransportBaseService;
import com.suisung.mall.shop.store.service.ShopStoreSfOrderService;
import com.suisung.mall.shop.store.service.ShopStoreSfSupplierService;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Lazy;
@ -136,8 +136,6 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
String oldSfShopId = sameCityTransportBase.getShop_id();
String oldSupplierId = sameCityTransportBase.getSupplier_id();
// 检查是否有相关订单
Boolean hasShopOrder = StrUtil.isNotBlank(oldSfShopId) && shopStoreSfOrderService.existsBySfShopId(oldSfShopId);
// 解析地址信息
String[] areaIds = AddressUtil.parseAreas2Arr(shopMchEntry.getStore_district());
@ -152,16 +150,18 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
// 构建响应数据
JSONObject resp = new JSONObject();
resp.put("hasShopOrder", hasShopOrder);
resp.put("supplier_id", oldSupplierId);
resp.put("province_id", getArrayElement(areaIds, 0));
resp.put("city_id", getArrayElement(areaIds, 1));
resp.put("district_id", getArrayElement(areaIds, 2));
resp.set("supplier_id", oldSupplierId);
resp.set("province_id", getArrayElement(areaIds, 0));
resp.set("city_id", getArrayElement(areaIds, 1));
resp.set("district_id", getArrayElement(areaIds, 2));
// 设置状态和消息
int status = 1;
String message = "顺丰店铺Id 未生成,可重建操作";
if (StrUtil.isNotBlank(oldSfShopId)) {
// 检查是否有相关订单
Boolean hasShopOrder = StrUtil.isNotBlank(oldSfShopId) && shopStoreSfOrderService.existsBySfShopId(oldSfShopId);
if (hasShopOrder) {
status = 3;
message = "顺丰店铺Id 和相关订单已存在,请检查是否需重建?";
@ -171,8 +171,8 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
}
}
resp.put("status", status);
resp.put("message", message);
resp.set("status", status);
resp.set("message", message);
return CommonResult.success(resp);
}
@ -211,9 +211,12 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
String cityName = getCityName(shopMchEntry.getStore_area(), addressParseResultTO);
String shopAddress = addressParseResultTO != null ? addressParseResultTO.getDetailAddress() : "";
// 为了其他顺丰店同名店铺名称加上[门店ID]; xxxx[xxxx] 聚万家生鲜超市[69]
String shopName = String.format("%s[%s]", shopMchEntry.getStore_name(), shopMchEntry.getStore_id());
// 调用顺丰API创建店铺
Pair<Boolean, String> result = sFExpressApiService.createSfExpressShopInner(storeId, sfSupplierId,
shopMchEntry.getStore_name(), cityName, shopAddress, shopMchEntry.getContact_name(),
shopName, cityName, shopAddress, shopMchEntry.getContact_name(),
shopMchEntry.getLogin_mobile(), shopMchEntry.getStore_longitude(), shopMchEntry.getStore_latitude());
if (Boolean.FALSE.equals(result.getFirst())) {