Commit 831ad3ee by guojuxing

修改超级管理员,添加发送短信业务逻辑

parent 2082cd62
......@@ -212,10 +212,20 @@ public class EnterpriseController {
ServiceResponse<Void> result = userApiService.editAdmin(userDTO);
//自动创建密码,需要发送短信
if (result.isSuccess() && isAutoPassword) {
String[] smsArr = new String[] { UserDetailUtils.getUserDetail().getEnterpriseInfo().getEnterpriseName(),
Integer enterpriseId = userDTO.getEnterpriseId();
//商户ID查询商户信息
//商户名称
String enterpriseName = null;
ServiceResponse<EnterpriseDTO> enterpriseResult = enterpriseApiService.getEnterpriseById(enterpriseId);
if (enterpriseResult.isSuccess()) {
enterpriseName = enterpriseResult.getResult().getEnterpriseName();
} else {
LOGGER.warn(enterpriseResult.getMessage());
}
String[] smsArr = new String[] { enterpriseName,
userDTO.getPhoneNumber(), userDTO.getPassword() };
ServiceResponse<Void> smsSendResult = smsSendApiService.sendPlatformSms("GICpassword001",
UserDetailUtils.getUserDetail().getEnterpriseId(), userDTO.getPhoneAreaCode(),
enterpriseId, userDTO.getPhoneAreaCode(),
userDTO.getPhoneNumber(), smsArr);
if (!smsSendResult.isSuccess()) {
LOGGER.warn(smsSendResult.getMessage());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment