diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/SendMessageDTO.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/SendMessageDTO.java index c222942..ce52f66 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/SendMessageDTO.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/domain/SendMessageDTO.java @@ -20,6 +20,8 @@ public class SendMessageDTO extends BaseEntity { * 接收人 */ private String readList; + + private Boolean isSendPhone; /** * 发送内容 */ @@ -29,6 +31,8 @@ public class SendMessageDTO extends BaseEntity { private List readerList; + private List phoneList; + public String getSender() { return sender; } @@ -73,6 +77,22 @@ public class SendMessageDTO extends BaseEntity { return sendType; } + public Boolean getIsSendPhone() { + return isSendPhone; + } + + public void setIsSendPhone(Boolean sendPhone) { + isSendPhone = sendPhone; + } + + public List getPhoneList() { + return phoneList; + } + + public void setPhoneList(List phoneList) { + this.phoneList = phoneList; + } + public void setSendType(String sendType) { this.sendType = sendType; } diff --git a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/SysSendInfoServiceImpl.java b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/SysSendInfoServiceImpl.java index 331fb0e..4d64484 100644 --- a/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/SysSendInfoServiceImpl.java +++ b/RuoYi-Vue-Oracle/src/main/java/com/ruoyi/project/oil/service/impl/SysSendInfoServiceImpl.java @@ -31,7 +31,15 @@ public class SysSendInfoServiceImpl implements ISysSendInfoService { readList.forEach(reader -> { sysSendInfoMapper.sendMessage(sendMessageDTO,reader); }); - //todo 调用发送短信接口 + if(sendMessageDTO.getIsSendPhone() !=null && sendMessageDTO.getIsSendPhone()){//发送短信 + List phoneList= sendMessageDTO.getPhoneList(); + String phone = String.join(",", phoneList); + String msg=sendMessageDTO.getSendText(); + String dwdm="SGJT-山港集团"; + //todo 调用发送短信接口 + + } + return 1; diff --git a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/SysSendInfoMapper.xml b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/SysSendInfoMapper.xml index 0159780..00eb39a 100644 --- a/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/SysSendInfoMapper.xml +++ b/RuoYi-Vue-Oracle/src/main/resources/mybatis/oil/SysSendInfoMapper.xml @@ -41,7 +41,7 @@ - update sys_send_info set read_time=now(),is_read='1' + update sys_send_info set read_time=sysdate,is_read='1' where id=#{id} diff --git a/ruoyi-ui/src/api/home.js b/ruoyi-ui/src/api/home.js index f126b8f..c735d67 100644 --- a/ruoyi-ui/src/api/home.js +++ b/ruoyi-ui/src/api/home.js @@ -73,3 +73,10 @@ export function readMsg(id) { method: 'get', }) } + //查看消息详情 + export function getMsgDetail(id) { + return request({ + url: '/sendInfo/getMsgDetail/'+id, + method: 'get', + }) + } \ No newline at end of file diff --git a/ruoyi-ui/src/views/demostrate/alarm/sendMsg.vue b/ruoyi-ui/src/views/demostrate/alarm/sendMsg.vue index 7ae2b1f..4fdc46e 100644 --- a/ruoyi-ui/src/views/demostrate/alarm/sendMsg.vue +++ b/ruoyi-ui/src/views/demostrate/alarm/sendMsg.vue @@ -11,8 +11,13 @@ -
发送
+ + + +
同时发送短信
+ +
发送
@@ -54,8 +59,10 @@ export default { }, data() { return { + isSendPhone:false, isShowUser: false, userList: [], + phoneList:[], shareContent: "", openConfig1: false, } @@ -63,10 +70,15 @@ export default { methods: { sendMsg() { let readList = [] + this.phoneList=[] this.userList.forEach(element => { readList.push(element.userName) + this.phoneList.push(element.phonenumber) }); + let params = { + phoneList :this.phoneList, + isSendPhone:this.isSendPhone, //readList: JSON.stringify(readList), readerList: readList, sendText: this.shareContent, diff --git a/ruoyi-ui/src/views/home/components/UserSelect.vue b/ruoyi-ui/src/views/home/components/UserSelect.vue index 2f0faf7..ac66dc7 100644 --- a/ruoyi-ui/src/views/home/components/UserSelect.vue +++ b/ruoyi-ui/src/views/home/components/UserSelect.vue @@ -1,4 +1,3 @@ - - +