Compare commits
No commits in common. "0e2cd55fbd4742991e03e01f44942e13cea58695" and "a425fd5ea4ff9651203c6d5b9351a3462de74f56" have entirely different histories.
0e2cd55fbd
...
a425fd5ea4
@ -7,7 +7,6 @@ import com.ktg.common.constant.UserConstants;
|
|||||||
import com.ktg.common.core.domain.entity.SysUser;
|
import com.ktg.common.core.domain.entity.SysUser;
|
||||||
import com.ktg.common.utils.StringUtils;
|
import com.ktg.common.utils.StringUtils;
|
||||||
import com.ktg.framework.message.MessageProvider;
|
import com.ktg.framework.message.MessageProvider;
|
||||||
import com.ktg.system.domain.dto.AgvArrivedDto;
|
|
||||||
import com.ktg.system.service.ISysUserService;
|
import com.ktg.system.service.ISysUserService;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -36,7 +35,8 @@ import com.ktg.common.core.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/system/message")
|
@RequestMapping("/system/message")
|
||||||
public class SysMessageController extends BaseController {
|
public class SysMessageController extends BaseController
|
||||||
|
{
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysMessageService sysMessageService;
|
private ISysMessageService sysMessageService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@ -49,7 +49,8 @@ public class SysMessageController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:message:list')")
|
@PreAuthorize("@ss.hasPermi('system:message:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysMessage sysMessage) {
|
public TableDataInfo list(SysMessage sysMessage)
|
||||||
|
{
|
||||||
startPage();
|
startPage();
|
||||||
List<SysMessage> list = sysMessageService.selectSysMessageList(sysMessage);
|
List<SysMessage> list = sysMessageService.selectSysMessageList(sysMessage);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
@ -61,7 +62,8 @@ public class SysMessageController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('system:message:export')")
|
@PreAuthorize("@ss.hasPermi('system:message:export')")
|
||||||
@Log(title = "消息", businessType = BusinessType.EXPORT)
|
@Log(title = "消息", businessType = BusinessType.EXPORT)
|
||||||
@PostMapping("/export")
|
@PostMapping("/export")
|
||||||
public void export(HttpServletResponse response, SysMessage sysMessage) {
|
public void export(HttpServletResponse response, SysMessage sysMessage)
|
||||||
|
{
|
||||||
List<SysMessage> list = sysMessageService.selectSysMessageList(sysMessage);
|
List<SysMessage> list = sysMessageService.selectSysMessageList(sysMessage);
|
||||||
ExcelUtil<SysMessage> util = new ExcelUtil<SysMessage>(SysMessage.class);
|
ExcelUtil<SysMessage> util = new ExcelUtil<SysMessage>(SysMessage.class);
|
||||||
util.exportExcel(response, list, "消息数据");
|
util.exportExcel(response, list, "消息数据");
|
||||||
@ -72,7 +74,8 @@ public class SysMessageController extends BaseController {
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:message:query')")
|
@PreAuthorize("@ss.hasPermi('system:message:query')")
|
||||||
@GetMapping(value = "/{messageId}")
|
@GetMapping(value = "/{messageId}")
|
||||||
public AjaxResult getInfo(@PathVariable("messageId") Long messageId) {
|
public AjaxResult getInfo(@PathVariable("messageId") Long messageId)
|
||||||
|
{
|
||||||
return AjaxResult.success(sysMessageService.selectSysMessageByMessageId(messageId));
|
return AjaxResult.success(sysMessageService.selectSysMessageByMessageId(messageId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,28 +85,20 @@ public class SysMessageController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('system:message:add')")
|
@PreAuthorize("@ss.hasPermi('system:message:add')")
|
||||||
@Log(title = "消息", businessType = BusinessType.INSERT)
|
@Log(title = "消息", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SysMessage sysMessage) {
|
public AjaxResult add(@RequestBody SysMessage sysMessage)
|
||||||
|
{
|
||||||
messageProvider.sendMessage(sysMessage);
|
messageProvider.sendMessage(sysMessage);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 通知用户agv小车到达
|
|
||||||
*/
|
|
||||||
@Log(title = "消息", businessType = BusinessType.INSERT)
|
|
||||||
@PostMapping("/open/agv-arrived")
|
|
||||||
public AjaxResult addAgv(@RequestBody AgvArrivedDto agvArrivedDto) {
|
|
||||||
sysMessageService.insertSysPromptMessage("AGV小车已到达", "订单号: " + agvArrivedDto.getOrderNo());
|
|
||||||
return AjaxResult.success();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改消息
|
* 修改消息
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('system:message:edit')")
|
@PreAuthorize("@ss.hasPermi('system:message:edit')")
|
||||||
@Log(title = "消息", businessType = BusinessType.UPDATE)
|
@Log(title = "消息", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody SysMessage sysMessage) {
|
public AjaxResult edit(@RequestBody SysMessage sysMessage)
|
||||||
|
{
|
||||||
return toAjax(sysMessageService.updateSysMessage(sysMessage));
|
return toAjax(sysMessageService.updateSysMessage(sysMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -113,7 +108,8 @@ public class SysMessageController extends BaseController {
|
|||||||
@PreAuthorize("@ss.hasPermi('system:message:remove')")
|
@PreAuthorize("@ss.hasPermi('system:message:remove')")
|
||||||
@Log(title = "消息", businessType = BusinessType.DELETE)
|
@Log(title = "消息", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{messageIds}")
|
@DeleteMapping("/{messageIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] messageIds) {
|
public AjaxResult remove(@PathVariable Long[] messageIds)
|
||||||
|
{
|
||||||
for (Long messageId: messageIds
|
for (Long messageId: messageIds
|
||||||
) {
|
) {
|
||||||
SysMessage sysMessage = sysMessageService.selectSysMessageByMessageId(messageId);
|
SysMessage sysMessage = sysMessageService.selectSysMessageByMessageId(messageId);
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
package com.ktg.system.domain.dto;
|
|
||||||
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
|
||||||
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class AgvArrivedDto {
|
|
||||||
@NotBlank(message = "订单号不能为空")
|
|
||||||
String orderNo;
|
|
||||||
}
|
|
@ -18,17 +18,8 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectNoticeVo">
|
<sql id="selectNoticeVo">
|
||||||
SELECT notice_id,
|
select notice_id, notice_title, notice_type, cast(notice_content as char) as notice_content, status, create_by, create_time, update_by, update_time, remark
|
||||||
notice_title,
|
from sys_notice
|
||||||
notice_type,
|
|
||||||
notice_content
|
|
||||||
status,
|
|
||||||
create_by,
|
|
||||||
create_time,
|
|
||||||
update_by,
|
|
||||||
update_time,
|
|
||||||
remark
|
|
||||||
FROM sys_notice
|
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
<select id="selectNoticeById" parameterType="Long" resultMap="SysNoticeResult">
|
||||||
@ -85,9 +76,7 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<delete id="deleteNoticeById" parameterType="Long">
|
<delete id="deleteNoticeById" parameterType="Long">
|
||||||
delete
|
delete from sys_notice where notice_id = #{noticeId}
|
||||||
from sys_notice
|
|
||||||
where notice_id = #{noticeId}
|
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteNoticeByIds" parameterType="Long">
|
<delete id="deleteNoticeByIds" parameterType="Long">
|
||||||
|
Loading…
Reference in New Issue
Block a user