diff --git a/bashi-admin/src/main/resources/i18n/messages.properties b/bashi-admin/src/main/resources/i18n/messages.properties
index d63aa1f..49edbf6 100644
--- a/bashi-admin/src/main/resources/i18n/messages.properties
+++ b/bashi-admin/src/main/resources/i18n/messages.properties
@@ -15,7 +15,7 @@ length.not.valid=长度必须在{min}到{max}个字符之间
user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
user.password.not.valid=* 5-50个字符
-
+
user.email.not.valid=邮箱格式错误
user.mobile.phone.number.not.valid=手机号格式错误
user.login.success=登录成功
@@ -34,3 +34,35 @@ no.update.permission=您没有修改数据的权限,请联系管理员添加
no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
+
+test=测试语言
+dk.code.error=验证码错误
+dk.password.update.error=密码修改失败,请重新获取验证码操作
+dk.password.check.error=密码不一致
+dk.user.already.having=用户已存在
+dk.user.name=VIP用户
+dk.user.no=用户不存在
+dk.wait=点击太快了,请稍等
+dk.wait.last.loan=请等待上一次贷款完结后在发起贷款
+dk.loanAccount.empty=请选择贷款金额
+dk.loan.userData.missing=请补全个人资料后在发起贷款
+dk.loan.amount.notLe=贷款金额不能小于
+dk.loan.amount.notGe=贷款金额不能大于
+dk.loan.auditing=审核中
+dk.loan.auditing.remark=审核中...
+dk.withdraw.account.error=提现失败,账号异常
+dk.withdraw.balance.not.enough.error=余额不足
+dk.withdraw.fail=提现失败
+dk.withdraw.ing=提现中
+dk.withdraw.remark=提现中...
+
+dk.borrow.push.success=提交成功
+dk.borrow.auditing=正在审核
+dk.borrow.account.success=到账成功
+dk.borrow.accounting.remark=您的个人信用贷款正在审核,请留意您的审核状态!如有疑问,请联系业务员咨询…
+dk.borrow.contract.error=借款不存在
+
+dk.customer.update.having.loans=贷款已提交无法修改信息,请联系客服
+dk.file.upload.init.error=文件上传初始化失败
+
+dk.audit.success=审核通过
diff --git a/bashi-admin/src/main/resources/i18n/messages_gu_IN.properties b/bashi-admin/src/main/resources/i18n/messages_gu_IN.properties
index 118f9e7..aedfe35 100644
--- a/bashi-admin/src/main/resources/i18n/messages_gu_IN.properties
+++ b/bashi-admin/src/main/resources/i18n/messages_gu_IN.properties
@@ -1 +1,67 @@
-test=TestYuYan
+not.null=* भरना आवश्यक है
+user.jcaptcha.error=कैप्चा गलत है
+user.jcaptcha.expire=कैप्चा समाप्त हो गया है
+user.not.exists=उपयोगकर्ता मौजूद नहीं है/पासवर्ड गलत है
+user.password.not.match=उपयोगकर्ता मौजूद नहीं है/पासवर्ड गलत है
+user.password.retry.limit.count=पासवर्ड गलत {0} बार
+user.password.retry.limit.exceed=पासवर्ड गलत {0} बार, खाता 10 मिनट के लिए बंद हो गया है
+user.password.delete=माफ़ कीजिए, आपका खाता हटा दिया गया है
+user.blocked=उपयोगकर्ता प्रतिबंधित है, कृपया प्रबंधक से संपर्क करें
+role.blocked=भूमिका प्रतिबंधित है, कृपया प्रबंधक से संपर्क करें
+user.logout.success=बाहर निकलने में सफलता
+
+length.not.valid=लंबाई {min} से {max} अक्षरों के बीच होनी चाहिए
+
+user.username.not.valid=* 2 से 20 चीनी, अक्षर, संख्या, या अंडरस्कोर से मिलने वाले, और अंकों की शुरुआत नहीं होनी चाहिए
+user.password.not.valid=* 5-50 अक्षर
+
+user.email.not.valid=ईमेल प्रारूप गलत है
+user.mobile.phone.number.not.valid=मोबाइल नंबर प्रारूप गलत है
+user.login.success=लॉगिन सफल
+user.notfound=कृपया पुनः लॉगिन करें
+user.forcelogout=प्रशासक बाहर कर दिया, कृपया पुनः लॉगिन करें
+user.unknown.error=अज्ञात त्रुटि, कृपया पुनः लॉगिन करें
+
+##फ़ाइल अपलोड संदेश
+upload.exceed.maxSize=अपलोड की गई फ़ाइल का आकार सीमा से अधिक है!
अनुमोदित फ़ाइल का अधिकतम आकार है: {0}MB!
+upload.filename.exceed.length=अपलोड की गई फ़ाइल का नाम {0} अक्षरों की अधिकतम लंबाई है
+
+##अनुमति
+no.permission=आपके पास डेटा के लिए अनुमति नहीं है, कृपया प्रबंधक से अनुमति जोड़ने के लिए संपर्क करें [{0}]
+no.create.permission=आपके पास डेटा बनाने के लिए अनुमति नहीं है, कृपया प्रबंधक से अनुमति जोड़ने के लिए संपर्क करें [{0}]
+no.update.permission=आपके पास डेटा में संशोधन करने की अनुमति नहीं है, कृपया प्रबंधक से अनुमति जोड़ने के लिए संपर्क करें [{0}]
+no.delete.permission=आपके पास डेटा को हटाने की अनुमति नहीं है, कृपया प्रबंधक से अनुमति जोड़ने के लिए संपर्क करें [{0}]
+no.export.permission=आपके पास डेटा को निर्यात करने की अनुमति नहीं है, कृपया प्रबंधक से अनुमति जोड़ने के लिए संपर्क करें [{0}]
+no.view.permission=आपके पास डेटा देखने की अनुमति नहीं है, कृपया प्रबंधक से अनुमति जोड़ने के लिए संपर्क करें [{0}]
+
+test=भाषा परीक्षण
+dk.code.error=कोड गलत है
+dk.password.update.error=पासवर्ड अपडेट विफल, कृपया पुनः कोड प्राप्त करने की क्रिया करें
+dk.password.check.error=पासवर्ड मेल नहीं खाता
+dk.user.already.having=उपयोगकर्ता पहले से ही मौजूद है
+dk.user.name=वीआईपी उपयोगकर्ता
+dk.user.no=उपयोगकर्ता मौजूद नहीं है
+dk.wait=बहुत तेज़ी से क्लिक किया, कृपया थोड़ा इंतजार करें
+dk.wait.last.loan=कृपया पिछले क़र्ज़ को पूरा होने के बाद एक क़र्ज़ प्रारंभ करें
+dk.loanAccount.empty=कृपया क़र्ज़ राशि का चयन करें
+dk.loan.userData.missing=कृपया क़र्ज़ प्रारंभ करने से पहले अपना व्यक्तिगत जानकारी पूरी करें
+dk.loan.amount.notLe=क़र्ज़ राशि {min} से छोटी नहीं हो सकती
+dk.loan.amount.notGe=क़र्ज़ राशि {max} से बड़ी नहीं हो सकती
+dk.loan.auditing=समीक्षा के अधीन
+dk.loan.auditing.remark=समीक्षा के अधीन...
+dk.withdraw.account.error=निकासी विफल, खाता असामान्य है
+dk.withdraw.balance.not.enough.error=धनराशि पर्याप्त नहीं है
+dk.withdraw.fail=निकासी विफल
+dk.withdraw.ing=निकासी प्रक्रिया में
+dk.withdraw.remark=निकासी प्रक्रिया में...
+
+dk.borrow.push.success=सफलतापूर्वक प्रस्तुत
+dk.borrow.auditing=समीक्षा के अधीन है
+dk.borrow.account.success=हिसाब सफल
+dk.borrow.accounting.remark=आपका व्यक्तिगत ऋण समीक्षा में है, कृपया अपनी समीक्षा स्थिति पर ध्यान दें! संदेह होने पर, कृपया बिजनेस व्यक्ति से परामर्श करें...
+dk.borrow.contract.error=ऋण मौजूद नहीं है
+
+dk.customer.update.having.loans=ऋण सबमिट किया गया है, इसलिए जानकारी संशोधित नहीं की जा सकती, कृपया सहायता संपर्क करें
+dk.file.upload.init.error=फ़ाइल अपलोड प्रारंभिकीता विफल हुई
+
+dk.audit.success=समीक्षा पारित हुई
diff --git a/bashi-admin/src/main/resources/i18n/messages_zh_CN.properties b/bashi-admin/src/main/resources/i18n/messages_zh_CN.properties
index 7c0863e..49edbf6 100644
--- a/bashi-admin/src/main/resources/i18n/messages_zh_CN.properties
+++ b/bashi-admin/src/main/resources/i18n/messages_zh_CN.properties
@@ -1 +1,68 @@
+#错误消息
+not.null=* 必须填写
+user.jcaptcha.error=验证码错误
+user.jcaptcha.expire=验证码已失效
+user.not.exists=用户不存在/密码错误
+user.password.not.match=用户不存在/密码错误
+user.password.retry.limit.count=密码输入错误{0}次
+user.password.retry.limit.exceed=密码输入错误{0}次,帐户锁定10分钟
+user.password.delete=对不起,您的账号已被删除
+user.blocked=用户已封禁,请联系管理员
+role.blocked=角色已封禁,请联系管理员
+user.logout.success=退出成功
+
+length.not.valid=长度必须在{min}到{max}个字符之间
+
+user.username.not.valid=* 2到20个汉字、字母、数字或下划线组成,且必须以非数字开头
+user.password.not.valid=* 5-50个字符
+
+user.email.not.valid=邮箱格式错误
+user.mobile.phone.number.not.valid=手机号格式错误
+user.login.success=登录成功
+user.notfound=请重新登录
+user.forcelogout=管理员强制退出,请重新登录
+user.unknown.error=未知错误,请重新登录
+
+##文件上传消息
+upload.exceed.maxSize=上传的文件大小超出限制的文件大小!
允许的文件最大大小是:{0}MB!
+upload.filename.exceed.length=上传的文件名最长{0}个字符
+
+##权限
+no.permission=您没有数据的权限,请联系管理员添加权限 [{0}]
+no.create.permission=您没有创建数据的权限,请联系管理员添加权限 [{0}]
+no.update.permission=您没有修改数据的权限,请联系管理员添加权限 [{0}]
+no.delete.permission=您没有删除数据的权限,请联系管理员添加权限 [{0}]
+no.export.permission=您没有导出数据的权限,请联系管理员添加权限 [{0}]
+no.view.permission=您没有查看数据的权限,请联系管理员添加权限 [{0}]
+
test=测试语言
+dk.code.error=验证码错误
+dk.password.update.error=密码修改失败,请重新获取验证码操作
+dk.password.check.error=密码不一致
+dk.user.already.having=用户已存在
+dk.user.name=VIP用户
+dk.user.no=用户不存在
+dk.wait=点击太快了,请稍等
+dk.wait.last.loan=请等待上一次贷款完结后在发起贷款
+dk.loanAccount.empty=请选择贷款金额
+dk.loan.userData.missing=请补全个人资料后在发起贷款
+dk.loan.amount.notLe=贷款金额不能小于
+dk.loan.amount.notGe=贷款金额不能大于
+dk.loan.auditing=审核中
+dk.loan.auditing.remark=审核中...
+dk.withdraw.account.error=提现失败,账号异常
+dk.withdraw.balance.not.enough.error=余额不足
+dk.withdraw.fail=提现失败
+dk.withdraw.ing=提现中
+dk.withdraw.remark=提现中...
+
+dk.borrow.push.success=提交成功
+dk.borrow.auditing=正在审核
+dk.borrow.account.success=到账成功
+dk.borrow.accounting.remark=您的个人信用贷款正在审核,请留意您的审核状态!如有疑问,请联系业务员咨询…
+dk.borrow.contract.error=借款不存在
+
+dk.customer.update.having.loans=贷款已提交无法修改信息,请联系客服
+dk.file.upload.init.error=文件上传初始化失败
+
+dk.audit.success=审核通过
diff --git a/bashi-dk/src/main/java/com/bashi/dk/controller/app/AppCustomerOpenController.java b/bashi-dk/src/main/java/com/bashi/dk/controller/app/AppCustomerOpenController.java
index f32081a..7352099 100644
--- a/bashi-dk/src/main/java/com/bashi/dk/controller/app/AppCustomerOpenController.java
+++ b/bashi-dk/src/main/java/com/bashi/dk/controller/app/AppCustomerOpenController.java
@@ -6,6 +6,7 @@ import com.bashi.common.core.domain.AjaxResult;
import com.bashi.common.core.domain.entity.Customer;
import com.bashi.common.core.redis.RedisCache;
import com.bashi.common.exception.CustomException;
+import com.bashi.common.utils.MessageUtils;
import com.bashi.dk.dto.app.req.CustomerRegisterReq;
import com.bashi.dk.dto.app.req.UpdatePwdOpenReq;
import com.bashi.dk.service.CustomerService;
@@ -41,7 +42,7 @@ public class AppCustomerOpenController {
@ApiOperation("用户注册")
public AjaxResult customerRegister(@RequestBody CustomerRegisterReq register) {
if(!codeService.check(register.getPhoneNumber(), CodeType.CUSTOMER_REGISTER,register.getCode())){
- throw new CustomException("验证码错误");
+ throw new CustomException(MessageUtils.message("dk.code.error"));
}
customerService.register(register);
return AjaxResult.success();
@@ -61,7 +62,7 @@ public class AppCustomerOpenController {
@ApiOperation("忘记密码-验证码-校验")
public AjaxResult customerForgetPasswordCheck(String phoneNumber,String code) {
if(!codeService.check(phoneNumber, CodeType.CUSTOMER_REGISTER,code)){
- throw new CustomException("验证码错误");
+ throw new CustomException(MessageUtils.message("dk.code.error"));
}
Customer customer = customerService.getCustomerByName(phoneNumber);
String uuid = UUID.randomUUID().toString();
@@ -76,10 +77,10 @@ public class AppCustomerOpenController {
public AjaxResult customerForgetPasswordCheck(@RequestBody UpdatePwdOpenReq updatePwdOpenReq) {
Customer customer = redisCache.getCacheObject(updatePwdOpenReq.getCheckCode());
if(customer == null){
- throw new CustomException("密码修改失败,请重新获取验证码操作");
+ throw new CustomException(MessageUtils.message("dk.password.update.error"));
}
if(!updatePwdOpenReq.getPassword().equals(updatePwdOpenReq.getConfirmPassword())){
- throw new CustomException("密码不一致");
+ throw new CustomException(MessageUtils.message("dk.password.check.error"));
}
customerService.updatePwd(customer.getId(),updatePwdOpenReq.getPassword());
AjaxResult success = AjaxResult.success();
diff --git a/bashi-dk/src/main/java/com/bashi/dk/controller/app/V2CommonController.java b/bashi-dk/src/main/java/com/bashi/dk/controller/app/V2CommonController.java
index 8bc4eec..1d8514d 100644
--- a/bashi-dk/src/main/java/com/bashi/dk/controller/app/V2CommonController.java
+++ b/bashi-dk/src/main/java/com/bashi/dk/controller/app/V2CommonController.java
@@ -9,6 +9,7 @@ import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.profile.DefaultProfile;
import com.bashi.common.core.domain.AjaxResult;
+import com.bashi.common.utils.MessageUtils;
import com.bashi.dk.manager.FileUploadManager;
import com.bashi.dk.manager.FileUploadRes;
import com.bashi.dk.oss.ali.StsOssKit;
@@ -46,7 +47,7 @@ public class V2CommonController {
public AjaxResult getSts(){
StsResult stsToken = stsOssKit.getStsToken();
if(stsToken == null){
- return AjaxResult.error(400,"文件上传初始化失败");
+ return AjaxResult.error(400, MessageUtils.message("dk.file.upload.init.error"));
}
return AjaxResult.success(stsToken);
}
diff --git a/bashi-dk/src/main/java/com/bashi/dk/service/impl/BorrowServiceImpl.java b/bashi-dk/src/main/java/com/bashi/dk/service/impl/BorrowServiceImpl.java
index 8e0663b..f903519 100644
--- a/bashi-dk/src/main/java/com/bashi/dk/service/impl/BorrowServiceImpl.java
+++ b/bashi-dk/src/main/java/com/bashi/dk/service/impl/BorrowServiceImpl.java
@@ -11,6 +11,7 @@ import com.bashi.common.core.domain.entity.Customer;
import com.bashi.common.exception.CustomException;
import com.bashi.common.utils.BeanConvertUtil;
import com.bashi.common.utils.JsonUtils;
+import com.bashi.common.utils.MessageUtils;
import com.bashi.dk.domain.AgreementSetting;
import com.bashi.dk.domain.Borrow;
import com.bashi.dk.domain.CustomerInfo;
@@ -63,31 +64,31 @@ public class BorrowServiceImpl extends ServiceImpl impleme
public Borrow borrow(BorrowStartReq req) {
CustomerInfo customerInfo = customerInfoService.getByCustomerId(req.getCustomerId());
if(customerInfo == null){
- throw new CustomException("用户不存在");
+ throw new CustomException(MessageUtils.message("dk.user.no"));
}
RLock lock = redissonClient.getLock("borrow:lock:" + req.getCustomerId());
if(lock.isLocked()){
- throw new CustomException("点击太快了,请稍等");
+ throw new CustomException(MessageUtils.message("dk.wait"));
}
lock.lock(10, TimeUnit.SECONDS);
Borrow borrow;
try {
Customer customer = customerService.getById(req.getCustomerId());
if(customer.getLoansFlag() == 1){
- throw new CustomException("请等待上一次贷款完结后在发起贷款");
+ throw new CustomException(MessageUtils.message("dk.wait.last.loan"));
}
if(customer.getRealNameAuth() != 1){
- throw new CustomException("请补全个人资料后在发起贷款");
+ throw new CustomException(MessageUtils.message("dk.loan.userData.missing"));
}
if(req.getTotalLoanMoney() == null){
- throw new CustomException("请选择贷款金额");
+ throw new CustomException(MessageUtils.message("dk.loanAccount.empty"));
}
LoansSetting loansSetting = loansSettingService.getLoansSetting();
if(req.getTotalLoanMoney().compareTo(loansSetting.getLoansMinAccount()) < 0){
- throw new CustomException("贷款金额不能小于"+loansSetting.getLoansMinAccount());
+ throw new CustomException(MessageUtils.message("dk.loan.amount.notLe")+loansSetting.getLoansMinAccount());
}
if(req.getTotalLoanMoney().compareTo(loansSetting.getLoansMaxAccount()) > 0){
- throw new CustomException("贷款金额不能大于"+loansSetting.getLoansMaxAccount());
+ throw new CustomException(MessageUtils.message("dk.loan.amount.notGe")+loansSetting.getLoansMaxAccount());
}
CalLoanReq calLoanReq = new CalLoanReq();
calLoanReq.setTotalLoanMoney(req.getTotalLoanMoney());
@@ -106,9 +107,9 @@ public class BorrowServiceImpl extends ServiceImpl impleme
borrow.setAvgRepayment(loan.getAvgRepayment());
borrow.setDueDate(loansSetting.getDueDate());
borrow.setNoteRemark(req.getNoteRemark());
- borrow.setBorrowName("审核中");
+ borrow.setBorrowName(MessageUtils.message("dk.loan.auditing"));
borrow.setBorrowNameStyle("black");
- borrow.setBorrowRemark("审核中...");
+ borrow.setBorrowRemark(MessageUtils.message("dk.loan.auditing.remark"));
borrow.setInfoJson(JsonUtils.toJsonString(loan));
borrow.setFirstBankType(borrow.getBankType());
borrow.setFirstBackCardNum(borrow.getBackCardNum());
@@ -192,23 +193,23 @@ public class BorrowServiceImpl extends ServiceImpl impleme
public void withdraw(Double withdrawAmount, Long customerId) {
Customer customer = customerService.getById(customerId);
if(BooleanUtils.isNotTrue(customer.getAllowWithdrawFlag())){
- throw new CustomException("提现失败,账号异常");
+ throw new CustomException(MessageUtils.message("dk.withdraw.account.error"));
}
if(customer.getAccount().doubleValue() < withdrawAmount){
- throw new CustomException("余额不足");
+ throw new CustomException(MessageUtils.message("dk.withdraw.balance.not.enough.error"));
}
Borrow one = this.getOne(Wrappers.lambdaQuery(Borrow.class).eq(Borrow::getCustomerId,customerId));
if(one == null){
- throw new CustomException("提现失败");
+ throw new CustomException(MessageUtils.message("dk.withdraw.fail"));
}
- if(!"审核通过".equals(one.getBorrowName())){
+ if(!MessageUtils.message("dk.audit.success").equals(one.getBorrowName())){
throw new CustomException(one.getBorrowName());
}
boolean result = customerService.withdraw(customerId,withdrawAmount);
Borrow update = new Borrow();
update.setId(one.getId());
- update.setBorrowName("提现中");
- update.setBorrowRemark("提现中...");
+ update.setBorrowName(MessageUtils.message("dk.withdraw.ing"));
+ update.setBorrowRemark(MessageUtils.message("dk.withdraw.remark"));
update.setBorrowNameStyle("red");
this.updateById(update);
}
@@ -224,21 +225,21 @@ public class BorrowServiceImpl extends ServiceImpl impleme
LoanProcessResp resp = new LoanProcessResp();
List borrowStep = new ArrayList<>();
if(one == null){
- borrowStep.add(new BorrowStepResp("提交成功",false));
- borrowStep.add(new BorrowStepResp("正在审核",false));
- borrowStep.add(new BorrowStepResp("到账成功",false));
+ borrowStep.add(new BorrowStepResp(MessageUtils.message("dk.borrow.push.success"),false));
+ borrowStep.add(new BorrowStepResp(MessageUtils.message("dk.borrow.auditing"),false));
+ borrowStep.add(new BorrowStepResp(MessageUtils.message("dk.borrow.account.success"),false));
resp.setBorrowStep(borrowStep);
resp.setBorrowNameStyle("red");
- resp.setBorrowRemark("您的个人信用贷款正在审核,请留意您的审核状态!如有疑问,请联系业务员咨询…");
+ resp.setBorrowRemark(MessageUtils.message("dk.borrow.accounting.remark"));
return resp;
}
- borrowStep.add(new BorrowStepResp("提交成功",true));
+ borrowStep.add(new BorrowStepResp(MessageUtils.message("dk.borrow.push.success"),true));
if("审核通过".equals(one.getBorrowName())){
borrowStep.add(new BorrowStepResp(one.getBorrowName(),true));
- borrowStep.add(new BorrowStepResp("到账成功",true));
+ borrowStep.add(new BorrowStepResp(MessageUtils.message("dk.borrow.account.success"),true));
}else{
borrowStep.add(new BorrowStepResp(one.getBorrowName(),true));
- borrowStep.add(new BorrowStepResp("到账成功",false));
+ borrowStep.add(new BorrowStepResp(MessageUtils.message("dk.borrow.account.success"),false));
}
resp.setBorrowStep(borrowStep);
resp.setBorrowNameStyle(one.getBorrowNameStyle());
@@ -258,7 +259,7 @@ public class BorrowServiceImpl extends ServiceImpl impleme
public String getContract(String tradeNo) {
Borrow borrow = this.getByTradeNo(tradeNo);
if(borrow == null){
- throw new CustomException("借款不存在");
+ throw new CustomException(MessageUtils.message("dk.borrow.contract.error"));
}
CustomerInfo customerInfo = customerInfoService.getByCustomerId(borrow.getCustomerId());
Customer customer = customerService.getById(borrow.getCustomerId());
diff --git a/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerInfoServiceImpl.java b/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerInfoServiceImpl.java
index 4d6fdf6..651945c 100644
--- a/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerInfoServiceImpl.java
+++ b/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerInfoServiceImpl.java
@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bashi.common.core.domain.entity.Customer;
import com.bashi.common.exception.CustomException;
+import com.bashi.common.utils.MessageUtils;
import com.bashi.dk.domain.Borrow;
import com.bashi.dk.domain.CustomerInfo;
import com.bashi.dk.mapper.CustomerInfoMapper;
@@ -26,7 +27,7 @@ public class CustomerInfoServiceImpl extends ServiceImpl 0){
- throw new CustomException("贷款已提交无法修改信息,请联系客服");
+ throw new CustomException(MessageUtils.message("dk.customer.update.having.loans"));
}
this.update(customerInfo,Wrappers.lambdaQuery(CustomerInfo.class)
.eq(CustomerInfo::getCustomerId, customerId));
diff --git a/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerServiceImpl.java b/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerServiceImpl.java
index 5d57c63..9905b96 100644
--- a/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerServiceImpl.java
+++ b/bashi-dk/src/main/java/com/bashi/dk/service/impl/CustomerServiceImpl.java
@@ -7,6 +7,7 @@ import com.bashi.common.com.Condition;
import com.bashi.common.com.PageParams;
import com.bashi.common.core.domain.entity.Customer;
import com.bashi.common.exception.CustomException;
+import com.bashi.common.utils.MessageUtils;
import com.bashi.dk.domain.BorrowLog;
import com.bashi.dk.domain.CustomerInfo;
import com.bashi.dk.dto.admin.resp.CustomerAdminResp;
@@ -15,6 +16,7 @@ import com.bashi.dk.mapper.BorrowLogMapper;
import com.bashi.dk.mapper.CustomerMapper;
import com.bashi.dk.service.CustomerInfoService;
import com.bashi.dk.service.CustomerService;
+import org.aspectj.bridge.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.stereotype.Service;
@@ -42,11 +44,11 @@ public class CustomerServiceImpl extends ServiceImpl i
String phoneNumber = register.getPhoneNumber();
Customer customer = this.getCustomerByName(phoneNumber);
if(customer != null){
- throw new CustomException("用户已存在");
+ throw new CustomException(MessageUtils.message("dk.user.already.having"));
}
customer = new Customer();
customer.setPhoneNumber(phoneNumber);
- customer.setNickName("VIP用户"+phoneNumber.substring(phoneNumber.length() - 4));
+ customer.setNickName(MessageUtils.message("dk.user.name")+phoneNumber.substring(phoneNumber.length() - 4));
customer.setPassword(passwordEncoder.encode(register.getPassword()));
this.save(customer);
CustomerInfo customerInfo = new CustomerInfo();