Pre Merge pull request !345 from 温宏建/sys_post_whj
commit
144fb01926
@ -0,0 +1,118 @@
|
|||||||
|
package com.ruoyi.system.controller;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.io.IOException;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.ruoyi.system.api.domain.SysDept;
|
||||||
|
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.common.log.annotation.Log;
|
||||||
|
import com.ruoyi.common.log.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.security.annotation.RequiresPermissions;
|
||||||
|
import com.ruoyi.system.domain.SysDuty;
|
||||||
|
import com.ruoyi.system.service.ISysDutyService;
|
||||||
|
import com.ruoyi.common.core.web.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.common.core.web.page.TableDataInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职称Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/duty")
|
||||||
|
public class SysDutyController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ISysDutyService sysDutyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询职称列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:duty:list")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(SysDuty sysDuty)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<SysDuty> list = sysDutyService.selectSysDutyList(sysDuty);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出职称列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:duty:export")
|
||||||
|
@Log(title = "职称", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, SysDuty sysDuty)
|
||||||
|
{
|
||||||
|
List<SysDuty> list = sysDutyService.selectSysDutyList(sysDuty);
|
||||||
|
ExcelUtil<SysDuty> util = new ExcelUtil<SysDuty>(SysDuty.class);
|
||||||
|
util.exportExcel(response, list, "职称数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取职称详细信息
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:duty:query")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||||
|
{
|
||||||
|
return success(sysDutyService.selectSysDutyById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增职称
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:duty:add")
|
||||||
|
@Log(title = "职称", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody SysDuty sysDuty)
|
||||||
|
{
|
||||||
|
return toAjax(sysDutyService.insertSysDuty(sysDuty));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改职称
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:duty:edit")
|
||||||
|
@Log(title = "职称", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody SysDuty sysDuty)
|
||||||
|
{
|
||||||
|
return toAjax(sysDutyService.updateSysDuty(sysDuty));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除职称
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:duty:remove")
|
||||||
|
@Log(title = "职称", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(sysDutyService.deleteSysDutyByIds(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取对应角色部门树列表
|
||||||
|
*/
|
||||||
|
@RequiresPermissions("system:duty:list")
|
||||||
|
@GetMapping(value = "/dutyTree")
|
||||||
|
public AjaxResult deptTree() {
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
ajax.put("dutys", sysDutyService.selectDutyTreeList());
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,61 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.system.domain.SysDuty;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职称Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
public interface SysDutyMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询职称
|
||||||
|
*
|
||||||
|
* @param id 职称主键
|
||||||
|
* @return 职称
|
||||||
|
*/
|
||||||
|
public SysDuty selectSysDutyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询职称列表
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 职称集合
|
||||||
|
*/
|
||||||
|
public List<SysDuty> selectSysDutyList(SysDuty sysDuty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增职称
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysDuty(SysDuty sysDuty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改职称
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysDuty(SysDuty sysDuty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除职称
|
||||||
|
*
|
||||||
|
* @param id 职称主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDutyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除职称
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDutyByIds(Long[] ids);
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.system.api.domain.SysDept;
|
||||||
|
import com.ruoyi.system.domain.SysDuty;
|
||||||
|
import com.ruoyi.system.domain.vo.TreeSelect;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职称Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
public interface ISysDutyService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询职称
|
||||||
|
*
|
||||||
|
* @param id 职称主键
|
||||||
|
* @return 职称
|
||||||
|
*/
|
||||||
|
public SysDuty selectSysDutyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询职称列表
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 职称集合
|
||||||
|
*/
|
||||||
|
public List<SysDuty> selectSysDutyList(SysDuty sysDuty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增职称
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertSysDuty(SysDuty sysDuty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改职称
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateSysDuty(SysDuty sysDuty);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除职称
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的职称主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDutyByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除职称信息
|
||||||
|
*
|
||||||
|
* @param id 职称主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteSysDutyById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询职称树结构信息
|
||||||
|
*
|
||||||
|
* @return 职称树信息集合
|
||||||
|
*/
|
||||||
|
public List<TreeSelect> selectDutyTreeList();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建前端所需要下拉树结构
|
||||||
|
*
|
||||||
|
* @param dutys 职称列表
|
||||||
|
* @return 下拉树结构列表
|
||||||
|
*/
|
||||||
|
public List<TreeSelect> buildDutyTreeSelect(List<SysDuty> dutys);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建前端所需要树结构
|
||||||
|
*
|
||||||
|
* @param dutys 职称列表
|
||||||
|
* @return 树结构列表
|
||||||
|
*/
|
||||||
|
public List<SysDuty> buildDutyTree(List<SysDuty> dutys);
|
||||||
|
}
|
@ -0,0 +1,194 @@
|
|||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.utils.SpringUtils;
|
||||||
|
import com.ruoyi.common.core.utils.StringUtils;
|
||||||
|
import com.ruoyi.system.domain.vo.TreeSelect;
|
||||||
|
import com.ruoyi.system.mapper.SysDutyMapper;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.system.domain.SysDuty;
|
||||||
|
import com.ruoyi.system.service.ISysDutyService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 职称Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2023-10-29
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class SysDutyServiceImpl implements ISysDutyService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private SysDutyMapper sysDutyMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询职称
|
||||||
|
*
|
||||||
|
* @param id 职称主键
|
||||||
|
* @return 职称
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public SysDuty selectSysDutyById(Long id)
|
||||||
|
{
|
||||||
|
return sysDutyMapper.selectSysDutyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询职称列表
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 职称
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysDuty> selectSysDutyList(SysDuty sysDuty)
|
||||||
|
{
|
||||||
|
return sysDutyMapper.selectSysDutyList(sysDuty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增职称
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertSysDuty(SysDuty sysDuty)
|
||||||
|
{
|
||||||
|
return sysDutyMapper.insertSysDuty(sysDuty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改职称
|
||||||
|
*
|
||||||
|
* @param sysDuty 职称
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateSysDuty(SysDuty sysDuty)
|
||||||
|
{
|
||||||
|
return sysDutyMapper.updateSysDuty(sysDuty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除职称
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的职称主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysDutyByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return sysDutyMapper.deleteSysDutyByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除职称信息
|
||||||
|
*
|
||||||
|
* @param id 职称主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteSysDutyById(Long id)
|
||||||
|
{
|
||||||
|
return sysDutyMapper.deleteSysDutyById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询职称树结构信息
|
||||||
|
*
|
||||||
|
* @return 职称树信息集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TreeSelect> selectDutyTreeList() {
|
||||||
|
List<SysDuty> dutys = selectSysDutyList(new SysDuty());
|
||||||
|
return buildDutyTreeSelect(dutys);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建前端所需要下拉树结构
|
||||||
|
*
|
||||||
|
* @param dutys 职称列表
|
||||||
|
* @return 下拉树结构列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<TreeSelect> buildDutyTreeSelect(List<SysDuty> dutys)
|
||||||
|
{
|
||||||
|
List<SysDuty> deptTrees = buildDutyTree(dutys);
|
||||||
|
return deptTrees.stream().map(TreeSelect::new).collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 构建前端所需要树结构
|
||||||
|
*
|
||||||
|
* @param dutys 职称列表
|
||||||
|
* @return 树结构列表
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<SysDuty> buildDutyTree(List<SysDuty> dutys)
|
||||||
|
{
|
||||||
|
List<SysDuty> returnList = new ArrayList<>();
|
||||||
|
List<Long> tempList = dutys.stream().map(SysDuty::getId).collect(Collectors.toList());
|
||||||
|
for (SysDuty duty : dutys)
|
||||||
|
{
|
||||||
|
// 如果是顶级节点, 遍历该父节点的所有子节点
|
||||||
|
if (!tempList.contains(duty.getParentId()))
|
||||||
|
{
|
||||||
|
recursionFn(dutys, duty);
|
||||||
|
returnList.add(duty);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (returnList.isEmpty())
|
||||||
|
{
|
||||||
|
returnList = dutys;
|
||||||
|
}
|
||||||
|
return returnList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归列表
|
||||||
|
*/
|
||||||
|
private void recursionFn(List<SysDuty> list, SysDuty t)
|
||||||
|
{
|
||||||
|
// 得到子节点列表
|
||||||
|
List<SysDuty> childList = getChildList(list, t);
|
||||||
|
t.setChildren(childList);
|
||||||
|
for (SysDuty tChild : childList)
|
||||||
|
{
|
||||||
|
if (hasChild(list, tChild))
|
||||||
|
{
|
||||||
|
recursionFn(list, tChild);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 得到子节点列表
|
||||||
|
*/
|
||||||
|
private List<SysDuty> getChildList(List<SysDuty> list, SysDuty t)
|
||||||
|
{
|
||||||
|
List<SysDuty> tlist = new ArrayList<>();
|
||||||
|
Iterator<SysDuty> it = list.iterator();
|
||||||
|
while (it.hasNext())
|
||||||
|
{
|
||||||
|
SysDuty n = it.next();
|
||||||
|
if (StringUtils.isNotNull(n.getParentId()) && n.getParentId().longValue() == t.getId().longValue())
|
||||||
|
{
|
||||||
|
tlist.add(n);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tlist;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断是否有子节点
|
||||||
|
*/
|
||||||
|
private boolean hasChild(List<SysDuty> list, SysDuty t)
|
||||||
|
{
|
||||||
|
return getChildList(list, t).size() > 0 ? true : false;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,99 @@
|
|||||||
|
<?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.system.mapper.SysDutyMapper">
|
||||||
|
|
||||||
|
<resultMap type="SysDuty" id="SysDutyResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="parentId" column="parent_id" />
|
||||||
|
<result property="ancestors" column="ancestors" />
|
||||||
|
<result property="code" column="code" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="level" column="level" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="createTime" column="create_time" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateTime" column="update_time" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectSysDutyVo">
|
||||||
|
select id, parent_id, ancestors, code, name, level, create_by, del_flag, create_time, update_by, update_time from sys_duty
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectSysDutyList" parameterType="SysDuty" resultMap="SysDutyResult">
|
||||||
|
<include refid="selectSysDutyVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||||
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="level != null "> and level = #{level}</if>
|
||||||
|
<if test="createTime != null "> and create_time = #{createTime}</if>
|
||||||
|
<if test="updateTime != null "> and update_time = #{updateTime}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectSysDutyById" parameterType="Long" resultMap="SysDutyResult">
|
||||||
|
<include refid="selectSysDutyVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertSysDuty" parameterType="SysDuty">
|
||||||
|
insert into sys_duty
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">id,</if>
|
||||||
|
<if test="parentId != null">parent_id,</if>
|
||||||
|
<if test="ancestors != null">ancestors,</if>
|
||||||
|
<if test="code != null">code,</if>
|
||||||
|
<if test="name != null">name,</if>
|
||||||
|
<if test="level != null">level,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
<if test="delFlag != null">del_flag,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="id != null">#{id},</if>
|
||||||
|
<if test="parentId != null">#{parentId},</if>
|
||||||
|
<if test="ancestors != null">#{ancestors},</if>
|
||||||
|
<if test="code != null">#{code},</if>
|
||||||
|
<if test="name != null">#{name},</if>
|
||||||
|
<if test="level != null">#{level},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
<if test="delFlag != null">#{delFlag},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateSysDuty" parameterType="SysDuty">
|
||||||
|
update sys_duty
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="parentId != null">parent_id = #{parentId},</if>
|
||||||
|
<if test="ancestors != null">ancestors = #{ancestors},</if>
|
||||||
|
<if test="code != null">code = #{code},</if>
|
||||||
|
<if test="name != null">name = #{name},</if>
|
||||||
|
<if test="level != null">level = #{level},</if>
|
||||||
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
|
<if test="delFlag != null">del_flag = #{delFlag},</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>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteSysDutyById" parameterType="Long">
|
||||||
|
update sys_duty set del_flag = '2' where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteSysDutyByIds" parameterType="String">
|
||||||
|
update sys_duty set del_flag = '2' where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
Loading…
Reference in new issue