Commit 019d4b2b by zhiwj

删除关联关系

parent 2fb75a1c
...@@ -126,4 +126,14 @@ public interface TabAuditedGroupUserRelMapper { ...@@ -126,4 +126,14 @@ public interface TabAuditedGroupUserRelMapper {
* @throws * @throws
*/ */
List<Integer> listAuditedGroupByUserId(@Param("enterpriseId") Integer enterpriseId, @Param("userId") Integer userId); List<Integer> listAuditedGroupByUserId(@Param("enterpriseId") Integer enterpriseId, @Param("userId") Integer userId);
/**
* @Title: deleteByUserId
* @Description:
* @author zhiwj
* @param userId
* @return void
* @throws
*/
void deleteByUserId(@Param("userId") Integer userId);
} }
\ No newline at end of file
...@@ -79,4 +79,14 @@ public interface AuditedGroupUserRelService { ...@@ -79,4 +79,14 @@ public interface AuditedGroupUserRelService {
* @throws * @throws
*/ */
List<Integer> listAuditedGroupByUserId(Integer enterpriseId, Integer userId); List<Integer> listAuditedGroupByUserId(Integer enterpriseId, Integer userId);
/**
* @Title: deleteByUserId
* @Description:
* @author zhiwj
* @param userId
* @return void
* @throws
*/
void deleteByUserId(Integer userId);
} }
...@@ -6,7 +6,6 @@ import com.gic.auth.dto.AuditedGroupDTO; ...@@ -6,7 +6,6 @@ import com.gic.auth.dto.AuditedGroupDTO;
import com.gic.auth.dto.AuditedGroupUserRelDTO; import com.gic.auth.dto.AuditedGroupUserRelDTO;
import com.gic.auth.entity.TabAuditedGroupUserRel; import com.gic.auth.entity.TabAuditedGroupUserRel;
import com.gic.auth.service.AuditedGroupUserRelService; import com.gic.auth.service.AuditedGroupUserRelService;
import com.gic.commons.util.GlobalInfo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -79,4 +78,9 @@ public class AuditedGroupUserRelServiceImpl implements AuditedGroupUserRelServic ...@@ -79,4 +78,9 @@ public class AuditedGroupUserRelServiceImpl implements AuditedGroupUserRelServic
public List<Integer> listAuditedGroupByUserId(Integer enterpriseId, Integer userId) { public List<Integer> listAuditedGroupByUserId(Integer enterpriseId, Integer userId) {
return tabAuditedGroupUserRelMapper.listAuditedGroupByUserId(enterpriseId, userId); return tabAuditedGroupUserRelMapper.listAuditedGroupByUserId(enterpriseId, userId);
} }
@Override
public void deleteByUserId(Integer userId) {
tabAuditedGroupUserRelMapper.deleteByUserId(userId);
}
} }
...@@ -357,6 +357,8 @@ public class UserApiServiceImpl implements UserApiService { ...@@ -357,6 +357,8 @@ public class UserApiServiceImpl implements UserApiService {
userResourceService.deleteByUserId(userId); userResourceService.deleteByUserId(userId);
//删除账号分组关联 //删除账号分组关联
accountGroupRelService.deleteByUserId(userId, AccountGroupMemberTypeEnum.ADMIN.getCode()); accountGroupRelService.deleteByUserId(userId, AccountGroupMemberTypeEnum.ADMIN.getCode());
//
auditedGroupUserRelService.deleteByUserId(userId);
userService.delete(userId); userService.delete(userId);
return ServiceResponse.success(tabUser.getUserName()); return ServiceResponse.success(tabUser.getUserName());
} }
......
...@@ -197,4 +197,7 @@ ...@@ -197,4 +197,7 @@
and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS} and delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@NORMAL_STATUS}
</where> </where>
</select> </select>
<update id="deleteByUserId">
update tab_audited_group_user_rel set delete_flag = ${@com.gic.auth.constant.DeleteFlagConstants@DELETE_STATUS} where user_id = #{userId};
</update>
</mapper> </mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment