From 8c34c107fccf9ec5516724ba6cf35a179bd7c0e5 Mon Sep 17 00:00:00 2001 From: paidaxing444 <12qwaszx> Date: Wed, 1 Jul 2020 17:39:34 +0800 Subject: [PATCH] =?UTF-8?q?20200701-zlp-1=20=E4=B8=BB=E9=A2=98=E6=95=B4?= =?UTF-8?q?=E5=90=88=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ByDayFlowDetailController.java | 2 +- .../ByDayFlowStandardController.java | 2 +- .../controller/ByDayFlowTaskController.java | 2 +- .../ByDayFlowUnscrambleController.java | 2 +- .../controller/ByThemeActivityController.java | 97 +++++++++ .../benyi/controller/ByThemeController.java | 97 +++++++++ .../ruoyi/project/benyi/domain/ByTheme.java | 112 ++++++++++ .../project/benyi/domain/ByThemeActivity.java | 202 ++++++++++++++++++ .../benyi/mapper/ByThemeActivityMapper.java | 61 ++++++ .../project/benyi/mapper/ByThemeMapper.java | 61 ++++++ .../service/IByThemeActivityService.java | 61 ++++++ .../benyi/service/IByThemeService.java | 61 ++++++ .../impl/ByThemeActivityServiceImpl.java | 89 ++++++++ .../service/impl/ByThemeServiceImpl.java | 89 ++++++++ .../mybatis/benyi/ByThemeActivityMapper.xml | 111 ++++++++++ .../resources/mybatis/benyi/ByThemeMapper.xml | 83 +++++++ 16 files changed, 1128 insertions(+), 4 deletions(-) create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeActivityController.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTheme.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByThemeActivity.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeActivityMapper.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeActivityService.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeActivityServiceImpl.java create mode 100644 ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java create mode 100644 ruoyi/src/main/resources/mybatis/benyi/ByThemeActivityMapper.xml create mode 100644 ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowDetailController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowDetailController.java index 020bf12aa..731aae03f 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowDetailController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowDetailController.java @@ -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) { diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowStandardController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowStandardController.java index 4fdf20432..aa1d77455 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowStandardController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowStandardController.java @@ -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) { diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowTaskController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowTaskController.java index 8d324e270..f335e2267 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowTaskController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowTaskController.java @@ -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) { diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowUnscrambleController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowUnscrambleController.java index 76738b53f..cc1a7e35e 100644 --- a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowUnscrambleController.java +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByDayFlowUnscrambleController.java @@ -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) { diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeActivityController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeActivityController.java new file mode 100644 index 000000000..292b4a879 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeActivityController.java @@ -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 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 list = byThemeActivityService.selectByThemeActivityList(byThemeActivity); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java new file mode 100644 index 000000000..517f02944 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/controller/ByThemeController.java @@ -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 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 list = byThemeService.selectByThemeList(byTheme); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTheme.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTheme.java new file mode 100644 index 000000000..e7a8ff433 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByTheme.java @@ -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(); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByThemeActivity.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByThemeActivity.java new file mode 100644 index 000000000..a122a8f75 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByThemeActivity.java @@ -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(); + } +} \ No newline at end of file diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeActivityMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeActivityMapper.java new file mode 100644 index 000000000..8e3d50f3a --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeActivityMapper.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java new file mode 100644 index 000000000..7892c75ed --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/mapper/ByThemeMapper.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeActivityService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeActivityService.java new file mode 100644 index 000000000..422c1a76e --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeActivityService.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java new file mode 100644 index 000000000..f8509ee27 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/IByThemeService.java @@ -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 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); +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeActivityServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeActivityServiceImpl.java new file mode 100644 index 000000000..5a4c82252 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeActivityServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java new file mode 100644 index 000000000..fa5b42613 --- /dev/null +++ b/ruoyi/src/main/java/com/ruoyi/project/benyi/service/impl/ByThemeServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeActivityMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeActivityMapper.xml new file mode 100644 index 000000000..f49c8037f --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeActivityMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + select id, themeid, name, type, field, target, data, process, proposal, reflect, appendix, sort, create_time from by_theme_activity + + + + + + + + insert into by_theme_activity + + themeid, + name, + type, + field, + target, + data, + process, + proposal, + reflect, + appendix, + sort, + create_time, + + + #{themeid}, + #{name}, + #{type}, + #{field}, + #{target}, + #{data}, + #{process}, + #{proposal}, + #{reflect}, + #{appendix}, + #{sort}, + #{createTime}, + + + + + update by_theme_activity + + themeid = #{themeid}, + name = #{name}, + type = #{type}, + field = #{field}, + target = #{target}, + data = #{data}, + process = #{process}, + proposal = #{proposal}, + reflect = #{reflect}, + appendix = #{appendix}, + sort = #{sort}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from by_theme_activity where id = #{id} + + + + delete from by_theme_activity where id in + + #{id} + + + + \ No newline at end of file diff --git a/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml new file mode 100644 index 000000000..afad49b88 --- /dev/null +++ b/ruoyi/src/main/resources/mybatis/benyi/ByThemeMapper.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + select id, name, content, communicate, classid, sort, create_time from by_theme + + + + + + + + insert into by_theme + + id, + name, + content, + communicate, + classid, + sort, + create_time, + + + #{id}, + #{name}, + #{content}, + #{communicate}, + #{classid}, + #{sort}, + #{createTime}, + + + + + update by_theme + + name = #{name}, + content = #{content}, + communicate = #{communicate}, + classid = #{classid}, + sort = #{sort}, + create_time = #{createTime}, + + where id = #{id} + + + + delete from by_theme where id = #{id} + + + + delete from by_theme where id in + + #{id} + + + + \ No newline at end of file