@@ -239,7 +239,7 @@
select c.PERMISSION_TYPE ,c.id roleId,c.ROLE_STATE roleState
from uims_user a join uims_user_role b on a.id=b.USER_ID
join uims_role c on b.ROLE_ID= c.ID
- where a.STATUS !=-1 and b.status!=-1 and c.status!=-1
+ where a.STATUS !=0 and b.status!=0 and c.status!=0
and a.id=#{id}
</select>
<select id="findOrgRole" resultType="com.huaxu.model.ProgramItem">
@@ -261,7 +261,7 @@
</if>
and TENANT_ID=#{tenantId}
- and status!=-1
+ and status!=0
</where>
@@ -73,7 +73,7 @@ public class OrgServiceImpl implements OrgService {
org.setTenantId(currentUser.getTenantId());
org.setCreateBy(currentUser.getUsername());
org.setDateCreate(new Date());
- org.setStatus(0);
+ org.setStatus(1);
if(org.getParentOrgId()==null){
org.setParentOrgId(0);
}
@@ -136,7 +136,7 @@ public class OrgServiceImpl implements OrgService {
org.setId(id);
Org orgUser = orgMapper.findOrgUser(org);
if(orgUser==null){
- org.setStatus(-1);
+ org.setStatus(0);
orgMapper.update(org);
}else {
fail.add(orgUser.getOrgName());
@@ -88,7 +88,7 @@ public class RoleServiceImpl implements RoleService {
role.setTenantId(currentUser.getTenantId());
role.setCreateBy(currentUser.getUsername());
role.setDateCreate(new Date());
- role.setStatus(0);
+ role.setStatus(1);
int insert = this.roleMapper.insert(role);
roleRequestDto.getRole().setId(role.getId());
configDataPermission(roleRequestDto);
@@ -169,7 +169,7 @@ public class RoleServiceImpl implements RoleService {
role.setId(id);
Role roleUser = roleMapper.findRoleUser(role);
if (roleUser==null){
- role.setStatus(-1);
+ role.setStatus(0);
roleMapper.update(role);
fail.add(roleUser.getRoleName());
@@ -76,7 +76,7 @@ public class UserGroupServiceImpl implements UserGroupService {
userGroup.setTenantId(currentUser.getTenantId());
userGroup.setCreateBy(currentUser.getUsername());
userGroup.setDateCreate(new Date());
- userGroup.setStatus(0);
+ userGroup.setStatus(1);
return this.userGroupMapper.insert(userGroup);
@@ -123,7 +123,7 @@ public class UserGroupServiceImpl implements UserGroupService {
ids.forEach(id->{
UserGroup userGroup=new UserGroup();
userGroup.setId(id);
- userGroup.setStatus(-1);
+ userGroup.setStatus(0);
userGroupMapper.update(userGroup);
@@ -179,9 +179,9 @@ public class UserGroupServiceImpl implements UserGroupService {
UserRoleEntity userRoleEntity=new UserRoleEntity();
userRoleEntity.setRoleId(userGroupDto.getRoleId());
userRoleEntity.setUserId(id);
- userRoleEntity.setStatus(0);
+ userRoleEntity.setStatus(1);
groupUsers.add(user);
- user.setStatus(0);
+ user.setStatus(1);
userRoleEntities.add(userRoleEntity);
});
userGroupMapper.deleteUserRoles(userGroupDto);
@@ -199,7 +199,7 @@
<include refid="Base_Column_List"/>
from uims_org
<where>
- status!=-1
+ status!=0
<if test="org.id != null">
and ID = #{org.id}
@@ -256,14 +256,14 @@
<select id="findOrgUser" resultType="com.huaxu.entity.Org">
select a.ID,a.ORG_NAME orgName from uims_org a join uims_user b on
(a.ID=b.DEPT_ORG_ID or a.ID=b.COMPANY_ORG_ID)
- where a.id=#{id} and b.status!=-1
+ where a.id=#{id} and b.status!=0
limit 1
<select id="selectTrees" resultType="com.huaxu.dto.OrgTree">
select ID, TENANT_ID, ORG_TYPE, PARENT_ORG_ID, ORG_AREA_ID, ORG_NAME, ORG_STATE, REMARK, ORG_LEADER_NAME, ORG_LEADER_PHONE, ORG_LEADER_EMAIL, ORG_LEADER_SEX, STATUS, DATE_CREATE, CREATE_BY, DATE_UPDATE, UPDATE_BY
<if test="tenantId!=null ">
@@ -51,7 +51,7 @@
from uims_role
<if test="id != null">
and ID = #{id}
@@ -168,12 +168,12 @@
from uims_role a left join
(select count(*) users ,ROLE_ID from uims_user_role b
group by b.ROLE_ID ) b
ON a.id=b.ROLE_ID
<if test="role.id != null">
and ID = #{role.id}
@@ -214,7 +214,7 @@
<select id="findRoleUser" resultType="com.huaxu.entity.Role">
select a.id,b.ROLE_NAME from uims_user_role a join uims_role b on a.ROLE_ID=b.ID
- where a.ROLE_ID=#{id} and a.status!=-1 limit 1
+ where a.ROLE_ID=#{id} and a.status!=0 limit 1
<sql id="sysAreaJoins">
left join uims_org com ON com.id = a.company_org_id
@@ -246,12 +246,12 @@
select <include refid="userColumns"/>
from uims_user_role b join uims_user a on b.USER_ID=a.ID
<include refid="sysAreaJoins"/>
- where b.ROLE_ID=#{id} and b.status!=-1
+ where b.ROLE_ID=#{id} and b.status!=0
<update id="deleteRoleUser">
- update uims_user_role set status=-1 where ROLE_ID=#{id}
+ update uims_user_role set status=0 where ROLE_ID=#{id}
</update>
<update id="deleteRoleMenu">
- update uims_role_menu set status=-1 where ROLE_ID=#{id}
+ update uims_role_menu set status=0 where ROLE_ID=#{id}
</mapper>
@@ -39,7 +39,7 @@
from uims_role_org
- and status != -1
+ and status != 0
@@ -153,7 +153,7 @@
<update id="deleteOrgRole">
- update uims_role_org set STATUS=-1 where
+ update uims_role_org set STATUS=0 where
ROLE_ID=#{id}
@@ -149,7 +149,7 @@
from uims_user_group
- STATUS!=-1
+ STATUS!=0
<if test="userGroup.id != null">
and ID = #{userGroup.id}
@@ -187,7 +187,7 @@
<select id="findHasUserGroupUsers" resultType="com.huaxu.entity.UserGroup">
select a.id,b.GROUP_NAME groupName from uims_group_user a join uims_user_group b on a.GROUP_ID=b.ID
- where a.GROUP_ID=#{id} and a.status!=-1 limit 1
+ where a.GROUP_ID=#{id} and a.status!=0 limit 1
<sql id="userColumns">
a.id as "id" ,
@@ -219,11 +219,11 @@
select <include refid="userColumns"/>,b.id userGroupId
from uims_user a left join uims_group_user b on a.id=b.USER_ID
- where a.status!=-1
- <if test="id != -1 ">
- and b.GROUP_ID=#{id} and b.status!=-1 and userrole.status!=-1
+ where a.status!=0
+ <if test="id != 0 ">
+ and b.GROUP_ID=#{id} and b.status!=0 and userrole.status!=0
- <if test="id == -1 ">
+ <if test="id == 0 ">
and b.GROUP_ID is null
<if test="tenantId != null and tenantId != ''">
@@ -231,10 +231,10 @@
<update id="deleteUserGroupRelations">
- update uims_group_user set STATUS=-1 where STATUS !=-1 and GROUP_ID=#{id}
+ update uims_group_user set STATUS=0 where STATUS !=0 and GROUP_ID=#{id}
<update id="deleteUserRoles">
- update uims_user_role set STATUS=-1 where STATUS!=-1 and USER_ID in
+ update uims_user_role set STATUS=0 where STATUS!=0 and USER_ID in
<foreach collection="userGroupDto.userIds" item="id" index="index" open="(" close=")" separator=",">
#{id}
</foreach>