20200701-zlp-1

主题整合管理
This commit is contained in:
paidaxing444 2020-07-01 17:39:34 +08:00
parent 411d5dd2c4
commit 8c34c107fc
16 changed files with 1128 additions and 4 deletions

View File

@ -64,7 +64,7 @@ public class ByDayFlowDetailController extends BaseController
/**
* 获取一日流程详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:dayflowmanger:query')")
@PreAuthorize("@ss.hasPermi('benyi:dayflowmanger:query')"+ "||@ss.hasPermi('benyi:dayflowmanger:list')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{

View File

@ -39,7 +39,7 @@ public class ByDayFlowStandardController extends BaseController
/**
* 查询一日流程标准列表
*/
@PreAuthorize("@ss.hasPermi('benyi:standard:list')")
@PreAuthorize("@ss.hasPermi('benyi:standard:list')"+ "||@ss.hasPermi('benyi:dayflowmanger:list')")
@GetMapping("/list")
public TableDataInfo list(ByDayFlowStandard byDayFlowStandard)
{

View File

@ -39,7 +39,7 @@ public class ByDayFlowTaskController extends BaseController
/**
* 查询一日流程任务列表
*/
@PreAuthorize("@ss.hasPermi('benyi:dayflowtask:list')")
@PreAuthorize("@ss.hasPermi('benyi:dayflowtask:list')"+ "||@ss.hasPermi('benyi:dayflowmanger:list')")
@GetMapping("/list")
public TableDataInfo list(ByDayFlowTask byDayFlowTask)
{

View File

@ -36,7 +36,7 @@ public class ByDayFlowUnscrambleController extends BaseController
/**
* 查询一日流程解读列表
*/
@PreAuthorize("@ss.hasPermi('benyi:unscramble:list')")
@PreAuthorize("@ss.hasPermi('benyi:unscramble:list')"+ "||@ss.hasPermi('benyi:dayflowmanger:list')")
@GetMapping("/list")
public TableDataInfo list(ByDayFlowUnscramble byDayFlowUnscramble)
{

View File

@ -0,0 +1,97 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.benyi.domain.ByThemeActivity;
import com.ruoyi.project.benyi.service.IByThemeActivityService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 主题整合活动Controller
*
* @author tsbz
* @date 2020-07-01
*/
@RestController
@RequestMapping("/benyi/activity")
public class ByThemeActivityController extends BaseController {
@Autowired
private IByThemeActivityService byThemeActivityService;
/**
* 查询主题整合活动列表
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:list')")
@GetMapping("/list")
public TableDataInfo list(ByThemeActivity byThemeActivity) {
startPage();
List<ByThemeActivity> list = byThemeActivityService.selectByThemeActivityList(byThemeActivity);
return getDataTable(list);
}
/**
* 导出主题整合活动列表
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:export')")
@Log(title = "主题整合活动", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByThemeActivity byThemeActivity) {
List<ByThemeActivity> list = byThemeActivityService.selectByThemeActivityList(byThemeActivity);
ExcelUtil<ByThemeActivity> util = new ExcelUtil<ByThemeActivity>(ByThemeActivity.class);
return util.exportExcel(list, "activity");
}
/**
* 获取主题整合活动详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byThemeActivityService.selectByThemeActivityById(id));
}
/**
* 新增主题整合活动
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:add')")
@Log(title = "主题整合活动", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByThemeActivity byThemeActivity) {
return toAjax(byThemeActivityService.insertByThemeActivity(byThemeActivity));
}
/**
* 修改主题整合活动
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:edit')")
@Log(title = "主题整合活动", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByThemeActivity byThemeActivity) {
return toAjax(byThemeActivityService.updateByThemeActivity(byThemeActivity));
}
/**
* 删除主题整合活动
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:remove')")
@Log(title = "主题整合活动", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byThemeActivityService.deleteByThemeActivityByIds(ids));
}
}

View File

@ -0,0 +1,97 @@
package com.ruoyi.project.benyi.controller;
import java.util.List;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.project.benyi.domain.ByTheme;
import com.ruoyi.project.benyi.service.IByThemeService;
import com.ruoyi.framework.web.controller.BaseController;
import com.ruoyi.framework.web.domain.AjaxResult;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.web.page.TableDataInfo;
/**
* 主题整合Controller
*
* @author tsbz
* @date 2020-07-01
*/
@RestController
@RequestMapping("/benyi/theme")
public class ByThemeController extends BaseController {
@Autowired
private IByThemeService byThemeService;
/**
* 查询主题整合列表
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:list')")
@GetMapping("/list")
public TableDataInfo list(ByTheme byTheme) {
startPage();
List<ByTheme> list = byThemeService.selectByThemeList(byTheme);
return getDataTable(list);
}
/**
* 导出主题整合列表
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:export')")
@Log(title = "主题整合", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(ByTheme byTheme) {
List<ByTheme> list = byThemeService.selectByThemeList(byTheme);
ExcelUtil<ByTheme> util = new ExcelUtil<ByTheme>(ByTheme.class);
return util.exportExcel(list, "theme");
}
/**
* 获取主题整合详细信息
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(byThemeService.selectByThemeById(id));
}
/**
* 新增主题整合
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:add')")
@Log(title = "主题整合", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody ByTheme byTheme) {
return toAjax(byThemeService.insertByTheme(byTheme));
}
/**
* 修改主题整合
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:edit')")
@Log(title = "主题整合", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody ByTheme byTheme) {
return toAjax(byThemeService.updateByTheme(byTheme));
}
/**
* 删除主题整合
*/
@PreAuthorize("@ss.hasPermi('benyi:theme:remove')")
@Log(title = "主题整合", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(byThemeService.deleteByThemeByIds(ids));
}
}

View File

@ -0,0 +1,112 @@
package com.ruoyi.project.benyi.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 主题整合对象 by_theme
*
* @author tsbz
* @date 2020-07-01
*/
public class ByTheme extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private Long id;
/**
* 主题名称
*/
@Excel(name = "主题名称")
private String name;
/**
* 主题内容
*/
@Excel(name = "主题内容")
private String content;
/**
* 家园沟通
*/
@Excel(name = "家园沟通")
private String communicate;
/**
* 适用班级
*/
@Excel(name = "适用班级")
private String classid;
/**
* 序号
*/
@Excel(name = "序号")
private Long sort;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setContent(String content) {
this.content = content;
}
public String getContent() {
return content;
}
public void setCommunicate(String communicate) {
this.communicate = communicate;
}
public String getCommunicate() {
return communicate;
}
public void setClassid(String classid) {
this.classid = classid;
}
public String getClassid() {
return classid;
}
public void setSort(Long sort) {
this.sort = sort;
}
public Long getSort() {
return sort;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("name", getName())
.append("content", getContent())
.append("communicate", getCommunicate())
.append("classid", getClassid())
.append("sort", getSort())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,202 @@
package com.ruoyi.project.benyi.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;
/**
* 主题整合活动对象 by_theme_activity
*
* @author tsbz
* @date 2020-07-01
*/
public class ByThemeActivity extends BaseEntity {
private static final long serialVersionUID = 1L;
/**
* 编号
*/
private Long id;
/**
* 所属主题
*/
@Excel(name = "所属主题")
private Long themeid;
/**
* 活动名称
*/
@Excel(name = "活动名称")
private String name;
/**
* 活动形式
*/
@Excel(name = "活动形式")
private String type;
/**
* 活动领域
*/
@Excel(name = "活动领域")
private String field;
/**
* 活动目标
*/
@Excel(name = "活动目标")
private String target;
/**
* 活动材料
*/
@Excel(name = "活动材料")
private String data;
/**
* 活动过程
*/
@Excel(name = "活动过程")
private String process;
/**
* 活动建议
*/
@Excel(name = "活动建议")
private String proposal;
/**
* 活动反思
*/
@Excel(name = "活动反思")
private String reflect;
/**
* 活动附录
*/
@Excel(name = "活动附录")
private String appendix;
/**
* 序号
*/
@Excel(name = "序号")
private Long sort;
public void setId(Long id) {
this.id = id;
}
public Long getId() {
return id;
}
public void setThemeid(Long themeid) {
this.themeid = themeid;
}
public Long getThemeid() {
return themeid;
}
public void setName(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setType(String type) {
this.type = type;
}
public String getType() {
return type;
}
public void setField(String field) {
this.field = field;
}
public String getField() {
return field;
}
public void setTarget(String target) {
this.target = target;
}
public String getTarget() {
return target;
}
public void setData(String data) {
this.data = data;
}
public String getData() {
return data;
}
public void setProcess(String process) {
this.process = process;
}
public String getProcess() {
return process;
}
public void setProposal(String proposal) {
this.proposal = proposal;
}
public String getProposal() {
return proposal;
}
public void setReflect(String reflect) {
this.reflect = reflect;
}
public String getReflect() {
return reflect;
}
public void setAppendix(String appendix) {
this.appendix = appendix;
}
public String getAppendix() {
return appendix;
}
public void setSort(Long sort) {
this.sort = sort;
}
public Long getSort() {
return sort;
}
@Override
public String toString() {
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("themeid", getThemeid())
.append("name", getName())
.append("type", getType())
.append("field", getField())
.append("target", getTarget())
.append("data", getData())
.append("process", getProcess())
.append("proposal", getProposal())
.append("reflect", getReflect())
.append("appendix", getAppendix())
.append("sort", getSort())
.append("createTime", getCreateTime())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.mapper;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeActivity;
/**
* 主题整合活动Mapper接口
*
* @author tsbz
* @date 2020-07-01
*/
public interface ByThemeActivityMapper {
/**
* 查询主题整合活动
*
* @param id 主题整合活动ID
* @return 主题整合活动
*/
public ByThemeActivity selectByThemeActivityById(Long id);
/**
* 查询主题整合活动列表
*
* @param byThemeActivity 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityList(ByThemeActivity byThemeActivity);
/**
* 新增主题整合活动
*
* @param byThemeActivity 主题整合活动
* @return 结果
*/
public int insertByThemeActivity(ByThemeActivity byThemeActivity);
/**
* 修改主题整合活动
*
* @param byThemeActivity 主题整合活动
* @return 结果
*/
public int updateByThemeActivity(ByThemeActivity byThemeActivity);
/**
* 删除主题整合活动
*
* @param id 主题整合活动ID
* @return 结果
*/
public int deleteByThemeActivityById(Long id);
/**
* 批量删除主题整合活动
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeActivityByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.mapper;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByTheme;
/**
* 主题整合Mapper接口
*
* @author tsbz
* @date 2020-07-01
*/
public interface ByThemeMapper {
/**
* 查询主题整合
*
* @param id 主题整合ID
* @return 主题整合
*/
public ByTheme selectByThemeById(Long id);
/**
* 查询主题整合列表
*
* @param byTheme 主题整合
* @return 主题整合集合
*/
public List<ByTheme> selectByThemeList(ByTheme byTheme);
/**
* 新增主题整合
*
* @param byTheme 主题整合
* @return 结果
*/
public int insertByTheme(ByTheme byTheme);
/**
* 修改主题整合
*
* @param byTheme 主题整合
* @return 结果
*/
public int updateByTheme(ByTheme byTheme);
/**
* 删除主题整合
*
* @param id 主题整合ID
* @return 结果
*/
public int deleteByThemeById(Long id);
/**
* 批量删除主题整合
*
* @param ids 需要删除的数据ID
* @return 结果
*/
public int deleteByThemeByIds(Long[] ids);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByThemeActivity;
/**
* 主题整合活动Service接口
*
* @author tsbz
* @date 2020-07-01
*/
public interface IByThemeActivityService {
/**
* 查询主题整合活动
*
* @param id 主题整合活动ID
* @return 主题整合活动
*/
public ByThemeActivity selectByThemeActivityById(Long id);
/**
* 查询主题整合活动列表
*
* @param byThemeActivity 主题整合活动
* @return 主题整合活动集合
*/
public List<ByThemeActivity> selectByThemeActivityList(ByThemeActivity byThemeActivity);
/**
* 新增主题整合活动
*
* @param byThemeActivity 主题整合活动
* @return 结果
*/
public int insertByThemeActivity(ByThemeActivity byThemeActivity);
/**
* 修改主题整合活动
*
* @param byThemeActivity 主题整合活动
* @return 结果
*/
public int updateByThemeActivity(ByThemeActivity byThemeActivity);
/**
* 批量删除主题整合活动
*
* @param ids 需要删除的主题整合活动ID
* @return 结果
*/
public int deleteByThemeActivityByIds(Long[] ids);
/**
* 删除主题整合活动信息
*
* @param id 主题整合活动ID
* @return 结果
*/
public int deleteByThemeActivityById(Long id);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.project.benyi.service;
import java.util.List;
import com.ruoyi.project.benyi.domain.ByTheme;
/**
* 主题整合Service接口
*
* @author tsbz
* @date 2020-07-01
*/
public interface IByThemeService {
/**
* 查询主题整合
*
* @param id 主题整合ID
* @return 主题整合
*/
public ByTheme selectByThemeById(Long id);
/**
* 查询主题整合列表
*
* @param byTheme 主题整合
* @return 主题整合集合
*/
public List<ByTheme> selectByThemeList(ByTheme byTheme);
/**
* 新增主题整合
*
* @param byTheme 主题整合
* @return 结果
*/
public int insertByTheme(ByTheme byTheme);
/**
* 修改主题整合
*
* @param byTheme 主题整合
* @return 结果
*/
public int updateByTheme(ByTheme byTheme);
/**
* 批量删除主题整合
*
* @param ids 需要删除的主题整合ID
* @return 结果
*/
public int deleteByThemeByIds(Long[] ids);
/**
* 删除主题整合信息
*
* @param id 主题整合ID
* @return 结果
*/
public int deleteByThemeById(Long id);
}

View File

@ -0,0 +1,89 @@
package com.ruoyi.project.benyi.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.benyi.mapper.ByThemeActivityMapper;
import com.ruoyi.project.benyi.domain.ByThemeActivity;
import com.ruoyi.project.benyi.service.IByThemeActivityService;
/**
* 主题整合活动Service业务层处理
*
* @author tsbz
* @date 2020-07-01
*/
@Service
public class ByThemeActivityServiceImpl implements IByThemeActivityService {
@Autowired
private ByThemeActivityMapper byThemeActivityMapper;
/**
* 查询主题整合活动
*
* @param id 主题整合活动ID
* @return 主题整合活动
*/
@Override
public ByThemeActivity selectByThemeActivityById(Long id) {
return byThemeActivityMapper.selectByThemeActivityById(id);
}
/**
* 查询主题整合活动列表
*
* @param byThemeActivity 主题整合活动
* @return 主题整合活动
*/
@Override
public List<ByThemeActivity> selectByThemeActivityList(ByThemeActivity byThemeActivity) {
return byThemeActivityMapper.selectByThemeActivityList(byThemeActivity);
}
/**
* 新增主题整合活动
*
* @param byThemeActivity 主题整合活动
* @return 结果
*/
@Override
public int insertByThemeActivity(ByThemeActivity byThemeActivity) {
byThemeActivity.setCreateTime(DateUtils.getNowDate());
return byThemeActivityMapper.insertByThemeActivity(byThemeActivity);
}
/**
* 修改主题整合活动
*
* @param byThemeActivity 主题整合活动
* @return 结果
*/
@Override
public int updateByThemeActivity(ByThemeActivity byThemeActivity) {
return byThemeActivityMapper.updateByThemeActivity(byThemeActivity);
}
/**
* 批量删除主题整合活动
*
* @param ids 需要删除的主题整合活动ID
* @return 结果
*/
@Override
public int deleteByThemeActivityByIds(Long[] ids) {
return byThemeActivityMapper.deleteByThemeActivityByIds(ids);
}
/**
* 删除主题整合活动信息
*
* @param id 主题整合活动ID
* @return 结果
*/
@Override
public int deleteByThemeActivityById(Long id) {
return byThemeActivityMapper.deleteByThemeActivityById(id);
}
}

View File

@ -0,0 +1,89 @@
package com.ruoyi.project.benyi.service.impl;
import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.benyi.mapper.ByThemeMapper;
import com.ruoyi.project.benyi.domain.ByTheme;
import com.ruoyi.project.benyi.service.IByThemeService;
/**
* 主题整合Service业务层处理
*
* @author tsbz
* @date 2020-07-01
*/
@Service
public class ByThemeServiceImpl implements IByThemeService {
@Autowired
private ByThemeMapper byThemeMapper;
/**
* 查询主题整合
*
* @param id 主题整合ID
* @return 主题整合
*/
@Override
public ByTheme selectByThemeById(Long id) {
return byThemeMapper.selectByThemeById(id);
}
/**
* 查询主题整合列表
*
* @param byTheme 主题整合
* @return 主题整合
*/
@Override
public List<ByTheme> selectByThemeList(ByTheme byTheme) {
return byThemeMapper.selectByThemeList(byTheme);
}
/**
* 新增主题整合
*
* @param byTheme 主题整合
* @return 结果
*/
@Override
public int insertByTheme(ByTheme byTheme) {
byTheme.setCreateTime(DateUtils.getNowDate());
return byThemeMapper.insertByTheme(byTheme);
}
/**
* 修改主题整合
*
* @param byTheme 主题整合
* @return 结果
*/
@Override
public int updateByTheme(ByTheme byTheme) {
return byThemeMapper.updateByTheme(byTheme);
}
/**
* 批量删除主题整合
*
* @param ids 需要删除的主题整合ID
* @return 结果
*/
@Override
public int deleteByThemeByIds(Long[] ids) {
return byThemeMapper.deleteByThemeByIds(ids);
}
/**
* 删除主题整合信息
*
* @param id 主题整合ID
* @return 结果
*/
@Override
public int deleteByThemeById(Long id) {
return byThemeMapper.deleteByThemeById(id);
}
}

View File

@ -0,0 +1,111 @@
<?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.project.benyi.mapper.ByThemeActivityMapper">
<resultMap type="ByThemeActivity" id="ByThemeActivityResult">
<result property="id" column="id"/>
<result property="themeid" column="themeid"/>
<result property="name" column="name"/>
<result property="type" column="type"/>
<result property="field" column="field"/>
<result property="target" column="target"/>
<result property="data" column="data"/>
<result property="process" column="process"/>
<result property="proposal" column="proposal"/>
<result property="reflect" column="reflect"/>
<result property="appendix" column="appendix"/>
<result property="sort" column="sort"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectByThemeActivityVo">
select id, themeid, name, type, field, target, data, process, proposal, reflect, appendix, sort, create_time from by_theme_activity
</sql>
<select id="selectByThemeActivityList" parameterType="ByThemeActivity" resultMap="ByThemeActivityResult">
<include refid="selectByThemeActivityVo"/>
<where>
<if test="themeid != null ">and themeid = #{themeid}</if>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="type != null and type != ''">and type = #{type}</if>
<if test="field != null and field != ''">and field = #{field}</if>
<if test="target != null and target != ''">and target = #{target}</if>
<if test="data != null and data != ''">and data = #{data}</if>
<if test="process != null and process != ''">and process = #{process}</if>
<if test="proposal != null and proposal != ''">and proposal = #{proposal}</if>
<if test="reflect != null and reflect != ''">and reflect = #{reflect}</if>
<if test="appendix != null and appendix != ''">and appendix = #{appendix}</if>
<if test="sort != null ">and sort = #{sort}</if>
</where>
</select>
<select id="selectByThemeActivityById" parameterType="Long" resultMap="ByThemeActivityResult">
<include refid="selectByThemeActivityVo"/>
where id = #{id}
</select>
<insert id="insertByThemeActivity" parameterType="ByThemeActivity" useGeneratedKeys="true" keyProperty="id">
insert into by_theme_activity
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="themeid != null ">themeid,</if>
<if test="name != null and name != ''">name,</if>
<if test="type != null and type != ''">type,</if>
<if test="field != null and field != ''">field,</if>
<if test="target != null and target != ''">target,</if>
<if test="data != null and data != ''">data,</if>
<if test="process != null and process != ''">process,</if>
<if test="proposal != null and proposal != ''">proposal,</if>
<if test="reflect != null and reflect != ''">reflect,</if>
<if test="appendix != null and appendix != ''">appendix,</if>
<if test="sort != null ">sort,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="themeid != null ">#{themeid},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="type != null and type != ''">#{type},</if>
<if test="field != null and field != ''">#{field},</if>
<if test="target != null and target != ''">#{target},</if>
<if test="data != null and data != ''">#{data},</if>
<if test="process != null and process != ''">#{process},</if>
<if test="proposal != null and proposal != ''">#{proposal},</if>
<if test="reflect != null and reflect != ''">#{reflect},</if>
<if test="appendix != null and appendix != ''">#{appendix},</if>
<if test="sort != null ">#{sort},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateByThemeActivity" parameterType="ByThemeActivity">
update by_theme_activity
<trim prefix="SET" suffixOverrides=",">
<if test="themeid != null ">themeid = #{themeid},</if>
<if test="name != null and name != ''">name = #{name},</if>
<if test="type != null and type != ''">type = #{type},</if>
<if test="field != null and field != ''">field = #{field},</if>
<if test="target != null and target != ''">target = #{target},</if>
<if test="data != null and data != ''">data = #{data},</if>
<if test="process != null and process != ''">process = #{process},</if>
<if test="proposal != null and proposal != ''">proposal = #{proposal},</if>
<if test="reflect != null and reflect != ''">reflect = #{reflect},</if>
<if test="appendix != null and appendix != ''">appendix = #{appendix},</if>
<if test="sort != null ">sort = #{sort},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByThemeActivityById" parameterType="Long">
delete from by_theme_activity where id = #{id}
</delete>
<delete id="deleteByThemeActivityByIds" parameterType="String">
delete from by_theme_activity where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,83 @@
<?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.project.benyi.mapper.ByThemeMapper">
<resultMap type="ByTheme" id="ByThemeResult">
<result property="id" column="id"/>
<result property="name" column="name"/>
<result property="content" column="content"/>
<result property="communicate" column="communicate"/>
<result property="classid" column="classid"/>
<result property="sort" column="sort"/>
<result property="createTime" column="create_time"/>
</resultMap>
<sql id="selectByThemeVo">
select id, name, content, communicate, classid, sort, create_time from by_theme
</sql>
<select id="selectByThemeList" parameterType="ByTheme" resultMap="ByThemeResult">
<include refid="selectByThemeVo"/>
<where>
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
<if test="content != null and content != ''">and content = #{content}</if>
<if test="communicate != null and communicate != ''">and communicate = #{communicate}</if>
<if test="classid != null and classid != ''">and classid = #{classid}</if>
<if test="sort != null ">and sort = #{sort}</if>
</where>
</select>
<select id="selectByThemeById" parameterType="Long" resultMap="ByThemeResult">
<include refid="selectByThemeVo"/>
where id = #{id}
</select>
<insert id="insertByTheme" parameterType="ByTheme">
insert into by_theme
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null ">id,</if>
<if test="name != null and name != ''">name,</if>
<if test="content != null and content != ''">content,</if>
<if test="communicate != null and communicate != ''">communicate,</if>
<if test="classid != null and classid != ''">classid,</if>
<if test="sort != null ">sort,</if>
<if test="createTime != null ">create_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null ">#{id},</if>
<if test="name != null and name != ''">#{name},</if>
<if test="content != null and content != ''">#{content},</if>
<if test="communicate != null and communicate != ''">#{communicate},</if>
<if test="classid != null and classid != ''">#{classid},</if>
<if test="sort != null ">#{sort},</if>
<if test="createTime != null ">#{createTime},</if>
</trim>
</insert>
<update id="updateByTheme" parameterType="ByTheme">
update by_theme
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="content != null and content != ''">content = #{content},</if>
<if test="communicate != null and communicate != ''">communicate = #{communicate},</if>
<if test="classid != null and classid != ''">classid = #{classid},</if>
<if test="sort != null ">sort = #{sort},</if>
<if test="createTime != null ">create_time = #{createTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteByThemeById" parameterType="Long">
delete from by_theme where id = #{id}
</delete>
<delete id="deleteByThemeByIds" parameterType="String">
delete from by_theme where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>