From 0be377f923c7285d53621130b768573de269cda7 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Jul 2022 16:58:20 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E5=BE=85=E7=BB=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/epmet/entity/ServerInfoDTO.java | 15 +++++++ .../impl/IcUserDemandRecServiceImpl.java | 45 ++++++++++++++----- 2 files changed, 48 insertions(+), 12 deletions(-) create mode 100644 epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ServerInfoDTO.java diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ServerInfoDTO.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ServerInfoDTO.java new file mode 100644 index 0000000000..39bdd462f5 --- /dev/null +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/entity/ServerInfoDTO.java @@ -0,0 +1,15 @@ +package com.epmet.entity; + +import lombok.Data; + +/** + * @Description + * @Author yzm + * @Date 2022/7/27 16:23 + */ +@Data +public class ServerInfoDTO { + private String serviceName; + private String mobile; +} + diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index c1acbcd859..9458f5ddff 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -414,11 +414,11 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl Date: Wed, 27 Jul 2022 17:44:17 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=9F=A5=E8=A7=92=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/dto/form/GovRoleListDTO.java | 49 +++++++++++++++++++ .../com/epmet/feign/GovAccessFeignClient.java | 9 ++-- .../GovAccessFeignClientFallBack.java | 11 +++-- .../epmet/controller/GovRoleController.java | 6 +++ .../main/java/com/epmet/dao/GovRoleDao.java | 2 + .../com/epmet/service/GovRoleService.java | 3 ++ .../service/impl/GovRoleServiceImpl.java | 6 +++ .../src/main/resources/mapper/GovRoleDao.xml | 12 +++++ 8 files changed, 90 insertions(+), 8 deletions(-) create mode 100644 epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/GovRoleListDTO.java diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/GovRoleListDTO.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/GovRoleListDTO.java new file mode 100644 index 0000000000..7ff4de4670 --- /dev/null +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/GovRoleListDTO.java @@ -0,0 +1,49 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.epmet.dto.form; + +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; +import java.util.List; + + +/** + * 角色管理 + * + * @author generator generator@elink-cn.com + * @since v1.0.0 2020-03-18 + */ +@Data +public class GovRoleListDTO implements Serializable { + + private static final long serialVersionUID = 1L; + + /** + * 客户id + */ + private String customerId; + + /** + * 角色名称 + */ + private String name; + + +} \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java index 36ccf542bb..d5b6623ea8 100644 --- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/GovAccessFeignClient.java @@ -2,10 +2,8 @@ package com.epmet.feign; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.form.GetStaffExistRoleFormDTO; -import com.epmet.dto.form.InitDefaultOperationsFormDTO; -import com.epmet.dto.form.ListOpePermsFormDTO; -import com.epmet.dto.form.RoleUserFormDTO; +import com.epmet.dto.GovRoleDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.NewUserRoleResultDTO; import com.epmet.feign.fallback.GovAccessFeignClientFallBackFactory; import org.springframework.cloud.openfeign.FeignClient; @@ -52,4 +50,7 @@ public interface GovAccessFeignClient { @PostMapping("/gov/access/govroleuser/getStaffExistRole") Result> getStaffExistRole(@RequestBody GetStaffExistRoleFormDTO formDTO); + @PostMapping("/gov/access/govrole/getgovrole") + Result getGovRole(@RequestBody GovRoleListDTO formDTO); + } diff --git a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java index bfb9acbc3b..9fb58edf69 100644 --- a/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java +++ b/epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/feign/fallback/GovAccessFeignClientFallBack.java @@ -3,10 +3,8 @@ package com.epmet.feign.fallback; import com.epmet.commons.tools.constant.ServiceConstant; import com.epmet.commons.tools.utils.ModuleUtils; import com.epmet.commons.tools.utils.Result; -import com.epmet.dto.form.GetStaffExistRoleFormDTO; -import com.epmet.dto.form.InitDefaultOperationsFormDTO; -import com.epmet.dto.form.ListOpePermsFormDTO; -import com.epmet.dto.form.RoleUserFormDTO; +import com.epmet.dto.GovRoleDTO; +import com.epmet.dto.form.*; import com.epmet.dto.result.NewUserRoleResultDTO; import com.epmet.feign.GovAccessFeignClient; @@ -40,4 +38,9 @@ public class GovAccessFeignClientFallBack implements GovAccessFeignClient { public Result> getStaffExistRole(GetStaffExistRoleFormDTO formDTO) { return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "getStaffExistRole", formDTO); } + + @Override + public Result getGovRole(GovRoleListDTO formDTO) { + return ModuleUtils.feignConError(ServiceConstant.GOV_ACCESS_SERVER, "getGovRole", formDTO); + } } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java index c11faba160..0159a8d891 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/GovRoleController.java @@ -27,6 +27,7 @@ import com.epmet.commons.tools.validator.group.AddGroup; import com.epmet.commons.tools.validator.group.DefaultGroup; import com.epmet.commons.tools.validator.group.UpdateGroup; import com.epmet.dto.GovRoleDTO; +import com.epmet.dto.form.GovRoleListDTO; import com.epmet.service.GovRoleMenuService; import com.epmet.service.GovRoleService; import org.springframework.beans.factory.annotation.Autowired; @@ -102,4 +103,9 @@ public class GovRoleController { return new Result>().ok(data); } + @PostMapping("getgovrole") + public Result getGovRole(@RequestBody GovRoleListDTO fromDTO){ + return new Result().ok(govRoleService.getGovRole(fromDTO)); + } + } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java index 526dbf9b37..a70c839a63 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/dao/GovRoleDao.java @@ -9,6 +9,7 @@ package com.epmet.dao; import com.epmet.commons.mybatis.dao.BaseDao; +import com.epmet.dto.GovRoleDTO; import com.epmet.dto.result.NewUserRoleResultDTO; import com.epmet.entity.GovRoleEntity; import org.apache.ibatis.annotations.Mapper; @@ -33,4 +34,5 @@ public interface GovRoleDao extends BaseDao { */ List getCustomerRoles(@Param("customerId")String customerId); + GovRoleDTO selectGovRole(@Param("customerId") String customerId, @Param("name") String name); } diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java index 4fbf7e0f58..b7ca62a420 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/GovRoleService.java @@ -20,6 +20,7 @@ package com.epmet.service; import com.epmet.commons.mybatis.service.BaseService; import com.epmet.commons.tools.page.PageData; import com.epmet.dto.GovRoleDTO; +import com.epmet.dto.form.GovRoleListDTO; import com.epmet.entity.GovRoleEntity; import java.util.List; @@ -92,4 +93,6 @@ public interface GovRoleService extends BaseService { * @date 2020-03-18 */ void delete(String[] ids); + + GovRoleDTO getGovRole(GovRoleListDTO fromDTO); } \ No newline at end of file diff --git a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java index 72a542c9e7..c171d081d9 100644 --- a/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java +++ b/epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/GovRoleServiceImpl.java @@ -28,6 +28,7 @@ import com.epmet.commons.tools.security.user.LoginUserUtil; import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.dao.GovRoleDao; import com.epmet.dto.GovRoleDTO; +import com.epmet.dto.form.GovRoleListDTO; import com.epmet.entity.GovRoleEntity; import com.epmet.redis.GovRoleRedis; import com.epmet.service.GovRoleMenuService; @@ -122,4 +123,9 @@ public class GovRoleServiceImpl extends BaseServiceImpl + + + From a209553d82fac426d5770d68a734a3523e7e0cef Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Wed, 27 Jul 2022 18:13:49 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=8C=87=E6=B4=BE=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=8F=91=E7=9F=AD=E4=BF=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcUserDemandRecServiceImpl.java | 21 ++++++++-- .../com/epmet/dto/form/SendSmsFormDTO.java | 42 +++++++++++++++++++ .../feign/EpmetMessageOpenFeignClient.java | 8 +++- .../EpmetMessageOpenFeignClientFallback.java | 5 +++ .../com/epmet/controller/SmsController.java | 14 +++++++ .../java/com/epmet/service/SysSmsService.java | 2 + .../epmet/service/impl/SysSmsServiceImpl.java | 30 ++++++++++++- ...em_zhzl.sql => V0.0.35__formitem_zhzl.sql} | 0 8 files changed, 116 insertions(+), 6 deletions(-) create mode 100644 epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/SendSmsFormDTO.java rename epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/{V0.0.34__formitem_zhzl.sql => V0.0.35__formitem_zhzl.sql} (100%) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 9458f5ddff..b85121ff68 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -43,6 +43,7 @@ import com.epmet.commons.tools.utils.DateUtils; import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.utils.ScanContentUtils; import com.epmet.constant.ReadFlagConstant; +import com.epmet.constant.SmsTemplateConstant; import com.epmet.constant.UserDemandConstant; import com.epmet.constant.UserMessageTypeConstant; import com.epmet.dao.IcUserDemandOperateLogDao; @@ -431,7 +432,7 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl smsList=new ArrayList<>(); + SendSmsFormDTO sms = new SendSmsFormDTO(); + sms.setCustomerId(customerId); + sms.setMobile(mobile); + sms.setAliyunTemplateCode(SmsTemplateConstant.PROJECT_TRANSFER); + List paramsContent=new ArrayList<>(); + paramsContent.add(String.format("%s给您指派了一个新的需求,请查看",staffInfoCacheResult.getAgencyName())); + sms.setParamsContent(paramsContent); + smsList.add(sms); + messageOpenFeignClient.sendMsg(smsList); + } /** diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/SendSmsFormDTO.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/SendSmsFormDTO.java new file mode 100644 index 0000000000..ee2802f691 --- /dev/null +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/dto/form/SendSmsFormDTO.java @@ -0,0 +1,42 @@ +package com.epmet.dto.form; + +import com.epmet.commons.tools.validator.group.CustomerClientShowGroup; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; +import java.util.List; + +/** + * @Description + * @Author yzm + * @Date 2022/7/27 17:23 + */ +@Data +public class SendSmsFormDTO implements Serializable { + public interface AddUserInternalGroup { + } + + public interface AddUserShowGroup extends CustomerClientShowGroup { + } + + /** + * 手机号 + */ + @NotBlank(message = "手机号不能为空", groups = {AddUserShowGroup.class}) + private String mobile; + + /** + * 场景: + */ + @NotBlank(message = "短信模板编码不能为空", groups = {AddUserInternalGroup.class}) + private String aliyunTemplateCode; + + /** + * 如果短信模板内有参数,按序传入 + */ + private List paramsContent; + + private String customerId; +} + diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java index 920d508b89..447111aca6 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/EpmetMessageOpenFeignClient.java @@ -21,8 +21,8 @@ import java.util.List; * @author yinzuomei@elink-cn.com * @date 2020/6/4 13:47 */ -//@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallbackFactory = EpmetMessageOpenFeignClientFallbackFactory.class, url = "http://127.0.0.1:8085") -@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallbackFactory = EpmetMessageOpenFeignClientFallbackFactory.class) +@FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallbackFactory = EpmetMessageOpenFeignClientFallbackFactory.class, url = "http://127.0.0.1:8085") +// @FeignClient(name = ServiceConstant.EPMET_MESSAGE_SERVER, fallbackFactory = EpmetMessageOpenFeignClientFallbackFactory.class) public interface EpmetMessageOpenFeignClient { /** * 发送短信 @@ -123,4 +123,8 @@ public interface EpmetMessageOpenFeignClient { */ @PostMapping("/message/system/pendding-mq-msg-scan") Result penddingMqMsgScan(); + + + @PostMapping(value = "message/sms/send-msg", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + Result sendMsg(@RequestBody List formDTO); } diff --git a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java index eba096ff0f..2d5c0d9073 100644 --- a/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java +++ b/epmet-module/epmet-message/epmet-message-client/src/main/java/com/epmet/feign/fallback/EpmetMessageOpenFeignClientFallback.java @@ -73,4 +73,9 @@ public class EpmetMessageOpenFeignClientFallback implements EpmetMessageOpenFeig public Result penddingMqMsgScan() { return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "penddingMqMsgScan"); } + + @Override + public Result sendMsg(List formDTO) { + return ModuleUtils.feignConError(ServiceConstant.EPMET_MESSAGE_SERVER, "sendMsg",formDTO); + } } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/SmsController.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/SmsController.java index c41ad3195d..47684b67c7 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/SmsController.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/controller/SmsController.java @@ -16,6 +16,7 @@ import com.epmet.commons.tools.validator.group.AliyunGroup; import com.epmet.commons.tools.validator.group.QcloudGroup; import com.epmet.dto.SysSmsDTO; import com.epmet.dto.form.ProjectSendMsgFormDTO; +import com.epmet.dto.form.SendSmsFormDTO; import com.epmet.dto.form.SendVerificationCodeFormDTO; import com.epmet.dto.result.SendVerificationCodeResultDTO; import com.epmet.enums.PlatformEnum; @@ -128,4 +129,17 @@ public class SmsController { return new Result(); } + /** + * 通用发短信方法,传入短信模板,内容 + * + * @param formDTOList + * @return + */ + @PostMapping("send-msg") + public Result sendMsg(@RequestBody List formDTOList) { + ValidatorUtils.validateEntity(formDTOList, SendSmsFormDTO.AddUserShowGroup.class, SendSmsFormDTO.AddUserInternalGroup.class); + sysSmsService.sendMsg(formDTOList); + return new Result(); + } + } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/SysSmsService.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/SysSmsService.java index 1327aff692..0025768d94 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/SysSmsService.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/SysSmsService.java @@ -13,6 +13,7 @@ import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.utils.Result; import com.epmet.dto.SysSmsDTO; import com.epmet.dto.form.ProjectSendMsgFormDTO; +import com.epmet.dto.form.SendSmsFormDTO; import com.epmet.dto.form.SendVerificationCodeFormDTO; import com.epmet.dto.result.SendVerificationCodeResultDTO; import com.epmet.entity.SysSmsEntity; @@ -77,5 +78,6 @@ public interface SysSmsService extends BaseService { **/ void projectSendMsg(List formDTOList); + void sendMsg(List formDTOList); } diff --git a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java index 1fc41bc718..ee4c3be657 100644 --- a/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java +++ b/epmet-module/epmet-message/epmet-message-server/src/main/java/com/epmet/service/impl/SysSmsServiceImpl.java @@ -13,6 +13,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.Constant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.ErrorCode; import com.epmet.commons.tools.exception.RenException; @@ -25,6 +26,7 @@ import com.epmet.dao.SysSmsDao; import com.epmet.dto.SysSmsDTO; import com.epmet.dto.form.CrmParameterFormDTO; import com.epmet.dto.form.ProjectSendMsgFormDTO; +import com.epmet.dto.form.SendSmsFormDTO; import com.epmet.dto.form.SendVerificationCodeFormDTO; import com.epmet.dto.result.CrmParameterResultDTO; import com.epmet.dto.result.SendVerificationCodeResultDTO; @@ -323,7 +325,33 @@ public class SysSmsServiceImpl extends BaseServiceImpl service.sendSmsMsg(sysSmsDTO); } } catch (Exception e) { - logger.warn(String.format("项目提醒发送短信失败,失败手机号:%s,ErrorCode:%s", sysSmsDTO.getMobile(), e.getMessage())); + logger.warn(String.format("发送短信失败,失败手机号:%s,ErrorCode:%s", sysSmsDTO.getMobile(), e.getMessage())); + } + } + + @Override + public void sendMsg(List formDTOList) { + try { + for(SendSmsFormDTO formDTO:formDTOList){ + SysSmsDTO sysSmsDTO = new SysSmsDTO(); + sysSmsDTO.setMobile(formDTO.getMobile()); + sysSmsDTO.setAliyunTemplateCode(formDTO.getAliyunTemplateCode()); + sysSmsDTO.setCustomerId(formDTO.getCustomerId()); + HashMap map = new HashMap<>(); + try{ + if(SmsTemplateConstant.PROJECT_TRANSFER.equals(formDTO.getAliyunTemplateCode())){ + map.put("params1", formDTO.getParamsContent().get(NumConstant.ZERO)); + } + String paramJson = new ObjectMapper().writeValueAsString(map); + sysSmsDTO.setParams(paramJson); + } catch (JsonProcessingException e) { + log.warn("sendMsg JsonProcessingException", e); + } + //推送短信 + this.sendMsg(sysSmsDTO); + } + } catch (Exception e) { + logger.error("sendMsg exception", e); } } diff --git a/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.34__formitem_zhzl.sql b/epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.35__formitem_zhzl.sql similarity index 100% rename from epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.34__formitem_zhzl.sql rename to epmet-module/oper-customize/oper-customize-server/src/main/resources/db/migration/V0.0.35__formitem_zhzl.sql