lau572
11 months ago
15 changed files with 1310 additions and 19 deletions
@ -0,0 +1,73 @@ |
|||||
|
package com.zc.business.controller; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
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.DcInfoBoardTemplate; |
||||
|
import com.zc.business.service.IDcInfoBoardTemplateService; |
||||
|
import io.swagger.annotations.Api; |
||||
|
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.*; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 情报板模板Controller |
||||
|
* |
||||
|
*/ |
||||
|
@Api("情报板模板") |
||||
|
@RestController |
||||
|
@RequestMapping("/business/boardTemplate") |
||||
|
public class DcInfoBoardTemplateController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private IDcInfoBoardTemplateService dcInfoBoardTemplateService; |
||||
|
|
||||
|
@ApiOperation("获取情报板模板") |
||||
|
@GetMapping("/getAllVmsTemplate") |
||||
|
public AjaxResult getAllVmsTemplate(String category, String devicePixel) { |
||||
|
return AjaxResult.success(dcInfoBoardTemplateService.getAllVmsTemplate(category, devicePixel)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增情报板模板 |
||||
|
*/ |
||||
|
@ApiOperation("新增情报板模板") |
||||
|
@PreAuthorize("@ss.hasPermi('business:boardTemplate:add')") |
||||
|
@Log(title = "情报板模板", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcInfoBoardTemplate dcInfoBoardTemplate) |
||||
|
{ |
||||
|
return AjaxResult.success(dcInfoBoardTemplateService.insertSdVmsTemplate(dcInfoBoardTemplate)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改情报板模板 |
||||
|
*/ |
||||
|
@ApiOperation("修改情报板模板") |
||||
|
@PreAuthorize("@ss.hasPermi('business:boardTemplate:edit')") |
||||
|
@Log(title = "情报板模板", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcInfoBoardTemplate dcInfoBoardTemplate) |
||||
|
{ |
||||
|
return toAjax(dcInfoBoardTemplateService.updateSdVmsTemplate(dcInfoBoardTemplate)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除情报板模板 |
||||
|
*/ |
||||
|
@ApiOperation("删除情报板模板") |
||||
|
@PreAuthorize("@ss.hasPermi('business:boardTemplate:remove')") |
||||
|
@Log(title = "情报板模板", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{id}") |
||||
|
public AjaxResult remove(@PathVariable @ApiParam(value="id", name="id", required=true) Long id) |
||||
|
{ |
||||
|
return toAjax(dcInfoBoardTemplateService.deleteSdVmsTemplateById(id)); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
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.DcPublishInfo; |
||||
|
import com.zc.business.service.IDcPublishInfoService; |
||||
|
import com.ruoyi.common.utils.poi.ExcelUtil; |
||||
|
import com.ruoyi.common.core.page.TableDataInfo; |
||||
|
|
||||
|
/** |
||||
|
* 信息发布记录Controller |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-01-04 |
||||
|
*/ |
||||
|
@Api(value = "信息发布记录") |
||||
|
@RestController |
||||
|
@RequestMapping("/business/dcPublishInfo") |
||||
|
public class DcPublishInfoController extends BaseController |
||||
|
{ |
||||
|
@Autowired |
||||
|
private IDcPublishInfoService dcPublishInfoService; |
||||
|
|
||||
|
/** |
||||
|
* 查询 信息发布记录列表 |
||||
|
*/ |
||||
|
@ApiOperation("查询信息发布记录列表") |
||||
|
@PreAuthorize("@ss.hasPermi('business:dcPublishInfo:list')") |
||||
|
@GetMapping("/list") |
||||
|
public TableDataInfo list(DcPublishInfo dcPublishInfo) |
||||
|
{ |
||||
|
startPage(); |
||||
|
List<DcPublishInfo> list = dcPublishInfoService.selectDcPublishInfoList(dcPublishInfo); |
||||
|
return getDataTable(list); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导出 信息发布记录列表 |
||||
|
*/ |
||||
|
@ApiOperation("导出信息发布记录") |
||||
|
@PreAuthorize("@ss.hasPermi('business:dcPublishInfo:export')") |
||||
|
@Log(title = " 信息发布记录", businessType = BusinessType.EXPORT) |
||||
|
@PostMapping("/export") |
||||
|
public void export(HttpServletResponse response, DcPublishInfo dcPublishInfo) |
||||
|
{ |
||||
|
List<DcPublishInfo> list = dcPublishInfoService.selectDcPublishInfoList(dcPublishInfo); |
||||
|
ExcelUtil<DcPublishInfo> util = new ExcelUtil<>(DcPublishInfo.class); |
||||
|
util.exportExcel(response, list, " 信息发布记录数据"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 获取 信息发布记录详细信息 |
||||
|
*/ |
||||
|
@ApiOperation("获取 信息发布记录详细信息") |
||||
|
@PreAuthorize("@ss.hasPermi('business:dcPublishInfo:query')") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
public AjaxResult getInfo(@PathVariable("id") @ApiParam(name = "id", value = "id", required = true) Long id) |
||||
|
{ |
||||
|
return AjaxResult.success(dcPublishInfoService.selectDcPublishInfoById(id)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增 信息发布记录 |
||||
|
*/ |
||||
|
@ApiOperation("新增 信息发布记录") |
||||
|
@PreAuthorize("@ss.hasPermi('business:dcPublishInfo:add')") |
||||
|
@Log(title = " 信息发布记录", businessType = BusinessType.INSERT) |
||||
|
@PostMapping |
||||
|
public AjaxResult add(@RequestBody DcPublishInfo dcPublishInfo) |
||||
|
{ |
||||
|
return toAjax(dcPublishInfoService.insertDcPublishInfo(dcPublishInfo)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改 信息发布记录 |
||||
|
*/ |
||||
|
@ApiOperation("修改 信息发布记录") |
||||
|
@PreAuthorize("@ss.hasPermi('business:dcPublishInfo:edit')") |
||||
|
@Log(title = " 信息发布记录", businessType = BusinessType.UPDATE) |
||||
|
@PutMapping |
||||
|
public AjaxResult edit(@RequestBody DcPublishInfo dcPublishInfo) |
||||
|
{ |
||||
|
return toAjax(dcPublishInfoService.updateDcPublishInfo(dcPublishInfo)); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除 信息发布记录 |
||||
|
*/ |
||||
|
@ApiOperation("删除 信息发布记录") |
||||
|
@PreAuthorize("@ss.hasPermi('business:dcPublishInfo:remove')") |
||||
|
@Log(title = " 信息发布记录", businessType = BusinessType.DELETE) |
||||
|
@DeleteMapping("/{id}") |
||||
|
public AjaxResult remove(@PathVariable @ApiParam(name = "id", value = "id", required = true) Long id) |
||||
|
{ |
||||
|
return toAjax(dcPublishInfoService.deleteDcPublishInfoById(id)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,228 @@ |
|||||
|
package com.zc.business.domain; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonFormat; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* 情报板模板 dc_info_board_template |
||||
|
* |
||||
|
*/ |
||||
|
@ApiModel("情报板模板对象") |
||||
|
public class DcInfoBoardTemplate { |
||||
|
|
||||
|
/** |
||||
|
* id |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "id") |
||||
|
private Long id; |
||||
|
|
||||
|
/** |
||||
|
* 模板分组 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "模板分组") |
||||
|
private String category; |
||||
|
|
||||
|
/** |
||||
|
* 内容 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "内容") |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* 屏幕尺寸 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "屏幕尺寸") |
||||
|
private String screenSize; |
||||
|
|
||||
|
/** |
||||
|
* 字体颜色 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "字体颜色") |
||||
|
private String fontColor; |
||||
|
|
||||
|
/** |
||||
|
* 字体大小 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "字体大小") |
||||
|
private String fontSize; |
||||
|
|
||||
|
/** |
||||
|
* 字体类型 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "字体类型") |
||||
|
private String fontType; |
||||
|
|
||||
|
/** |
||||
|
* 字体间距 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "字体间距") |
||||
|
private String fontSpacing; |
||||
|
|
||||
|
/** |
||||
|
* 滚动速度 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "滚动速度") |
||||
|
private String rollingSpeed; |
||||
|
|
||||
|
/** |
||||
|
* 停留时间 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "停留时间") |
||||
|
private String stopTime; |
||||
|
|
||||
|
/** |
||||
|
* 入屏方式 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "入屏方式") |
||||
|
private String inScreenMode; |
||||
|
|
||||
|
/** |
||||
|
* 对齐样式 0-左对齐 2-居中 1-右对齐 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "对齐样式 0-左对齐 2-居中 1-右对齐") |
||||
|
private String formatStyle; |
||||
|
|
||||
|
/** |
||||
|
* 备注 |
||||
|
*/ |
||||
|
@ApiModelProperty(value = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
/** |
||||
|
* 创建时间 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
||||
|
private Date createTime; |
||||
|
|
||||
|
/** |
||||
|
* 修改时间 |
||||
|
*/ |
||||
|
@ApiModelProperty(hidden = true) |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") |
||||
|
private Date updateTime; |
||||
|
|
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getCategory() { |
||||
|
return category; |
||||
|
} |
||||
|
|
||||
|
public void setCategory(String category) { |
||||
|
this.category = category; |
||||
|
} |
||||
|
|
||||
|
public String getContent() { |
||||
|
return content; |
||||
|
} |
||||
|
|
||||
|
public void setContent(String content) { |
||||
|
this.content = content; |
||||
|
} |
||||
|
|
||||
|
public String getScreenSize() { |
||||
|
return screenSize; |
||||
|
} |
||||
|
|
||||
|
public void setScreenSize(String screenSize) { |
||||
|
this.screenSize = screenSize; |
||||
|
} |
||||
|
|
||||
|
public String getFontColor() { |
||||
|
return fontColor; |
||||
|
} |
||||
|
|
||||
|
public void setFontColor(String fontColor) { |
||||
|
this.fontColor = fontColor; |
||||
|
} |
||||
|
|
||||
|
public String getFontSize() { |
||||
|
return fontSize; |
||||
|
} |
||||
|
|
||||
|
public void setFontSize(String fontSize) { |
||||
|
this.fontSize = fontSize; |
||||
|
} |
||||
|
|
||||
|
public String getFontType() { |
||||
|
return fontType; |
||||
|
} |
||||
|
|
||||
|
public void setFontType(String fontType) { |
||||
|
this.fontType = fontType; |
||||
|
} |
||||
|
|
||||
|
public String getFontSpacing() { |
||||
|
return fontSpacing; |
||||
|
} |
||||
|
|
||||
|
public void setFontSpacing(String fontSpacing) { |
||||
|
this.fontSpacing = fontSpacing; |
||||
|
} |
||||
|
|
||||
|
public String getRollingSpeed() { |
||||
|
return rollingSpeed; |
||||
|
} |
||||
|
|
||||
|
public void setRollingSpeed(String rollingSpeed) { |
||||
|
this.rollingSpeed = rollingSpeed; |
||||
|
} |
||||
|
|
||||
|
public String getStopTime() { |
||||
|
return stopTime; |
||||
|
} |
||||
|
|
||||
|
public void setStopTime(String stopTime) { |
||||
|
this.stopTime = stopTime; |
||||
|
} |
||||
|
|
||||
|
public String getInScreenMode() { |
||||
|
return inScreenMode; |
||||
|
} |
||||
|
|
||||
|
public void setInScreenMode(String inScreenMode) { |
||||
|
this.inScreenMode = inScreenMode; |
||||
|
} |
||||
|
|
||||
|
public String getFormatStyle() { |
||||
|
return formatStyle; |
||||
|
} |
||||
|
|
||||
|
public void setFormatStyle(String formatStyle) { |
||||
|
this.formatStyle = formatStyle; |
||||
|
} |
||||
|
|
||||
|
public String getRemark() { |
||||
|
return remark; |
||||
|
} |
||||
|
|
||||
|
public void setRemark(String remark) { |
||||
|
this.remark = remark; |
||||
|
} |
||||
|
|
||||
|
public Date getCreateTime() { |
||||
|
return createTime; |
||||
|
} |
||||
|
|
||||
|
public void setCreateTime(Date createTime) { |
||||
|
this.createTime = createTime; |
||||
|
} |
||||
|
|
||||
|
public Date getUpdateTime() { |
||||
|
return updateTime; |
||||
|
} |
||||
|
|
||||
|
public void setUpdateTime(Date updateTime) { |
||||
|
this.updateTime = updateTime; |
||||
|
} |
||||
|
} |
@ -0,0 +1,213 @@ |
|||||
|
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_publish_info |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-01-04 |
||||
|
*/ |
||||
|
@ApiModel("信息发布记录对象") |
||||
|
public class DcPublishInfo extends BaseEntity |
||||
|
{ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** 主键 */ |
||||
|
@ApiModelProperty(value = "id") |
||||
|
private Long id; |
||||
|
|
||||
|
/** 所属机构 */ |
||||
|
@ApiModelProperty(value = "所属机构") |
||||
|
@Excel(name = "所属机构") |
||||
|
private Long groupId; |
||||
|
|
||||
|
/** 所属信息 */ |
||||
|
@ApiModelProperty(value = "所属信息") |
||||
|
@Excel(name = "所属信息") |
||||
|
private String subjectId; |
||||
|
|
||||
|
/** 标题 */ |
||||
|
@ApiModelProperty(value = "标题") |
||||
|
@Excel(name = "标题") |
||||
|
private String title; |
||||
|
|
||||
|
/** 发布渠道1-事件,2-情报板,3-广播 */ |
||||
|
@ApiModelProperty(value = "发布渠道1-事件,2-情报板,3-广播") |
||||
|
@Excel(name = "发布渠道1-事件,2-情报板,3-广播") |
||||
|
private Integer publishChannel; |
||||
|
|
||||
|
/** 审核状态0-未审核, 1-已审核, 2-驳回 */ |
||||
|
@ApiModelProperty(value = "审核状态0-未审核, 1-已审核, 2-驳回") |
||||
|
@Excel(name = "审核状态0-未审核, 1-已审核, 2-驳回") |
||||
|
private Integer isverify; |
||||
|
|
||||
|
/** 发布者 */ |
||||
|
@ApiModelProperty(value = "发布者") |
||||
|
@Excel(name = "发布者") |
||||
|
private String publisher; |
||||
|
|
||||
|
/** 审核者 */ |
||||
|
@ApiModelProperty(value = "审核者") |
||||
|
@Excel(name = "审核者") |
||||
|
private String auditor; |
||||
|
|
||||
|
/** 发布时间 */ |
||||
|
@ApiModelProperty(value = "发布时间") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date publishTime; |
||||
|
|
||||
|
/** 审核时间 */ |
||||
|
@ApiModelProperty(value = "审核时间") |
||||
|
@JsonFormat(pattern = "yyyy-MM-dd") |
||||
|
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") |
||||
|
private Date auditTime; |
||||
|
|
||||
|
/** 发布状态0失败, 1成功, 2草稿 */ |
||||
|
@ApiModelProperty(value = "发布状态0失败, 1成功, 2草稿") |
||||
|
@Excel(name = "发布状态0失败, 1成功, 2草稿") |
||||
|
private Integer publishStatus; |
||||
|
|
||||
|
/** 内容 json结构 */ |
||||
|
@ApiModelProperty(value = "内容 json结构") |
||||
|
@Excel(name = "内容 json结构") |
||||
|
private String content; |
||||
|
|
||||
|
public void setId(Long id) |
||||
|
{ |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public Long getId() |
||||
|
{ |
||||
|
return id; |
||||
|
} |
||||
|
public void setGroupId(Long groupId) |
||||
|
{ |
||||
|
this.groupId = groupId; |
||||
|
} |
||||
|
|
||||
|
public Long getGroupId() |
||||
|
{ |
||||
|
return groupId; |
||||
|
} |
||||
|
public void setSubjectId(String subjectId) |
||||
|
{ |
||||
|
this.subjectId = subjectId; |
||||
|
} |
||||
|
|
||||
|
public String getSubjectId() |
||||
|
{ |
||||
|
return subjectId; |
||||
|
} |
||||
|
public void setTitle(String title) |
||||
|
{ |
||||
|
this.title = title; |
||||
|
} |
||||
|
|
||||
|
public String getTitle() |
||||
|
{ |
||||
|
return title; |
||||
|
} |
||||
|
public void setPublishChannel(Integer publishChannel) |
||||
|
{ |
||||
|
this.publishChannel = publishChannel; |
||||
|
} |
||||
|
|
||||
|
public Integer getPublishChannel() |
||||
|
{ |
||||
|
return publishChannel; |
||||
|
} |
||||
|
public void setIsverify(Integer isverify) |
||||
|
{ |
||||
|
this.isverify = isverify; |
||||
|
} |
||||
|
|
||||
|
public Integer getIsverify() |
||||
|
{ |
||||
|
return isverify; |
||||
|
} |
||||
|
public void setPublisher(String publisher) |
||||
|
{ |
||||
|
this.publisher = publisher; |
||||
|
} |
||||
|
|
||||
|
public String getPublisher() |
||||
|
{ |
||||
|
return publisher; |
||||
|
} |
||||
|
public void setAuditor(String auditor) |
||||
|
{ |
||||
|
this.auditor = auditor; |
||||
|
} |
||||
|
|
||||
|
public String getAuditor() |
||||
|
{ |
||||
|
return auditor; |
||||
|
} |
||||
|
public void setPublishTime(Date publishTime) |
||||
|
{ |
||||
|
this.publishTime = publishTime; |
||||
|
} |
||||
|
|
||||
|
public Date getPublishTime() |
||||
|
{ |
||||
|
return publishTime; |
||||
|
} |
||||
|
public void setAuditTime(Date auditTime) |
||||
|
{ |
||||
|
this.auditTime = auditTime; |
||||
|
} |
||||
|
|
||||
|
public Date getAuditTime() |
||||
|
{ |
||||
|
return auditTime; |
||||
|
} |
||||
|
public void setPublishStatus(Integer publishStatus) |
||||
|
{ |
||||
|
this.publishStatus = publishStatus; |
||||
|
} |
||||
|
|
||||
|
public Integer getPublishStatus() |
||||
|
{ |
||||
|
return publishStatus; |
||||
|
} |
||||
|
public void setContent(String content) |
||||
|
{ |
||||
|
this.content = content; |
||||
|
} |
||||
|
|
||||
|
public String getContent() |
||||
|
{ |
||||
|
return content; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) |
||||
|
.append("id", getId()) |
||||
|
.append("groupId", getGroupId()) |
||||
|
.append("subjectId", getSubjectId()) |
||||
|
.append("title", getTitle()) |
||||
|
.append("publishChannel", getPublishChannel()) |
||||
|
.append("isverify", getIsverify()) |
||||
|
.append("publisher", getPublisher()) |
||||
|
.append("auditor", getAuditor()) |
||||
|
.append("publishTime", getPublishTime()) |
||||
|
.append("auditTime", getAuditTime()) |
||||
|
.append("publishStatus", getPublishStatus()) |
||||
|
.append("content", getContent()) |
||||
|
.append("remark", getRemark()) |
||||
|
.append("createTime", getCreateTime()) |
||||
|
.append("updateTime", getUpdateTime()) |
||||
|
.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
package com.zc.business.mapper; |
||||
|
|
||||
|
|
||||
|
import com.zc.business.domain.DcInfoBoardTemplate; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 情报板模板Mapper接口 |
||||
|
* |
||||
|
*/ |
||||
|
public interface DcInfoBoardTemplateMapper |
||||
|
{ |
||||
|
|
||||
|
public List<DcInfoBoardTemplate> selectTemplateList(@Param("category") String category, @Param("devicePixel") String devicePixel); |
||||
|
|
||||
|
/** |
||||
|
* 新增情报板模板 |
||||
|
* |
||||
|
* @param dcInfoBoardTemplate 情报板模板 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int insertSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); |
||||
|
|
||||
|
/** |
||||
|
* 修改情报板模板 |
||||
|
* |
||||
|
* @param dcInfoBoardTemplate 情报板模板 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int updateSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); |
||||
|
|
||||
|
/** |
||||
|
* 删除情报板模板 |
||||
|
* |
||||
|
* @param id 情报板模板ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSdVmsTemplateById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 删除情报板模板 |
||||
|
* |
||||
|
* @param id 需要删除的数据ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
public int deleteSdVmsTemplateByIds(Long id); |
||||
|
|
||||
|
public Long selectSdVmsTemplateId(); |
||||
|
|
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package com.zc.business.mapper; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.zc.business.domain.DcPublishInfo; |
||||
|
|
||||
|
/** |
||||
|
* 信息发布记录Mapper接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-01-04 |
||||
|
*/ |
||||
|
public interface DcPublishInfoMapper |
||||
|
{ |
||||
|
/** |
||||
|
* 查询 信息发布记录 |
||||
|
* |
||||
|
* @param id 信息发布记录主键 |
||||
|
* @return 信息发布记录 |
||||
|
*/ |
||||
|
public DcPublishInfo selectDcPublishInfoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询 信息发布记录列表 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 信息发布记录集合 |
||||
|
*/ |
||||
|
List<DcPublishInfo> selectDcPublishInfoList(DcPublishInfo dcPublishInfo); |
||||
|
|
||||
|
/** |
||||
|
* 新增 信息发布记录 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int insertDcPublishInfo(DcPublishInfo dcPublishInfo); |
||||
|
|
||||
|
/** |
||||
|
* 修改 信息发布记录 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int updateDcPublishInfo(DcPublishInfo dcPublishInfo); |
||||
|
|
||||
|
/** |
||||
|
* 删除 信息发布记录 |
||||
|
* |
||||
|
* @param id 信息发布记录主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int deleteDcPublishInfoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 信息发布记录 |
||||
|
* |
||||
|
* @param ids 需要删除的数据主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int deleteDcPublishInfoByIds(Long[] ids); |
||||
|
} |
@ -0,0 +1,42 @@ |
|||||
|
package com.zc.business.service; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.zc.business.domain.DcInfoBoardTemplate; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 情报板模板Service接口 |
||||
|
* |
||||
|
* @author 刘方堃 |
||||
|
* @date 2021-11-30 |
||||
|
*/ |
||||
|
public interface IDcInfoBoardTemplateService { |
||||
|
|
||||
|
Map<String, List<DcInfoBoardTemplate>> getAllVmsTemplate(String category, String devicePixel); |
||||
|
|
||||
|
/** |
||||
|
* 新增情报板模板 |
||||
|
* |
||||
|
* @param dcInfoBoardTemplate 情报板模板 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int insertSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); |
||||
|
|
||||
|
/** |
||||
|
* 修改情报板模板 |
||||
|
* |
||||
|
* @param dcInfoBoardTemplate 情报板模板 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int updateSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除情报板模板 |
||||
|
* |
||||
|
* @param ids 需要删除的情报板模板ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int deleteSdVmsTemplateById(Long ids); |
||||
|
} |
@ -0,0 +1,61 @@ |
|||||
|
package com.zc.business.service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.zc.business.domain.DcPublishInfo; |
||||
|
|
||||
|
/** |
||||
|
* 信息发布记录Service接口 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-01-04 |
||||
|
*/ |
||||
|
public interface IDcPublishInfoService |
||||
|
{ |
||||
|
/** |
||||
|
* 查询 信息发布记录 |
||||
|
* |
||||
|
* @param id 信息发布记录主键 |
||||
|
* @return 信息发布记录 |
||||
|
*/ |
||||
|
public DcPublishInfo selectDcPublishInfoById(Long id); |
||||
|
|
||||
|
/** |
||||
|
* 查询 信息发布记录列表 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 信息发布记录集合 |
||||
|
*/ |
||||
|
List<DcPublishInfo> selectDcPublishInfoList(DcPublishInfo dcPublishInfo); |
||||
|
|
||||
|
/** |
||||
|
* 新增 信息发布记录 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int insertDcPublishInfo(DcPublishInfo dcPublishInfo); |
||||
|
|
||||
|
/** |
||||
|
* 修改 信息发布记录 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int updateDcPublishInfo(DcPublishInfo dcPublishInfo); |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 信息发布记录 |
||||
|
* |
||||
|
* @param ids 需要删除的 信息发布记录主键集合 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int deleteDcPublishInfoByIds(Long[] ids); |
||||
|
|
||||
|
/** |
||||
|
* 删除 信息发布记录信息 |
||||
|
* |
||||
|
* @param id 信息发布记录主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
int deleteDcPublishInfoById(Long id); |
||||
|
} |
@ -0,0 +1,87 @@ |
|||||
|
package com.zc.business.service.impl; |
||||
|
|
||||
|
import com.ruoyi.common.core.domain.entity.SysDictData; |
||||
|
import com.ruoyi.common.utils.DictUtils; |
||||
|
import com.zc.business.domain.DcInfoBoardTemplate; |
||||
|
import com.zc.business.mapper.DcInfoBoardTemplateMapper; |
||||
|
import com.zc.business.service.IDcInfoBoardTemplateService; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.HashMap; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* 情报板模板Service业务层处理 |
||||
|
* |
||||
|
* @author |
||||
|
* @date |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DcInfoBoardTemplateServiceImpl implements IDcInfoBoardTemplateService { |
||||
|
|
||||
|
@Autowired |
||||
|
private DcInfoBoardTemplateMapper dcInfoBoardTemplateMapper; |
||||
|
|
||||
|
|
||||
|
@Override |
||||
|
public Map<String, List<DcInfoBoardTemplate>> getAllVmsTemplate(String category, String devicePixel) { |
||||
|
Map<String, List<DcInfoBoardTemplate>> map = new HashMap<>(); |
||||
|
|
||||
|
List<SysDictData> categorys = DictUtils.getDictCache("iot_template_category"); |
||||
|
List<DcInfoBoardTemplate> iotBoardTemplates = dcInfoBoardTemplateMapper.selectTemplateList(null, devicePixel); |
||||
|
List<DcInfoBoardTemplate> template = new ArrayList<>(); |
||||
|
if (categorys != null) { |
||||
|
for (int i = 0;i < categorys.size();i++) { |
||||
|
template = new ArrayList<>(); |
||||
|
String dictValue = categorys.get(i).getDictValue(); |
||||
|
for (int j = 0; j < iotBoardTemplates.size(); j++) { |
||||
|
DcInfoBoardTemplate iotBoardTemplate = iotBoardTemplates.get(j); |
||||
|
if (!dictValue.equals(iotBoardTemplate.getCategory())) { |
||||
|
continue; |
||||
|
} |
||||
|
template.add(iotBoardTemplate); |
||||
|
} |
||||
|
map.put(dictValue, template); |
||||
|
} |
||||
|
} |
||||
|
return map; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增情报板模板 |
||||
|
* |
||||
|
* @param dcInfoBoardTemplate 情报板模板 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate) { |
||||
|
|
||||
|
return dcInfoBoardTemplateMapper.insertSdVmsTemplate(dcInfoBoardTemplate); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改情报板模板 |
||||
|
* |
||||
|
* @param dcInfoBoardTemplate 情报板模板 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateSdVmsTemplate(DcInfoBoardTemplate dcInfoBoardTemplate) { |
||||
|
return dcInfoBoardTemplateMapper.updateSdVmsTemplate(dcInfoBoardTemplate); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除情报板模板 |
||||
|
* |
||||
|
* @param id 需要删除的情报板模板ID |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteSdVmsTemplateById(Long id) { |
||||
|
return dcInfoBoardTemplateMapper.deleteSdVmsTemplateByIds(id); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,96 @@ |
|||||
|
package com.zc.business.service.impl; |
||||
|
|
||||
|
import java.util.List; |
||||
|
import com.ruoyi.common.utils.DateUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import com.zc.business.mapper.DcPublishInfoMapper; |
||||
|
import com.zc.business.domain.DcPublishInfo; |
||||
|
import com.zc.business.service.IDcPublishInfoService; |
||||
|
|
||||
|
/** |
||||
|
* 信息发布记录Service业务层处理 |
||||
|
* |
||||
|
* @author ruoyi |
||||
|
* @date 2024-01-04 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class DcPublishInfoServiceImpl implements IDcPublishInfoService |
||||
|
{ |
||||
|
@Autowired |
||||
|
private DcPublishInfoMapper dcPublishInfoMapper; |
||||
|
|
||||
|
/** |
||||
|
* 查询 信息发布记录 |
||||
|
* |
||||
|
* @param id 信息发布记录主键 |
||||
|
* @return 信息发布记录 |
||||
|
*/ |
||||
|
@Override |
||||
|
public DcPublishInfo selectDcPublishInfoById(Long id) |
||||
|
{ |
||||
|
return dcPublishInfoMapper.selectDcPublishInfoById(id); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询 信息发布记录列表 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 信息发布记录 |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<DcPublishInfo> selectDcPublishInfoList(DcPublishInfo dcPublishInfo) |
||||
|
{ |
||||
|
return dcPublishInfoMapper.selectDcPublishInfoList(dcPublishInfo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 新增 信息发布记录 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int insertDcPublishInfo(DcPublishInfo dcPublishInfo) |
||||
|
{ |
||||
|
dcPublishInfo.setCreateTime(DateUtils.getNowDate()); |
||||
|
return dcPublishInfoMapper.insertDcPublishInfo(dcPublishInfo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改 信息发布记录 |
||||
|
* |
||||
|
* @param dcPublishInfo 信息发布记录 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int updateDcPublishInfo(DcPublishInfo dcPublishInfo) |
||||
|
{ |
||||
|
dcPublishInfo.setUpdateTime(DateUtils.getNowDate()); |
||||
|
return dcPublishInfoMapper.updateDcPublishInfo(dcPublishInfo); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 批量删除 信息发布记录 |
||||
|
* |
||||
|
* @param ids 需要删除的 信息发布记录主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteDcPublishInfoByIds(Long[] ids) |
||||
|
{ |
||||
|
return dcPublishInfoMapper.deleteDcPublishInfoByIds(ids); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除 信息发布记录信息 |
||||
|
* |
||||
|
* @param id 信息发布记录主键 |
||||
|
* @return 结果 |
||||
|
*/ |
||||
|
@Override |
||||
|
public int deleteDcPublishInfoById(Long id) |
||||
|
{ |
||||
|
return dcPublishInfoMapper.deleteDcPublishInfoById(id); |
||||
|
} |
||||
|
} |
@ -0,0 +1,121 @@ |
|||||
|
<?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.DcInfoBoardTemplateMapper"> |
||||
|
|
||||
|
<resultMap type="com.zc.business.domain.DcInfoBoardTemplate" id="DcInfoBoardTemplateResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="category" column="category" /> |
||||
|
<result property="content" column="content" /> |
||||
|
<result property="screenSize" column="screen_size" /> |
||||
|
<result property="fontColor" column="font_color" /> |
||||
|
<result property="fontSize" column="font_size" /> |
||||
|
<result property="fontType" column="font_type" /> |
||||
|
<result property="fontSpacing" column="font_spacing" /> |
||||
|
<result property="rollingSpeed" column="rolling_speed" /> |
||||
|
<result property="stopTime" column="stop_time" /> |
||||
|
<result property="inScreenMode" column="in_screen_mode" /> |
||||
|
<result property="formatStyle" column="format_style" /> |
||||
|
<result property="remark" column="remark" /> |
||||
|
<result property="createTime" column="create_time" /> |
||||
|
<result property="updateTime" column="update_time" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcInfoBoardTemplateVo"> |
||||
|
select id, category, content, screen_size, font_color, font_size, font_type, font_spacing, rolling_speed, stop_time, |
||||
|
in_screen_mode, format_style, remark, create_time, update_time |
||||
|
from dc_info_board_template |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectSdVmsTemplateList" parameterType="com.zc.business.domain.DcInfoBoardTemplate" resultMap="DcInfoBoardTemplateResult"> |
||||
|
<include refid="selectDcInfoBoardTemplateVo"/> |
||||
|
<where> |
||||
|
<if test="screenSize != null and screenSize != ''"> and screen_size = #{screenSize}</if> |
||||
|
<if test="category != null and category != ''"> and category = #{category}</if> |
||||
|
<if test="ids != null and ids != ''"> and FIND_IN_SET(id,#{ids}) > 0</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectTemplateList" resultMap="DcInfoBoardTemplateResult"> |
||||
|
select id, category, content, screen_size, font_color, font_size, font_type, font_spacing, rolling_speed, stop_time, |
||||
|
in_screen_mode, format_style, remark, create_time, update_time |
||||
|
from dc_info_board_template |
||||
|
<where> |
||||
|
<if test="category != null and category != ''"> and category = #{category}</if> |
||||
|
<if test="devicePixel != null and devicePixel != ''"> and screen_size = #{devicePixel}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectSdVmsTemplateById" parameterType="Long" resultMap="DcInfoBoardTemplateResult"> |
||||
|
<include refid="selectDcInfoBoardTemplateVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertSdVmsTemplate" parameterType="DcInfoBoardTemplate"> |
||||
|
insert into dc_info_board_template |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="category != null">category,</if> |
||||
|
<if test="content != null">content,</if> |
||||
|
<if test="screenSize != null">screen_size,</if> |
||||
|
<if test="fontColor != null">font_color,</if> |
||||
|
<if test="fontSize != null">font_size,</if> |
||||
|
<if test="fontType != null">font_type,</if> |
||||
|
<if test="fontSpacing != null">font_spacing,</if> |
||||
|
<if test="rollingSpeed != null">rolling_speed,</if> |
||||
|
<if test="stopTime != null">stop_time,</if> |
||||
|
<if test="inScreenMode != null">in_screen_mode,</if> |
||||
|
<if test="formatStyle != null">format_style,</if> |
||||
|
<if test="remark != null">remark,</if> |
||||
|
create_time |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="category != null">#{category},</if> |
||||
|
<if test="content != null">#{content},</if> |
||||
|
<if test="screenSize != null">#{screenSize},</if> |
||||
|
<if test="fontColor != null">#{fontColor},</if> |
||||
|
<if test="fontSize != null">#{fontSize},</if> |
||||
|
<if test="fontType != null">#{fontType},</if> |
||||
|
<if test="fontSpacing != null">#{fontSpacing},</if> |
||||
|
<if test="rollingSpeed != null">#{rollingSpeed},</if> |
||||
|
<if test="stopTime != null">#{stopTime},</if> |
||||
|
<if test="inScreenMode != null">#{inScreenMode},</if> |
||||
|
<if test="formatStyle != null">#{formatStyle},</if> |
||||
|
<if test="remark != null">#{remark},</if> |
||||
|
now() |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateSdVmsTemplate" parameterType="DcInfoBoardTemplate"> |
||||
|
update dc_info_board_template |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="category != null">category = #{category},</if> |
||||
|
<if test="content != null">content = #{content},</if> |
||||
|
<if test="screenSize != null">screen_size = #{screenSize},</if> |
||||
|
<if test="fontColor != null">font_color = #{fontColor},</if> |
||||
|
<if test="fontSize != null">font_size = #{fontSize},</if> |
||||
|
<if test="fontType != null">font_type = #{fontType},</if> |
||||
|
<if test="fontSpacing != null">font_spacing = #{fontSpacing},</if> |
||||
|
<if test="rollingSpeed != null">rolling_speed = #{rollingSpeed},</if> |
||||
|
<if test="stopTime != null">stop_time = #{stopTime},</if> |
||||
|
<if test="inScreenMode != null">in_screen_mode = #{inScreenMode},</if> |
||||
|
<if test="formatStyle != null">format_style = #{formatStyle},</if> |
||||
|
<if test="remark != null">remark = #{remark},</if> |
||||
|
update_time = now() |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteSdVmsTemplateById" parameterType="Long"> |
||||
|
delete from dc_info_board_template where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteSdVmsTemplateByIds" parameterType="Long"> |
||||
|
delete from dc_info_board_template where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<select id="selectSdVmsTemplateId" resultType="Long"> |
||||
|
SELECT id from iot_board_template ORDER BY id desc LIMIT 1 |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,120 @@ |
|||||
|
<?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.DcPublishInfoMapper"> |
||||
|
|
||||
|
<resultMap type="DcPublishInfo" id="DcPublishInfoResult"> |
||||
|
<result property="id" column="id" /> |
||||
|
<result property="groupId" column="group_id" /> |
||||
|
<result property="subjectId" column="subject_id" /> |
||||
|
<result property="title" column="title" /> |
||||
|
<result property="publishChannel" column="publish_channel" /> |
||||
|
<result property="isverify" column="isverify" /> |
||||
|
<result property="publisher" column="publisher" /> |
||||
|
<result property="auditor" column="auditor" /> |
||||
|
<result property="publishTime" column="publish_time" /> |
||||
|
<result property="auditTime" column="audit_time" /> |
||||
|
<result property="publishStatus" column="publish_status" /> |
||||
|
<result property="content" column="content" /> |
||||
|
<result property="remark" column="remark" /> |
||||
|
<result property="createTime" column="create_time" /> |
||||
|
<result property="updateTime" column="update_time" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="selectDcPublishInfoVo"> |
||||
|
select id, group_id, subject_id, title, publish_channel, isverify, publisher, auditor, publish_time, audit_time, publish_status, content, remark, create_time, update_time from dc_publish_info |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectDcPublishInfoList" parameterType="DcPublishInfo" resultMap="DcPublishInfoResult"> |
||||
|
<include refid="selectDcPublishInfoVo"/> |
||||
|
<where> |
||||
|
<if test="groupId != null "> and group_id = #{groupId}</if> |
||||
|
<if test="subjectId != null and subjectId != ''"> and subject_id = #{subjectId}</if> |
||||
|
<if test="title != null and title != ''"> and title = #{title}</if> |
||||
|
<if test="publishChannel != null "> and publish_channel = #{publishChannel}</if> |
||||
|
<if test="isverify != null "> and isverify = #{isverify}</if> |
||||
|
<if test="publisher != null and publisher != ''"> and publisher = #{publisher}</if> |
||||
|
<if test="auditor != null and auditor != ''"> and auditor = #{auditor}</if> |
||||
|
<if test="publishTime != null "> and publish_time = #{publishTime}</if> |
||||
|
<if test="auditTime != null "> and audit_time = #{auditTime}</if> |
||||
|
<if test="publishStatus != null "> and publish_status = #{publishStatus}</if> |
||||
|
<if test="content != null and content != ''"> and content = #{content}</if> |
||||
|
</where> |
||||
|
</select> |
||||
|
|
||||
|
<select id="selectDcPublishInfoById" parameterType="Long" resultMap="DcPublishInfoResult"> |
||||
|
<include refid="selectDcPublishInfoVo"/> |
||||
|
where id = #{id} |
||||
|
</select> |
||||
|
|
||||
|
<insert id="insertDcPublishInfo" parameterType="DcPublishInfo"> |
||||
|
insert into dc_publish_info |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null">id,</if> |
||||
|
<if test="groupId != null">group_id,</if> |
||||
|
<if test="subjectId != null">subject_id,</if> |
||||
|
<if test="title != null">title,</if> |
||||
|
<if test="publishChannel != null">publish_channel,</if> |
||||
|
<if test="isverify != null">isverify,</if> |
||||
|
<if test="publisher != null">publisher,</if> |
||||
|
<if test="auditor != null">auditor,</if> |
||||
|
<if test="publishTime != null">publish_time,</if> |
||||
|
<if test="auditTime != null">audit_time,</if> |
||||
|
<if test="publishStatus != null">publish_status,</if> |
||||
|
<if test="content != null">content,</if> |
||||
|
<if test="remark != null">remark,</if> |
||||
|
<if test="createTime != null">create_time,</if> |
||||
|
<if test="updateTime != null">update_time,</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null">#{id},</if> |
||||
|
<if test="groupId != null">#{groupId},</if> |
||||
|
<if test="subjectId != null">#{subjectId},</if> |
||||
|
<if test="title != null">#{title},</if> |
||||
|
<if test="publishChannel != null">#{publishChannel},</if> |
||||
|
<if test="isverify != null">#{isverify},</if> |
||||
|
<if test="publisher != null">#{publisher},</if> |
||||
|
<if test="auditor != null">#{auditor},</if> |
||||
|
<if test="publishTime != null">#{publishTime},</if> |
||||
|
<if test="auditTime != null">#{auditTime},</if> |
||||
|
<if test="publishStatus != null">#{publishStatus},</if> |
||||
|
<if test="content != null">#{content},</if> |
||||
|
<if test="remark != null">#{remark},</if> |
||||
|
<if test="createTime != null">#{createTime},</if> |
||||
|
<if test="updateTime != null">#{updateTime},</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateDcPublishInfo" parameterType="DcPublishInfo"> |
||||
|
update dc_publish_info |
||||
|
<trim prefix="SET" suffixOverrides=","> |
||||
|
<if test="groupId != null">group_id = #{groupId},</if> |
||||
|
<if test="subjectId != null">subject_id = #{subjectId},</if> |
||||
|
<if test="title != null">title = #{title},</if> |
||||
|
<if test="publishChannel != null">publish_channel = #{publishChannel},</if> |
||||
|
<if test="isverify != null">isverify = #{isverify},</if> |
||||
|
<if test="publisher != null">publisher = #{publisher},</if> |
||||
|
<if test="auditor != null">auditor = #{auditor},</if> |
||||
|
<if test="publishTime != null">publish_time = #{publishTime},</if> |
||||
|
<if test="auditTime != null">audit_time = #{auditTime},</if> |
||||
|
<if test="publishStatus != null">publish_status = #{publishStatus},</if> |
||||
|
<if test="content != null">content = #{content},</if> |
||||
|
<if test="remark != null">remark = #{remark},</if> |
||||
|
<if test="createTime != null">create_time = #{createTime},</if> |
||||
|
<if test="updateTime != null">update_time = #{updateTime},</if> |
||||
|
</trim> |
||||
|
where id = #{id} |
||||
|
</update> |
||||
|
|
||||
|
<delete id="deleteDcPublishInfoById" parameterType="Long"> |
||||
|
delete from dc_publish_info where id = #{id} |
||||
|
</delete> |
||||
|
|
||||
|
<delete id="deleteDcPublishInfoByIds" parameterType="String"> |
||||
|
delete from dc_publish_info where id in |
||||
|
<foreach item="id" collection="array" open="(" separator="," close=")"> |
||||
|
#{id} |
||||
|
</foreach> |
||||
|
</delete> |
||||
|
</mapper> |
Loading…
Reference in new issue