parent
8373805007
commit
22b2416258
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.tcZz.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.ruoyi.tcZz.domain.TcCy;
|
||||
import com.ruoyi.tcZz.service.ITcCyService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 词云Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tcZz/cy")
|
||||
public class TcCyController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITcCyService tcCyService;
|
||||
|
||||
/**
|
||||
* 查询词云列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:cy:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TcCy tcCy)
|
||||
{
|
||||
startPage();
|
||||
List<TcCy> list = tcCyService.selectTcCyList(tcCy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出词云列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:cy:export')")
|
||||
@Log(title = "词云", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TcCy tcCy)
|
||||
{
|
||||
List<TcCy> list = tcCyService.selectTcCyList(tcCy);
|
||||
ExcelUtil<TcCy> util = new ExcelUtil<TcCy>(TcCy.class);
|
||||
util.exportExcel(response, list, "词云数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取词云详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:cy:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(tcCyService.selectTcCyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增词云
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:cy:add')")
|
||||
@Log(title = "词云", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TcCy tcCy)
|
||||
{
|
||||
return toAjax(tcCyService.insertTcCy(tcCy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改词云
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:cy:edit')")
|
||||
@Log(title = "词云", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TcCy tcCy)
|
||||
{
|
||||
return toAjax(tcCyService.updateTcCy(tcCy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除词云
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:cy:remove')")
|
||||
@Log(title = "词云", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(tcCyService.deleteTcCyByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.ruoyi.tcZz.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.ruoyi.tcZz.domain.TcYqzs;
|
||||
import com.ruoyi.tcZz.service.ITcYqzsService;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 舆情走势图Controller
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/tcZz/yqzs")
|
||||
public class TcYqzsController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ITcYqzsService tcYqzsService;
|
||||
|
||||
/**
|
||||
* 查询舆情走势图列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:yqzs:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(TcYqzs tcYqzs)
|
||||
{
|
||||
startPage();
|
||||
List<TcYqzs> list = tcYqzsService.selectTcYqzsList(tcYqzs);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出舆情走势图列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:yqzs:export')")
|
||||
@Log(title = "舆情走势图", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, TcYqzs tcYqzs)
|
||||
{
|
||||
List<TcYqzs> list = tcYqzsService.selectTcYqzsList(tcYqzs);
|
||||
ExcelUtil<TcYqzs> util = new ExcelUtil<TcYqzs>(TcYqzs.class);
|
||||
util.exportExcel(response, list, "舆情走势图数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取舆情走势图详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:yqzs:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(tcYqzsService.selectTcYqzsById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增舆情走势图
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:yqzs:add')")
|
||||
@Log(title = "舆情走势图", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody TcYqzs tcYqzs)
|
||||
{
|
||||
return toAjax(tcYqzsService.insertTcYqzs(tcYqzs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改舆情走势图
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:yqzs:edit')")
|
||||
@Log(title = "舆情走势图", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody TcYqzs tcYqzs)
|
||||
{
|
||||
return toAjax(tcYqzsService.updateTcYqzs(tcYqzs));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除舆情走势图
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('tcZz:yqzs:remove')")
|
||||
@Log(title = "舆情走势图", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(tcYqzsService.deleteTcYqzsByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.ruoyi.tcZz.domain;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 词云对象 tc_cy
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public class TcCy extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 词云名称 */
|
||||
@Excel(name = "词云名称")
|
||||
private String cyName;
|
||||
|
||||
/** 词云数量 */
|
||||
@Excel(name = "词云数量")
|
||||
private Long cyCount;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCyName(String cyName)
|
||||
{
|
||||
this.cyName = cyName;
|
||||
}
|
||||
|
||||
public String getCyName()
|
||||
{
|
||||
return cyName;
|
||||
}
|
||||
public void setCyCount(Long cyCount)
|
||||
{
|
||||
this.cyCount = cyCount;
|
||||
}
|
||||
|
||||
public Long getCyCount()
|
||||
{
|
||||
return cyCount;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("cyName", getCyName())
|
||||
.append("cyCount", getCyCount())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.ruoyi.tcZz.domain;
|
||||
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 舆情走势图对象 tc_yqzs
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public class TcYqzs extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long id;
|
||||
|
||||
/** 区域id */
|
||||
@Excel(name = "区域id")
|
||||
private Long areaId;
|
||||
|
||||
/** 日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date dateTime;
|
||||
|
||||
/** 非敏感数量 */
|
||||
@Excel(name = "非敏感数量")
|
||||
private Long count1;
|
||||
|
||||
/** 敏感数量 */
|
||||
@Excel(name = "敏感数量")
|
||||
private Long count2;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setAreaId(Long areaId)
|
||||
{
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public Long getAreaId()
|
||||
{
|
||||
return areaId;
|
||||
}
|
||||
public void setDateTime(Date dateTime)
|
||||
{
|
||||
this.dateTime = dateTime;
|
||||
}
|
||||
|
||||
public Date getDateTime()
|
||||
{
|
||||
return dateTime;
|
||||
}
|
||||
public void setCount1(Long count1)
|
||||
{
|
||||
this.count1 = count1;
|
||||
}
|
||||
|
||||
public Long getCount1()
|
||||
{
|
||||
return count1;
|
||||
}
|
||||
public void setCount2(Long count2)
|
||||
{
|
||||
this.count2 = count2;
|
||||
}
|
||||
|
||||
public Long getCount2()
|
||||
{
|
||||
return count2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("areaId", getAreaId())
|
||||
.append("dateTime", getDateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("count1", getCount1())
|
||||
.append("count2", getCount2())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.tcZz.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.tcZz.domain.TcCy;
|
||||
|
||||
/**
|
||||
* 词云Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface TcCyMapper
|
||||
{
|
||||
/**
|
||||
* 查询词云
|
||||
*
|
||||
* @param id 词云主键
|
||||
* @return 词云
|
||||
*/
|
||||
public TcCy selectTcCyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询词云列表
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 词云集合
|
||||
*/
|
||||
public List<TcCy> selectTcCyList(TcCy tcCy);
|
||||
|
||||
/**
|
||||
* 新增词云
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTcCy(TcCy tcCy);
|
||||
|
||||
/**
|
||||
* 修改词云
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTcCy(TcCy tcCy);
|
||||
|
||||
/**
|
||||
* 删除词云
|
||||
*
|
||||
* @param id 词云主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcCyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除词云
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcCyByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.tcZz.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.tcZz.domain.TcYqzs;
|
||||
|
||||
/**
|
||||
* 舆情走势图Mapper接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface TcYqzsMapper
|
||||
{
|
||||
/**
|
||||
* 查询舆情走势图
|
||||
*
|
||||
* @param id 舆情走势图主键
|
||||
* @return 舆情走势图
|
||||
*/
|
||||
public TcYqzs selectTcYqzsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询舆情走势图列表
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 舆情走势图集合
|
||||
*/
|
||||
public List<TcYqzs> selectTcYqzsList(TcYqzs tcYqzs);
|
||||
|
||||
/**
|
||||
* 新增舆情走势图
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTcYqzs(TcYqzs tcYqzs);
|
||||
|
||||
/**
|
||||
* 修改舆情走势图
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTcYqzs(TcYqzs tcYqzs);
|
||||
|
||||
/**
|
||||
* 删除舆情走势图
|
||||
*
|
||||
* @param id 舆情走势图主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcYqzsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除舆情走势图
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcYqzsByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.tcZz.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.tcZz.domain.TcCy;
|
||||
|
||||
/**
|
||||
* 词云Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface ITcCyService
|
||||
{
|
||||
/**
|
||||
* 查询词云
|
||||
*
|
||||
* @param id 词云主键
|
||||
* @return 词云
|
||||
*/
|
||||
public TcCy selectTcCyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询词云列表
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 词云集合
|
||||
*/
|
||||
public List<TcCy> selectTcCyList(TcCy tcCy);
|
||||
|
||||
/**
|
||||
* 新增词云
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTcCy(TcCy tcCy);
|
||||
|
||||
/**
|
||||
* 修改词云
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTcCy(TcCy tcCy);
|
||||
|
||||
/**
|
||||
* 批量删除词云
|
||||
*
|
||||
* @param ids 需要删除的词云主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcCyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除词云信息
|
||||
*
|
||||
* @param id 词云主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcCyById(Long id);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.tcZz.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.tcZz.domain.TcYqzs;
|
||||
|
||||
/**
|
||||
* 舆情走势图Service接口
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
public interface ITcYqzsService
|
||||
{
|
||||
/**
|
||||
* 查询舆情走势图
|
||||
*
|
||||
* @param id 舆情走势图主键
|
||||
* @return 舆情走势图
|
||||
*/
|
||||
public TcYqzs selectTcYqzsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询舆情走势图列表
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 舆情走势图集合
|
||||
*/
|
||||
public List<TcYqzs> selectTcYqzsList(TcYqzs tcYqzs);
|
||||
|
||||
/**
|
||||
* 新增舆情走势图
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertTcYqzs(TcYqzs tcYqzs);
|
||||
|
||||
/**
|
||||
* 修改舆情走势图
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateTcYqzs(TcYqzs tcYqzs);
|
||||
|
||||
/**
|
||||
* 批量删除舆情走势图
|
||||
*
|
||||
* @param ids 需要删除的舆情走势图主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcYqzsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除舆情走势图信息
|
||||
*
|
||||
* @param id 舆情走势图主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTcYqzsById(Long id);
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.tcZz.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.ruoyi.tcZz.mapper.TcCyMapper;
|
||||
import com.ruoyi.tcZz.domain.TcCy;
|
||||
import com.ruoyi.tcZz.service.ITcCyService;
|
||||
|
||||
/**
|
||||
* 词云Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
@Service
|
||||
public class TcCyServiceImpl implements ITcCyService
|
||||
{
|
||||
@Autowired
|
||||
private TcCyMapper tcCyMapper;
|
||||
|
||||
/**
|
||||
* 查询词云
|
||||
*
|
||||
* @param id 词云主键
|
||||
* @return 词云
|
||||
*/
|
||||
@Override
|
||||
public TcCy selectTcCyById(Long id)
|
||||
{
|
||||
return tcCyMapper.selectTcCyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询词云列表
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 词云
|
||||
*/
|
||||
@Override
|
||||
public List<TcCy> selectTcCyList(TcCy tcCy)
|
||||
{
|
||||
return tcCyMapper.selectTcCyList(tcCy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增词云
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTcCy(TcCy tcCy)
|
||||
{
|
||||
tcCy.setCreateTime(DateUtils.getNowDate());
|
||||
return tcCyMapper.insertTcCy(tcCy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改词云
|
||||
*
|
||||
* @param tcCy 词云
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTcCy(TcCy tcCy)
|
||||
{
|
||||
tcCy.setUpdateTime(DateUtils.getNowDate());
|
||||
return tcCyMapper.updateTcCy(tcCy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除词云
|
||||
*
|
||||
* @param ids 需要删除的词云主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTcCyByIds(Long[] ids)
|
||||
{
|
||||
return tcCyMapper.deleteTcCyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除词云信息
|
||||
*
|
||||
* @param id 词云主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTcCyById(Long id)
|
||||
{
|
||||
return tcCyMapper.deleteTcCyById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,96 @@
|
||||
package com.ruoyi.tcZz.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.ruoyi.tcZz.mapper.TcYqzsMapper;
|
||||
import com.ruoyi.tcZz.domain.TcYqzs;
|
||||
import com.ruoyi.tcZz.service.ITcYqzsService;
|
||||
|
||||
/**
|
||||
* 舆情走势图Service业务层处理
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2023-10-12
|
||||
*/
|
||||
@Service
|
||||
public class TcYqzsServiceImpl implements ITcYqzsService
|
||||
{
|
||||
@Autowired
|
||||
private TcYqzsMapper tcYqzsMapper;
|
||||
|
||||
/**
|
||||
* 查询舆情走势图
|
||||
*
|
||||
* @param id 舆情走势图主键
|
||||
* @return 舆情走势图
|
||||
*/
|
||||
@Override
|
||||
public TcYqzs selectTcYqzsById(Long id)
|
||||
{
|
||||
return tcYqzsMapper.selectTcYqzsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询舆情走势图列表
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 舆情走势图
|
||||
*/
|
||||
@Override
|
||||
public List<TcYqzs> selectTcYqzsList(TcYqzs tcYqzs)
|
||||
{
|
||||
return tcYqzsMapper.selectTcYqzsList(tcYqzs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增舆情走势图
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertTcYqzs(TcYqzs tcYqzs)
|
||||
{
|
||||
tcYqzs.setCreateTime(DateUtils.getNowDate());
|
||||
return tcYqzsMapper.insertTcYqzs(tcYqzs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改舆情走势图
|
||||
*
|
||||
* @param tcYqzs 舆情走势图
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateTcYqzs(TcYqzs tcYqzs)
|
||||
{
|
||||
tcYqzs.setUpdateTime(DateUtils.getNowDate());
|
||||
return tcYqzsMapper.updateTcYqzs(tcYqzs);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除舆情走势图
|
||||
*
|
||||
* @param ids 需要删除的舆情走势图主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTcYqzsByIds(Long[] ids)
|
||||
{
|
||||
return tcYqzsMapper.deleteTcYqzsByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除舆情走势图信息
|
||||
*
|
||||
* @param id 舆情走势图主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteTcYqzsById(Long id)
|
||||
{
|
||||
return tcYqzsMapper.deleteTcYqzsById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
<?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.ruoyi.tcZz.mapper.TcCyMapper">
|
||||
|
||||
<resultMap type="TcCy" id="TcCyResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="cyName" column="cy_name" />
|
||||
<result property="cyCount" column="cy_count" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTcCyVo">
|
||||
select id, cy_name, cy_count, create_by, create_time, update_by, update_time, remark from tc_cy
|
||||
</sql>
|
||||
|
||||
<select id="selectTcCyList" parameterType="TcCy" resultMap="TcCyResult">
|
||||
<include refid="selectTcCyVo"/>
|
||||
<where>
|
||||
<if test="cyName != null and cyName != ''"> and cy_name like concat('%', #{cyName}, '%')</if>
|
||||
<if test="cyCount != null "> and cy_count = #{cyCount}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTcCyById" parameterType="Long" resultMap="TcCyResult">
|
||||
<include refid="selectTcCyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTcCy" parameterType="TcCy" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tc_cy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="cyName != null">cy_name,</if>
|
||||
<if test="cyCount != null">cy_count,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="cyName != null">#{cyName},</if>
|
||||
<if test="cyCount != null">#{cyCount},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTcCy" parameterType="TcCy">
|
||||
update tc_cy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="cyName != null">cy_name = #{cyName},</if>
|
||||
<if test="cyCount != null">cy_count = #{cyCount},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTcCyById" parameterType="Long">
|
||||
delete from tc_cy where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTcCyByIds" parameterType="String">
|
||||
delete from tc_cy where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
@ -0,0 +1,91 @@
|
||||
<?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.ruoyi.tcZz.mapper.TcYqzsMapper">
|
||||
|
||||
<resultMap type="TcYqzs" id="TcYqzsResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="areaId" column="area_id" />
|
||||
<result property="dateTime" column="date_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="count1" column="count1" />
|
||||
<result property="count2" column="count2" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectTcYqzsVo">
|
||||
select id, area_id, date_time, create_by, create_time, update_by, update_time, remark, count1, count2 from tc_yqzs
|
||||
</sql>
|
||||
|
||||
<select id="selectTcYqzsList" parameterType="TcYqzs" resultMap="TcYqzsResult">
|
||||
<include refid="selectTcYqzsVo"/>
|
||||
<where>
|
||||
<if test="areaId != null "> and area_id = #{areaId}</if>
|
||||
<if test="dateTime != null "> and date_time = #{dateTime}</if>
|
||||
<if test="count1 != null "> and count1 = #{count1}</if>
|
||||
<if test="count2 != null "> and count2 = #{count2}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectTcYqzsById" parameterType="Long" resultMap="TcYqzsResult">
|
||||
<include refid="selectTcYqzsVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertTcYqzs" parameterType="TcYqzs" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into tc_yqzs
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="areaId != null">area_id,</if>
|
||||
<if test="dateTime != null">date_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="count1 != null">count1,</if>
|
||||
<if test="count2 != null">count2,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="areaId != null">#{areaId},</if>
|
||||
<if test="dateTime != null">#{dateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="count1 != null">#{count1},</if>
|
||||
<if test="count2 != null">#{count2},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateTcYqzs" parameterType="TcYqzs">
|
||||
update tc_yqzs
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="areaId != null">area_id = #{areaId},</if>
|
||||
<if test="dateTime != null">date_time = #{dateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="count1 != null">count1 = #{count1},</if>
|
||||
<if test="count2 != null">count2 = #{count2},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteTcYqzsById" parameterType="Long">
|
||||
delete from tc_yqzs where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteTcYqzsByIds" parameterType="String">
|
||||
delete from tc_yqzs where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in new issue