diff --git a/agri-system/src/main/java/com/agri/system/controller/SysImeiAutoLogController.java b/agri-system/src/main/java/com/agri/system/controller/SysImeiAutoLogController.java new file mode 100644 index 0000000..6d61c41 --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/controller/SysImeiAutoLogController.java @@ -0,0 +1,104 @@ +package com.agri.system.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.agri.common.annotation.Log; +import com.agri.common.core.controller.BaseController; +import com.agri.common.core.domain.AjaxResult; +import com.agri.common.enums.BusinessType; +import com.agri.system.domain.SysImeiAutoLog; +import com.agri.system.service.ISysImeiAutoLogService; +import com.agri.common.utils.poi.ExcelUtil; +import com.agri.common.core.page.TableDataInfo; + +/** + * 自动模式日志Controller + * + * @author lld + * @date 2026-03-29 + */ +@RestController +@RequestMapping("/warn/autolog") +public class SysImeiAutoLogController extends BaseController +{ + @Autowired + private ISysImeiAutoLogService sysImeiAutoLogService; + + /** + * 查询自动模式日志列表 + */ + @PreAuthorize("@ss.hasPermi('warn:autolog:list')") + @GetMapping("/list") + public TableDataInfo list(SysImeiAutoLog sysImeiAutoLog) + { + startPage(); + List list = sysImeiAutoLogService.selectSysImeiAutoLogList(sysImeiAutoLog); + return getDataTable(list); + } + + /** + * 导出自动模式日志列表 + */ + @PreAuthorize("@ss.hasPermi('warn:autolog:export')") + @Log(title = "自动模式日志", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysImeiAutoLog sysImeiAutoLog) + { + List list = sysImeiAutoLogService.selectSysImeiAutoLogList(sysImeiAutoLog); + ExcelUtil util = new ExcelUtil(SysImeiAutoLog.class); + util.exportExcel(response, list, "自动模式日志数据"); + } + + /** + * 获取自动模式日志详细信息 + */ + @PreAuthorize("@ss.hasPermi('warn:autolog:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysImeiAutoLogService.selectSysImeiAutoLogById(id)); + } + + /** + * 新增自动模式日志 + */ + @PreAuthorize("@ss.hasPermi('warn:autolog:add')") + @Log(title = "自动模式日志", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysImeiAutoLog sysImeiAutoLog) + { + return toAjax(sysImeiAutoLogService.insertSysImeiAutoLog(sysImeiAutoLog)); + } + + /** + * 修改自动模式日志 + */ + @PreAuthorize("@ss.hasPermi('warn:autolog:edit')") + @Log(title = "自动模式日志", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysImeiAutoLog sysImeiAutoLog) + { + return toAjax(sysImeiAutoLogService.updateSysImeiAutoLog(sysImeiAutoLog)); + } + + /** + * 删除自动模式日志 + */ + @PreAuthorize("@ss.hasPermi('warn:autolog:remove')") + @Log(title = "自动模式日志", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysImeiAutoLogService.deleteSysImeiAutoLogByIds(ids)); + } +} diff --git a/agri-system/src/main/java/com/agri/system/controller/SysMessageController.java b/agri-system/src/main/java/com/agri/system/controller/SysMessageController.java new file mode 100644 index 0000000..bfe2495 --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/controller/SysMessageController.java @@ -0,0 +1,104 @@ +package com.agri.system.controller; + +import java.util.List; +import javax.servlet.http.HttpServletResponse; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.agri.common.annotation.Log; +import com.agri.common.core.controller.BaseController; +import com.agri.common.core.domain.AjaxResult; +import com.agri.common.enums.BusinessType; +import com.agri.system.domain.SysMessage; +import com.agri.system.service.ISysMessageService; +import com.agri.common.utils.poi.ExcelUtil; +import com.agri.common.core.page.TableDataInfo; + +/** + * 系统消息中心Controller + * + * @author lld + * @date 2026-03-26 + */ +@RestController +@RequestMapping("/warn/message") +public class SysMessageController extends BaseController +{ + @Autowired + private ISysMessageService sysMessageService; + + /** + * 查询系统消息中心列表 + */ + @PreAuthorize("@ss.hasPermi('warn:message:list')") + @GetMapping("/list") + public TableDataInfo list(SysMessage sysMessage) + { + startPage(); + List list = sysMessageService.selectSysMessageList(sysMessage); + return getDataTable(list); + } + + /** + * 导出系统消息中心列表 + */ + @PreAuthorize("@ss.hasPermi('warn:message:export')") + @Log(title = "系统消息中心", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, SysMessage sysMessage) + { + List list = sysMessageService.selectSysMessageList(sysMessage); + ExcelUtil util = new ExcelUtil(SysMessage.class); + util.exportExcel(response, list, "系统消息中心数据"); + } + + /** + * 获取系统消息中心详细信息 + */ + @PreAuthorize("@ss.hasPermi('warn:message:query')") + @GetMapping(value = "/{id}") + public AjaxResult getInfo(@PathVariable("id") Long id) + { + return success(sysMessageService.selectSysMessageById(id)); + } + + /** + * 新增系统消息中心 + */ + @PreAuthorize("@ss.hasPermi('warn:message:add')") + @Log(title = "系统消息中心", businessType = BusinessType.INSERT) + @PostMapping + public AjaxResult add(@RequestBody SysMessage sysMessage) + { + return toAjax(sysMessageService.insertSysMessage(sysMessage)); + } + + /** + * 修改系统消息中心 + */ + @PreAuthorize("@ss.hasPermi('warn:message:edit')") + @Log(title = "系统消息中心", businessType = BusinessType.UPDATE) + @PutMapping + public AjaxResult edit(@RequestBody SysMessage sysMessage) + { + return toAjax(sysMessageService.updateSysMessage(sysMessage)); + } + + /** + * 删除系统消息中心 + */ + @PreAuthorize("@ss.hasPermi('warn:message:remove')") + @Log(title = "系统消息中心", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public AjaxResult remove(@PathVariable Long[] ids) + { + return toAjax(sysMessageService.deleteSysMessageByIds(ids)); + } +} diff --git a/agri-system/src/main/java/com/agri/system/domain/SysImeiAutoLog.java b/agri-system/src/main/java/com/agri/system/domain/SysImeiAutoLog.java new file mode 100644 index 0000000..d6b0a7a --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/domain/SysImeiAutoLog.java @@ -0,0 +1,198 @@ +package com.agri.system.domain; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.agri.common.annotation.Excel; +import com.agri.common.core.domain.BaseEntity; + +/** + * 自动模式日志对象 sys_imei_auto_log + * + * @author lld + * @date 2026-03-29 + */ +@TableName("sys_imei_auto_log") +public class SysImeiAutoLog extends BaseEntity +{ + @TableField(exist = false) + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 设备IMEI */ + @Excel(name = "设备IMEI") + private String imei; + + /** 卷膜 */ + @Excel(name = "卷膜") + private String rollFilm; + + /** 监控时间段 */ + @Excel(name = "监控时间段") + private String monitorPeriod; + + /** 当前温度 */ + @Excel(name = "当前温度") + private BigDecimal currentTemp; + + /** 参考温度 */ + @Excel(name = "参考温度") + private BigDecimal refTemp; + + /** 适宜温度 */ + @Excel(name = "适宜温度") + private String suitableTemp; + + /** 运行风口 */ + @Excel(name = "运行风口") + private String fanStatus; + + /** 是否最后一条 0否1是 */ + @Excel(name = "是否最后一条 0否1是") + private Long isLast; + + /** 执行指令 */ + @Excel(name = "执行指令") + private String execCmd; + + /** 操作日志ID */ + @Excel(name = "操作日志ID") + private Long logId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setImei(String imei) + { + this.imei = imei; + } + + public String getImei() + { + return imei; + } + + public void setRollFilm(String rollFilm) + { + this.rollFilm = rollFilm; + } + + public String getRollFilm() + { + return rollFilm; + } + + public void setMonitorPeriod(String monitorPeriod) + { + this.monitorPeriod = monitorPeriod; + } + + public String getMonitorPeriod() + { + return monitorPeriod; + } + + public void setCurrentTemp(BigDecimal currentTemp) + { + this.currentTemp = currentTemp; + } + + public BigDecimal getCurrentTemp() + { + return currentTemp; + } + + public void setRefTemp(BigDecimal refTemp) + { + this.refTemp = refTemp; + } + + public BigDecimal getRefTemp() + { + return refTemp; + } + + public void setSuitableTemp(String suitableTemp) + { + this.suitableTemp = suitableTemp; + } + + public String getSuitableTemp() + { + return suitableTemp; + } + + public void setFanStatus(String fanStatus) + { + this.fanStatus = fanStatus; + } + + public String getFanStatus() + { + return fanStatus; + } + + public void setIsLast(Long isLast) + { + this.isLast = isLast; + } + + public Long getIsLast() + { + return isLast; + } + + public void setExecCmd(String execCmd) + { + this.execCmd = execCmd; + } + + public String getExecCmd() + { + return execCmd; + } + + public void setLogId(Long logId) + { + this.logId = logId; + } + + public Long getLogId() + { + return logId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("imei", getImei()) + .append("rollFilm", getRollFilm()) + .append("monitorPeriod", getMonitorPeriod()) + .append("currentTemp", getCurrentTemp()) + .append("refTemp", getRefTemp()) + .append("suitableTemp", getSuitableTemp()) + .append("fanStatus", getFanStatus()) + .append("isLast", getIsLast()) + .append("execCmd", getExecCmd()) + .append("logId", getLogId()) + .append("remark", getRemark()) + .append("createTime", getCreateTime()) + .append("createBy", getCreateBy()) + .append("updateTime", getUpdateTime()) + .append("updateBy", getUpdateBy()) + .toString(); + } +} diff --git a/agri-system/src/main/java/com/agri/system/domain/SysMessage.java b/agri-system/src/main/java/com/agri/system/domain/SysMessage.java new file mode 100644 index 0000000..78ae33d --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/domain/SysMessage.java @@ -0,0 +1,167 @@ +package com.agri.system.domain; + +import com.baomidou.mybatisplus.annotation.TableName; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.agri.common.annotation.Excel; +import com.agri.common.core.domain.BaseEntity; + +/** + * 系统消息中心对象 sys_message + * + * @author lld + * @date 2026-03-26 + */ +@TableName("sys_message") +public class SysMessage extends BaseEntity +{ + @TableField(exist = false) + private static final long serialVersionUID = 1L; + + /** 消息主键ID */ + private Long id; + + /** 接收人:all=全体用户,其他=用户ID */ + @Excel(name = "接收人:all=全体用户,其他=用户ID") + private String receiver; + + /** 消息标题 */ + @Excel(name = "消息标题") + private String title; + + /** 消息类型:activity-活动 notice-通知 interact-互动消息 */ + @Excel(name = "消息类型:activity-活动 notice-通知 interact-互动消息") + private String msgType; + + /** 阅读状态:0-未读 1-已读 */ + @Excel(name = "阅读状态:0-未读 1-已读") + private Long readStatus; + + /** 消息内容(普通文本) */ + @Excel(name = "消息内容", readConverterExp = "普=通文本") + private String content; + + /** 富文本内容 */ + @Excel(name = "富文本内容") + private String richContent; + + /** 图片地址 */ + @Excel(name = "图片地址") + private String imgUrl; + + /** 跳转链接地址 */ + @Excel(name = "跳转链接地址") + private String linkUrl; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + + public void setReceiver(String receiver) + { + this.receiver = receiver; + } + + public String getReceiver() + { + return receiver; + } + + public void setTitle(String title) + { + this.title = title; + } + + public String getTitle() + { + return title; + } + + public void setMsgType(String msgType) + { + this.msgType = msgType; + } + + public String getMsgType() + { + return msgType; + } + + public void setReadStatus(Long readStatus) + { + this.readStatus = readStatus; + } + + public Long getReadStatus() + { + return readStatus; + } + + public void setContent(String content) + { + this.content = content; + } + + public String getContent() + { + return content; + } + + public void setRichContent(String richContent) + { + this.richContent = richContent; + } + + public String getRichContent() + { + return richContent; + } + + public void setImgUrl(String imgUrl) + { + this.imgUrl = imgUrl; + } + + public String getImgUrl() + { + return imgUrl; + } + + public void setLinkUrl(String linkUrl) + { + this.linkUrl = linkUrl; + } + + public String getLinkUrl() + { + return linkUrl; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("receiver", getReceiver()) + .append("title", getTitle()) + .append("msgType", getMsgType()) + .append("readStatus", getReadStatus()) + .append("content", getContent()) + .append("richContent", getRichContent()) + .append("imgUrl", getImgUrl()) + .append("linkUrl", getLinkUrl()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/agri-system/src/main/java/com/agri/system/mapper/SysImeiAutoLogMapper.java b/agri-system/src/main/java/com/agri/system/mapper/SysImeiAutoLogMapper.java new file mode 100644 index 0000000..90e7015 --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/mapper/SysImeiAutoLogMapper.java @@ -0,0 +1,62 @@ +package com.agri.system.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.agri.system.domain.SysImeiAutoLog; + +/** + * 自动模式日志Mapper接口 + * + * @author lld + * @date 2026-03-29 + */ +public interface SysImeiAutoLogMapper extends BaseMapper +{ + /** + * 查询自动模式日志 + * + * @param id 自动模式日志主键 + * @return 自动模式日志 + */ + public SysImeiAutoLog selectSysImeiAutoLogById(Long id); + + /** + * 查询自动模式日志列表 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 自动模式日志集合 + */ + public List selectSysImeiAutoLogList(SysImeiAutoLog sysImeiAutoLog); + + /** + * 新增自动模式日志 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 结果 + */ + public int insertSysImeiAutoLog(SysImeiAutoLog sysImeiAutoLog); + + /** + * 修改自动模式日志 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 结果 + */ + public int updateSysImeiAutoLog(SysImeiAutoLog sysImeiAutoLog); + + /** + * 删除自动模式日志 + * + * @param id 自动模式日志主键 + * @return 结果 + */ + public int deleteSysImeiAutoLogById(Long id); + + /** + * 批量删除自动模式日志 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysImeiAutoLogByIds(Long[] ids); +} diff --git a/agri-system/src/main/java/com/agri/system/mapper/SysMessageMapper.java b/agri-system/src/main/java/com/agri/system/mapper/SysMessageMapper.java new file mode 100644 index 0000000..28bcc93 --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/mapper/SysMessageMapper.java @@ -0,0 +1,62 @@ +package com.agri.system.mapper; + +import java.util.List; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.agri.system.domain.SysMessage; + +/** + * 系统消息中心Mapper接口 + * + * @author lld + * @date 2026-03-26 + */ +public interface SysMessageMapper extends BaseMapper +{ + /** + * 查询系统消息中心 + * + * @param id 系统消息中心主键 + * @return 系统消息中心 + */ + public SysMessage selectSysMessageById(Long id); + + /** + * 查询系统消息中心列表 + * + * @param sysMessage 系统消息中心 + * @return 系统消息中心集合 + */ + public List selectSysMessageList(SysMessage sysMessage); + + /** + * 新增系统消息中心 + * + * @param sysMessage 系统消息中心 + * @return 结果 + */ + public int insertSysMessage(SysMessage sysMessage); + + /** + * 修改系统消息中心 + * + * @param sysMessage 系统消息中心 + * @return 结果 + */ + public int updateSysMessage(SysMessage sysMessage); + + /** + * 删除系统消息中心 + * + * @param id 系统消息中心主键 + * @return 结果 + */ + public int deleteSysMessageById(Long id); + + /** + * 批量删除系统消息中心 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteSysMessageByIds(Long[] ids); +} diff --git a/agri-system/src/main/java/com/agri/system/service/ISysImeiAutoLogService.java b/agri-system/src/main/java/com/agri/system/service/ISysImeiAutoLogService.java new file mode 100644 index 0000000..5543d8c --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/service/ISysImeiAutoLogService.java @@ -0,0 +1,61 @@ +package com.agri.system.service; + +import java.util.List; +import com.baomidou.mybatisplus.extension.service.IService; +import com.agri.system.domain.SysImeiAutoLog; + +/** + * 自动模式日志Service接口 + * + * @author lld + * @date 2026-03-29 + */ +public interface ISysImeiAutoLogService extends IService { + /** + * 查询自动模式日志 + * + * @param id 自动模式日志主键 + * @return 自动模式日志 + */ + public SysImeiAutoLog selectSysImeiAutoLogById(Long id); + + /** + * 查询自动模式日志列表 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 自动模式日志集合 + */ + public List selectSysImeiAutoLogList(SysImeiAutoLog sysImeiAutoLog); + + /** + * 新增自动模式日志 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 结果 + */ + public int insertSysImeiAutoLog(SysImeiAutoLog sysImeiAutoLog); + + /** + * 修改自动模式日志 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 结果 + */ + public int updateSysImeiAutoLog(SysImeiAutoLog sysImeiAutoLog); + + /** + * 批量删除自动模式日志 + * + * @param ids 需要删除的自动模式日志主键集合 + * @return 结果 + */ + public int deleteSysImeiAutoLogByIds(Long[] ids); + + /** + * 删除自动模式日志信息 + * + * @param id 自动模式日志主键 + * @return 结果 + */ + public int deleteSysImeiAutoLogById(Long id); +} diff --git a/agri-system/src/main/java/com/agri/system/service/ISysMessageService.java b/agri-system/src/main/java/com/agri/system/service/ISysMessageService.java new file mode 100644 index 0000000..62d37a5 --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/service/ISysMessageService.java @@ -0,0 +1,61 @@ +package com.agri.system.service; + +import java.util.List; +import com.baomidou.mybatisplus.extension.service.IService; +import com.agri.system.domain.SysMessage; + +/** + * 系统消息中心Service接口 + * + * @author lld + * @date 2026-03-26 + */ +public interface ISysMessageService extends IService { + /** + * 查询系统消息中心 + * + * @param id 系统消息中心主键 + * @return 系统消息中心 + */ + public SysMessage selectSysMessageById(Long id); + + /** + * 查询系统消息中心列表 + * + * @param sysMessage 系统消息中心 + * @return 系统消息中心集合 + */ + public List selectSysMessageList(SysMessage sysMessage); + + /** + * 新增系统消息中心 + * + * @param sysMessage 系统消息中心 + * @return 结果 + */ + public int insertSysMessage(SysMessage sysMessage); + + /** + * 修改系统消息中心 + * + * @param sysMessage 系统消息中心 + * @return 结果 + */ + public int updateSysMessage(SysMessage sysMessage); + + /** + * 批量删除系统消息中心 + * + * @param ids 需要删除的系统消息中心主键集合 + * @return 结果 + */ + public int deleteSysMessageByIds(Long[] ids); + + /** + * 删除系统消息中心信息 + * + * @param id 系统消息中心主键 + * @return 结果 + */ + public int deleteSysMessageById(Long id); +} diff --git a/agri-system/src/main/java/com/agri/system/service/impl/SysDevOperLogServiceImpl.java b/agri-system/src/main/java/com/agri/system/service/impl/SysDevOperLogServiceImpl.java index b59faf7..61a17a5 100644 --- a/agri-system/src/main/java/com/agri/system/service/impl/SysDevOperLogServiceImpl.java +++ b/agri-system/src/main/java/com/agri/system/service/impl/SysDevOperLogServiceImpl.java @@ -122,6 +122,7 @@ public class SysDevOperLogServiceImpl extends ServiceImpl implements ISysImeiAutoLogService +{ + + /** + * 查询自动模式日志 + * + * @param id 自动模式日志主键 + * @return 自动模式日志 + */ + @Override + public SysImeiAutoLog selectSysImeiAutoLogById(Long id) + { + return baseMapper.selectSysImeiAutoLogById(id); + } + + /** + * 查询自动模式日志列表 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 自动模式日志 + */ + @Override + public List selectSysImeiAutoLogList(SysImeiAutoLog sysImeiAutoLog) + { + return baseMapper.selectSysImeiAutoLogList(sysImeiAutoLog); + } + + /** + * 新增自动模式日志 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 结果 + */ + @Override + public int insertSysImeiAutoLog(SysImeiAutoLog sysImeiAutoLog) + { + sysImeiAutoLog.setCreateTime(DateUtils.getNowDate()); + return baseMapper.insertSysImeiAutoLog(sysImeiAutoLog); + } + + /** + * 修改自动模式日志 + * + * @param sysImeiAutoLog 自动模式日志 + * @return 结果 + */ + @Override + public int updateSysImeiAutoLog(SysImeiAutoLog sysImeiAutoLog) + { + sysImeiAutoLog.setUpdateTime(DateUtils.getNowDate()); + return baseMapper.updateSysImeiAutoLog(sysImeiAutoLog); + } + + /** + * 批量删除自动模式日志 + * + * @param ids 需要删除的自动模式日志主键 + * @return 结果 + */ + @Override + public int deleteSysImeiAutoLogByIds(Long[] ids) + { + return baseMapper.deleteSysImeiAutoLogByIds(ids); + } + + /** + * 删除自动模式日志信息 + * + * @param id 自动模式日志主键 + * @return 结果 + */ + @Override + public int deleteSysImeiAutoLogById(Long id) + { + return baseMapper.deleteSysImeiAutoLogById(id); + } +} diff --git a/agri-system/src/main/java/com/agri/system/service/impl/SysMessageServiceImpl.java b/agri-system/src/main/java/com/agri/system/service/impl/SysMessageServiceImpl.java new file mode 100644 index 0000000..8d0d8c4 --- /dev/null +++ b/agri-system/src/main/java/com/agri/system/service/impl/SysMessageServiceImpl.java @@ -0,0 +1,94 @@ +package com.agri.system.service.impl; + +import java.util.List; +import com.agri.common.utils.DateUtils; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.agri.system.mapper.SysMessageMapper; +import com.agri.system.domain.SysMessage; +import com.agri.system.service.ISysMessageService; + +/** + * 系统消息中心Service业务层处理 + * + * @author lld + * @date 2026-03-26 + */ +@Service +public class SysMessageServiceImpl extends ServiceImpl implements ISysMessageService +{ + + /** + * 查询系统消息中心 + * + * @param id 系统消息中心主键 + * @return 系统消息中心 + */ + @Override + public SysMessage selectSysMessageById(Long id) + { + return baseMapper.selectSysMessageById(id); + } + + /** + * 查询系统消息中心列表 + * + * @param sysMessage 系统消息中心 + * @return 系统消息中心 + */ + @Override + public List selectSysMessageList(SysMessage sysMessage) + { + return baseMapper.selectSysMessageList(sysMessage); + } + + /** + * 新增系统消息中心 + * + * @param sysMessage 系统消息中心 + * @return 结果 + */ + @Override + public int insertSysMessage(SysMessage sysMessage) + { + sysMessage.setCreateTime(DateUtils.getNowDate()); + return baseMapper.insertSysMessage(sysMessage); + } + + /** + * 修改系统消息中心 + * + * @param sysMessage 系统消息中心 + * @return 结果 + */ + @Override + public int updateSysMessage(SysMessage sysMessage) + { + sysMessage.setUpdateTime(DateUtils.getNowDate()); + return baseMapper.updateSysMessage(sysMessage); + } + + /** + * 批量删除系统消息中心 + * + * @param ids 需要删除的系统消息中心主键 + * @return 结果 + */ + @Override + public int deleteSysMessageByIds(Long[] ids) + { + return baseMapper.deleteSysMessageByIds(ids); + } + + /** + * 删除系统消息中心信息 + * + * @param id 系统消息中心主键 + * @return 结果 + */ + @Override + public int deleteSysMessageById(Long id) + { + return baseMapper.deleteSysMessageById(id); + } +} diff --git a/agri-system/src/main/resources/mapper/system/SysImeiAutoLogMapper.xml b/agri-system/src/main/resources/mapper/system/SysImeiAutoLogMapper.xml new file mode 100644 index 0000000..33a3b94 --- /dev/null +++ b/agri-system/src/main/resources/mapper/system/SysImeiAutoLogMapper.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + select id, imei, roll_film, monitor_period, current_temp, ref_temp, suitable_temp, fan_status, is_last, exec_cmd, log_id, remark, create_time, create_by, update_time, update_by from sys_imei_auto_log + + + + + + + + insert into sys_imei_auto_log + + imei, + roll_film, + monitor_period, + current_temp, + ref_temp, + suitable_temp, + fan_status, + is_last, + exec_cmd, + log_id, + remark, + create_time, + create_by, + update_time, + update_by, + + + #{imei}, + #{rollFilm}, + #{monitorPeriod}, + #{currentTemp}, + #{refTemp}, + #{suitableTemp}, + #{fanStatus}, + #{isLast}, + #{execCmd}, + #{logId}, + #{remark}, + #{createTime}, + #{createBy}, + #{updateTime}, + #{updateBy}, + + + + + update sys_imei_auto_log + + imei = #{imei}, + roll_film = #{rollFilm}, + monitor_period = #{monitorPeriod}, + current_temp = #{currentTemp}, + ref_temp = #{refTemp}, + suitable_temp = #{suitableTemp}, + fan_status = #{fanStatus}, + is_last = #{isLast}, + exec_cmd = #{execCmd}, + log_id = #{logId}, + remark = #{remark}, + create_time = #{createTime}, + create_by = #{createBy}, + update_time = #{updateTime}, + update_by = #{updateBy}, + + where id = #{id} + + + + delete from sys_imei_auto_log where id = #{id} + + + + delete from sys_imei_auto_log where id in + + #{id} + + + \ No newline at end of file diff --git a/agri-system/src/main/resources/mapper/system/SysMessageMapper.xml b/agri-system/src/main/resources/mapper/system/SysMessageMapper.xml new file mode 100644 index 0000000..c0d8d61 --- /dev/null +++ b/agri-system/src/main/resources/mapper/system/SysMessageMapper.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + select id, receiver, title, msg_type, read_status, content, rich_content, img_url, link_url, create_by, create_time, update_by, update_time, remark from sys_message + + + + + + + + insert into sys_message + + receiver, + title, + msg_type, + read_status, + content, + rich_content, + img_url, + link_url, + create_by, + create_time, + update_by, + update_time, + remark, + + + #{receiver}, + #{title}, + #{msgType}, + #{readStatus}, + #{content}, + #{richContent}, + #{imgUrl}, + #{linkUrl}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + #{remark}, + + + + + update sys_message + + receiver = #{receiver}, + title = #{title}, + msg_type = #{msgType}, + read_status = #{readStatus}, + content = #{content}, + rich_content = #{richContent}, + img_url = #{imgUrl}, + link_url = #{linkUrl}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + remark = #{remark}, + + where id = #{id} + + + + delete from sys_message where id = #{id} + + + + delete from sys_message where id in + + #{id} + + + \ No newline at end of file