dongdingding
吴顺杰 2 years ago
parent 330133bbe2
commit 6d9eb43f18

@ -1,15 +1,15 @@
package com.ruoyi.zongzhi.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
import com.ruoyi.zongzhi.service.TcDataSourceTjService;
import com.ruoyi.zongzhi.service.ITcDataSourceTjService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -17,89 +17,84 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.Serializable;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* (TcDataSourceTj)
* Controller
*
* @author wu
* @since 2023-09-12 14:55:53
* @author ruoyi
* @date 2023-09-13
*/
@RestController
@RequestMapping("zongzhi/tcDataSourceTj")
@Api(tags = "数据来源统计表")
@Transactional(rollbackFor = Exception.class)
@RequestMapping("/zongzhi/sourceTj")
@Api(tags = " 数据来源统计")
public class TcDataSourceTjController extends BaseController {
@Resource
private ITcDataSourceTjService tcDataSourceTjService;
/**
*
*
*/
@Resource
private TcDataSourceTjService tcDataSourceTjService;
@PreAuthorize("@ss.hasPermi('zongzhi:sourceTj:list')")
@GetMapping("/list")
public TableDataInfo list(TcDataSourceTj tcDataSourceTj) {
startPage();
List<TcDataSourceTj> list = tcDataSourceTjService.selectTcDataSourceTjList(tcDataSourceTj);
return getDataTable(list);
}
/**
*
*
* @param page
* @param tcDataSourceTj
* @return
*
*/
@GetMapping
@ApiOperation(value = "分页条件查询数据来源统计表", response = TcDataSourceTj.class)
public AjaxResult page(Page<TcDataSourceTj> page, TcDataSourceTj tcDataSourceTj) {
return success(tcDataSourceTjService.page(page, new QueryWrapper<>(tcDataSourceTj)));
@PreAuthorize("@ss.hasPermi('zongzhi:sourceTj:export')")
@Log(title = "数据来源统计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcDataSourceTj tcDataSourceTj) {
List<TcDataSourceTj> list = tcDataSourceTjService.selectTcDataSourceTjList(tcDataSourceTj);
ExcelUtil<TcDataSourceTj> util = new ExcelUtil<TcDataSourceTj>(TcDataSourceTj.class);
util.exportExcel(response, list, "数据来源统计数据");
}
/**
*
*
* @param id
* @return
*
*/
@GetMapping("{id}")
@ApiOperation(value = "通过主键查询单条数据来源统计表", response = TcDataSourceTj.class)
public AjaxResult getById(@PathVariable Serializable id) {
return success(tcDataSourceTjService.getById(id));
@PreAuthorize("@ss.hasPermi('zongzhi:sourceTj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcDataSourceTjService.selectTcDataSourceTjById(id));
}
/**
*
*
* @param tcDataSourceTj
* @return
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sourceTj:add')")
@Log(title = "数据来源统计", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation(value = "新增数据来源统计表", response = TcDataSourceTj.class)
public AjaxResult insert(@RequestBody TcDataSourceTj tcDataSourceTj) {
return success(tcDataSourceTjService.save(tcDataSourceTj));
public AjaxResult add(@RequestBody TcDataSourceTj tcDataSourceTj) {
return toAjax(tcDataSourceTjService.insertTcDataSourceTj(tcDataSourceTj));
}
/**
*
*
* @param tcDataSourceTj
* @return
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:sourceTj:edit')")
@Log(title = "数据来源统计", businessType = BusinessType.UPDATE)
@PutMapping
@ApiOperation(value = "修改数据来源统计表")
public AjaxResult update(@RequestBody TcDataSourceTj tcDataSourceTj) {
return success(tcDataSourceTjService.updateById(tcDataSourceTj));
public AjaxResult edit(@RequestBody TcDataSourceTj tcDataSourceTj) {
return toAjax(tcDataSourceTjService.updateTcDataSourceTj(tcDataSourceTj));
}
/**
*
*
* @param idList
* @return
*
*/
@DeleteMapping
@ApiOperation(value = "删除数据来源统计表")
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
return success(tcDataSourceTjService.removeByIds(idList));
@PreAuthorize("@ss.hasPermi('zongzhi:sourceTj:remove')")
@Log(title = "数据来源统计", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcDataSourceTjService.deleteTcDataSourceTjByIds(ids));
}
}

@ -1,15 +1,15 @@
package com.ruoyi.zongzhi.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.zongzhi.domain.TcSgjTj;
import com.ruoyi.zongzhi.service.TcSgjTjService;
import com.ruoyi.zongzhi.service.ITcSgjTjService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@ -17,89 +17,85 @@ import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.io.Serializable;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
* (TcSgjTj)
* Controller
*
* @author wu
* @since 2023-09-11 15:42:21
* @author ruoyi
* @date 2023-09-13
*/
@RestController
@RequestMapping("zongzhi/tcSgjTj")
@Api(tags = "安全监测受攻击统计")
@Transactional(rollbackFor = Exception.class)
@RequestMapping("/zongzhi/tj")
@Api(tags = " 安全监测受攻击统计")
public class TcSgjTjController extends BaseController {
@Resource
private ITcSgjTjService tcSgjTjService;
/**
*
*
*/
@Resource
private TcSgjTjService tcSgjTjService;
@PreAuthorize("@ss.hasPermi('zongzhi:tj:list')")
@GetMapping("/list")
public TableDataInfo list(TcSgjTj tcSgjTj) {
startPage();
List<TcSgjTj> list = tcSgjTjService.selectTcSgjTjList(tcSgjTj);
return getDataTable(list);
}
/**
*
*
* @param page
* @param tcSgjTj
* @return
*
*/
@GetMapping
@ApiOperation(value = "分页条件查询安全监测受攻击统计", response = TcSgjTj.class)
public AjaxResult page(Page<TcSgjTj> page, TcSgjTj tcSgjTj) {
return success(tcSgjTjService.page(page, new QueryWrapper<>(tcSgjTj)));
@PreAuthorize("@ss.hasPermi('zongzhi:tj:export')")
@Log(title = "安全监测受攻击统计", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, TcSgjTj tcSgjTj) {
List<TcSgjTj> list = tcSgjTjService.selectTcSgjTjList(tcSgjTj);
ExcelUtil<TcSgjTj> util = new ExcelUtil<TcSgjTj>(TcSgjTj.class);
util.exportExcel(response, list, "安全监测受攻击统计数据");
}
/**
*
*
* @param id
* @return
*
*/
@GetMapping("{id}")
@ApiOperation(value = "通过主键查询单条安全监测受攻击统计", response = TcSgjTj.class)
public AjaxResult getById(@PathVariable Serializable id) {
return success(tcSgjTjService.getById(id));
@PreAuthorize("@ss.hasPermi('zongzhi:tj:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return success(tcSgjTjService.selectTcSgjTjById(id));
}
/**
*
*
* @param tcSgjTj
* @return
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:tj:add')")
@Log(title = "安全监测受攻击统计", businessType = BusinessType.INSERT)
@PostMapping
@ApiOperation(value = "新增安全监测受攻击统计", response = TcSgjTj.class)
public AjaxResult insert(@RequestBody TcSgjTj tcSgjTj) {
return success(tcSgjTjService.save(tcSgjTj));
public AjaxResult add(@RequestBody TcSgjTj tcSgjTj) {
return toAjax(tcSgjTjService.insertTcSgjTj(tcSgjTj));
}
/**
*
*
* @param tcSgjTj
* @return
*
*/
@PreAuthorize("@ss.hasPermi('zongzhi:tj:edit')")
@Log(title = "安全监测受攻击统计", businessType = BusinessType.UPDATE)
@PutMapping
@ApiOperation(value = "修改安全监测受攻击统计")
public AjaxResult update(@RequestBody TcSgjTj tcSgjTj) {
return success(tcSgjTjService.updateById(tcSgjTj));
public AjaxResult edit(@RequestBody TcSgjTj tcSgjTj) {
return toAjax(tcSgjTjService.updateTcSgjTj(tcSgjTj));
}
/**
*
*
* @param idList
* @return
*
*/
@DeleteMapping
@ApiOperation(value = "删除安全监测受攻击统计")
public AjaxResult delete(@RequestParam("idList") List<Long> idList) {
return success(tcSgjTjService.removeByIds(idList));
@PreAuthorize("@ss.hasPermi('zongzhi:tj:remove')")
@Log(title = "安全监测受攻击统计", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(tcSgjTjService.deleteTcSgjTjByIds(ids));
}
}

@ -1,97 +1,122 @@
package com.ruoyi.zongzhi.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* (TcDataSourceTj)
* tc_data_source_tj
*
* @author wu
* @since 2023-09-12 14:55:53
* @author ruoyi
* @date 2023-09-13
*/
@Data
@ApiModel("数据来源统计表实体类")
@TableName(value = "tc_data_source_tj")
public class TcDataSourceTj implements Serializable {
public class TcDataSourceTj extends BaseEntity {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = 304828068144976883L;
/**
* id
*/
@ApiModelProperty(value = "主键id")
private Long id;
/**
* id
*/
@Excel(name = "区域id")
@ApiModelProperty(value = "区域id")
private Long areaId;
/**
* (G)
*/
@Excel(name = "云端监测(G)")
@ApiModelProperty(value = "云端监测(G)")
private String lable1;
/**
* APT(M)
*/
@ApiModelProperty(value = "APT(M)")
@Excel(name = "APT(M)")
@ApiModelProperty(value = "APT(M)")
private String lable2;
/**
* id
*/
@ApiModelProperty(value = "创建人id")
@Excel(name = "创建人id")
@ApiModelProperty(value = "创建人id")
private Long createId;
/**
*
*/
@ApiModelProperty(value = "创建人名称")
private String createBy;
/**
*
*/
@ApiModelProperty(value = "创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date createTime;
/**
* id
*/
@Excel(name = "最后更新人id")
@ApiModelProperty(value = "最后更新人id")
private Long updateId;
/**
*
*/
@ApiModelProperty(value = "最后更新人名称")
private String updateBy;
/**
*
*/
@ApiModelProperty(value = "最后更新时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date updateTime;
/**
*
*/
@ApiModelProperty(value = "备注")
private String remark;
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 setLable1(String lable1) {
this.lable1 = lable1;
}
public String getLable1() {
return lable1;
}
public void setLable2(String lable2) {
this.lable2 = lable2;
}
public String getLable2() {
return lable2;
}
public void setCreateId(Long createId) {
this.createId = createId;
}
public Long getCreateId() {
return createId;
}
public void setUpdateId(Long updateId) {
this.updateId = updateId;
}
public Long getUpdateId() {
return updateId;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("areaId", getAreaId())
.append("lable1", getLable1())
.append("lable2", getLable2())
.append("createId", getCreateId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateId", getUpdateId())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -1,115 +1,156 @@
package com.ruoyi.zongzhi.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* (TcSgjTj)
* tc_sgj_tj
*
* @author wu
* @since 2023-09-11 15:42:22
* @author ruoyi
* @date 2023-09-13
*/
@Data
@ApiModel("安全监测受攻击统计实体类")
@TableName(value = "tc_sgj_tj")
public class TcSgjTj implements Serializable {
public class TcSgjTj extends BaseEntity {
private static final long serialVersionUID = 1L;
private static final long serialVersionUID = -71243947099429961L;
/**
* id
*/
@ApiModelProperty(value = "主键id")
private Long id;
/**
* ID
*/
@ApiModelProperty(value = "所属镇ID")
/** 所属镇ID */
private Long townId;
/**
* ID
*/
@ApiModelProperty(value = "所属村ID")
/** 所属村ID */
private Long villageId;
/**
*
*/
@ApiModelProperty(value = "网络攻击(次)")
private Integer totalSum;
@ApiModelProperty(value = "网络攻击")
@Excel(name = "网络攻击", readConverterExp = "次=")
private Long totalSum;
/**
*
*/
@Excel(name = "入侵攻击")
@ApiModelProperty(value = "入侵攻击")
private Integer rqSum;
private Long rqSum;
/**
*
*/
@Excel(name = "恶意扫描")
@ApiModelProperty(value = "恶意扫描")
private Integer eySum;
private Long eySum;
/**
*
*/
@Excel(name = "僵木蠕病毒")
@ApiModelProperty(value = "僵木蠕病毒")
private Integer jmrSum;
private Long jmrSum;
/**
* id
*/
@ApiModelProperty(value = "创建人id")
/** 创建人id */
private Long createId;
/**
*
*/
@ApiModelProperty(value = "创建人名称")
private String createBy;
/**
*
*/
@ApiModelProperty(value = "创建时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date createTime;
/**
* id
*/
@ApiModelProperty(value = "最后更新人id")
private Long updateId;
/**
*
*/
@ApiModelProperty(value = "最后更新人名称")
private String updateBy;
/**
*
*/
@ApiModelProperty(value = "最后更新时间")
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd", timezone = "GMT+8")
@DateTimeFormat(pattern = "yyyy-MM-dd ")
private Date updateTime;
/**
*
*/
@ApiModelProperty(value = "备注")
private String remark;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setTownId(Long townId) {
this.townId = townId;
}
public Long getTownId() {
return townId;
}
public void setVillageId(Long villageId) {
this.villageId = villageId;
}
public Long getVillageId() {
return villageId;
}
public void setTotalSum(Long totalSum) {
this.totalSum = totalSum;
}
public Long getTotalSum() {
return totalSum;
}
public void setRqSum(Long rqSum) {
this.rqSum = rqSum;
}
public Long getRqSum() {
return rqSum;
}
public void setEySum(Long eySum) {
this.eySum = eySum;
}
public Long getEySum() {
return eySum;
}
public void setJmrSum(Long jmrSum) {
this.jmrSum = jmrSum;
}
public Long getJmrSum() {
return jmrSum;
}
public void setCreateId(Long createId) {
this.createId = createId;
}
public Long getCreateId() {
return createId;
}
public void setUpdateId(Long updateId) {
this.updateId = updateId;
}
public Long getUpdateId() {
return updateId;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("townId", getTownId())
.append("villageId", getVillageId())
.append("totalSum", getTotalSum())
.append("rqSum", getRqSum())
.append("eySum", getEySum())
.append("jmrSum", getJmrSum())
.append("createId", getCreateId())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateId", getUpdateId())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

@ -1,15 +1,61 @@
package com.ruoyi.zongzhi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
import java.util.List;
/**
* (TcDataSourceTj)访
* Mapper
*
* @author ruoyi
* @date 2023-09-13
*/
public interface TcDataSourceTjMapper {
/**
*
*
* @author wu
* @since 2023-09-12 14:55:53
* @param id
* @return
*/
public interface TcDataSourceTjMapper extends BaseMapper<TcDataSourceTj> {
public TcDataSourceTj selectTcDataSourceTjById(Long id);
}
/**
*
*
* @param tcDataSourceTj
* @return
*/
public List<TcDataSourceTj> selectTcDataSourceTjList(TcDataSourceTj tcDataSourceTj);
/**
*
*
* @param tcDataSourceTj
* @return
*/
public int insertTcDataSourceTj(TcDataSourceTj tcDataSourceTj);
/**
*
*
* @param tcDataSourceTj
* @return
*/
public int updateTcDataSourceTj(TcDataSourceTj tcDataSourceTj);
/**
*
*
* @param id
* @return
*/
public int deleteTcDataSourceTjById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTcDataSourceTjByIds(Long[] ids);
}

@ -1,15 +1,61 @@
package com.ruoyi.zongzhi.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.zongzhi.domain.TcSgjTj;
import java.util.List;
/**
* (TcSgjTj)访
* Mapper
*
* @author ruoyi
* @date 2023-09-13
*/
public interface TcSgjTjMapper {
/**
*
*
* @author wu
* @since 2023-09-11 15:42:22
* @param id
* @return
*/
public interface TcSgjTjMapper extends BaseMapper<TcSgjTj> {
public TcSgjTj selectTcSgjTjById(Long id);
}
/**
*
*
* @param tcSgjTj
* @return
*/
public List<TcSgjTj> selectTcSgjTjList(TcSgjTj tcSgjTj);
/**
*
*
* @param tcSgjTj
* @return
*/
public int insertTcSgjTj(TcSgjTj tcSgjTj);
/**
*
*
* @param tcSgjTj
* @return
*/
public int updateTcSgjTj(TcSgjTj tcSgjTj);
/**
*
*
* @param id
* @return
*/
public int deleteTcSgjTjById(Long id);
/**
*
*
* @param ids
* @return
*/
public int deleteTcSgjTjByIds(Long[] ids);
}

@ -0,0 +1,61 @@
package com.ruoyi.zongzhi.service;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-09-13
*/
public interface ITcDataSourceTjService {
/**
*
*
* @param id
* @return
*/
public TcDataSourceTj selectTcDataSourceTjById(Long id);
/**
*
*
* @param tcDataSourceTj
* @return
*/
public List<TcDataSourceTj> selectTcDataSourceTjList(TcDataSourceTj tcDataSourceTj);
/**
*
*
* @param tcDataSourceTj
* @return
*/
public int insertTcDataSourceTj(TcDataSourceTj tcDataSourceTj);
/**
*
*
* @param tcDataSourceTj
* @return
*/
public int updateTcDataSourceTj(TcDataSourceTj tcDataSourceTj);
/**
*
*
* @param ids
* @return
*/
public int deleteTcDataSourceTjByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTcDataSourceTjById(Long id);
}

@ -0,0 +1,61 @@
package com.ruoyi.zongzhi.service;
import com.ruoyi.zongzhi.domain.TcSgjTj;
import java.util.List;
/**
* Service
*
* @author ruoyi
* @date 2023-09-13
*/
public interface ITcSgjTjService {
/**
*
*
* @param id
* @return
*/
public TcSgjTj selectTcSgjTjById(Long id);
/**
*
*
* @param tcSgjTj
* @return
*/
public List<TcSgjTj> selectTcSgjTjList(TcSgjTj tcSgjTj);
/**
*
*
* @param tcSgjTj
* @return
*/
public int insertTcSgjTj(TcSgjTj tcSgjTj);
/**
*
*
* @param tcSgjTj
* @return
*/
public int updateTcSgjTj(TcSgjTj tcSgjTj);
/**
*
*
* @param ids
* @return
*/
public int deleteTcSgjTjByIds(Long[] ids);
/**
*
*
* @param id
* @return
*/
public int deleteTcSgjTjById(Long id);
}

@ -1,15 +0,0 @@
package com.ruoyi.zongzhi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
/**
* (TcDataSourceTj)
*
* @author wu
* @since 2023-09-12 14:55:53
*/
public interface TcDataSourceTjService extends IService<TcDataSourceTj> {
}

@ -1,15 +0,0 @@
package com.ruoyi.zongzhi.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.zongzhi.domain.TcSgjTj;
/**
* (TcSgjTj)
*
* @author wu
* @since 2023-09-11 15:42:25
*/
public interface TcSgjTjService extends IService<TcSgjTj> {
}

@ -1,19 +1,90 @@
package com.ruoyi.zongzhi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.zongzhi.domain.TcDataSourceTj;
import com.ruoyi.zongzhi.mapper.TcDataSourceTjMapper;
import com.ruoyi.zongzhi.service.TcDataSourceTjService;
import com.ruoyi.zongzhi.service.ITcDataSourceTjService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (TcDataSourceTj)
* Service
*
* @author wu
* @since 2023-09-12 14:55:53
* @author ruoyi
* @date 2023-09-13
*/
@Service("tcDataSourceTjService")
public class TcDataSourceTjServiceImpl extends ServiceImpl<TcDataSourceTjMapper, TcDataSourceTj> implements TcDataSourceTjService {
@Service
public class TcDataSourceTjServiceImpl implements ITcDataSourceTjService {
@Resource
private TcDataSourceTjMapper tcDataSourceTjMapper;
}
/**
*
*
* @param id
* @return
*/
@Override
public TcDataSourceTj selectTcDataSourceTjById(Long id) {
return tcDataSourceTjMapper.selectTcDataSourceTjById(id);
}
/**
*
*
* @param tcDataSourceTj
* @return
*/
@Override
public List<TcDataSourceTj> selectTcDataSourceTjList(TcDataSourceTj tcDataSourceTj) {
return tcDataSourceTjMapper.selectTcDataSourceTjList(tcDataSourceTj);
}
/**
*
*
* @param tcDataSourceTj
* @return
*/
@Override
public int insertTcDataSourceTj(TcDataSourceTj tcDataSourceTj) {
tcDataSourceTj.setCreateTime(DateUtils.getNowDate());
return tcDataSourceTjMapper.insertTcDataSourceTj(tcDataSourceTj);
}
/**
*
*
* @param tcDataSourceTj
* @return
*/
@Override
public int updateTcDataSourceTj(TcDataSourceTj tcDataSourceTj) {
tcDataSourceTj.setUpdateTime(DateUtils.getNowDate());
return tcDataSourceTjMapper.updateTcDataSourceTj(tcDataSourceTj);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTcDataSourceTjByIds(Long[] ids) {
return tcDataSourceTjMapper.deleteTcDataSourceTjByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTcDataSourceTjById(Long id) {
return tcDataSourceTjMapper.deleteTcDataSourceTjById(id);
}
}

@ -1,19 +1,90 @@
package com.ruoyi.zongzhi.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.zongzhi.domain.TcSgjTj;
import com.ruoyi.zongzhi.mapper.TcSgjTjMapper;
import com.ruoyi.zongzhi.service.TcSgjTjService;
import com.ruoyi.zongzhi.service.ITcSgjTjService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
/**
* (TcSgjTj)
* Service
*
* @author wu
* @since 2023-09-11 15:42:25
* @author ruoyi
* @date 2023-09-13
*/
@Service("tcSgjTjService")
public class TcSgjTjServiceImpl extends ServiceImpl<TcSgjTjMapper, TcSgjTj> implements TcSgjTjService {
@Service
public class TcSgjTjServiceImpl implements ITcSgjTjService {
@Resource
private TcSgjTjMapper tcSgjTjMapper;
}
/**
*
*
* @param id
* @return
*/
@Override
public TcSgjTj selectTcSgjTjById(Long id) {
return tcSgjTjMapper.selectTcSgjTjById(id);
}
/**
*
*
* @param tcSgjTj
* @return
*/
@Override
public List<TcSgjTj> selectTcSgjTjList(TcSgjTj tcSgjTj) {
return tcSgjTjMapper.selectTcSgjTjList(tcSgjTj);
}
/**
*
*
* @param tcSgjTj
* @return
*/
@Override
public int insertTcSgjTj(TcSgjTj tcSgjTj) {
tcSgjTj.setCreateTime(DateUtils.getNowDate());
return tcSgjTjMapper.insertTcSgjTj(tcSgjTj);
}
/**
*
*
* @param tcSgjTj
* @return
*/
@Override
public int updateTcSgjTj(TcSgjTj tcSgjTj) {
tcSgjTj.setUpdateTime(DateUtils.getNowDate());
return tcSgjTjMapper.updateTcSgjTj(tcSgjTj);
}
/**
*
*
* @param ids
* @return
*/
@Override
public int deleteTcSgjTjByIds(Long[] ids) {
return tcSgjTjMapper.deleteTcSgjTjByIds(ids);
}
/**
*
*
* @param id
* @return
*/
@Override
public int deleteTcSgjTjById(Long id) {
return tcSgjTjMapper.deleteTcSgjTjById(id);
}
}

@ -0,0 +1,109 @@
<?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.zongzhi.mapper.TcDataSourceTjMapper">
<resultMap type="TcDataSourceTj" id="TcDataSourceTjResult">
<result property="id" column="id"/>
<result property="areaId" column="area_id"/>
<result property="lable1" column="lable1"/>
<result property="lable2" column="lable2"/>
<result property="createId" column="create_id"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateId" column="update_id"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectTcDataSourceTjVo">
select id,
area_id,
lable1,
lable2,
create_id,
create_by,
create_time,
update_id,
update_by,
update_time,
remark
from tc_data_source_tj
</sql>
<select id="selectTcDataSourceTjList" parameterType="TcDataSourceTj" resultMap="TcDataSourceTjResult">
<include refid="selectTcDataSourceTjVo"/>
<where>
<if test="areaId != null ">and area_id = #{areaId}</if>
<if test="lable1 != null and lable1 != ''">and lable1 = #{lable1}</if>
<if test="lable2 != null and lable2 != ''">and lable2 = #{lable2}</if>
<if test="createId != null ">and create_id = #{createId}</if>
<if test="updateId != null ">and update_id = #{updateId}</if>
</where>
</select>
<select id="selectTcDataSourceTjById" parameterType="Long" resultMap="TcDataSourceTjResult">
<include refid="selectTcDataSourceTjVo"/>
where id = #{id}
</select>
<insert id="insertTcDataSourceTj" parameterType="TcDataSourceTj" useGeneratedKeys="true" keyProperty="id">
insert into tc_data_source_tj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="areaId != null">area_id,</if>
<if test="lable1 != null">lable1,</if>
<if test="lable2 != null">lable2,</if>
<if test="createId != null">create_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateId != null">update_id,</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="areaId != null">#{areaId},</if>
<if test="lable1 != null">#{lable1},</if>
<if test="lable2 != null">#{lable2},</if>
<if test="createId != null">#{createId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateId != null">#{updateId},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTcDataSourceTj" parameterType="TcDataSourceTj">
update tc_data_source_tj
<trim prefix="SET" suffixOverrides=",">
<if test="areaId != null">area_id = #{areaId},</if>
<if test="lable1 != null">lable1 = #{lable1},</if>
<if test="lable2 != null">lable2 = #{lable2},</if>
<if test="createId != null">create_id = #{createId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateId != null">update_id = #{updateId},</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="deleteTcDataSourceTjById" parameterType="Long">
delete
from tc_data_source_tj
where id = #{id}
</delete>
<delete id="deleteTcDataSourceTjByIds" parameterType="String">
delete from tc_data_source_tj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

@ -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.ruoyi.zongzhi.mapper.TcSgjTjMapper">
<resultMap type="TcSgjTj" id="TcSgjTjResult">
<result property="id" column="id"/>
<result property="townId" column="town_id"/>
<result property="villageId" column="village_id"/>
<result property="totalSum" column="total_sum"/>
<result property="rqSum" column="rq_sum"/>
<result property="eySum" column="ey_sum"/>
<result property="jmrSum" column="jmr_sum"/>
<result property="createId" column="create_id"/>
<result property="createBy" column="create_by"/>
<result property="createTime" column="create_time"/>
<result property="updateId" column="update_id"/>
<result property="updateBy" column="update_by"/>
<result property="updateTime" column="update_time"/>
<result property="remark" column="remark"/>
</resultMap>
<sql id="selectTcSgjTjVo">
select id,
town_id,
village_id,
total_sum,
rq_sum,
ey_sum,
jmr_sum,
create_id,
create_by,
create_time,
update_id,
update_by,
update_time,
remark
from tc_sgj_tj
</sql>
<select id="selectTcSgjTjList" parameterType="TcSgjTj" resultMap="TcSgjTjResult">
<include refid="selectTcSgjTjVo"/>
<where>
<if test="totalSum != null ">and total_sum = #{totalSum}</if>
<if test="rqSum != null ">and rq_sum = #{rqSum}</if>
</where>
</select>
<select id="selectTcSgjTjById" parameterType="Long" resultMap="TcSgjTjResult">
<include refid="selectTcSgjTjVo"/>
where id = #{id}
</select>
<insert id="insertTcSgjTj" parameterType="TcSgjTj" useGeneratedKeys="true" keyProperty="id">
insert into tc_sgj_tj
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="townId != null">town_id,</if>
<if test="villageId != null">village_id,</if>
<if test="totalSum != null">total_sum,</if>
<if test="rqSum != null">rq_sum,</if>
<if test="eySum != null">ey_sum,</if>
<if test="jmrSum != null">jmr_sum,</if>
<if test="createId != null">create_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateId != null">update_id,</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="townId != null">#{townId},</if>
<if test="villageId != null">#{villageId},</if>
<if test="totalSum != null">#{totalSum},</if>
<if test="rqSum != null">#{rqSum},</if>
<if test="eySum != null">#{eySum},</if>
<if test="jmrSum != null">#{jmrSum},</if>
<if test="createId != null">#{createId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateId != null">#{updateId},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
<if test="remark != null">#{remark},</if>
</trim>
</insert>
<update id="updateTcSgjTj" parameterType="TcSgjTj">
update tc_sgj_tj
<trim prefix="SET" suffixOverrides=",">
<if test="townId != null">town_id = #{townId},</if>
<if test="villageId != null">village_id = #{villageId},</if>
<if test="totalSum != null">total_sum = #{totalSum},</if>
<if test="rqSum != null">rq_sum = #{rqSum},</if>
<if test="eySum != null">ey_sum = #{eySum},</if>
<if test="jmrSum != null">jmr_sum = #{jmrSum},</if>
<if test="createId != null">create_id = #{createId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateId != null">update_id = #{updateId},</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="deleteTcSgjTjById" parameterType="Long">
delete
from tc_sgj_tj
where id = #{id}
</delete>
<delete id="deleteTcSgjTjByIds" parameterType="String">
delete from tc_sgj_tj where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>
Loading…
Cancel
Save