消息通知
This commit is contained in:
parent
43bc1fb506
commit
1c6e360d91
|
@ -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<String> readerList;
|
||||
|
||||
private List<String> 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<String> getPhoneList() {
|
||||
return phoneList;
|
||||
}
|
||||
|
||||
public void setPhoneList(List<String> phoneList) {
|
||||
this.phoneList = phoneList;
|
||||
}
|
||||
|
||||
public void setSendType(String sendType) {
|
||||
this.sendType = sendType;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,15 @@ public class SysSendInfoServiceImpl implements ISysSendInfoService {
|
|||
readList.forEach(reader -> {
|
||||
sysSendInfoMapper.sendMessage(sendMessageDTO,reader);
|
||||
});
|
||||
//todo 调用发送短信接口
|
||||
if(sendMessageDTO.getIsSendPhone() !=null && sendMessageDTO.getIsSendPhone()){//发送短信
|
||||
List<String> phoneList= sendMessageDTO.getPhoneList();
|
||||
String phone = String.join(",", phoneList);
|
||||
String msg=sendMessageDTO.getSendText();
|
||||
String dwdm="SGJT-山港集团";
|
||||
//todo 调用发送短信接口
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return 1;
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
</select>
|
||||
|
||||
<update id="readMsg">
|
||||
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}
|
||||
</update>
|
||||
|
||||
|
|
|
@ -73,3 +73,10 @@ export function readMsg(id) {
|
|||
method: 'get',
|
||||
})
|
||||
}
|
||||
//查看消息详情
|
||||
export function getMsgDetail(id) {
|
||||
return request({
|
||||
url: '/sendInfo/getMsgDetail/'+id,
|
||||
method: 'get',
|
||||
})
|
||||
}
|
|
@ -11,8 +11,13 @@
|
|||
<el-input type="textarea" :rows="2" placeholder="请输入消息内容..." v-model="shareContent">
|
||||
</el-input>
|
||||
</div>
|
||||
<div> <el-button class="agreeButton" @click="sendMsg">发送</el-button></div>
|
||||
|
||||
|
||||
<user-select v-if="isShowUser" :isShowUser="isShowUser" @closeUser="closeUser" @chooseUser="chooseUser" />
|
||||
|
||||
<div style="margin-left:5px;height: 50px;"> <el-checkbox v-model="isSendPhone">同时发送短信</el-checkbox></div>
|
||||
|
||||
<div style="margin-left:5px;height: 50px;"> <el-button class="agreeButton" @click="sendMsg">发送</el-button></div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
@ -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,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
<template>
|
||||
<el-dialog title="选择联系人" :visible.sync="openConfig1" :before-close="handleClose">
|
||||
<el-form :model="userParams" size="small" :inline="true" label-width="100px">
|
||||
|
@ -8,6 +7,9 @@
|
|||
<el-form-item label="用户昵称" prop="nickName">
|
||||
<el-input v-model="userParams.nickName" placeholder="请输入用户昵称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button class="agreeButton" @click="quetyList()">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="userList" @selection-change="handleSelectionChange">
|
||||
|
@ -17,12 +19,14 @@
|
|||
<el-table-column label="企业" align="center" prop="deptName" />
|
||||
<el-table-column label="用户手机号" align="center" prop="phonenumber" />
|
||||
</el-table>
|
||||
<pagination v-show="total > 0" :total="total" :page.sync="userParams.pageNum" :limit.sync="userParams.pageSize"
|
||||
@pagination="getList" />
|
||||
<div> <el-button class="agreeButton" @click="confirm">确定</el-button></div>
|
||||
<pagination style="margin-bottom: 10px;" v-show="total > 0" :total="total" :page.sync="userParams.pageNum"
|
||||
:limit.sync="userParams.pageSize" @pagination="getList" />
|
||||
<div style="height: 80px; margin: 10px; display: flex; justify-content: center; align-items: center;">
|
||||
<el-button class="agreeButton" @click="confirm">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<script>
|
||||
import { listUser } from "@/api/system/user";
|
||||
export default {
|
||||
|
@ -83,6 +87,13 @@ export default {
|
|||
handleSelectionChange(val) {
|
||||
this.selectList = val;
|
||||
},
|
||||
quetyList() {
|
||||
listUser(this.userParams).then(response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total;
|
||||
}
|
||||
);
|
||||
},
|
||||
getList() {
|
||||
listUser(this.addDateRange(this.userParams)).then(response => {
|
||||
this.userList = response.rows;
|
||||
|
@ -171,5 +182,4 @@ export default {
|
|||
border-color: #65a5f9;
|
||||
color: #FFF;
|
||||
}
|
||||
</style>
|
||||
|
||||
</style>
|
Loading…
Reference in New Issue