lau572
11 months ago
22 changed files with 1412 additions and 21 deletions
@ -0,0 +1,53 @@ |
|||
package com.zc.business.controller; |
|||
|
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.zc.business.domain.DcBoardPublish; |
|||
import com.zc.business.service.IDcBoardService; |
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiImplicitParam; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.security.access.prepost.PreAuthorize; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* @Description 情报板Controller |
|||
* |
|||
* @author liuwenge |
|||
* @date 2024/1/5 11:38 |
|||
*/ |
|||
@Api(tags = "情报板") |
|||
@RestController |
|||
@RequestMapping("/business/board") |
|||
public class DcBoardController { |
|||
|
|||
|
|||
@Autowired |
|||
private IDcBoardService dcBoardService; |
|||
|
|||
/** |
|||
* 情报板发布 |
|||
*/ |
|||
@ApiOperation("情报板发布") |
|||
@PreAuthorize("@ss.hasPermi('business:board:publish')") |
|||
@PostMapping("/publish") |
|||
public AjaxResult publish(@RequestBody DcBoardPublish dcBoardPublish){ |
|||
return dcBoardService.publish(dcBoardPublish); |
|||
} |
|||
|
|||
|
|||
/** |
|||
* 情报板回读 |
|||
*/ |
|||
@ApiOperation("情报板回读") |
|||
@PreAuthorize("@ss.hasPermi('business:board:realtimeProperty')") |
|||
@GetMapping("/realtimeProperty/{deviceId}") |
|||
public AjaxResult realtimeProperty(@ApiParam(name = "deviceId", value = "设备id", required = true) @PathVariable("deviceId") String deviceId){ |
|||
return dcBoardService.realtimeProperty(deviceId); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.zc.business.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.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.zc.business.domain.DcBoardReleaseLog; |
|||
import com.zc.business.service.IDcBoardReleaseLogService; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 情报板内容发布日志Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/business/boardReleaseLog") |
|||
public class DcBoardReleaseLogController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private IDcBoardReleaseLogService dcBoardReleaseLogService; |
|||
|
|||
/** |
|||
* 查询情报板内容发布日志列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:list')") |
|||
@GetMapping("/list") |
|||
public TableDataInfo list(DcBoardReleaseLog dcBoardReleaseLog) |
|||
{ |
|||
startPage(); |
|||
List<DcBoardReleaseLog> list = dcBoardReleaseLogService.selectDcBoardReleaseLogList(dcBoardReleaseLog); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出情报板内容发布日志列表 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:export')") |
|||
@Log(title = "情报板内容发布日志", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(HttpServletResponse response, DcBoardReleaseLog dcBoardReleaseLog) |
|||
{ |
|||
List<DcBoardReleaseLog> list = dcBoardReleaseLogService.selectDcBoardReleaseLogList(dcBoardReleaseLog); |
|||
ExcelUtil<DcBoardReleaseLog> util = new ExcelUtil<>(DcBoardReleaseLog.class); |
|||
util.exportExcel(response, list, "情报板内容发布日志数据"); |
|||
} |
|||
|
|||
/** |
|||
* 获取情报板内容发布日志详细信息 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:query')") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") Long id) |
|||
{ |
|||
return AjaxResult.success(dcBoardReleaseLogService.selectDcBoardReleaseLogById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增情报板内容发布日志 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:add')") |
|||
@Log(title = "情报板内容发布日志", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
public AjaxResult add(@RequestBody DcBoardReleaseLog dcBoardReleaseLog) |
|||
{ |
|||
return toAjax(dcBoardReleaseLogService.insertDcBoardReleaseLog(dcBoardReleaseLog)); |
|||
} |
|||
|
|||
/** |
|||
* 修改情报板内容发布日志 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:edit')") |
|||
@Log(title = "情报板内容发布日志", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody DcBoardReleaseLog dcBoardReleaseLog) |
|||
{ |
|||
return toAjax(dcBoardReleaseLogService.updateDcBoardReleaseLog(dcBoardReleaseLog)); |
|||
} |
|||
|
|||
/** |
|||
* 删除情报板内容发布日志 |
|||
*/ |
|||
@PreAuthorize("@ss.hasPermi('business:boardReleaseLog:remove')") |
|||
@Log(title = "情报板内容发布日志", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{ids}") |
|||
public AjaxResult remove(@PathVariable Long[] ids) |
|||
{ |
|||
return toAjax(dcBoardReleaseLogService.deleteDcBoardReleaseLogByIds(ids)); |
|||
} |
|||
} |
@ -0,0 +1,124 @@ |
|||
package com.zc.business.controller; |
|||
|
|||
import java.util.List; |
|||
import javax.servlet.http.HttpServletResponse; |
|||
|
|||
import io.swagger.annotations.Api; |
|||
import io.swagger.annotations.ApiOperation; |
|||
import io.swagger.annotations.ApiParam; |
|||
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.ruoyi.common.annotation.Log; |
|||
import com.ruoyi.common.core.controller.BaseController; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.enums.BusinessType; |
|||
import com.zc.business.domain.DcInfoBoardVocabulary; |
|||
import com.zc.business.service.IDcInfoBoardVocabularyService; |
|||
import com.ruoyi.common.utils.poi.ExcelUtil; |
|||
import com.ruoyi.common.core.page.TableDataInfo; |
|||
|
|||
/** |
|||
* 情报板敏感字管理Controller |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
@Api(tags = {"情报板敏感字管理"}) |
|||
@RestController |
|||
@RequestMapping("/business/dcInfoBoardVocabulary") |
|||
public class DcInfoBoardVocabularyController extends BaseController |
|||
{ |
|||
@Autowired |
|||
private IDcInfoBoardVocabularyService dcInfoBoardVocabularyService; |
|||
|
|||
/** |
|||
* 查询情报板敏感字管理列表 |
|||
*/ |
|||
@ApiOperation("查询情报板敏感字管理列表") |
|||
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:list')") |
|||
@GetMapping("/list") |
|||
public TableDataInfo list(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|||
{ |
|||
startPage(); |
|||
List<DcInfoBoardVocabulary> list = dcInfoBoardVocabularyService.selectDcInfoBoardVocabularyList(dcInfoBoardVocabulary); |
|||
return getDataTable(list); |
|||
} |
|||
|
|||
/** |
|||
* 导出情报板敏感字管理列表 |
|||
*/ |
|||
@ApiOperation("导出情报板敏感字管理列表") |
|||
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:export')") |
|||
@Log(title = "情报板敏感字管理", businessType = BusinessType.EXPORT) |
|||
@PostMapping("/export") |
|||
public void export(HttpServletResponse response, DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|||
{ |
|||
List<DcInfoBoardVocabulary> list = dcInfoBoardVocabularyService.selectDcInfoBoardVocabularyList(dcInfoBoardVocabulary); |
|||
ExcelUtil<DcInfoBoardVocabulary> util = new ExcelUtil<>(DcInfoBoardVocabulary.class); |
|||
util.exportExcel(response, list, "情报板敏感字管理数据"); |
|||
} |
|||
|
|||
/** |
|||
* 获取情报板敏感字管理详细信息 |
|||
*/ |
|||
@ApiOperation("获取情报板敏感字管理详细信息") |
|||
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:query')") |
|||
@GetMapping(value = "/{id}") |
|||
public AjaxResult getInfo(@PathVariable("id") @ApiParam(value="id", name="id", required=true) Long id) |
|||
{ |
|||
return AjaxResult.success(dcInfoBoardVocabularyService.selectDcInfoBoardVocabularyById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 新增情报板敏感字管理 |
|||
*/ |
|||
@ApiOperation("新增情报板敏感字管理") |
|||
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:add')") |
|||
@Log(title = "情报板敏感字管理", businessType = BusinessType.INSERT) |
|||
@PostMapping |
|||
public AjaxResult add(@RequestBody DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|||
{ |
|||
return toAjax(dcInfoBoardVocabularyService.insertDcInfoBoardVocabulary(dcInfoBoardVocabulary)); |
|||
} |
|||
|
|||
/** |
|||
* 修改情报板敏感字管理 |
|||
*/ |
|||
@ApiOperation("修改情报板敏感字管理") |
|||
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:edit')") |
|||
@Log(title = "情报板敏感字管理", businessType = BusinessType.UPDATE) |
|||
@PutMapping |
|||
public AjaxResult edit(@RequestBody DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|||
{ |
|||
return toAjax(dcInfoBoardVocabularyService.updateDcInfoBoardVocabulary(dcInfoBoardVocabulary)); |
|||
} |
|||
|
|||
/** |
|||
* 删除情报板敏感字管理 |
|||
*/ |
|||
@ApiOperation("删除情报板敏感字管理") |
|||
@PreAuthorize("@ss.hasPermi('business:dcInfoBoardVocabulary:remove')") |
|||
@Log(title = "情报板敏感字管理", businessType = BusinessType.DELETE) |
|||
@DeleteMapping("/{id}") |
|||
public AjaxResult remove(@PathVariable @ApiParam(value="id", name="id", required=true) Long id) |
|||
{ |
|||
return toAjax(dcInfoBoardVocabularyService.deleteDcInfoBoardVocabularyById(id)); |
|||
} |
|||
|
|||
/** |
|||
* 检查情报板是否含有敏感字 |
|||
*/ |
|||
@ApiOperation("检查情报板是否含有敏感字") |
|||
@GetMapping("/checkBoardContent") |
|||
public AjaxResult checkBoardContent(String content) { |
|||
return dcInfoBoardVocabularyService.checkBoardContent(content); |
|||
} |
|||
} |
@ -0,0 +1,47 @@ |
|||
package com.zc.business.domain; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
import io.swagger.annotations.ApiImplicitParam; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
|
|||
import java.util.Date; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 情报板发布对象 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
@ApiModel("情报板发布对象") |
|||
public class DcBoardPublish |
|||
{ |
|||
|
|||
@ApiModelProperty(value = "设备id", required = true) |
|||
private String deviceId; |
|||
|
|||
@ApiModelProperty(value = "内容列表", required = true) |
|||
private List<Map<String,Object>> content; |
|||
|
|||
public String getDeviceId() { |
|||
return deviceId; |
|||
} |
|||
|
|||
public void setDeviceId(String deviceId) { |
|||
this.deviceId = deviceId; |
|||
} |
|||
|
|||
public List<Map<String, Object>> getContent() { |
|||
return content; |
|||
} |
|||
|
|||
public void setContent(List<Map<String, Object>> content) { |
|||
this.content = content; |
|||
} |
|||
} |
@ -0,0 +1,208 @@ |
|||
package com.zc.business.domain; |
|||
|
|||
import java.util.Date; |
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import io.swagger.annotations.ApiModelProperty; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
/** |
|||
* 情报板内容发布日志对象 dc_board_release_log |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
@ApiModel("情报板内容发布日志对象") |
|||
public class DcBoardReleaseLog extends BaseEntity |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** $column.columnComment */ |
|||
@ApiModelProperty(value="id") |
|||
private Long id; |
|||
|
|||
/** 设备编号 */ |
|||
@Excel(name = "设备编号") |
|||
@ApiModelProperty(value="设备编号") |
|||
private String deviceId; |
|||
|
|||
/** 设备名称 */ |
|||
@Excel(name = "设备名称") |
|||
@ApiModelProperty(value="设备名称") |
|||
private String deviceName; |
|||
|
|||
/** 发布内容 */ |
|||
@Excel(name = "发布内容") |
|||
@ApiModelProperty(value="发布内容") |
|||
private String releaseContent; |
|||
|
|||
/** 发布状态(0:成功;1:失败) */ |
|||
@Excel(name = "发布状态", readConverterExp = "0=:成功;1:失败") |
|||
@ApiModelProperty(value="发布状态0=:成功;1:失败") |
|||
private String releaseStatus; |
|||
|
|||
/** 发布时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
|||
@ApiModelProperty(value="发布时间") |
|||
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
|||
private Date releaseTime; |
|||
|
|||
/** 发布机构 */ |
|||
@Excel(name = "发布机构") |
|||
@ApiModelProperty(value="发布机构") |
|||
private String releaseDeptName; |
|||
|
|||
/** 发布机构 */ |
|||
@Excel(name = "发布机构") |
|||
@ApiModelProperty(value="发布机构id") |
|||
private String releaseDeptId; |
|||
|
|||
/** 发布用户 */ |
|||
@Excel(name = "发布用户") |
|||
@ApiModelProperty(value="发布用户") |
|||
private String releaseUserName; |
|||
|
|||
/** 发布用户 */ |
|||
@Excel(name = "发布用户") |
|||
@ApiModelProperty(value="发布用户") |
|||
private String releaseUserId; |
|||
|
|||
/** 发布端 */ |
|||
@Excel(name = "发布端") |
|||
@ApiModelProperty(value="发布端(00=系统用户,01=智慧大脑,02=GIS+BIM") |
|||
private String platform; |
|||
|
|||
/** ip地址 */ |
|||
@Excel(name = "ip地址") |
|||
@ApiModelProperty(value="ip地址") |
|||
private String releaseIp; |
|||
|
|||
public void setId(Long id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setDeviceId(String deviceId) |
|||
{ |
|||
this.deviceId = deviceId; |
|||
} |
|||
|
|||
public String getDeviceId() |
|||
{ |
|||
return deviceId; |
|||
} |
|||
public void setDeviceName(String deviceName) |
|||
{ |
|||
this.deviceName = deviceName; |
|||
} |
|||
|
|||
public String getDeviceName() |
|||
{ |
|||
return deviceName; |
|||
} |
|||
public void setReleaseContent(String releaseContent) |
|||
{ |
|||
this.releaseContent = releaseContent; |
|||
} |
|||
|
|||
public String getReleaseContent() |
|||
{ |
|||
return releaseContent; |
|||
} |
|||
public void setReleaseStatus(String releaseStatus) |
|||
{ |
|||
this.releaseStatus = releaseStatus; |
|||
} |
|||
|
|||
public String getReleaseStatus() |
|||
{ |
|||
return releaseStatus; |
|||
} |
|||
public void setReleaseTime(Date releaseTime) |
|||
{ |
|||
this.releaseTime = releaseTime; |
|||
} |
|||
|
|||
public Date getReleaseTime() |
|||
{ |
|||
return releaseTime; |
|||
} |
|||
public void setReleaseDeptName(String releaseDeptName) |
|||
{ |
|||
this.releaseDeptName = releaseDeptName; |
|||
} |
|||
|
|||
public String getReleaseDeptName() |
|||
{ |
|||
return releaseDeptName; |
|||
} |
|||
public void setReleaseDeptId(String releaseDeptId) |
|||
{ |
|||
this.releaseDeptId = releaseDeptId; |
|||
} |
|||
|
|||
public String getReleaseDeptId() |
|||
{ |
|||
return releaseDeptId; |
|||
} |
|||
public void setReleaseUserName(String releaseUserName) |
|||
{ |
|||
this.releaseUserName = releaseUserName; |
|||
} |
|||
|
|||
public String getReleaseUserName() |
|||
{ |
|||
return releaseUserName; |
|||
} |
|||
public void setReleaseUserId(String releaseUserId) |
|||
{ |
|||
this.releaseUserId = releaseUserId; |
|||
} |
|||
|
|||
public String getReleaseUserId() |
|||
{ |
|||
return releaseUserId; |
|||
} |
|||
|
|||
public String getPlatform() { |
|||
return platform; |
|||
} |
|||
|
|||
public void setPlatform(String platform) { |
|||
this.platform = platform; |
|||
} |
|||
|
|||
public void setReleaseIp(String releaseIp) |
|||
{ |
|||
this.releaseIp = releaseIp; |
|||
} |
|||
|
|||
public String getReleaseIp() |
|||
{ |
|||
return releaseIp; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("deviceId", getDeviceId()) |
|||
.append("deviceName", getDeviceName()) |
|||
.append("releaseContent", getReleaseContent()) |
|||
.append("releaseStatus", getReleaseStatus()) |
|||
.append("releaseTime", getReleaseTime()) |
|||
.append("releaseDeptName", getReleaseDeptName()) |
|||
.append("releaseDeptId", getReleaseDeptId()) |
|||
.append("releaseUserName", getReleaseUserName()) |
|||
.append("releaseUserId", getReleaseUserId()) |
|||
.append("releaseIp", getReleaseIp()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,70 @@ |
|||
package com.zc.business.domain; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import io.swagger.annotations.ApiModel; |
|||
import org.apache.commons.lang3.builder.ToStringBuilder; |
|||
import org.apache.commons.lang3.builder.ToStringStyle; |
|||
import com.ruoyi.common.annotation.Excel; |
|||
import com.ruoyi.common.core.domain.BaseEntity; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 情报板敏感字管理对象 dc_info_board_vocabulary |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
@ApiModel("情报板敏感字管理对象") |
|||
public class DcInfoBoardVocabulary |
|||
{ |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** id */ |
|||
private Long id; |
|||
|
|||
/** 文本 */ |
|||
@Excel(name = "文本") |
|||
private String word; |
|||
|
|||
/** 创建时间 */ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
|||
@Excel(name = "创建时间") |
|||
private Date createTime; |
|||
|
|||
public void setId(Long id) |
|||
{ |
|||
this.id = id; |
|||
} |
|||
|
|||
public Long getId() |
|||
{ |
|||
return id; |
|||
} |
|||
public void setWord(String word) |
|||
{ |
|||
this.word = word; |
|||
} |
|||
|
|||
public String getWord() |
|||
{ |
|||
return word; |
|||
} |
|||
|
|||
public Date getCreateTime() { |
|||
return createTime; |
|||
} |
|||
|
|||
public void setCreateTime(Date createTime) { |
|||
this.createTime = createTime; |
|||
} |
|||
|
|||
@Override |
|||
public String toString() { |
|||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
|||
.append("id", getId()) |
|||
.append("word", getWord()) |
|||
.append("createTime", getCreateTime()) |
|||
.toString(); |
|||
} |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.zc.business.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.zc.business.domain.DcBoardReleaseLog; |
|||
|
|||
/** |
|||
* 情报板内容发布日志Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
public interface DcBoardReleaseLogMapper |
|||
{ |
|||
/** |
|||
* 查询情报板内容发布日志 |
|||
* |
|||
* @param id 情报板内容发布日志主键 |
|||
* @return 情报板内容发布日志 |
|||
*/ |
|||
public DcBoardReleaseLog selectDcBoardReleaseLogById(Long id); |
|||
|
|||
/** |
|||
* 查询情报板内容发布日志列表 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 情报板内容发布日志集合 |
|||
*/ |
|||
List<DcBoardReleaseLog> selectDcBoardReleaseLogList(DcBoardReleaseLog dcBoardReleaseLog); |
|||
|
|||
/** |
|||
* 新增情报板内容发布日志 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 结果 |
|||
*/ |
|||
int insertDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog); |
|||
|
|||
/** |
|||
* 修改情报板内容发布日志 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 结果 |
|||
*/ |
|||
int updateDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog); |
|||
|
|||
/** |
|||
* 删除情报板内容发布日志 |
|||
* |
|||
* @param id 情报板内容发布日志主键 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcBoardReleaseLogById(Long id); |
|||
|
|||
/** |
|||
* 批量删除情报板内容发布日志 |
|||
* |
|||
* @param ids 需要删除的数据主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcBoardReleaseLogByIds(Long[] ids); |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.zc.business.mapper; |
|||
|
|||
import java.util.List; |
|||
import com.zc.business.domain.DcInfoBoardVocabulary; |
|||
|
|||
/** |
|||
* 情报板敏感字管理Mapper接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
public interface DcInfoBoardVocabularyMapper |
|||
{ |
|||
/** |
|||
* 查询情报板敏感字管理 |
|||
* |
|||
* @param id 情报板敏感字管理主键 |
|||
* @return 情报板敏感字管理 |
|||
*/ |
|||
public DcInfoBoardVocabulary selectDcInfoBoardVocabularyById(Long id); |
|||
|
|||
/** |
|||
* 查询情报板敏感字管理列表 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 情报板敏感字管理集合 |
|||
*/ |
|||
List<DcInfoBoardVocabulary> selectDcInfoBoardVocabularyList(DcInfoBoardVocabulary dcInfoBoardVocabulary); |
|||
|
|||
/** |
|||
* 新增情报板敏感字管理 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 结果 |
|||
*/ |
|||
int insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary); |
|||
|
|||
/** |
|||
* 修改情报板敏感字管理 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 结果 |
|||
*/ |
|||
int updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary); |
|||
|
|||
/** |
|||
* 删除情报板敏感字管理 |
|||
* |
|||
* @param id 情报板敏感字管理主键 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcInfoBoardVocabularyById(Long id); |
|||
|
|||
/** |
|||
* 批量删除情报板敏感字管理 |
|||
* |
|||
* @param ids 需要删除的数据主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcInfoBoardVocabularyByIds(Long[] ids); |
|||
} |
@ -0,0 +1,61 @@ |
|||
package com.zc.business.service; |
|||
|
|||
import java.util.List; |
|||
import com.zc.business.domain.DcBoardReleaseLog; |
|||
|
|||
/** |
|||
* 情报板内容发布日志Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
public interface IDcBoardReleaseLogService |
|||
{ |
|||
/** |
|||
* 查询情报板内容发布日志 |
|||
* |
|||
* @param id 情报板内容发布日志主键 |
|||
* @return 情报板内容发布日志 |
|||
*/ |
|||
public DcBoardReleaseLog selectDcBoardReleaseLogById(Long id); |
|||
|
|||
/** |
|||
* 查询情报板内容发布日志列表 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 情报板内容发布日志集合 |
|||
*/ |
|||
List<DcBoardReleaseLog> selectDcBoardReleaseLogList(DcBoardReleaseLog dcBoardReleaseLog); |
|||
|
|||
/** |
|||
* 新增情报板内容发布日志 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 结果 |
|||
*/ |
|||
int insertDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog); |
|||
|
|||
/** |
|||
* 修改情报板内容发布日志 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 结果 |
|||
*/ |
|||
int updateDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog); |
|||
|
|||
/** |
|||
* 批量删除情报板内容发布日志 |
|||
* |
|||
* @param ids 需要删除的情报板内容发布日志主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcBoardReleaseLogByIds(Long[] ids); |
|||
|
|||
/** |
|||
* 删除情报板内容发布日志信息 |
|||
* |
|||
* @param id 情报板内容发布日志主键 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcBoardReleaseLogById(Long id); |
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.zc.business.service; |
|||
|
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.zc.business.domain.DcBoardPublish; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 情报板Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-03 |
|||
*/ |
|||
public interface IDcBoardService |
|||
{ |
|||
|
|||
/** |
|||
* 情报板发布 |
|||
*/ |
|||
AjaxResult publish(DcBoardPublish dcBoardPublish); |
|||
|
|||
/** |
|||
* 情报板回读 |
|||
*/ |
|||
AjaxResult realtimeProperty(String deviceId); |
|||
} |
@ -0,0 +1,71 @@ |
|||
package com.zc.business.service; |
|||
|
|||
import java.util.List; |
|||
|
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.zc.business.domain.DcInfoBoardVocabulary; |
|||
|
|||
/** |
|||
* 情报板敏感字管理Service接口 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
public interface IDcInfoBoardVocabularyService |
|||
{ |
|||
/** |
|||
* 查询情报板敏感字管理 |
|||
* |
|||
* @param id 情报板敏感字管理主键 |
|||
* @return 情报板敏感字管理 |
|||
*/ |
|||
public DcInfoBoardVocabulary selectDcInfoBoardVocabularyById(Long id); |
|||
|
|||
/** |
|||
* 查询情报板敏感字管理列表 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 情报板敏感字管理集合 |
|||
*/ |
|||
List<DcInfoBoardVocabulary> selectDcInfoBoardVocabularyList(DcInfoBoardVocabulary dcInfoBoardVocabulary); |
|||
|
|||
/** |
|||
* 新增情报板敏感字管理 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 结果 |
|||
*/ |
|||
int insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary); |
|||
|
|||
/** |
|||
* 修改情报板敏感字管理 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 结果 |
|||
*/ |
|||
int updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary); |
|||
|
|||
/** |
|||
* 批量删除情报板敏感字管理 |
|||
* |
|||
* @param ids 需要删除的情报板敏感字管理主键集合 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcInfoBoardVocabularyByIds(Long[] ids); |
|||
|
|||
/** |
|||
* 删除情报板敏感字管理信息 |
|||
* |
|||
* @param id 情报板敏感字管理主键 |
|||
* @return 结果 |
|||
*/ |
|||
int deleteDcInfoBoardVocabularyById(Long id); |
|||
|
|||
/** |
|||
* 检查情报板是否含有敏感字 |
|||
* |
|||
* @param content 情报板内容 |
|||
* @return 结果 |
|||
*/ |
|||
AjaxResult checkBoardContent(String content); |
|||
} |
@ -0,0 +1,93 @@ |
|||
package com.zc.business.service.impl; |
|||
|
|||
import java.util.List; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.zc.business.mapper.DcBoardReleaseLogMapper; |
|||
import com.zc.business.domain.DcBoardReleaseLog; |
|||
import com.zc.business.service.IDcBoardReleaseLogService; |
|||
|
|||
/** |
|||
* 情报板内容发布日志Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
@Service |
|||
public class DcBoardReleaseLogServiceImpl implements IDcBoardReleaseLogService |
|||
{ |
|||
@Autowired |
|||
private DcBoardReleaseLogMapper dcBoardReleaseLogMapper; |
|||
|
|||
/** |
|||
* 查询情报板内容发布日志 |
|||
* |
|||
* @param id 情报板内容发布日志主键 |
|||
* @return 情报板内容发布日志 |
|||
*/ |
|||
@Override |
|||
public DcBoardReleaseLog selectDcBoardReleaseLogById(Long id) |
|||
{ |
|||
return dcBoardReleaseLogMapper.selectDcBoardReleaseLogById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询情报板内容发布日志列表 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 情报板内容发布日志 |
|||
*/ |
|||
@Override |
|||
public List<DcBoardReleaseLog> selectDcBoardReleaseLogList(DcBoardReleaseLog dcBoardReleaseLog) |
|||
{ |
|||
return dcBoardReleaseLogMapper.selectDcBoardReleaseLogList(dcBoardReleaseLog); |
|||
} |
|||
|
|||
/** |
|||
* 新增情报板内容发布日志 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog) |
|||
{ |
|||
return dcBoardReleaseLogMapper.insertDcBoardReleaseLog(dcBoardReleaseLog); |
|||
} |
|||
|
|||
/** |
|||
* 修改情报板内容发布日志 |
|||
* |
|||
* @param dcBoardReleaseLog 情报板内容发布日志 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateDcBoardReleaseLog(DcBoardReleaseLog dcBoardReleaseLog) |
|||
{ |
|||
return dcBoardReleaseLogMapper.updateDcBoardReleaseLog(dcBoardReleaseLog); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除情报板内容发布日志 |
|||
* |
|||
* @param ids 需要删除的情报板内容发布日志主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDcBoardReleaseLogByIds(Long[] ids) |
|||
{ |
|||
return dcBoardReleaseLogMapper.deleteDcBoardReleaseLogByIds(ids); |
|||
} |
|||
|
|||
/** |
|||
* 删除情报板内容发布日志信息 |
|||
* |
|||
* @param id 情报板内容发布日志主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDcBoardReleaseLogById(Long id) |
|||
{ |
|||
return dcBoardReleaseLogMapper.deleteDcBoardReleaseLogById(id); |
|||
} |
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.zc.business.service.impl; |
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.core.domain.model.LoginUser; |
|||
import com.ruoyi.common.utils.SecurityUtils; |
|||
import com.ruoyi.common.utils.StringUtils; |
|||
import com.zc.business.domain.DcBoardPublish; |
|||
import com.zc.business.domain.DcBoardReleaseLog; |
|||
import com.zc.business.mapper.DcBoardReleaseLogMapper; |
|||
import com.zc.business.service.IDcBoardService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 情报板Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-03 |
|||
*/ |
|||
@Service |
|||
public class DcBoardServiceImpl implements IDcBoardService { |
|||
|
|||
|
|||
@Autowired |
|||
private DcBoardReleaseLogMapper dcBoardReleaseLogMapper; |
|||
|
|||
/** |
|||
* @Description 情报板发布 |
|||
* |
|||
* @author liuwenge |
|||
* @date 2024/1/5 14:30 |
|||
* @return com.ruoyi.common.core.domain.AjaxResult |
|||
*/ |
|||
public AjaxResult publish(DcBoardPublish dcBoardPublish){ |
|||
|
|||
if (StringUtils.isEmpty(dcBoardPublish.getDeviceId())){ |
|||
return AjaxResult.error("设备id为空"); |
|||
} |
|||
if (dcBoardPublish.getContent() == null || dcBoardPublish.getContent().size() == 0){ |
|||
return AjaxResult.error("下发内容为空"); |
|||
} |
|||
|
|||
String deviceId = dcBoardPublish.getDeviceId(); |
|||
List<Map<String,Object>> contentList = dcBoardPublish.getContent(); |
|||
|
|||
//TODO 调用控制设备接口
|
|||
/* //下发文件名
|
|||
Map<String,Object> param = new HashMap<>(); |
|||
param.put("size","65535"); |
|||
param.put("fileName","play010.lst"); |
|||
invokeFunction(deviceId,"11",param); |
|||
|
|||
//功能码13 下发内容
|
|||
param = new HashMap<>(); |
|||
param.put("parameters",contentList); |
|||
invokeFunction(deviceId,"1B",param); |
|||
|
|||
//功能码1B 播放
|
|||
param = new HashMap<>(); |
|||
param.put("fileId","10"); |
|||
invokeFunction(deviceId,"13",param);*/ |
|||
|
|||
String status = "1"; |
|||
|
|||
//发布记录
|
|||
LoginUser loginUser = SecurityUtils.getLoginUser(); |
|||
|
|||
for (Map<String, Object> content : contentList) { |
|||
DcBoardReleaseLog releaseLog = new DcBoardReleaseLog(); |
|||
releaseLog.setDeviceId(deviceId); |
|||
releaseLog.setReleaseContent(JSON.toJSONString(content)); |
|||
releaseLog.setReleaseIp(loginUser.getIpaddr()); |
|||
releaseLog.setReleaseStatus(status); |
|||
releaseLog.setReleaseUserId(loginUser.getUsername()); |
|||
releaseLog.setReleaseUserName(loginUser.getUser().getNickName()); |
|||
releaseLog.setReleaseDeptId(loginUser.getDeptId().toString()); |
|||
dcBoardReleaseLogMapper.insertDcBoardReleaseLog(releaseLog); |
|||
} |
|||
|
|||
|
|||
return AjaxResult.success(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 情报板回读 |
|||
* |
|||
* @author liuwenge |
|||
* @date 2024/1/5 15:58 |
|||
* @param deviceId 设备id |
|||
*/ |
|||
public AjaxResult realtimeProperty(String deviceId){ |
|||
|
|||
/*Map<String,Object> param = new HashMap<>(); |
|||
param.put("async",false); |
|||
invokeFunction(deviceId,"3A",param);*/ |
|||
|
|||
return AjaxResult.success(); |
|||
} |
|||
} |
@ -0,0 +1,127 @@ |
|||
package com.zc.business.service.impl; |
|||
|
|||
import java.net.URLDecoder; |
|||
import java.util.List; |
|||
|
|||
import com.ruoyi.common.core.domain.AjaxResult; |
|||
import com.ruoyi.common.utils.DateUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import com.zc.business.mapper.DcInfoBoardVocabularyMapper; |
|||
import com.zc.business.domain.DcInfoBoardVocabulary; |
|||
import com.zc.business.service.IDcInfoBoardVocabularyService; |
|||
|
|||
/** |
|||
* 情报板敏感字管理Service业务层处理 |
|||
* |
|||
* @author ruoyi |
|||
* @date 2024-01-05 |
|||
*/ |
|||
@Service |
|||
public class DcInfoBoardVocabularyServiceImpl implements IDcInfoBoardVocabularyService |
|||
{ |
|||
@Autowired |
|||
private DcInfoBoardVocabularyMapper dcInfoBoardVocabularyMapper; |
|||
|
|||
/** |
|||
* 查询情报板敏感字管理 |
|||
* |
|||
* @param id 情报板敏感字管理主键 |
|||
* @return 情报板敏感字管理 |
|||
*/ |
|||
@Override |
|||
public DcInfoBoardVocabulary selectDcInfoBoardVocabularyById(Long id) |
|||
{ |
|||
return dcInfoBoardVocabularyMapper.selectDcInfoBoardVocabularyById(id); |
|||
} |
|||
|
|||
/** |
|||
* 查询情报板敏感字管理列表 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 情报板敏感字管理 |
|||
*/ |
|||
@Override |
|||
public List<DcInfoBoardVocabulary> selectDcInfoBoardVocabularyList(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|||
{ |
|||
return dcInfoBoardVocabularyMapper.selectDcInfoBoardVocabularyList(dcInfoBoardVocabulary); |
|||
} |
|||
|
|||
/** |
|||
* 新增情报板敏感字管理 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int insertDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|||
{ |
|||
dcInfoBoardVocabulary.setCreateTime(DateUtils.getNowDate()); |
|||
return dcInfoBoardVocabularyMapper.insertDcInfoBoardVocabulary(dcInfoBoardVocabulary); |
|||
} |
|||
|
|||
/** |
|||
* 修改情报板敏感字管理 |
|||
* |
|||
* @param dcInfoBoardVocabulary 情报板敏感字管理 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int updateDcInfoBoardVocabulary(DcInfoBoardVocabulary dcInfoBoardVocabulary) |
|||
{ |
|||
return dcInfoBoardVocabularyMapper.updateDcInfoBoardVocabulary(dcInfoBoardVocabulary); |
|||
} |
|||
|
|||
/** |
|||
* 批量删除情报板敏感字管理 |
|||
* |
|||
* @param ids 需要删除的情报板敏感字管理主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDcInfoBoardVocabularyByIds(Long[] ids) |
|||
{ |
|||
return dcInfoBoardVocabularyMapper.deleteDcInfoBoardVocabularyByIds(ids); |
|||
} |
|||
|
|||
/** |
|||
* 删除情报板敏感字管理信息 |
|||
* |
|||
* @param id 情报板敏感字管理主键 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public int deleteDcInfoBoardVocabularyById(Long id) |
|||
{ |
|||
return dcInfoBoardVocabularyMapper.deleteDcInfoBoardVocabularyById(id); |
|||
} |
|||
|
|||
/** |
|||
* 检查情报板是否含有敏感字 |
|||
* |
|||
* @param content 情报板内容 |
|||
* @return 结果 |
|||
*/ |
|||
@Override |
|||
public AjaxResult checkBoardContent(String content){ |
|||
if (content == null || content.equals("")) { |
|||
return AjaxResult.error("情报板内容为空"); |
|||
} else { |
|||
Boolean flag = false; |
|||
List<DcInfoBoardVocabulary> boardVocabularies = dcInfoBoardVocabularyMapper.selectDcInfoBoardVocabularyList(null); |
|||
try { |
|||
content = URLDecoder.decode(content, "UTF-8"); |
|||
} catch (Exception e) { |
|||
e.printStackTrace(); |
|||
return AjaxResult.error(); |
|||
} |
|||
for (int i = 0;i < boardVocabularies.size();i++) { |
|||
String word = boardVocabularies.get(i).getWord(); |
|||
if (content.contains(word)) { |
|||
return AjaxResult.error("当前发布内容包含敏感字段'" + word + "',请修改"); |
|||
} |
|||
} |
|||
} |
|||
return AjaxResult.success("验证通过"); |
|||
} |
|||
} |
@ -0,0 +1,105 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.zc.business.mapper.DcBoardReleaseLogMapper"> |
|||
|
|||
<resultMap type="DcBoardReleaseLog" id="DcBoardReleaseLogResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="deviceId" column="device_id" /> |
|||
<result property="deviceName" column="device_name" /> |
|||
<result property="releaseContent" column="release_content" /> |
|||
<result property="releaseStatus" column="release_status" /> |
|||
<result property="releaseTime" column="release_time" /> |
|||
<result property="releaseDeptName" column="release_dept_name" /> |
|||
<result property="releaseDeptId" column="release_dept_id" /> |
|||
<result property="releaseUserName" column="release_user_name" /> |
|||
<result property="releaseUserId" column="release_user_id" /> |
|||
<result property="platform" column="platform" /> |
|||
<result property="releaseIp" column="release_ip" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectDcBoardReleaseLogVo"> |
|||
select id, device_id, device_name, release_content, release_status, release_time, release_dept_name, release_dept_id, release_user_name, release_user_id, platform,release_ip from dc_board_release_log |
|||
</sql> |
|||
|
|||
<select id="selectDcBoardReleaseLogList" parameterType="DcBoardReleaseLog" resultMap="DcBoardReleaseLogResult"> |
|||
<include refid="selectDcBoardReleaseLogVo"/> |
|||
<where> |
|||
<if test="deviceId != null and deviceId != ''"> and device_id = #{deviceId}</if> |
|||
<if test="deviceName != null and deviceName != ''"> and device_name like concat('%', #{deviceName}, '%')</if> |
|||
<if test="releaseContent != null and releaseContent != ''"> and release_content = #{releaseContent}</if> |
|||
<if test="releaseStatus != null and releaseStatus != ''"> and release_status = #{releaseStatus}</if> |
|||
<if test="releaseTime != null "> and release_time = #{releaseTime}</if> |
|||
<if test="releaseDeptName != null and releaseDeptName != ''"> and release_dept_name like concat('%', #{releaseDeptName}, '%')</if> |
|||
<if test="releaseDeptId != null and releaseDeptId != ''"> and release_dept_id = #{releaseDeptId}</if> |
|||
<if test="releaseUserName != null and releaseUserName != ''"> and release_user_name like concat('%', #{releaseUserName}, '%')</if> |
|||
<if test="releaseUserId != null and releaseUserId != ''"> and release_user_id = #{releaseUserId}</if> |
|||
<if test="releaseIp != null and releaseIp != ''"> and release_ip = #{releaseIp}</if> |
|||
<if test="platform != null and platform != ''"> and platform = #{platform}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectDcBoardReleaseLogById" parameterType="Long" resultMap="DcBoardReleaseLogResult"> |
|||
<include refid="selectDcBoardReleaseLogVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertDcBoardReleaseLog" parameterType="DcBoardReleaseLog" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into dc_board_release_log |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="deviceId != null">device_id,</if> |
|||
<if test="deviceName != null">device_name,</if> |
|||
<if test="releaseContent != null">release_content,</if> |
|||
<if test="releaseStatus != null">release_status,</if> |
|||
<if test="releaseDeptName != null">release_dept_name,</if> |
|||
<if test="releaseDeptId != null">release_dept_id,</if> |
|||
<if test="releaseUserName != null">release_user_name,</if> |
|||
<if test="releaseUserId != null">release_user_id,</if> |
|||
<if test="releaseIp != null">release_ip,</if> |
|||
<if test="platform != null">platform,</if> |
|||
release_time |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="deviceId != null">#{deviceId},</if> |
|||
<if test="deviceName != null">#{deviceName},</if> |
|||
<if test="releaseContent != null">#{releaseContent},</if> |
|||
<if test="releaseStatus != null">#{releaseStatus},</if> |
|||
<if test="releaseDeptName != null">#{releaseDeptName},</if> |
|||
<if test="releaseDeptId != null">#{releaseDeptId},</if> |
|||
<if test="releaseUserName != null">#{releaseUserName},</if> |
|||
<if test="releaseUserId != null">#{releaseUserId},</if> |
|||
<if test="releaseIp != null">#{releaseIp},</if> |
|||
<if test="platform != null">#{platform},</if> |
|||
now() |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateDcBoardReleaseLog" parameterType="DcBoardReleaseLog"> |
|||
update dc_board_release_log |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="deviceId != null">device_id = #{deviceId},</if> |
|||
<if test="deviceName != null">device_name = #{deviceName},</if> |
|||
<if test="releaseContent != null">release_content = #{releaseContent},</if> |
|||
<if test="releaseStatus != null">release_status = #{releaseStatus},</if> |
|||
<if test="releaseDeptName != null">release_dept_name = #{releaseDeptName},</if> |
|||
<if test="releaseDeptId != null">release_dept_id = #{releaseDeptId},</if> |
|||
<if test="releaseUserName != null">release_user_name = #{releaseUserName},</if> |
|||
<if test="releaseUserId != null">release_user_id = #{releaseUserId},</if> |
|||
<if test="releaseIp != null">release_ip = #{releaseIp},</if> |
|||
<if test="platform != null">platform = #{platform},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteDcBoardReleaseLogById" parameterType="Long"> |
|||
delete from dc_board_release_log where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteDcBoardReleaseLogByIds" parameterType="String"> |
|||
delete from dc_board_release_log where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
@ -0,0 +1,60 @@ |
|||
<?xml version="1.0" encoding="UTF-8" ?> |
|||
<!DOCTYPE mapper |
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
|||
<mapper namespace="com.zc.business.mapper.DcInfoBoardVocabularyMapper"> |
|||
|
|||
<resultMap type="DcInfoBoardVocabulary" id="DcInfoBoardVocabularyResult"> |
|||
<result property="id" column="id" /> |
|||
<result property="word" column="word" /> |
|||
<result property="createTime" column="create_time" /> |
|||
</resultMap> |
|||
|
|||
<sql id="selectDcInfoBoardVocabularyVo"> |
|||
select id, word, create_time from dc_info_board_vocabulary |
|||
</sql> |
|||
|
|||
<select id="selectDcInfoBoardVocabularyList" parameterType="DcInfoBoardVocabulary" resultMap="DcInfoBoardVocabularyResult"> |
|||
<include refid="selectDcInfoBoardVocabularyVo"/> |
|||
<where> |
|||
<if test="word != null and word != ''"> and word = #{word}</if> |
|||
</where> |
|||
</select> |
|||
|
|||
<select id="selectDcInfoBoardVocabularyById" parameterType="Long" resultMap="DcInfoBoardVocabularyResult"> |
|||
<include refid="selectDcInfoBoardVocabularyVo"/> |
|||
where id = #{id} |
|||
</select> |
|||
|
|||
<insert id="insertDcInfoBoardVocabulary" parameterType="DcInfoBoardVocabulary" useGeneratedKeys="true" keyProperty="id"> |
|||
insert into dc_info_board_vocabulary |
|||
<trim prefix="(" suffix=")" suffixOverrides=","> |
|||
<if test="word != null">word,</if> |
|||
<if test="createTime != null">create_time,</if> |
|||
</trim> |
|||
<trim prefix="values (" suffix=")" suffixOverrides=","> |
|||
<if test="word != null">#{word},</if> |
|||
<if test="createTime != null">#{createTime},</if> |
|||
</trim> |
|||
</insert> |
|||
|
|||
<update id="updateDcInfoBoardVocabulary" parameterType="DcInfoBoardVocabulary"> |
|||
update dc_info_board_vocabulary |
|||
<trim prefix="SET" suffixOverrides=","> |
|||
<if test="word != null">word = #{word},</if> |
|||
<if test="createTime != null">create_time = #{createTime},</if> |
|||
</trim> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<delete id="deleteDcInfoBoardVocabularyById" parameterType="Long"> |
|||
delete from dc_info_board_vocabulary where id = #{id} |
|||
</delete> |
|||
|
|||
<delete id="deleteDcInfoBoardVocabularyByIds" parameterType="String"> |
|||
delete from dc_info_board_vocabulary where id in |
|||
<foreach item="id" collection="array" open="(" separator="," close=")"> |
|||
#{id} |
|||
</foreach> |
|||
</delete> |
|||
</mapper> |
Loading…
Reference in new issue