|
@@ -1,5 +1,7 @@
|
|
|
package com.chelvc.cloud.vehicle.server.service.impl;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
import com.chelvc.cloud.user.client.UserClient;
|
|
@@ -14,6 +16,7 @@ import com.chelvc.cloud.vehicle.server.copier.MerchantAuthCopier;
|
|
|
import com.chelvc.cloud.vehicle.server.dao.MerchantAuthMapper;
|
|
|
import com.chelvc.cloud.vehicle.server.entity.Merchant;
|
|
|
import com.chelvc.cloud.vehicle.server.entity.MerchantAuth;
|
|
|
+import com.chelvc.cloud.vehicle.server.entity.UserAuth;
|
|
|
import com.chelvc.cloud.vehicle.server.service.CategoryService;
|
|
|
import com.chelvc.cloud.vehicle.server.service.MerchantAuthService;
|
|
|
import com.chelvc.cloud.vehicle.server.service.MerchantRelationService;
|
|
@@ -67,7 +70,7 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
}
|
|
|
merchantAuth.setApplicationTime(new Date());
|
|
|
merchantAuth.setApplicant(userId);
|
|
|
- merchantAuth.setReviewStatus("2");
|
|
|
+ merchantAuth.setReviewStatus("1");
|
|
|
this.save(merchantAuth);
|
|
|
MerchantModifyParam param1 = new MerchantModifyParam();
|
|
|
param1.setName(param.getStoreName());
|
|
@@ -93,7 +96,8 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
}else{
|
|
|
this.merchantService.updateMerchant(merchant.getId(),param1);
|
|
|
}
|
|
|
-
|
|
|
+ //首信易个人子商户认证
|
|
|
+ merchantRelationService.registerMerchantId(merchantAuth);
|
|
|
return merchantAuth.getId();
|
|
|
}
|
|
|
|
|
@@ -104,7 +108,7 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
}
|
|
|
MerchantAuth merchantAuth = AssertUtils.nonnull(this.getById(id), "商家认证不存在");
|
|
|
MerchantAuthCopier.INSTANCE.copying(param, merchantAuth);
|
|
|
- merchantAuth.setReviewStatus("2");
|
|
|
+ merchantAuth.setReviewStatus("1");
|
|
|
merchantAuth.setId(id);
|
|
|
this.updateById(merchantAuth);
|
|
|
MerchantModifyParam param1 = new MerchantModifyParam();
|
|
@@ -196,4 +200,12 @@ public class MerchantAuthServiceImpl extends ServiceImpl<MerchantAuthMapper, Mer
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public int updateStatus(Long userId, Integer status) {
|
|
|
+ UpdateWrapper<MerchantAuth> update = Wrappers.update();
|
|
|
+ update.set("review_status", status);
|
|
|
+ update.eq("applicant", userId);
|
|
|
+ return baseMapper.update(null, update);
|
|
|
+ }
|
|
|
}
|