dept
This commit is contained in:
parent
f8d3762aca
commit
2f1714b4da
|
|
@ -308,7 +308,6 @@ public class SysDeptServiceImpl implements ISysDeptService
|
|||
@Transactional(rollbackFor = Exception.class)
|
||||
public int insertDept(SysDept dept)
|
||||
{
|
||||
dept.setDeptId(Id.next());
|
||||
//增加根公司的处理
|
||||
if (dept.getParentId() == null){
|
||||
dept.setParentId(0L);
|
||||
|
|
|
|||
|
|
@ -188,7 +188,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertDept" parameterType="com.bonus.system.api.domain.SysDept">
|
||||
<insert id="insertDept" parameterType="com.bonus.system.api.domain.SysDept" useGeneratedKeys="true" keyProperty="deptId">
|
||||
insert into sys_dept(
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
<if test="parentId != null and parentId != 0">parent_id,</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue