| | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysOrganization; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.common.utils.StringUtils; |
| | | import com.kidgrow.redis.util.RedisConstant; |
| | | import com.kidgrow.redis.util.RedisUtils; |
| | | import com.kidgrow.usercenter.mapper.SysOrganizationMapper; |
| | |
| | | @Override |
| | | public int deleteByUserId(Long userId) { |
| | | Map<String, Object> params = new HashMap<>(); |
| | | params.put("userId", userId); |
| | | params.put("user_id", userId); |
| | | return sysUserOrgMapper.deleteByMap(params); |
| | | } |
| | | |
| | |
| | | SysOrganization sysOrganizationLast = list.get(list.size() - 1); |
| | | if (sysOrganizationLast.getOrgLevel() >= 2) { |
| | | String orgCodeLast = sysOrganizationLast.getOrgCode(); |
| | | //取前部分 |
| | | String orgCodeLastQianZhui = orgCodeLast.substring(0, orgCodeLast.length() - 3); |
| | | //取后部分 |
| | | Integer codenum = Integer.valueOf(orgCodeLast.substring(orgCodeLast.length() - 3)); |
| | | String str = "00"; |
| | | str += (codenum + 1); |
| | | String substring = str.substring(str.length() - 3); |
| | | return orgCodeLastQianZhui + substring; |
| | | if (StringUtils.isNotBlank(orgCodeLast)) { |
| | | //取前部分 |
| | | String orgCodeLastQianZhui = orgCodeLast.substring(0, orgCodeLast.length() - 3); |
| | | //取后部分 |
| | | Integer codenum = Integer.valueOf(orgCodeLast.substring(orgCodeLast.length() - 3)); |
| | | String str = "00"; |
| | | str += (codenum + 1); |
| | | String substring = str.substring(str.length() - 3); |
| | | return orgCodeLastQianZhui + substring; |
| | | } |
| | | } else { |
| | | String orgCodeLast = sysOrganizationLast.getOrgCode(); |
| | | if (StringUtils.isNotBlank(orgCodeLast)) { |
| | | //取前部分 |
| | | String orgCodeLastQianZhui = orgCodeLast.substring(0, orgCodeLast.length() - 7); |
| | | //取后部分 |
| | |
| | | str += (codenum + 1); |
| | | String substring = str.substring(str.length() - 7); |
| | | return orgCodeLastQianZhui + substring; |
| | | } |
| | | } |
| | | } else { |
| | | String fucode = sysOrg.getOrgCode(); |