周计划
This commit is contained in:
		| @@ -2,6 +2,8 @@ package com.ruoyi.project.benyi.controller; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import com.ruoyi.common.utils.SecurityUtils; | ||||
| import com.ruoyi.project.common.SchoolCommon; | ||||
| import org.springframework.security.access.prepost.PreAuthorize; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.web.bind.annotation.GetMapping; | ||||
| @@ -32,6 +34,8 @@ import com.ruoyi.framework.web.page.TableDataInfo; | ||||
| public class ByPlanweekController extends BaseController { | ||||
|     @Autowired | ||||
|     private IByPlanweekService byPlanweekService; | ||||
|     @Autowired | ||||
|     private SchoolCommon schoolCommon; | ||||
|  | ||||
|     /** | ||||
|      * 查询周计划(家长和教育部门)列表 | ||||
| @@ -61,7 +65,7 @@ public class ByPlanweekController extends BaseController { | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:query')") | ||||
|     @GetMapping(value = "/{id}") | ||||
|     public AjaxResult getInfo(@PathVariable("id") Long id) { | ||||
|     public AjaxResult getInfo(@PathVariable("id") String id) { | ||||
|         return AjaxResult.success(byPlanweekService.selectByPlanweekById(id)); | ||||
|     } | ||||
|  | ||||
| @@ -72,7 +76,22 @@ public class ByPlanweekController extends BaseController { | ||||
|     @Log(title = "周计划(家长和教育部门)", businessType = BusinessType.INSERT) | ||||
|     @PostMapping | ||||
|     public AjaxResult add(@RequestBody ByPlanweek byPlanweek) { | ||||
|         return toAjax(byPlanweekService.insertByPlanweek(byPlanweek)); | ||||
|         String classId = schoolCommon.getClassId(); | ||||
|         //首先判断当前账户是否为幼儿园账号 | ||||
|         //if (schoolCommon.isSchool() && !schoolCommon.isStringEmpty(classId)) { | ||||
|             String uuid = schoolCommon.getUuid(); | ||||
|             byPlanweek.setId(uuid); | ||||
|             //学校id | ||||
|             byPlanweek.setSchoolid(SecurityUtils.getLoginUser().getUser().getDept().getDeptId()); | ||||
|             //创建人id | ||||
|             byPlanweek.setCreateuserid(SecurityUtils.getLoginUser().getUser().getUserId()); | ||||
|             //班级id | ||||
|             byPlanweek.setClassid(classId); | ||||
|             byPlanweek.setStatus("0"); | ||||
|             return toAjax(byPlanweekService.insertByPlanweek(byPlanweek)); | ||||
| //        } else { | ||||
| //            return AjaxResult.error("当前用户非幼儿园,无法添加计划"); | ||||
| //        } | ||||
|     } | ||||
|  | ||||
|     /** | ||||
| @@ -85,13 +104,33 @@ public class ByPlanweekController extends BaseController { | ||||
|         return toAjax(byPlanweekService.updateByPlanweek(byPlanweek)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 提交审核周计划(家长和教育部门) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:edit')") | ||||
|     @Log(title = "周计划(家长和教育部门)", businessType = BusinessType.UPDATE) | ||||
|     @PostMapping("/check/{ids}") | ||||
|     public AjaxResult check(@PathVariable String[] ids) { | ||||
|         int iCount = 0; | ||||
|         ByPlanweek byPlanweek = null; | ||||
|         for (int i = 0; i < ids.length; i++) { | ||||
|             byPlanweek = new ByPlanweek(); | ||||
|             byPlanweek.setId(ids[i]); | ||||
|             byPlanweek.setStatus("1"); | ||||
|             //byPlanweek.setShrid(SecurityUtils.getLoginUser().getUser().getUserId()); | ||||
|  | ||||
|             iCount = iCount + byPlanweekService.updateByPlanweek(byPlanweek); | ||||
|         } | ||||
|         return toAjax(iCount); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除周计划(家长和教育部门) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:remove')") | ||||
|     @Log(title = "周计划(家长和教育部门)", businessType = BusinessType.DELETE) | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public AjaxResult remove(@PathVariable Long[] ids) { | ||||
|     public AjaxResult remove(@PathVariable String[] ids) { | ||||
|         return toAjax(byPlanweekService.deleteByPlanweekByIds(ids)); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,7 +1,6 @@ | ||||
| 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; | ||||
| @@ -25,32 +24,35 @@ import com.ruoyi.framework.web.page.TableDataInfo; | ||||
|  * 周计划(家长和教育部门细化)Controller | ||||
|  * | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-24 | ||||
|  * @date 2020-08-27 | ||||
|  */ | ||||
| @RestController | ||||
| @RequestMapping("/benyi/planweekitem") | ||||
| public class ByPlanweekitemController extends BaseController { | ||||
| public class ByPlanweekitemController extends BaseController | ||||
| { | ||||
|     @Autowired | ||||
|     private IByPlanweekitemService byPlanweekitemService; | ||||
|  | ||||
|     /** | ||||
|      * 查询周计划(家长和教育部门细化)列表 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:list')") | ||||
|     @GetMapping("/list") | ||||
|     public TableDataInfo list(ByPlanweekitem byPlanweekitem) { | ||||
| /** | ||||
|  * 查询周计划(家长和教育部门细化)列表 | ||||
|  */ | ||||
| @PreAuthorize("@ss.hasPermi('benyi:planweekitem:list')") | ||||
| @GetMapping("/list") | ||||
|         public TableDataInfo list(ByPlanweekitem byPlanweekitem) | ||||
|     { | ||||
|         startPage(); | ||||
|         List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem); | ||||
|         return getDataTable(list); | ||||
|     } | ||||
|  | ||||
|      | ||||
|     /** | ||||
|      * 导出周计划(家长和教育部门细化)列表 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:export')") | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweekitem:export')") | ||||
|     @Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.EXPORT) | ||||
|     @GetMapping("/export") | ||||
|     public AjaxResult export(ByPlanweekitem byPlanweekitem) { | ||||
|     public AjaxResult export(ByPlanweekitem byPlanweekitem) | ||||
|     { | ||||
|         List<ByPlanweekitem> list = byPlanweekitemService.selectByPlanweekitemList(byPlanweekitem); | ||||
|         ExcelUtil<ByPlanweekitem> util = new ExcelUtil<ByPlanweekitem>(ByPlanweekitem.class); | ||||
|         return util.exportExcel(list, "planweekitem"); | ||||
| @@ -59,39 +61,43 @@ public class ByPlanweekitemController extends BaseController { | ||||
|     /** | ||||
|      * 获取周计划(家长和教育部门细化)详细信息 | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:query')") | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweekitem:query')") | ||||
|     @GetMapping(value = "/{id}") | ||||
|     public AjaxResult getInfo(@PathVariable("id") Long id) { | ||||
|     public AjaxResult getInfo(@PathVariable("id") Long id) | ||||
|     { | ||||
|         return AjaxResult.success(byPlanweekitemService.selectByPlanweekitemById(id)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 新增周计划(家长和教育部门细化) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:add')") | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweekitem:add')") | ||||
|     @Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.INSERT) | ||||
|     @PostMapping | ||||
|     public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem) { | ||||
|     public AjaxResult add(@RequestBody ByPlanweekitem byPlanweekitem) | ||||
|     { | ||||
|         return toAjax(byPlanweekitemService.insertByPlanweekitem(byPlanweekitem)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 修改周计划(家长和教育部门细化) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:edit')") | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweekitem:edit')") | ||||
|     @Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.UPDATE) | ||||
|     @PutMapping | ||||
|     public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem) { | ||||
|     public AjaxResult edit(@RequestBody ByPlanweekitem byPlanweekitem) | ||||
|     { | ||||
|         return toAjax(byPlanweekitemService.updateByPlanweekitem(byPlanweekitem)); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 删除周计划(家长和教育部门细化) | ||||
|      */ | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweek:remove')") | ||||
|     @PreAuthorize("@ss.hasPermi('benyi:planweekitem:remove')") | ||||
|     @Log(title = "周计划(家长和教育部门细化)", businessType = BusinessType.DELETE) | ||||
|     @DeleteMapping("/{ids}") | ||||
|     public AjaxResult remove(@PathVariable Long[] ids) { | ||||
|     public AjaxResult remove(@PathVariable Long[] ids) | ||||
|     { | ||||
|         return toAjax(byPlanweekitemService.deleteByPlanweekitemByIds(ids)); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -20,7 +20,7 @@ public class ByPlanweek extends BaseEntity { | ||||
|     /** | ||||
|      * 编号 | ||||
|      */ | ||||
|     private Long id; | ||||
|     private String id; | ||||
|  | ||||
|     /** | ||||
|      * 学校id | ||||
| @@ -115,11 +115,19 @@ public class ByPlanweek extends BaseEntity { | ||||
|     @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd") | ||||
|     private Date shtime; | ||||
|  | ||||
|     public void setId(Long id) { | ||||
|     /** | ||||
|      * 审核意见 | ||||
|      */ | ||||
|     @Excel(name = "审核意见") | ||||
|     private String shyj; | ||||
|  | ||||
|  | ||||
|  | ||||
|     public void setId(String id) { | ||||
|         this.id = id; | ||||
|     } | ||||
|  | ||||
|     public Long getId() { | ||||
|     public String getId() { | ||||
|         return id; | ||||
|     } | ||||
|  | ||||
| @@ -263,6 +271,15 @@ public class ByPlanweek extends BaseEntity { | ||||
|                 .append("status", getStatus()) | ||||
|                 .append("shrid", getShrid()) | ||||
|                 .append("shtime", getShtime()) | ||||
|                 .append("shyj", getShyj()) | ||||
|                 .toString(); | ||||
|     } | ||||
|  | ||||
|     public String getShyj() { | ||||
|         return shyj; | ||||
|     } | ||||
|  | ||||
|     public void setShyj(String shyj) { | ||||
|         this.shyj = shyj; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -12,7 +12,7 @@ import com.ruoyi.framework.web.domain.BaseEntity; | ||||
|  * 周计划(家长和教育部门细化)对象 by_planweekitem | ||||
|  * | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-24 | ||||
|  * @date 2020-08-27 | ||||
|  */ | ||||
| public class ByPlanweekitem extends BaseEntity { | ||||
|     private static final long serialVersionUID = 1L; | ||||
| @@ -26,7 +26,7 @@ public class ByPlanweekitem extends BaseEntity { | ||||
|      * 所属计划 | ||||
|      */ | ||||
|     @Excel(name = "所属计划") | ||||
|     private Long wid; | ||||
|     private String wid; | ||||
|  | ||||
|     /** | ||||
|      * 活动类型 | ||||
| @@ -67,11 +67,11 @@ public class ByPlanweekitem extends BaseEntity { | ||||
|         return id; | ||||
|     } | ||||
|  | ||||
|     public void setWid(Long wid) { | ||||
|     public void setWid(String wid) { | ||||
|         this.wid = wid; | ||||
|     } | ||||
|  | ||||
|     public Long getWid() { | ||||
|     public String getWid() { | ||||
|         return wid; | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -17,7 +17,7 @@ public interface ByPlanweekMapper | ||||
|      * @param id 周计划(家长和教育部门)ID | ||||
|      * @return 周计划(家长和教育部门) | ||||
|      */ | ||||
|     public ByPlanweek selectByPlanweekById(Long id); | ||||
|     public ByPlanweek selectByPlanweekById(String id); | ||||
|  | ||||
|     /** | ||||
|      * 查询周计划(家长和教育部门)列表 | ||||
| @@ -49,7 +49,7 @@ public interface ByPlanweekMapper | ||||
|      * @param id 周计划(家长和教育部门)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByPlanweekById(Long id); | ||||
|     public int deleteByPlanweekById(String id); | ||||
|  | ||||
|     /** | ||||
|      * 批量删除周计划(家长和教育部门) | ||||
| @@ -57,5 +57,5 @@ public interface ByPlanweekMapper | ||||
|      * @param ids 需要删除的数据ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByPlanweekByIds(Long[] ids); | ||||
|     public int deleteByPlanweekByIds(String[] ids); | ||||
| } | ||||
|   | ||||
| @@ -7,7 +7,7 @@ import com.ruoyi.project.benyi.domain.ByPlanweekitem; | ||||
|  * 周计划(家长和教育部门细化)Mapper接口 | ||||
|  * | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-24 | ||||
|  * @date 2020-08-27 | ||||
|  */ | ||||
| public interface ByPlanweekitemMapper | ||||
| { | ||||
|   | ||||
| @@ -17,7 +17,7 @@ public interface IByPlanweekService { | ||||
|      * @param id 周计划(家长和教育部门)ID | ||||
|      * @return 周计划(家长和教育部门) | ||||
|      */ | ||||
|     public ByPlanweek selectByPlanweekById(Long id); | ||||
|     public ByPlanweek selectByPlanweekById(String id); | ||||
|  | ||||
|     /** | ||||
|      * 查询周计划(家长和教育部门)列表 | ||||
| @@ -49,7 +49,7 @@ public interface IByPlanweekService { | ||||
|      * @param ids 需要删除的周计划(家长和教育部门)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByPlanweekByIds(Long[] ids); | ||||
|     public int deleteByPlanweekByIds(String[] ids); | ||||
|  | ||||
|     /** | ||||
|      * 删除周计划(家长和教育部门)信息 | ||||
| @@ -57,5 +57,5 @@ public interface IByPlanweekService { | ||||
|      * @param id 周计划(家长和教育部门)ID | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     public int deleteByPlanweekById(Long id); | ||||
|     public int deleteByPlanweekById(String id); | ||||
| } | ||||
|   | ||||
| @@ -1,16 +1,16 @@ | ||||
| package com.ruoyi.project.benyi.service; | ||||
|  | ||||
| import java.util.List; | ||||
|  | ||||
| import com.ruoyi.project.benyi.domain.ByPlanweekitem; | ||||
|  | ||||
| /** | ||||
|  * 周计划(家长和教育部门细化)Service接口 | ||||
|  * | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-24 | ||||
|  * @date 2020-08-27 | ||||
|  */ | ||||
| public interface IByPlanweekitemService { | ||||
| public interface IByPlanweekitemService | ||||
| { | ||||
|     /** | ||||
|      * 查询周计划(家长和教育部门细化) | ||||
|      * | ||||
|   | ||||
| @@ -27,7 +27,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService { | ||||
|      * @return 周计划(家长和教育部门) | ||||
|      */ | ||||
|     @Override | ||||
|     public ByPlanweek selectByPlanweekById(Long id) { | ||||
|     public ByPlanweek selectByPlanweekById(String id) { | ||||
|         return byPlanweekMapper.selectByPlanweekById(id); | ||||
|     } | ||||
|  | ||||
| @@ -72,7 +72,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService { | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByPlanweekByIds(Long[] ids) { | ||||
|     public int deleteByPlanweekByIds(String[] ids) { | ||||
|         return byPlanweekMapper.deleteByPlanweekByIds(ids); | ||||
|     } | ||||
|  | ||||
| @@ -83,7 +83,7 @@ public class ByPlanweekServiceImpl implements IByPlanweekService { | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByPlanweekById(Long id) { | ||||
|     public int deleteByPlanweekById(String id) { | ||||
|         return byPlanweekMapper.deleteByPlanweekById(id); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -1,9 +1,8 @@ | ||||
| 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 com.ruoyi.common.utils.DateUtils; | ||||
|             import org.springframework.beans.factory.annotation.Autowired; | ||||
| import org.springframework.stereotype.Service; | ||||
| import com.ruoyi.project.benyi.mapper.ByPlanweekitemMapper; | ||||
| import com.ruoyi.project.benyi.domain.ByPlanweekitem; | ||||
| @@ -13,10 +12,11 @@ import com.ruoyi.project.benyi.service.IByPlanweekitemService; | ||||
|  * 周计划(家长和教育部门细化)Service业务层处理 | ||||
|  * | ||||
|  * @author tsbz | ||||
|  * @date 2020-08-24 | ||||
|  * @date 2020-08-27 | ||||
|  */ | ||||
| @Service | ||||
| public class ByPlanweekitemServiceImpl implements IByPlanweekitemService { | ||||
| public class ByPlanweekitemServiceImpl implements IByPlanweekitemService | ||||
| { | ||||
|     @Autowired | ||||
|     private ByPlanweekitemMapper byPlanweekitemMapper; | ||||
|  | ||||
| @@ -27,7 +27,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService { | ||||
|      * @return 周计划(家长和教育部门细化) | ||||
|      */ | ||||
|     @Override | ||||
|     public ByPlanweekitem selectByPlanweekitemById(Long id) { | ||||
|     public ByPlanweekitem selectByPlanweekitemById(Long id) | ||||
|     { | ||||
|         return byPlanweekitemMapper.selectByPlanweekitemById(id); | ||||
|     } | ||||
|  | ||||
| @@ -38,7 +39,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService { | ||||
|      * @return 周计划(家长和教育部门细化) | ||||
|      */ | ||||
|     @Override | ||||
|     public List<ByPlanweekitem> selectByPlanweekitemList(ByPlanweekitem byPlanweekitem) { | ||||
|     public List<ByPlanweekitem> selectByPlanweekitemList(ByPlanweekitem byPlanweekitem) | ||||
|     { | ||||
|         return byPlanweekitemMapper.selectByPlanweekitemList(byPlanweekitem); | ||||
|     } | ||||
|  | ||||
| @@ -49,9 +51,10 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService { | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int insertByPlanweekitem(ByPlanweekitem byPlanweekitem) { | ||||
|         byPlanweekitem.setCreateTime(DateUtils.getNowDate()); | ||||
|         return byPlanweekitemMapper.insertByPlanweekitem(byPlanweekitem); | ||||
|     public int insertByPlanweekitem(ByPlanweekitem byPlanweekitem) | ||||
|     { | ||||
|                                                                                                                                                             byPlanweekitem.setCreateTime(DateUtils.getNowDate()); | ||||
|                                                                     return byPlanweekitemMapper.insertByPlanweekitem(byPlanweekitem); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
| @@ -61,9 +64,10 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService { | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int updateByPlanweekitem(ByPlanweekitem byPlanweekitem) { | ||||
|         byPlanweekitem.setUpdateTime(DateUtils.getNowDate()); | ||||
|         return byPlanweekitemMapper.updateByPlanweekitem(byPlanweekitem); | ||||
|     public int updateByPlanweekitem(ByPlanweekitem byPlanweekitem) | ||||
|     { | ||||
|                                                                                                                                                                                                     byPlanweekitem.setUpdateTime(DateUtils.getNowDate()); | ||||
|                             return byPlanweekitemMapper.updateByPlanweekitem(byPlanweekitem); | ||||
|     } | ||||
|  | ||||
|     /** | ||||
| @@ -73,7 +77,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService { | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByPlanweekitemByIds(Long[] ids) { | ||||
|     public int deleteByPlanweekitemByIds(Long[] ids) | ||||
|     { | ||||
|         return byPlanweekitemMapper.deleteByPlanweekitemByIds(ids); | ||||
|     } | ||||
|  | ||||
| @@ -84,7 +89,8 @@ public class ByPlanweekitemServiceImpl implements IByPlanweekitemService { | ||||
|      * @return 结果 | ||||
|      */ | ||||
|     @Override | ||||
|     public int deleteByPlanweekitemById(Long id) { | ||||
|     public int deleteByPlanweekitemById(Long id) | ||||
|     { | ||||
|         return byPlanweekitemMapper.deleteByPlanweekitemById(id); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -22,10 +22,11 @@ | ||||
|         <result property="status" column="status"/> | ||||
|         <result property="shrid" column="shrid"/> | ||||
|         <result property="shtime" column="shtime"/> | ||||
|         <result property="shyj"    column="shyj"    /> | ||||
|     </resultMap> | ||||
|  | ||||
|     <sql id="selectByPlanweekVo"> | ||||
|         select id, schoolid, classid, name, starttime, endtime, themeofweek, jxmb_sh, jxmb_yy, jxmb_jk, jxmb_kx, jxmb_ys, createuserid, create_time, status, shrid, shtime from by_planweek | ||||
|         select id, schoolid, classid, name, starttime, endtime, themeofweek, jxmb_sh, jxmb_yy, jxmb_jk, jxmb_kx, jxmb_ys, createuserid, create_time, status, shrid, shtime, shyj from by_planweek | ||||
|     </sql> | ||||
|  | ||||
|     <select id="selectByPlanweekList" parameterType="ByPlanweek" resultMap="ByPlanweekResult"> | ||||
| @@ -46,17 +47,19 @@ | ||||
|             <if test="status != null  and status != ''">and status = #{status}</if> | ||||
|             <if test="shrid != null ">and shrid = #{shrid}</if> | ||||
|             <if test="shtime != null ">and shtime = #{shtime}</if> | ||||
|             <if test="shyj != null  and shyj != ''"> and shyj = #{shyj}</if> | ||||
|         </where> | ||||
|     </select> | ||||
|  | ||||
|     <select id="selectByPlanweekById" parameterType="Long" resultMap="ByPlanweekResult"> | ||||
|     <select id="selectByPlanweekById" parameterType="String" resultMap="ByPlanweekResult"> | ||||
|         <include refid="selectByPlanweekVo"/> | ||||
|         where id = #{id} | ||||
|     </select> | ||||
|  | ||||
|     <insert id="insertByPlanweek" parameterType="ByPlanweek" useGeneratedKeys="true" keyProperty="id"> | ||||
|     <insert id="insertByPlanweek" parameterType="ByPlanweek" > | ||||
|         insert into by_planweek | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="id != null  and id != ''">id,</if> | ||||
|             <if test="schoolid != null ">schoolid,</if> | ||||
|             <if test="classid != null  and classid != ''">classid,</if> | ||||
|             <if test="name != null  and name != ''">name,</if> | ||||
| @@ -73,8 +76,10 @@ | ||||
|             <if test="status != null  and status != ''">status,</if> | ||||
|             <if test="shrid != null ">shrid,</if> | ||||
|             <if test="shtime != null ">shtime,</if> | ||||
|             <if test="shyj != null  and shyj != ''">shyj,</if> | ||||
|         </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="id != null  and id != ''">#{id},</if> | ||||
|             <if test="schoolid != null ">#{schoolid},</if> | ||||
|             <if test="classid != null  and classid != ''">#{classid},</if> | ||||
|             <if test="name != null  and name != ''">#{name},</if> | ||||
| @@ -91,6 +96,7 @@ | ||||
|             <if test="status != null  and status != ''">#{status},</if> | ||||
|             <if test="shrid != null ">#{shrid},</if> | ||||
|             <if test="shtime != null ">#{shtime},</if> | ||||
|             <if test="shyj != null  and shyj != ''">#{shyj},</if> | ||||
|         </trim> | ||||
|     </insert> | ||||
|  | ||||
| @@ -113,11 +119,12 @@ | ||||
|             <if test="status != null  and status != ''">status = #{status},</if> | ||||
|             <if test="shrid != null ">shrid = #{shrid},</if> | ||||
|             <if test="shtime != null ">shtime = #{shtime},</if> | ||||
|             <if test="shyj != null  and shyj != ''">shyj = #{shyj},</if> | ||||
|         </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|     <delete id="deleteByPlanweekById" parameterType="Long"> | ||||
|     <delete id="deleteByPlanweekById" parameterType="String"> | ||||
|         delete from by_planweek where id = #{id} | ||||
|     </delete> | ||||
|  | ||||
|   | ||||
| @@ -5,16 +5,16 @@ | ||||
| <mapper namespace="com.ruoyi.project.benyi.mapper.ByPlanweekitemMapper"> | ||||
|  | ||||
|     <resultMap type="ByPlanweekitem" id="ByPlanweekitemResult"> | ||||
|         <result property="id" column="id"/> | ||||
|         <result property="wid" column="wid"/> | ||||
|         <result property="activitytype" column="activitytype"/> | ||||
|         <result property="content" column="content"/> | ||||
|         <result property="activitytime" column="activitytime"/> | ||||
|         <result property="createuserid" column="createuserid"/> | ||||
|         <result property="createTime" column="create_time"/> | ||||
|         <result property="updateuserid" column="updateuserid"/> | ||||
|         <result property="updateTime" column="update_time"/> | ||||
|     </resultMap> | ||||
|                     <result property="id"    column="id"    /> | ||||
|                     <result property="wid"    column="wid"    /> | ||||
|                     <result property="activitytype"    column="activitytype"    /> | ||||
|                     <result property="content"    column="content"    /> | ||||
|                     <result property="activitytime"    column="activitytime"    /> | ||||
|                     <result property="createuserid"    column="createuserid"    /> | ||||
|                     <result property="createTime"    column="create_time"    /> | ||||
|                     <result property="updateuserid"    column="updateuserid"    /> | ||||
|                     <result property="updateTime"    column="update_time"    /> | ||||
|             </resultMap> | ||||
|  | ||||
|     <sql id="selectByPlanweekitemVo"> | ||||
|         select id, wid, activitytype, content, activitytime, createuserid, create_time, updateuserid, update_time from by_planweekitem | ||||
| @@ -23,13 +23,13 @@ | ||||
|     <select id="selectByPlanweekitemList" parameterType="ByPlanweekitem" resultMap="ByPlanweekitemResult"> | ||||
|         <include refid="selectByPlanweekitemVo"/> | ||||
|         <where> | ||||
|             <if test="wid != null ">and wid = #{wid}</if> | ||||
|             <if test="activitytype != null  and activitytype != ''">and activitytype = #{activitytype}</if> | ||||
|             <if test="content != null  and content != ''">and content = #{content}</if> | ||||
|             <if test="activitytime != null ">and activitytime = #{activitytime}</if> | ||||
|             <if test="createuserid != null ">and createuserid = #{createuserid}</if> | ||||
|             <if test="updateuserid != null ">and updateuserid = #{updateuserid}</if> | ||||
|         </where> | ||||
|                                                                                                     <if test="wid != null  and wid != ''"> and wid = #{wid}</if> | ||||
|                                                                                                             <if test="activitytype != null  and activitytype != ''"> and activitytype = #{activitytype}</if> | ||||
|                                                                                                             <if test="content != null  and content != ''"> and content = #{content}</if> | ||||
|                                                                                                             <if test="activitytime != null "> and activitytime = #{activitytime}</if> | ||||
|                                                                                                             <if test="createuserid != null "> and createuserid = #{createuserid}</if> | ||||
|                                                                                                                                         <if test="updateuserid != null "> and updateuserid = #{updateuserid}</if> | ||||
|                                                                                     </where> | ||||
|     </select> | ||||
|  | ||||
|     <select id="selectByPlanweekitemById" parameterType="Long" resultMap="ByPlanweekitemResult"> | ||||
| @@ -40,39 +40,39 @@ | ||||
|     <insert id="insertByPlanweekitem" parameterType="ByPlanweekitem" useGeneratedKeys="true" keyProperty="id"> | ||||
|         insert into by_planweekitem | ||||
|         <trim prefix="(" suffix=")" suffixOverrides=","> | ||||
|             <if test="wid != null ">wid,</if> | ||||
|             <if test="activitytype != null  and activitytype != ''">activitytype,</if> | ||||
|             <if test="content != null  and content != ''">content,</if> | ||||
|             <if test="activitytime != null ">activitytime,</if> | ||||
|             <if test="createuserid != null ">createuserid,</if> | ||||
|             <if test="createTime != null ">create_time,</if> | ||||
|             <if test="updateuserid != null ">updateuserid,</if> | ||||
|             <if test="updateTime != null ">update_time,</if> | ||||
|         </trim> | ||||
|                                                                             <if test="wid != null  and wid != ''">wid,</if> | ||||
|                                                                 <if test="activitytype != null  and activitytype != ''">activitytype,</if> | ||||
|                                                                 <if test="content != null  and content != ''">content,</if> | ||||
|                                                                 <if test="activitytime != null ">activitytime,</if> | ||||
|                                                                 <if test="createuserid != null ">createuserid,</if> | ||||
|                                                                 <if test="createTime != null ">create_time,</if> | ||||
|                                                                 <if test="updateuserid != null ">updateuserid,</if> | ||||
|                                                                 <if test="updateTime != null ">update_time,</if> | ||||
|                                     </trim> | ||||
|         <trim prefix="values (" suffix=")" suffixOverrides=","> | ||||
|             <if test="wid != null ">#{wid},</if> | ||||
|             <if test="activitytype != null  and activitytype != ''">#{activitytype},</if> | ||||
|             <if test="content != null  and content != ''">#{content},</if> | ||||
|             <if test="activitytime != null ">#{activitytime},</if> | ||||
|             <if test="createuserid != null ">#{createuserid},</if> | ||||
|             <if test="createTime != null ">#{createTime},</if> | ||||
|             <if test="updateuserid != null ">#{updateuserid},</if> | ||||
|             <if test="updateTime != null ">#{updateTime},</if> | ||||
|         </trim> | ||||
|                                                                             <if test="wid != null  and wid != ''">#{wid},</if> | ||||
|                                                                 <if test="activitytype != null  and activitytype != ''">#{activitytype},</if> | ||||
|                                                                 <if test="content != null  and content != ''">#{content},</if> | ||||
|                                                                 <if test="activitytime != null ">#{activitytime},</if> | ||||
|                                                                 <if test="createuserid != null ">#{createuserid},</if> | ||||
|                                                                 <if test="createTime != null ">#{createTime},</if> | ||||
|                                                                 <if test="updateuserid != null ">#{updateuserid},</if> | ||||
|                                                                 <if test="updateTime != null ">#{updateTime},</if> | ||||
|                                     </trim> | ||||
|     </insert> | ||||
|  | ||||
|     <update id="updateByPlanweekitem" parameterType="ByPlanweekitem"> | ||||
|         update by_planweekitem | ||||
|         <trim prefix="SET" suffixOverrides=","> | ||||
|             <if test="wid != null ">wid = #{wid},</if> | ||||
|             <if test="activitytype != null  and activitytype != ''">activitytype = #{activitytype},</if> | ||||
|             <if test="content != null  and content != ''">content = #{content},</if> | ||||
|             <if test="activitytime != null ">activitytime = #{activitytime},</if> | ||||
|             <if test="createuserid != null ">createuserid = #{createuserid},</if> | ||||
|             <if test="createTime != null ">create_time = #{createTime},</if> | ||||
|             <if test="updateuserid != null ">updateuserid = #{updateuserid},</if> | ||||
|             <if test="updateTime != null ">update_time = #{updateTime},</if> | ||||
|         </trim> | ||||
|                                                                             <if test="wid != null  and wid != ''">wid = #{wid},</if> | ||||
|                                                                 <if test="activitytype != null  and activitytype != ''">activitytype = #{activitytype},</if> | ||||
|                                                                 <if test="content != null  and content != ''">content = #{content},</if> | ||||
|                                                                 <if test="activitytime != null ">activitytime = #{activitytime},</if> | ||||
|                                                                 <if test="createuserid != null ">createuserid = #{createuserid},</if> | ||||
|                                                                 <if test="createTime != null ">create_time = #{createTime},</if> | ||||
|                                                                 <if test="updateuserid != null ">updateuserid = #{updateuserid},</if> | ||||
|                                                                 <if test="updateTime != null ">update_time = #{updateTime},</if> | ||||
|                                     </trim> | ||||
|         where id = #{id} | ||||
|     </update> | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user