入驻更改 银行结算类型,57 58
This commit is contained in:
parent
6ea9216d2c
commit
d4038dac85
@ -485,7 +485,12 @@ public class LklTkServiceImpl {
|
|||||||
reqJsonBody.set("openningBankName", shopMchEntry.getBank_name());//结算账户开户⾏名称
|
reqJsonBody.set("openningBankName", shopMchEntry.getBank_name());//结算账户开户⾏名称
|
||||||
reqJsonBody.set("clearingBankCode", shopMchEntry.getClearing_bank_code());//结算账户清算⾏号
|
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("accountNo", shopMchEntry.getAccount_number()); //结算人银行卡号
|
||||||
reqJsonBody.set("accountName", shopMchEntry.getAccount_holder_name()); //结算人账户名称
|
reqJsonBody.set("accountName", shopMchEntry.getAccount_holder_name()); //结算人账户名称
|
||||||
reqJsonBody.set("accountIdCard", larIdCard);//结算⼈(法人或小微个人)证件号码(身份证)
|
reqJsonBody.set("accountIdCard", larIdCard);//结算⼈(法人或小微个人)证件号码(身份证)
|
||||||
@ -569,6 +574,7 @@ public class LklTkServiceImpl {
|
|||||||
logger.warn("法人身份证国徽面图片添加失败");
|
logger.warn("法人身份证国徽面图片添加失败");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ("57".equals(accountType)) {
|
||||||
JSONObject BUSINESS_LICENCE = updatePhoto(shopMchEntry.getBiz_license_image(), "BUSINESS_LICENCE", false);
|
JSONObject BUSINESS_LICENCE = updatePhoto(shopMchEntry.getBiz_license_image(), "BUSINESS_LICENCE", false);
|
||||||
if (BUSINESS_LICENCE != null) {
|
if (BUSINESS_LICENCE != null) {
|
||||||
attachments.set(BUSINESS_LICENCE); // 营业执照
|
attachments.set(BUSINESS_LICENCE); // 营业执照
|
||||||
@ -576,6 +582,7 @@ public class LklTkServiceImpl {
|
|||||||
} else {
|
} else {
|
||||||
logger.warn("营业执照图片添加失败");
|
logger.warn("营业执照图片添加失败");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 银行对公开户正面
|
// 银行对公开户正面
|
||||||
JSONObject OPENING_PERMIT = updatePhoto(shopMchEntry.getOpening_permit_image(), "OPENING_PERMIT", false);
|
JSONObject OPENING_PERMIT = updatePhoto(shopMchEntry.getOpening_permit_image(), "OPENING_PERMIT", false);
|
||||||
|
|||||||
@ -339,10 +339,9 @@ public class ShopMchEntryServiceImpl extends BaseServiceImpl<ShopMchEntryMapper,
|
|||||||
return CommonResult.failed("缺少法人身份证信息!");
|
return CommonResult.failed("缺少法人身份证信息!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO 银行开户许可证明(开户账号图片) 必填项
|
// TODO 银行开户许可证明(开户账号图片) 必填项
|
||||||
if (StrUtil.isBlank(record.getOpening_permit_image())
|
//account_type 结算账号类型,不填和 entity_type 匹配,企业匹配对公,个人匹配对私:57-对公 58-对私; 可选项,
|
||||||
&& "57".equals(record.getAccount_type())) {
|
if ("57".equals(record.getAccount_type()) && StrUtil.isBlank(record.getOpening_permit_image())) {
|
||||||
log.warn("缺少银行开户许可证明图片,手机号: {}", loginMobile);
|
log.warn("缺少银行开户许可证明图片,手机号: {}", loginMobile);
|
||||||
return CommonResult.failed("缺少银行开户许可证明图片!");
|
return CommonResult.failed("缺少银行开户许可证明图片!");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,6 +2,7 @@ package com.suisung.mall.shop.store.service.impl;
|
|||||||
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.json.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.suisung.mall.common.api.CommonResult;
|
import com.suisung.mall.common.api.CommonResult;
|
||||||
import com.suisung.mall.common.constant.CommonConstant;
|
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.ShopStoreSameCityTransportBaseService;
|
||||||
import com.suisung.mall.shop.store.service.ShopStoreSfOrderService;
|
import com.suisung.mall.shop.store.service.ShopStoreSfOrderService;
|
||||||
import com.suisung.mall.shop.store.service.ShopStoreSfSupplierService;
|
import com.suisung.mall.shop.store.service.ShopStoreSfSupplierService;
|
||||||
import org.json.JSONObject;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
@ -136,8 +136,6 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
|
|||||||
String oldSfShopId = sameCityTransportBase.getShop_id();
|
String oldSfShopId = sameCityTransportBase.getShop_id();
|
||||||
String oldSupplierId = sameCityTransportBase.getSupplier_id();
|
String oldSupplierId = sameCityTransportBase.getSupplier_id();
|
||||||
|
|
||||||
// 检查是否有相关订单
|
|
||||||
Boolean hasShopOrder = StrUtil.isNotBlank(oldSfShopId) && shopStoreSfOrderService.existsBySfShopId(oldSfShopId);
|
|
||||||
|
|
||||||
// 解析地址信息
|
// 解析地址信息
|
||||||
String[] areaIds = AddressUtil.parseAreas2Arr(shopMchEntry.getStore_district());
|
String[] areaIds = AddressUtil.parseAreas2Arr(shopMchEntry.getStore_district());
|
||||||
@ -152,16 +150,18 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
|
|||||||
|
|
||||||
// 构建响应数据
|
// 构建响应数据
|
||||||
JSONObject resp = new JSONObject();
|
JSONObject resp = new JSONObject();
|
||||||
resp.put("hasShopOrder", hasShopOrder);
|
resp.set("supplier_id", oldSupplierId);
|
||||||
resp.put("supplier_id", oldSupplierId);
|
resp.set("province_id", getArrayElement(areaIds, 0));
|
||||||
resp.put("province_id", getArrayElement(areaIds, 0));
|
resp.set("city_id", getArrayElement(areaIds, 1));
|
||||||
resp.put("city_id", getArrayElement(areaIds, 1));
|
resp.set("district_id", getArrayElement(areaIds, 2));
|
||||||
resp.put("district_id", getArrayElement(areaIds, 2));
|
|
||||||
|
|
||||||
// 设置状态和消息
|
// 设置状态和消息
|
||||||
int status = 1;
|
int status = 1;
|
||||||
String message = "顺丰店铺Id 未生成,可重建操作";
|
String message = "顺丰店铺Id 未生成,可重建操作";
|
||||||
|
|
||||||
if (StrUtil.isNotBlank(oldSfShopId)) {
|
if (StrUtil.isNotBlank(oldSfShopId)) {
|
||||||
|
// 检查是否有相关订单
|
||||||
|
Boolean hasShopOrder = StrUtil.isNotBlank(oldSfShopId) && shopStoreSfOrderService.existsBySfShopId(oldSfShopId);
|
||||||
if (hasShopOrder) {
|
if (hasShopOrder) {
|
||||||
status = 3;
|
status = 3;
|
||||||
message = "顺丰店铺Id 和相关订单已存在,请检查是否需重建?";
|
message = "顺丰店铺Id 和相关订单已存在,请检查是否需重建?";
|
||||||
@ -171,8 +171,8 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
resp.put("status", status);
|
resp.set("status", status);
|
||||||
resp.put("message", message);
|
resp.set("message", message);
|
||||||
|
|
||||||
return CommonResult.success(resp);
|
return CommonResult.success(resp);
|
||||||
}
|
}
|
||||||
@ -211,9 +211,12 @@ public class ShopStoreSfSupplierServiceImpl extends BaseServiceImpl<ShopStoreSfS
|
|||||||
String cityName = getCityName(shopMchEntry.getStore_area(), addressParseResultTO);
|
String cityName = getCityName(shopMchEntry.getStore_area(), addressParseResultTO);
|
||||||
String shopAddress = addressParseResultTO != null ? addressParseResultTO.getDetailAddress() : "";
|
String shopAddress = addressParseResultTO != null ? addressParseResultTO.getDetailAddress() : "";
|
||||||
|
|
||||||
|
// 为了其他顺丰店同名,店铺名称加上[门店ID]; 如:xxxx[xxxx] 聚万家生鲜超市[69]
|
||||||
|
String shopName = String.format("%s[%s]", shopMchEntry.getStore_name(), shopMchEntry.getStore_id());
|
||||||
|
|
||||||
// 调用顺丰API创建店铺
|
// 调用顺丰API创建店铺
|
||||||
Pair<Boolean, String> result = sFExpressApiService.createSfExpressShopInner(storeId, sfSupplierId,
|
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());
|
shopMchEntry.getLogin_mobile(), shopMchEntry.getStore_longitude(), shopMchEntry.getStore_latitude());
|
||||||
|
|
||||||
if (Boolean.FALSE.equals(result.getFirst())) {
|
if (Boolean.FALSE.equals(result.getFirst())) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user