|
|
@@ -65,7 +65,7 @@ public class UserLogic {
|
|
|
private final PgOrderBaseService pgOrderBaseService;
|
|
|
private final PgOrderWorkerService pgOrderWorkerService;
|
|
|
private final UserCompanyDeliveryService userCompanyDeliveryService;
|
|
|
- private final UserCompanyAttrService userCompanyAttrService;
|
|
|
+ private final UserCompanyCreditService userCompanyCreditService;
|
|
|
private final StorageService storageService;
|
|
|
private final UserCompanyDeliveryRelaService userCompanyDeliveryRelaService;
|
|
|
|
|
|
@@ -554,7 +554,7 @@ public class UserLogic {
|
|
|
.remove();
|
|
|
}
|
|
|
|
|
|
- public IPage<UserCompanyAttrBean> companyCredit(String nickName, String mobile, Integer pageNum, Integer pageSize) {
|
|
|
+ public IPage<UserCompanyCreditBean> companyCredit(String nickName, String mobile, Integer pageNum, Integer pageSize) {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
return commonMapper.companyCredit(new Page<>(pageNum, pageSize), adminUser.getCompanyWechatId(), nickName, mobile);
|
|
|
}
|
|
|
@@ -568,7 +568,7 @@ public class UserLogic {
|
|
|
|
|
|
final DateTime curDate = DateUtil.date();
|
|
|
|
|
|
- List<UserCompanyAttr> userCompanyAttrList = new ArrayList<>();
|
|
|
+ List<UserCompanyCredit> userCompanyCreditList = new ArrayList<>();
|
|
|
for (Object o : datas) {
|
|
|
index++;
|
|
|
String errPrefix = "第" + index + "行";
|
|
|
@@ -594,9 +594,9 @@ public class UserLogic {
|
|
|
throw new RemoteServiceException(errPrefix + " 没有找到对应师傅信息");
|
|
|
}
|
|
|
|
|
|
- final Integer count = userCompanyAttrService.lambdaQuery()
|
|
|
- .eq(UserCompanyAttr::getUserId, user.getUserId())
|
|
|
- .eq(UserCompanyAttr::getCompanyWechatId, adminUser.getCompanyWechatId())
|
|
|
+ final Integer count = userCompanyCreditService.lambdaQuery()
|
|
|
+ .eq(UserCompanyCredit::getUserId, user.getUserId())
|
|
|
+ .eq(UserCompanyCredit::getCompanyWechatId, adminUser.getCompanyWechatId())
|
|
|
.count();
|
|
|
|
|
|
if (count > 0) {
|
|
|
@@ -630,7 +630,7 @@ public class UserLogic {
|
|
|
throw new RemoteServiceException(errPrefix + " 请填写正确的账期天数(1-30)");
|
|
|
}
|
|
|
|
|
|
- UserCompanyAttr attr = new UserCompanyAttr();
|
|
|
+ UserCompanyCredit attr = new UserCompanyCredit();
|
|
|
attr.setCompanyWechatId(adminUser.getCompanyWechatId())
|
|
|
.setCompanyWechatName(adminUser.getCompanyName())
|
|
|
.setUserId(user.getUserId())
|
|
|
@@ -640,20 +640,20 @@ public class UserLogic {
|
|
|
.setPaymentGracePeriod(paymentGracePeriodInt)
|
|
|
.setCreateTime(curDate);
|
|
|
|
|
|
- userCompanyAttrList.add(attr);
|
|
|
+ userCompanyCreditList.add(attr);
|
|
|
}
|
|
|
|
|
|
- userCompanyAttrService.saveBatch(userCompanyAttrList);
|
|
|
+ userCompanyCreditService.saveBatch(userCompanyCreditList);
|
|
|
}
|
|
|
|
|
|
public void companyCreditEnabled(List<String> userIds, Boolean status) {
|
|
|
AdminUserCom adminUser = commonLogic.getAdminUser();
|
|
|
|
|
|
- userCompanyAttrService.lambdaUpdate()
|
|
|
- .set(UserCompanyAttr::getIsCreditEnabled, status)
|
|
|
- .set(UserCompanyAttr::getUpdateTime, DateUtil.date())
|
|
|
- .eq(UserCompanyAttr::getCompanyWechatId, adminUser.getCompanyWechatId())
|
|
|
- .in(UserCompanyAttr::getUserId, userIds)
|
|
|
+ userCompanyCreditService.lambdaUpdate()
|
|
|
+ .set(UserCompanyCredit::getIsCreditEnabled, status)
|
|
|
+ .set(UserCompanyCredit::getUpdateTime, DateUtil.date())
|
|
|
+ .eq(UserCompanyCredit::getCompanyWechatId, adminUser.getCompanyWechatId())
|
|
|
+ .in(UserCompanyCredit::getUserId, userIds)
|
|
|
.update();
|
|
|
}
|
|
|
|