进件关联
This commit is contained in:
@@ -48,15 +48,15 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
||||
}
|
||||
shopMerchantVO.setShopId(shopId);
|
||||
shopMerchantVO.setChannel(one.getChannel());
|
||||
shopMerchantVO.setRelatedLicenceNo(one.getRelatedLicenceNo());
|
||||
shopMerchantVO.setRelatedId(one.getRelatedId());
|
||||
if (StrUtil.isNotBlank(one.getNativePayJson())) {
|
||||
shopMerchantVO.setNativeMerchantDTO(JSONObject.parseObject(one.getNativePayJson(), NativeMerchantDTO.class));
|
||||
}
|
||||
if (StrUtil.isNotBlank(one.getPolyPayJson())) {
|
||||
shopMerchantVO.setPolyMerchantDTO(JSONObject.parseObject(one.getPolyPayJson(), PolyMerchantDTO.class));
|
||||
}
|
||||
if (StrUtil.isNotBlank(one.getRelatedLicenceNo())) {
|
||||
shopMerchantVO.setShopDirectMerchant(shopDirectMerchantService.getOne(query().eq(ShopDirectMerchant::getLicenceNo, one.getRelatedLicenceNo())));
|
||||
if (one.getRelatedId() != null) {
|
||||
shopMerchantVO.setShopDirectMerchant(shopDirectMerchantService.getOne(query().eq(ShopDirectMerchant::getShopId, one.getRelatedId())));
|
||||
}
|
||||
return shopMerchantVO;
|
||||
}
|
||||
@@ -76,11 +76,12 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
||||
shopMerchant = new ShopMerchant();
|
||||
shopMerchant.setAlipayAppId(SystemConstants.PayType.ALIPAY_APP_ID);
|
||||
shopMerchant.setWechatAppId(SystemConstants.PayType.WECHAT_APP_ID);
|
||||
shopMerchant.setRelatedId(shopMerchantParam.getShopId());
|
||||
}
|
||||
shopMerchant.setShopId(shopMerchantParam.getShopId());
|
||||
if (isUp) {
|
||||
shopMerchant.setChannel(CzgStrUtils.getStrOrNull(shopMerchantParam.getChannel()));
|
||||
shopMerchant.setRelatedLicenceNo(CzgStrUtils.getStrOrNull(shopMerchantParam.getRelatedLicenceNo()));
|
||||
shopMerchant.setRelatedId(shopMerchantParam.getShopId());
|
||||
if (shopMerchantParam.getNativeMerchantDTO() != null) {
|
||||
shopMerchant.setNativePayJson(JSONObject.toJSONString(shopMerchantParam.getNativeMerchantDTO()));
|
||||
}
|
||||
@@ -88,9 +89,9 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
||||
shopMerchant.setPolyPayJson(JSONObject.toJSONString(shopMerchantParam.getPolyMerchantDTO()));
|
||||
}
|
||||
} else {
|
||||
//不是新增且不是修改 只有进件完成会进入这里
|
||||
if (StrUtil.isBlank(shopMerchant.getRelatedLicenceNo())) {
|
||||
shopMerchant.setRelatedLicenceNo(shopMerchantParam.getRelatedLicenceNo());
|
||||
//只有进件会进入这里
|
||||
if (shopMerchant.getRelatedId() == null) {
|
||||
shopMerchant.setRelatedId(shopMerchantParam.getShopId());
|
||||
}
|
||||
if (StrUtil.isBlank(shopMerchant.getNativePayJson()) && shopMerchantParam.getNativeMerchantDTO() != null) {
|
||||
shopMerchant.setNativePayJson(JSONObject.toJSONString(shopMerchantParam.getNativeMerchantDTO()));
|
||||
@@ -101,12 +102,12 @@ public class ShopMerchantServiceImpl extends ServiceImpl<ShopMerchantMapper, Sho
|
||||
|
||||
@Override
|
||||
@CacheEvict(allEntries = true)
|
||||
public void upMerchant(@NotBlank String relatedLicenceNo, @NotNull NativeMerchantDTO nativeMerchantDTO) {
|
||||
public void upMerchant(@NotBlank Long relatedId, @NotNull NativeMerchantDTO nativeMerchantDTO) {
|
||||
ShopMerchant upShopMerchant = new ShopMerchant();
|
||||
upShopMerchant.setAlipayAppId(nativeMerchantDTO.getAlipayMerchantId());
|
||||
upShopMerchant.setWechatAppId(nativeMerchantDTO.getWechatMerchantId());
|
||||
upShopMerchant.setNativePayJson(JSONObject.toJSONString(nativeMerchantDTO));
|
||||
update(upShopMerchant, query().eq(ShopMerchant::getRelatedLicenceNo, relatedLicenceNo));
|
||||
update(upShopMerchant, query().eq(ShopMerchant::getRelatedId, relatedId));
|
||||
}
|
||||
|
||||
@Cacheable(key = "#shopId")
|
||||
|
||||
Reference in New Issue
Block a user