feat(特色专区专项项目): 基于专项项目表结构生成相关代码
Signed-off-by: OTTO <731554297@qq.com>
This commit is contained in:
parent
4a19739c00
commit
bba58c02b7
|
|
@ -0,0 +1,91 @@
|
|||
package com.microservices.zone.specialProject.controller;
|
||||
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.common.security.annotation.RequiresPermissions;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProject;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目Controller
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/specialProject")
|
||||
public class ZoneSpecialProjectController extends BaseController {
|
||||
@Autowired
|
||||
private IZoneSpecialProjectService zoneSpecialProjectService;
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目列表
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProject:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ZoneSpecialProject zoneSpecialProject) {
|
||||
startPage();
|
||||
List<ZoneSpecialProject> list = zoneSpecialProjectService.selectZoneSpecialProjectList(zoneSpecialProject);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出特色专区专项项目列表
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProject:export")
|
||||
@Log(title = "特色专区专项项目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ZoneSpecialProject zoneSpecialProject) {
|
||||
List<ZoneSpecialProject> list = zoneSpecialProjectService.selectZoneSpecialProjectList(zoneSpecialProject);
|
||||
ExcelUtil<ZoneSpecialProject> util = new ExcelUtil<ZoneSpecialProject>(ZoneSpecialProject.class);
|
||||
util.exportExcel(response, list, "特色专区专项项目数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取特色专区专项项目详细信息
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProject:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(zoneSpecialProjectService.selectZoneSpecialProjectById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProject:add")
|
||||
@Log(title = "特色专区专项项目", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ZoneSpecialProject zoneSpecialProject) {
|
||||
return toAjax(zoneSpecialProjectService.insertZoneSpecialProject(zoneSpecialProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProject:edit")
|
||||
@Log(title = "特色专区专项项目", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ZoneSpecialProject zoneSpecialProject) {
|
||||
return toAjax(zoneSpecialProjectService.updateZoneSpecialProject(zoneSpecialProject));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProject:remove")
|
||||
@Log(title = "特色专区专项项目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(zoneSpecialProjectService.deleteZoneSpecialProjectByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package com.microservices.zone.specialProject.controller;
|
||||
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.common.security.annotation.RequiresPermissions;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectRelevancy;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectRelevancyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目关联关系Controller
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/specialProjectRelevancy")
|
||||
public class ZoneSpecialProjectRelevancyController extends BaseController {
|
||||
@Autowired
|
||||
private IZoneSpecialProjectRelevancyService zoneSpecialProjectRelevancyService;
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目关联关系列表
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectRelevancy:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy) {
|
||||
startPage();
|
||||
List<ZoneSpecialProjectRelevancy> list = zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyList(zoneSpecialProjectRelevancy);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出特色专区专项项目关联关系列表
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectRelevancy:export")
|
||||
@Log(title = "特色专区专项项目关联关系", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy) {
|
||||
List<ZoneSpecialProjectRelevancy> list = zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyList(zoneSpecialProjectRelevancy);
|
||||
ExcelUtil<ZoneSpecialProjectRelevancy> util = new ExcelUtil<ZoneSpecialProjectRelevancy>(ZoneSpecialProjectRelevancy.class);
|
||||
util.exportExcel(response, list, "特色专区专项项目关联关系数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取特色专区专项项目关联关系详细信息
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectRelevancy:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(zoneSpecialProjectRelevancyService.selectZoneSpecialProjectRelevancyById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目关联关系
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectRelevancy:add")
|
||||
@Log(title = "特色专区专项项目关联关系", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy) {
|
||||
return toAjax(zoneSpecialProjectRelevancyService.insertZoneSpecialProjectRelevancy(zoneSpecialProjectRelevancy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目关联关系
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectRelevancy:edit")
|
||||
@Log(title = "特色专区专项项目关联关系", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy) {
|
||||
return toAjax(zoneSpecialProjectRelevancyService.updateZoneSpecialProjectRelevancy(zoneSpecialProjectRelevancy));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目关联关系
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectRelevancy:remove")
|
||||
@Log(title = "特色专区专项项目关联关系", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(zoneSpecialProjectRelevancyService.deleteZoneSpecialProjectRelevancyByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,234 @@
|
|||
package com.microservices.zone.specialProject.domain;
|
||||
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目对象 zone_special_project
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
public class ZoneSpecialProject extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 专项项目主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专项项目名称
|
||||
*/
|
||||
@Excel(name = "专项项目名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 专项项目负责人id
|
||||
*/
|
||||
@Excel(name = "专项项目负责人id")
|
||||
private Long projectLeaderId;
|
||||
|
||||
/**
|
||||
* 项目描述
|
||||
*/
|
||||
@Excel(name = "项目描述")
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* 奖项
|
||||
*/
|
||||
@Excel(name = "奖项")
|
||||
private String awards;
|
||||
|
||||
/**
|
||||
* 专项项目类型id
|
||||
*/
|
||||
@Excel(name = "专项项目类型id")
|
||||
private Long typeId;
|
||||
|
||||
/**
|
||||
* 专区Id
|
||||
*/
|
||||
@Excel(name = "专区Id")
|
||||
private Long zoneId;
|
||||
|
||||
/**
|
||||
* 所属组织id
|
||||
*/
|
||||
@Excel(name = "所属组织id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 预留字段1
|
||||
*/
|
||||
@Excel(name = "预留字段1")
|
||||
private String reservedField1;
|
||||
|
||||
/**
|
||||
* 预留字段2
|
||||
*/
|
||||
@Excel(name = "预留字段2")
|
||||
private String reservedField2;
|
||||
|
||||
/**
|
||||
* 预留字段3
|
||||
*/
|
||||
@Excel(name = "预留字段3")
|
||||
private String reservedField3;
|
||||
|
||||
/**
|
||||
* 预留字段4
|
||||
*/
|
||||
@Excel(name = "预留字段4")
|
||||
private String reservedField4;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序")
|
||||
private Integer sort;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getProjectLeaderId() {
|
||||
return projectLeaderId;
|
||||
}
|
||||
|
||||
public void setProjectLeaderId(Long projectLeaderId) {
|
||||
this.projectLeaderId = projectLeaderId;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getAwards() {
|
||||
return awards;
|
||||
}
|
||||
|
||||
public void setAwards(String awards) {
|
||||
this.awards = awards;
|
||||
}
|
||||
|
||||
public Long getTypeId() {
|
||||
return typeId;
|
||||
}
|
||||
|
||||
public void setTypeId(Long typeId) {
|
||||
this.typeId = typeId;
|
||||
}
|
||||
|
||||
public Long getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(Long zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getReservedField1() {
|
||||
return reservedField1;
|
||||
}
|
||||
|
||||
public void setReservedField1(String reservedField1) {
|
||||
this.reservedField1 = reservedField1;
|
||||
}
|
||||
|
||||
public String getReservedField2() {
|
||||
return reservedField2;
|
||||
}
|
||||
|
||||
public void setReservedField2(String reservedField2) {
|
||||
this.reservedField2 = reservedField2;
|
||||
}
|
||||
|
||||
public String getReservedField3() {
|
||||
return reservedField3;
|
||||
}
|
||||
|
||||
public void setReservedField3(String reservedField3) {
|
||||
this.reservedField3 = reservedField3;
|
||||
}
|
||||
|
||||
public String getReservedField4() {
|
||||
return reservedField4;
|
||||
}
|
||||
|
||||
public void setReservedField4(String reservedField4) {
|
||||
this.reservedField4 = reservedField4;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("projectLeaderId", getProjectLeaderId())
|
||||
.append("description", getDescription())
|
||||
.append("awards", getAwards())
|
||||
.append("typeId", getTypeId())
|
||||
.append("zoneId", getZoneId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("reservedField1", getReservedField1())
|
||||
.append("reservedField2", getReservedField2())
|
||||
.append("reservedField3", getReservedField3())
|
||||
.append("reservedField4", getReservedField4())
|
||||
.append("sort", getSort())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
package com.microservices.zone.specialProject.domain;
|
||||
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目关联关系对象 zone_special_project_relevancy
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
public class ZoneSpecialProjectRelevancy extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 专项项目关联关系主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专项项目关联类型
|
||||
*/
|
||||
@Excel(name = "专项项目关联类型")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 专项项目关联关系的作者
|
||||
*/
|
||||
@Excel(name = "专项项目关联关系的作者")
|
||||
private String author;
|
||||
|
||||
/**
|
||||
* 专项项目关联对象id
|
||||
*/
|
||||
@Excel(name = "专项项目关联对象id")
|
||||
private String relevancyId;
|
||||
|
||||
/**
|
||||
* 专项项目id
|
||||
*/
|
||||
@Excel(name = "专项项目id")
|
||||
private Long specialProjectId;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 专区id
|
||||
*/
|
||||
@Excel(name = "专区id")
|
||||
private Long zoneId;
|
||||
|
||||
/**
|
||||
* 所属组织Id
|
||||
*/
|
||||
@Excel(name = "所属组织Id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 预留字段1
|
||||
*/
|
||||
@Excel(name = "预留字段1")
|
||||
private String reservedField1;
|
||||
|
||||
/**
|
||||
* 预留字段2
|
||||
*/
|
||||
@Excel(name = "预留字段2")
|
||||
private String reservedField2;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getAuthor() {
|
||||
return author;
|
||||
}
|
||||
|
||||
public void setAuthor(String author) {
|
||||
this.author = author;
|
||||
}
|
||||
|
||||
public String getRelevancyId() {
|
||||
return relevancyId;
|
||||
}
|
||||
|
||||
public void setRelevancyId(String relevancyId) {
|
||||
this.relevancyId = relevancyId;
|
||||
}
|
||||
|
||||
public Long getSpecialProjectId() {
|
||||
return specialProjectId;
|
||||
}
|
||||
|
||||
public void setSpecialProjectId(Long specialProjectId) {
|
||||
this.specialProjectId = specialProjectId;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(Long zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getReservedField1() {
|
||||
return reservedField1;
|
||||
}
|
||||
|
||||
public void setReservedField1(String reservedField1) {
|
||||
this.reservedField1 = reservedField1;
|
||||
}
|
||||
|
||||
public String getReservedField2() {
|
||||
return reservedField2;
|
||||
}
|
||||
|
||||
public void setReservedField2(String reservedField2) {
|
||||
this.reservedField2 = reservedField2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("type", getType())
|
||||
.append("author", getAuthor())
|
||||
.append("relevancyId", getRelevancyId())
|
||||
.append("specialProjectId", getSpecialProjectId())
|
||||
.append("sort", getSort())
|
||||
.append("zoneId", getZoneId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("reservedField1", getReservedField1())
|
||||
.append("reservedField2", getReservedField2())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.microservices.zone.specialProject.mapper;
|
||||
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目Mapper接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZoneSpecialProjectMapper {
|
||||
/**
|
||||
* 查询特色专区专项项目
|
||||
*
|
||||
* @param id 特色专区专项项目主键
|
||||
* @return 特色专区专项项目
|
||||
*/
|
||||
public ZoneSpecialProject selectZoneSpecialProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目列表
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 特色专区专项项目集合
|
||||
*/
|
||||
public List<ZoneSpecialProject> selectZoneSpecialProjectList(ZoneSpecialProject zoneSpecialProject);
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProject(ZoneSpecialProject zoneSpecialProject);
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProject(ZoneSpecialProject zoneSpecialProject);
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目
|
||||
*
|
||||
* @param id 特色专区专项项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.microservices.zone.specialProject.mapper;
|
||||
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectRelevancy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目关联关系Mapper接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZoneSpecialProjectRelevancyMapper {
|
||||
/**
|
||||
* 查询特色专区专项项目关联关系
|
||||
*
|
||||
* @param id 特色专区专项项目关联关系主键
|
||||
* @return 特色专区专项项目关联关系
|
||||
*/
|
||||
public ZoneSpecialProjectRelevancy selectZoneSpecialProjectRelevancyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目关联关系列表
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 特色专区专项项目关联关系集合
|
||||
*/
|
||||
public List<ZoneSpecialProjectRelevancy> selectZoneSpecialProjectRelevancyList(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy);
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目关联关系
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProjectRelevancy(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy);
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目关联关系
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProjectRelevancy(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy);
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目关联关系
|
||||
*
|
||||
* @param id 特色专区专项项目关联关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectRelevancyById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目关联关系
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectRelevancyByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.microservices.zone.specialProject.service;
|
||||
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectRelevancy;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目关联关系Service接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
public interface IZoneSpecialProjectRelevancyService {
|
||||
/**
|
||||
* 查询特色专区专项项目关联关系
|
||||
*
|
||||
* @param id 特色专区专项项目关联关系主键
|
||||
* @return 特色专区专项项目关联关系
|
||||
*/
|
||||
public ZoneSpecialProjectRelevancy selectZoneSpecialProjectRelevancyById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目关联关系列表
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 特色专区专项项目关联关系集合
|
||||
*/
|
||||
public List<ZoneSpecialProjectRelevancy> selectZoneSpecialProjectRelevancyList(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy);
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目关联关系
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProjectRelevancy(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy);
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目关联关系
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProjectRelevancy(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目关联关系
|
||||
*
|
||||
* @param ids 需要删除的特色专区专项项目关联关系主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectRelevancyByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目关联关系信息
|
||||
*
|
||||
* @param id 特色专区专项项目关联关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectRelevancyById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.microservices.zone.specialProject.service;
|
||||
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目Service接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
public interface IZoneSpecialProjectService {
|
||||
/**
|
||||
* 查询特色专区专项项目
|
||||
*
|
||||
* @param id 特色专区专项项目主键
|
||||
* @return 特色专区专项项目
|
||||
*/
|
||||
public ZoneSpecialProject selectZoneSpecialProjectById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目列表
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 特色专区专项项目集合
|
||||
*/
|
||||
public List<ZoneSpecialProject> selectZoneSpecialProjectList(ZoneSpecialProject zoneSpecialProject);
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProject(ZoneSpecialProject zoneSpecialProject);
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProject(ZoneSpecialProject zoneSpecialProject);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目
|
||||
*
|
||||
* @param ids 需要删除的特色专区专项项目主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目信息
|
||||
*
|
||||
* @param id 特色专区专项项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.microservices.zone.specialProject.service.impl;
|
||||
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProjectRelevancy;
|
||||
import com.microservices.zone.specialProject.mapper.ZoneSpecialProjectRelevancyMapper;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectRelevancyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目关联关系Service业务层处理
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@Service
|
||||
public class ZoneSpecialProjectRelevancyServiceImpl implements IZoneSpecialProjectRelevancyService {
|
||||
@Autowired
|
||||
private ZoneSpecialProjectRelevancyMapper zoneSpecialProjectRelevancyMapper;
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目关联关系
|
||||
*
|
||||
* @param id 特色专区专项项目关联关系主键
|
||||
* @return 特色专区专项项目关联关系
|
||||
*/
|
||||
@Override
|
||||
public ZoneSpecialProjectRelevancy selectZoneSpecialProjectRelevancyById(Long id) {
|
||||
return zoneSpecialProjectRelevancyMapper.selectZoneSpecialProjectRelevancyById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目关联关系列表
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 特色专区专项项目关联关系
|
||||
*/
|
||||
@Override
|
||||
public List<ZoneSpecialProjectRelevancy> selectZoneSpecialProjectRelevancyList(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy) {
|
||||
return zoneSpecialProjectRelevancyMapper.selectZoneSpecialProjectRelevancyList(zoneSpecialProjectRelevancy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目关联关系
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZoneSpecialProjectRelevancy(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy) {
|
||||
zoneSpecialProjectRelevancy.setCreateTime(DateUtils.getNowDate());
|
||||
return zoneSpecialProjectRelevancyMapper.insertZoneSpecialProjectRelevancy(zoneSpecialProjectRelevancy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目关联关系
|
||||
*
|
||||
* @param zoneSpecialProjectRelevancy 特色专区专项项目关联关系
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZoneSpecialProjectRelevancy(ZoneSpecialProjectRelevancy zoneSpecialProjectRelevancy) {
|
||||
zoneSpecialProjectRelevancy.setUpdateTime(DateUtils.getNowDate());
|
||||
return zoneSpecialProjectRelevancyMapper.updateZoneSpecialProjectRelevancy(zoneSpecialProjectRelevancy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目关联关系
|
||||
*
|
||||
* @param ids 需要删除的特色专区专项项目关联关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectRelevancyByIds(Long[] ids) {
|
||||
return zoneSpecialProjectRelevancyMapper.deleteZoneSpecialProjectRelevancyByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目关联关系信息
|
||||
*
|
||||
* @param id 特色专区专项项目关联关系主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectRelevancyById(Long id) {
|
||||
return zoneSpecialProjectRelevancyMapper.deleteZoneSpecialProjectRelevancyById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.microservices.zone.specialProject.service.impl;
|
||||
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.microservices.zone.specialProject.domain.ZoneSpecialProject;
|
||||
import com.microservices.zone.specialProject.mapper.ZoneSpecialProjectMapper;
|
||||
import com.microservices.zone.specialProject.service.IZoneSpecialProjectService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目Service业务层处理
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@Service
|
||||
public class ZoneSpecialProjectServiceImpl implements IZoneSpecialProjectService {
|
||||
@Autowired
|
||||
private ZoneSpecialProjectMapper zoneSpecialProjectMapper;
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目
|
||||
*
|
||||
* @param id 特色专区专项项目主键
|
||||
* @return 特色专区专项项目
|
||||
*/
|
||||
@Override
|
||||
public ZoneSpecialProject selectZoneSpecialProjectById(Long id) {
|
||||
return zoneSpecialProjectMapper.selectZoneSpecialProjectById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目列表
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 特色专区专项项目
|
||||
*/
|
||||
@Override
|
||||
public List<ZoneSpecialProject> selectZoneSpecialProjectList(ZoneSpecialProject zoneSpecialProject) {
|
||||
return zoneSpecialProjectMapper.selectZoneSpecialProjectList(zoneSpecialProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZoneSpecialProject(ZoneSpecialProject zoneSpecialProject) {
|
||||
zoneSpecialProject.setCreateTime(DateUtils.getNowDate());
|
||||
return zoneSpecialProjectMapper.insertZoneSpecialProject(zoneSpecialProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目
|
||||
*
|
||||
* @param zoneSpecialProject 特色专区专项项目
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZoneSpecialProject(ZoneSpecialProject zoneSpecialProject) {
|
||||
zoneSpecialProject.setUpdateTime(DateUtils.getNowDate());
|
||||
return zoneSpecialProjectMapper.updateZoneSpecialProject(zoneSpecialProject);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目
|
||||
*
|
||||
* @param ids 需要删除的特色专区专项项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectByIds(Long[] ids) {
|
||||
return zoneSpecialProjectMapper.deleteZoneSpecialProjectByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目信息
|
||||
*
|
||||
* @param id 特色专区专项项目主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectById(Long id) {
|
||||
return zoneSpecialProjectMapper.deleteZoneSpecialProjectById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package com.ruoyi.zone.zone.specialProject.controller;
|
||||
|
||||
import com.microservices.common.core.utils.poi.ExcelUtil;
|
||||
import com.microservices.common.core.web.controller.BaseController;
|
||||
import com.microservices.common.core.web.domain.AjaxResult;
|
||||
import com.microservices.common.core.web.page.TableDataInfo;
|
||||
import com.microservices.common.log.annotation.Log;
|
||||
import com.microservices.common.log.enums.BusinessType;
|
||||
import com.microservices.common.security.annotation.RequiresPermissions;
|
||||
import com.ruoyi.zone.zone.specialProject.domain.ZoneSpecialProjectType;
|
||||
import com.ruoyi.zone.zone.specialProject.service.IZoneSpecialProjectTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目分类Controller
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/specialProjectType")
|
||||
public class ZoneSpecialProjectTypeController extends BaseController {
|
||||
@Autowired
|
||||
private IZoneSpecialProjectTypeService zoneSpecialProjectTypeService;
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目分类列表
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectType:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ZoneSpecialProjectType zoneSpecialProjectType) {
|
||||
startPage();
|
||||
List<ZoneSpecialProjectType> list = zoneSpecialProjectTypeService.selectZoneSpecialProjectTypeList(zoneSpecialProjectType);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出特色专区专项项目分类列表
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectType:export")
|
||||
@Log(title = "特色专区专项项目分类", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ZoneSpecialProjectType zoneSpecialProjectType) {
|
||||
List<ZoneSpecialProjectType> list = zoneSpecialProjectTypeService.selectZoneSpecialProjectTypeList(zoneSpecialProjectType);
|
||||
ExcelUtil<ZoneSpecialProjectType> util = new ExcelUtil<ZoneSpecialProjectType>(ZoneSpecialProjectType.class);
|
||||
util.exportExcel(response, list, "特色专区专项项目分类数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取特色专区专项项目分类详细信息
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectType:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return success(zoneSpecialProjectTypeService.selectZoneSpecialProjectTypeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目分类
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectType:add")
|
||||
@Log(title = "特色专区专项项目分类", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ZoneSpecialProjectType zoneSpecialProjectType) {
|
||||
return toAjax(zoneSpecialProjectTypeService.insertZoneSpecialProjectType(zoneSpecialProjectType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目分类
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectType:edit")
|
||||
@Log(title = "特色专区专项项目分类", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ZoneSpecialProjectType zoneSpecialProjectType) {
|
||||
return toAjax(zoneSpecialProjectTypeService.updateZoneSpecialProjectType(zoneSpecialProjectType));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目分类
|
||||
*/
|
||||
@RequiresPermissions("zone:specialProjectType:remove")
|
||||
@Log(title = "特色专区专项项目分类", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(zoneSpecialProjectTypeService.deleteZoneSpecialProjectTypeByIds(ids));
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,144 @@
|
|||
package com.ruoyi.zone.zone.specialProject.domain;
|
||||
|
||||
import com.microservices.common.core.annotation.Excel;
|
||||
import com.microservices.common.core.web.domain.BaseEntity;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目分类对象 zone_special_project_type
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
public class ZoneSpecialProjectType extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 专项项目分类主键
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 专项项目分类名称
|
||||
*/
|
||||
@Excel(name = "专项项目分类名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序")
|
||||
private Integer sort;
|
||||
|
||||
/**
|
||||
* 专区id
|
||||
*/
|
||||
@Excel(name = "专区id")
|
||||
private Long zoneId;
|
||||
|
||||
/**
|
||||
* 所属组织Id
|
||||
*/
|
||||
@Excel(name = "所属组织Id")
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 2代表删除)
|
||||
*/
|
||||
private String delFlag;
|
||||
|
||||
/**
|
||||
* 预留字段1
|
||||
*/
|
||||
@Excel(name = "预留字段1")
|
||||
private String reservedField1;
|
||||
|
||||
/**
|
||||
* 预留字段2
|
||||
*/
|
||||
@Excel(name = "预留字段2")
|
||||
private String reservedField2;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getZoneId() {
|
||||
return zoneId;
|
||||
}
|
||||
|
||||
public void setZoneId(Long zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDelFlag() {
|
||||
return delFlag;
|
||||
}
|
||||
|
||||
public void setDelFlag(String delFlag) {
|
||||
this.delFlag = delFlag;
|
||||
}
|
||||
|
||||
public String getReservedField1() {
|
||||
return reservedField1;
|
||||
}
|
||||
|
||||
public void setReservedField1(String reservedField1) {
|
||||
this.reservedField1 = reservedField1;
|
||||
}
|
||||
|
||||
public String getReservedField2() {
|
||||
return reservedField2;
|
||||
}
|
||||
|
||||
public void setReservedField2(String reservedField2) {
|
||||
this.reservedField2 = reservedField2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("sort", getSort())
|
||||
.append("zoneId", getZoneId())
|
||||
.append("deptId", getDeptId())
|
||||
.append("delFlag", getDelFlag())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("reservedField1", getReservedField1())
|
||||
.append("reservedField2", getReservedField2())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.ruoyi.zone.zone.specialProject.mapper;
|
||||
|
||||
import com.ruoyi.zone.zone.specialProject.domain.ZoneSpecialProjectType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目分类Mapper接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@Mapper
|
||||
public interface ZoneSpecialProjectTypeMapper {
|
||||
/**
|
||||
* 查询特色专区专项项目分类
|
||||
*
|
||||
* @param id 特色专区专项项目分类主键
|
||||
* @return 特色专区专项项目分类
|
||||
*/
|
||||
public ZoneSpecialProjectType selectZoneSpecialProjectTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目分类列表
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 特色专区专项项目分类集合
|
||||
*/
|
||||
public List<ZoneSpecialProjectType> selectZoneSpecialProjectTypeList(ZoneSpecialProjectType zoneSpecialProjectType);
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目分类
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProjectType(ZoneSpecialProjectType zoneSpecialProjectType);
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目分类
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProjectType(ZoneSpecialProjectType zoneSpecialProjectType);
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目分类
|
||||
*
|
||||
* @param id 特色专区专项项目分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目分类
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectTypeByIds(Long[] ids);
|
||||
}
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
package com.ruoyi.zone.zone.specialProject.service;
|
||||
|
||||
import com.ruoyi.zone.zone.specialProject.domain.ZoneSpecialProjectType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目分类Service接口
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
public interface IZoneSpecialProjectTypeService {
|
||||
/**
|
||||
* 查询特色专区专项项目分类
|
||||
*
|
||||
* @param id 特色专区专项项目分类主键
|
||||
* @return 特色专区专项项目分类
|
||||
*/
|
||||
public ZoneSpecialProjectType selectZoneSpecialProjectTypeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目分类列表
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 特色专区专项项目分类集合
|
||||
*/
|
||||
public List<ZoneSpecialProjectType> selectZoneSpecialProjectTypeList(ZoneSpecialProjectType zoneSpecialProjectType);
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目分类
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertZoneSpecialProjectType(ZoneSpecialProjectType zoneSpecialProjectType);
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目分类
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateZoneSpecialProjectType(ZoneSpecialProjectType zoneSpecialProjectType);
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目分类
|
||||
*
|
||||
* @param ids 需要删除的特色专区专项项目分类主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectTypeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目分类信息
|
||||
*
|
||||
* @param id 特色专区专项项目分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteZoneSpecialProjectTypeById(Long id);
|
||||
}
|
||||
|
|
@ -0,0 +1,90 @@
|
|||
package com.ruoyi.zone.zone.specialProject.service.impl;
|
||||
|
||||
import com.microservices.common.core.utils.DateUtils;
|
||||
import com.ruoyi.zone.zone.specialProject.domain.ZoneSpecialProjectType;
|
||||
import com.ruoyi.zone.zone.specialProject.mapper.ZoneSpecialProjectTypeMapper;
|
||||
import com.ruoyi.zone.zone.specialProject.service.IZoneSpecialProjectTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 特色专区专项项目分类Service业务层处理
|
||||
*
|
||||
* @author otto
|
||||
* @date 2024-10-26
|
||||
*/
|
||||
@Service
|
||||
public class ZoneSpecialProjectTypeServiceImpl implements IZoneSpecialProjectTypeService {
|
||||
@Autowired
|
||||
private ZoneSpecialProjectTypeMapper zoneSpecialProjectTypeMapper;
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目分类
|
||||
*
|
||||
* @param id 特色专区专项项目分类主键
|
||||
* @return 特色专区专项项目分类
|
||||
*/
|
||||
@Override
|
||||
public ZoneSpecialProjectType selectZoneSpecialProjectTypeById(Long id) {
|
||||
return zoneSpecialProjectTypeMapper.selectZoneSpecialProjectTypeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询特色专区专项项目分类列表
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 特色专区专项项目分类
|
||||
*/
|
||||
@Override
|
||||
public List<ZoneSpecialProjectType> selectZoneSpecialProjectTypeList(ZoneSpecialProjectType zoneSpecialProjectType) {
|
||||
return zoneSpecialProjectTypeMapper.selectZoneSpecialProjectTypeList(zoneSpecialProjectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增特色专区专项项目分类
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertZoneSpecialProjectType(ZoneSpecialProjectType zoneSpecialProjectType) {
|
||||
zoneSpecialProjectType.setCreateTime(DateUtils.getNowDate());
|
||||
return zoneSpecialProjectTypeMapper.insertZoneSpecialProjectType(zoneSpecialProjectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改特色专区专项项目分类
|
||||
*
|
||||
* @param zoneSpecialProjectType 特色专区专项项目分类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateZoneSpecialProjectType(ZoneSpecialProjectType zoneSpecialProjectType) {
|
||||
zoneSpecialProjectType.setUpdateTime(DateUtils.getNowDate());
|
||||
return zoneSpecialProjectTypeMapper.updateZoneSpecialProjectType(zoneSpecialProjectType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除特色专区专项项目分类
|
||||
*
|
||||
* @param ids 需要删除的特色专区专项项目分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectTypeByIds(Long[] ids) {
|
||||
return zoneSpecialProjectTypeMapper.deleteZoneSpecialProjectTypeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除特色专区专项项目分类信息
|
||||
*
|
||||
* @param id 特色专区专项项目分类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteZoneSpecialProjectTypeById(Long id) {
|
||||
return zoneSpecialProjectTypeMapper.deleteZoneSpecialProjectTypeById(id);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
<?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.microservices.zone.specialProject.mapper.ZoneSpecialProjectMapper">
|
||||
|
||||
<resultMap type="ZoneSpecialProject" id="ZoneSpecialProjectResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="projectLeaderId" column="project_leader_id"/>
|
||||
<result property="description" column="description"/>
|
||||
<result property="awards" column="awards"/>
|
||||
<result property="typeId" column="type_id"/>
|
||||
<result property="zoneId" column="zone_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="reservedField1" column="reserved_field_1"/>
|
||||
<result property="reservedField2" column="reserved_field_2"/>
|
||||
<result property="reservedField3" column="reserved_field_3"/>
|
||||
<result property="reservedField4" column="reserved_field_4"/>
|
||||
<result property="sort" column="sort"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZoneSpecialProjectVo">
|
||||
select id,
|
||||
name,
|
||||
project_leader_id,
|
||||
description,
|
||||
awards,
|
||||
type_id,
|
||||
zone_id,
|
||||
dept_id,
|
||||
del_flag,
|
||||
update_time,
|
||||
update_by,
|
||||
create_time,
|
||||
create_by,
|
||||
reserved_field_1,
|
||||
reserved_field_2,
|
||||
reserved_field_3,
|
||||
reserved_field_4,
|
||||
sort
|
||||
from zone_special_project
|
||||
</sql>
|
||||
|
||||
<select id="selectZoneSpecialProjectList" parameterType="ZoneSpecialProject" resultMap="ZoneSpecialProjectResult">
|
||||
<include refid="selectZoneSpecialProjectVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="projectLeaderId != null ">and project_leader_id = #{projectLeaderId}</if>
|
||||
<if test="description != null and description != ''">and description = #{description}</if>
|
||||
<if test="awards != null and awards != ''">and awards = #{awards}</if>
|
||||
<if test="typeId != null ">and type_id = #{typeId}</if>
|
||||
<if test="zoneId != null ">and zone_id = #{zoneId}</if>
|
||||
<if test="deptId != null ">and dept_id = #{deptId}</if>
|
||||
<if test="reservedField1 != null and reservedField1 != ''">and reserved_field_1 = #{reservedField1}</if>
|
||||
<if test="reservedField2 != null and reservedField2 != ''">and reserved_field_2 = #{reservedField2}</if>
|
||||
<if test="reservedField3 != null and reservedField3 != ''">and reserved_field_3 = #{reservedField3}</if>
|
||||
<if test="reservedField4 != null and reservedField4 != ''">and reserved_field_4 = #{reservedField4}</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZoneSpecialProjectById" parameterType="Long" resultMap="ZoneSpecialProjectResult">
|
||||
<include refid="selectZoneSpecialProjectVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZoneSpecialProject" parameterType="ZoneSpecialProject" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into zone_special_project
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="projectLeaderId != null">project_leader_id,</if>
|
||||
<if test="description != null">description,</if>
|
||||
<if test="awards != null">awards,</if>
|
||||
<if test="typeId != null">type_id,</if>
|
||||
<if test="zoneId != null">zone_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="reservedField1 != null">reserved_field_1,</if>
|
||||
<if test="reservedField2 != null">reserved_field_2,</if>
|
||||
<if test="reservedField3 != null">reserved_field_3,</if>
|
||||
<if test="reservedField4 != null">reserved_field_4,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="projectLeaderId != null">#{projectLeaderId},</if>
|
||||
<if test="description != null">#{description},</if>
|
||||
<if test="awards != null">#{awards},</if>
|
||||
<if test="typeId != null">#{typeId},</if>
|
||||
<if test="zoneId != null">#{zoneId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="reservedField1 != null">#{reservedField1},</if>
|
||||
<if test="reservedField2 != null">#{reservedField2},</if>
|
||||
<if test="reservedField3 != null">#{reservedField3},</if>
|
||||
<if test="reservedField4 != null">#{reservedField4},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZoneSpecialProject" parameterType="ZoneSpecialProject">
|
||||
update zone_special_project
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="projectLeaderId != null">project_leader_id = #{projectLeaderId},</if>
|
||||
<if test="description != null">description = #{description},</if>
|
||||
<if test="awards != null">awards = #{awards},</if>
|
||||
<if test="typeId != null">type_id = #{typeId},</if>
|
||||
<if test="zoneId != null">zone_id = #{zoneId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="reservedField1 != null">reserved_field_1 = #{reservedField1},</if>
|
||||
<if test="reservedField2 != null">reserved_field_2 = #{reservedField2},</if>
|
||||
<if test="reservedField3 != null">reserved_field_3 = #{reservedField3},</if>
|
||||
<if test="reservedField4 != null">reserved_field_4 = #{reservedField4},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectById" parameterType="Long">
|
||||
delete
|
||||
from zone_special_project
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectByIds" parameterType="String">
|
||||
delete from zone_special_project where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
<?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.microservices.zone.specialProject.mapper.ZoneSpecialProjectRelevancyMapper">
|
||||
|
||||
<resultMap type="ZoneSpecialProjectRelevancy" id="ZoneSpecialProjectRelevancyResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="author" column="author"/>
|
||||
<result property="relevancyId" column="relevancy_id"/>
|
||||
<result property="specialProjectId" column="special_project_id"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="zoneId" column="zone_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="reservedField1" column="reserved_field_1"/>
|
||||
<result property="reservedField2" column="reserved_field_2"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZoneSpecialProjectRelevancyVo">
|
||||
select id,
|
||||
type,
|
||||
author,
|
||||
relevancy_id,
|
||||
special_project_id,
|
||||
sort,
|
||||
zone_id,
|
||||
dept_id,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
reserved_field_1,
|
||||
reserved_field_2
|
||||
from zone_special_project_relevancy
|
||||
</sql>
|
||||
|
||||
<select id="selectZoneSpecialProjectRelevancyList" parameterType="ZoneSpecialProjectRelevancy"
|
||||
resultMap="ZoneSpecialProjectRelevancyResult">
|
||||
<include refid="selectZoneSpecialProjectRelevancyVo"/>
|
||||
<where>
|
||||
<if test="type != null and type != ''">and type = #{type}</if>
|
||||
<if test="author != null and author != ''">and author = #{author}</if>
|
||||
<if test="relevancyId != null and relevancyId != ''">and relevancy_id = #{relevancyId}</if>
|
||||
<if test="specialProjectId != null ">and special_project_id = #{specialProjectId}</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
<if test="zoneId != null ">and zone_id = #{zoneId}</if>
|
||||
<if test="deptId != null ">and dept_id = #{deptId}</if>
|
||||
<if test="reservedField1 != null and reservedField1 != ''">and reserved_field_1 = #{reservedField1}</if>
|
||||
<if test="reservedField2 != null and reservedField2 != ''">and reserved_field_2 = #{reservedField2}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZoneSpecialProjectRelevancyById" parameterType="Long"
|
||||
resultMap="ZoneSpecialProjectRelevancyResult">
|
||||
<include refid="selectZoneSpecialProjectRelevancyVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZoneSpecialProjectRelevancy" parameterType="ZoneSpecialProjectRelevancy" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zone_special_project_relevancy
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="author != null">author,</if>
|
||||
<if test="relevancyId != null">relevancy_id,</if>
|
||||
<if test="specialProjectId != null">special_project_id,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="zoneId != null">zone_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="delFlag != null">del_flag,</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="reservedField1 != null">reserved_field_1,</if>
|
||||
<if test="reservedField2 != null">reserved_field_2,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="author != null">#{author},</if>
|
||||
<if test="relevancyId != null">#{relevancyId},</if>
|
||||
<if test="specialProjectId != null">#{specialProjectId},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="zoneId != null">#{zoneId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</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="reservedField1 != null">#{reservedField1},</if>
|
||||
<if test="reservedField2 != null">#{reservedField2},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZoneSpecialProjectRelevancy" parameterType="ZoneSpecialProjectRelevancy">
|
||||
update zone_special_project_relevancy
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="author != null">author = #{author},</if>
|
||||
<if test="relevancyId != null">relevancy_id = #{relevancyId},</if>
|
||||
<if test="specialProjectId != null">special_project_id = #{specialProjectId},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
<if test="zoneId != null">zone_id = #{zoneId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</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="reservedField1 != null">reserved_field_1 = #{reservedField1},</if>
|
||||
<if test="reservedField2 != null">reserved_field_2 = #{reservedField2},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectRelevancyById" parameterType="Long">
|
||||
delete
|
||||
from zone_special_project_relevancy
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectRelevancyByIds" parameterType="String">
|
||||
delete from zone_special_project_relevancy where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
<?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.zone.zone.specialProject.mapper.ZoneSpecialProjectTypeMapper">
|
||||
|
||||
<resultMap type="ZoneSpecialProjectType" id="ZoneSpecialProjectTypeResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="zoneId" column="zone_id"/>
|
||||
<result property="deptId" column="dept_id"/>
|
||||
<result property="delFlag" column="del_flag"/>
|
||||
<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="reservedField1" column="reserved_field_1"/>
|
||||
<result property="reservedField2" column="reserved_field_2"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectZoneSpecialProjectTypeVo">
|
||||
select id,
|
||||
name,
|
||||
sort,
|
||||
zone_id,
|
||||
dept_id,
|
||||
del_flag,
|
||||
create_by,
|
||||
create_time,
|
||||
update_by,
|
||||
update_time,
|
||||
reserved_field_1,
|
||||
reserved_field_2
|
||||
from zone_special_project_type
|
||||
</sql>
|
||||
|
||||
<select id="selectZoneSpecialProjectTypeList" parameterType="ZoneSpecialProjectType"
|
||||
resultMap="ZoneSpecialProjectTypeResult">
|
||||
<include refid="selectZoneSpecialProjectTypeVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
<if test="zoneId != null ">and zone_id = #{zoneId}</if>
|
||||
<if test="deptId != null ">and dept_id = #{deptId}</if>
|
||||
<if test="reservedField1 != null and reservedField1 != ''">and reserved_field_1 = #{reservedField1}</if>
|
||||
<if test="reservedField2 != null and reservedField2 != ''">and reserved_field_2 = #{reservedField2}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectZoneSpecialProjectTypeById" parameterType="Long" resultMap="ZoneSpecialProjectTypeResult">
|
||||
<include refid="selectZoneSpecialProjectTypeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertZoneSpecialProjectType" parameterType="ZoneSpecialProjectType" useGeneratedKeys="true"
|
||||
keyProperty="id">
|
||||
insert into zone_special_project_type
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="sort != null">sort,</if>
|
||||
<if test="zoneId != null">zone_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
<if test="delFlag != null">del_flag,</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="reservedField1 != null">reserved_field_1,</if>
|
||||
<if test="reservedField2 != null">reserved_field_2,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="sort != null">#{sort},</if>
|
||||
<if test="zoneId != null">#{zoneId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
<if test="delFlag != null">#{delFlag},</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="reservedField1 != null">#{reservedField1},</if>
|
||||
<if test="reservedField2 != null">#{reservedField2},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateZoneSpecialProjectType" parameterType="ZoneSpecialProjectType">
|
||||
update zone_special_project_type
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="sort != null">sort = #{sort},</if>
|
||||
<if test="zoneId != null">zone_id = #{zoneId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</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="reservedField1 != null">reserved_field_1 = #{reservedField1},</if>
|
||||
<if test="reservedField2 != null">reserved_field_2 = #{reservedField2},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectTypeById" parameterType="Long">
|
||||
delete
|
||||
from zone_special_project_type
|
||||
where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteZoneSpecialProjectTypeByIds" parameterType="String">
|
||||
delete from zone_special_project_type where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue