|
@@ -58,25 +58,19 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
@Override
|
|
|
public Long addMerchantAuth(@NonNull MerchantAuthModifyParam param) {
|
|
|
Long userId = SessionContextHolder.getId();
|
|
|
- /*LambdaQueryWrapper<MerchantAuth> wrapper = Wrappers.lambdaQuery();
|
|
|
- wrapper.eq(MerchantAuth::getApplicant, userId);
|
|
|
- if(baseMapper.selectCount(wrapper) > 0){
|
|
|
- throw new ResourceUnavailableException("审核认证已申请");
|
|
|
- }*/
|
|
|
- if (StringUtils.isEmpty(param.getStoreAddress())){
|
|
|
- param.setStoreAddress(param.getStoreAddress());
|
|
|
- }
|
|
|
- MerchantAuth merchantAuth = MerchantAuthCopier.INSTANCE.copying(param);
|
|
|
MerchantAuth count = this.lambdaQuery().eq(MerchantAuth::getApplicant, userId).one();
|
|
|
- //AssertUtils.available(count <= 0, "商家认证已存在");
|
|
|
if (null != count){
|
|
|
this.updateMerchantAuth(count.getId(),param);
|
|
|
- } else {
|
|
|
- merchantAuth.setApplicationTime(new Date());
|
|
|
- merchantAuth.setApplicant(userId);
|
|
|
- merchantAuth.setReviewStatus("1");
|
|
|
- this.save(merchantAuth);
|
|
|
+ return count.getId();
|
|
|
}
|
|
|
+ if (StringUtils.isEmpty(param.getStoreAddress())){
|
|
|
+ param.setStoreAddress(param.getStoreAddress());
|
|
|
+ }
|
|
|
+ MerchantAuth merchantAuth = MerchantAuthCopier.INSTANCE.copying(param);
|
|
|
+ merchantAuth.setApplicationTime(new Date());
|
|
|
+ merchantAuth.setApplicant(userId);
|
|
|
+ merchantAuth.setReviewStatus("1");
|
|
|
+ this.save(merchantAuth);
|
|
|
MerchantModifyParam param1 = new MerchantModifyParam();
|
|
|
param1.setName(param.getStoreName());
|
|
|
param1.setLiaison(param.getLegalRepresentativeName());
|