|
@@ -49,8 +49,12 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
param.setStoreAddress(param.getRegion());
|
|
|
}
|
|
|
MerchantAuth merchantAuth = MerchantAuthCopier.INSTANCE.copying(param);
|
|
|
- Integer count = this.lambdaQuery().eq(MerchantAuth::getApplicant, userId).count();
|
|
|
- AssertUtils.available(count <= 0, "商家认证已存在");
|
|
|
+ MerchantAuth count = this.lambdaQuery().eq(MerchantAuth::getApplicant, userId).one();
|
|
|
+ //AssertUtils.available(count <= 0, "商家认证已存在");
|
|
|
+ if (null != count){
|
|
|
+ this.updateMerchantAuth(count.getId(),param);
|
|
|
+ return count.getId();
|
|
|
+ }
|
|
|
merchantAuth.setApplicationTime(new Date());
|
|
|
merchantAuth.setApplicant(userId);
|
|
|
merchantAuth.setReviewStatus("2");
|
|
@@ -91,6 +95,7 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
MerchantAuth merchantAuth = AssertUtils.available(this.getById(id), "商家认证不存在");
|
|
|
MerchantAuthCopier.INSTANCE.copying(param, merchantAuth);
|
|
|
merchantAuth.setReviewStatus("2");
|
|
|
+ merchantAuth.setId(id);
|
|
|
this.updateById(merchantAuth);
|
|
|
MerchantModifyParam param1 = new MerchantModifyParam();
|
|
|
param1.setName(param.getStoreName());
|