|
@@ -45,6 +45,9 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
@Override
|
|
|
public Long addMerchantAuth(@NonNull MerchantAuthModifyParam param) {
|
|
|
Long userId = SessionContextHolder.getId();
|
|
|
+ if (StringUtils.isEmpty(param.getStoreAddress())){
|
|
|
+ param.setStoreAddress(param.getRegion());
|
|
|
+ }
|
|
|
MerchantAuth merchantAuth = MerchantAuthCopier.INSTANCE.copying(param);
|
|
|
Integer count = this.lambdaQuery().eq(MerchantAuth::getApplicant, userId).count();
|
|
|
AssertUtils.available(count <= 0, "商家认证已存在");
|
|
@@ -82,6 +85,9 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
|
|
|
@Override
|
|
|
public void updateMerchantAuth(@NonNull Long id, @NonNull MerchantAuthModifyParam param) {
|
|
|
+ if (StringUtils.isEmpty(param.getStoreAddress())){
|
|
|
+ param.setStoreAddress(param.getRegion());
|
|
|
+ }
|
|
|
MerchantAuth merchantAuth = AssertUtils.available(this.getById(id), "商家认证不存在");
|
|
|
MerchantAuthCopier.INSTANCE.copying(param, merchantAuth);
|
|
|
merchantAuth.setReviewStatus("2");
|