Commit c93dbcd9 authored by zhangc's avatar zhangc

commit

parent 2475bce1
......@@ -86,17 +86,6 @@ public class OrganizationManageImpl implements OrganizationManageService {
*/
@Override
public Result add(OrganizationManageAddReq req) {
if (StringUtils.isNotBlank(req.getOrgName())) {
ApiOrg orgNameInfo = getOrgNameInfo(req.getOrgName());
if (null != orgNameInfo) {
return Result.of_error("组织名称已存在!");
}
}
if (StringUtils.isNotBlank(req.getOrgType())) {
if (null == fromOrgTypeEnumName(req.getOrgType())){
return Result.of_error("组织类型不存在!");
}
}
String coding = "";
ApiOrg apiOrg = new ApiOrg();
BeanUtils.copyProperties(req, apiOrg);
......@@ -110,6 +99,17 @@ public class OrganizationManageImpl implements OrganizationManageService {
return Result.of_success(ResultMsg.UPDATE_SUCCESS);
}
}else {//添加
if (StringUtils.isNotBlank(req.getOrgName())) {
ApiOrg orgNameInfo = getOrgNameInfo(req.getOrgName());
if (null != orgNameInfo) {
return Result.of_error("组织名称已存在!");
}
}
if (StringUtils.isNotBlank(req.getOrgType())) {
if (null == fromOrgTypeEnumName(req.getOrgType())){
return Result.of_error("组织类型不存在!");
}
}
if (StringUtils.isNotBlank(req.getOrgType()) //内部组织
&& Constants.AUTH_INT.equals(req.getOrgType())) {
coding = generateCode(req.getOrgName(), Constants.AUTH_INT);
......
......@@ -3,8 +3,6 @@ package com.jz.dm.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jz.common.bean.SysUserDto;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultCode;
import com.jz.common.constant.ResultMsg;
import com.jz.common.exception.ResponseException;
......@@ -668,26 +666,6 @@ public class ProducerServiceImpl implements ProducerService {
return random;
}
/**
* 获取当前登录用户
*
* @param userType
* @return
*/
protected SysUserDto getLoginUser(String userType) {
SysUserDto currentUser = null;
switch (userType) {
case "004": //平台用户004
currentUser = (SysUserDto) redisUtils.getObj("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_SYS);
break;
case "003": //商城用户 003
currentUser = (SysUserDto) redisUtils.getObj("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
break;
default:
return null;
}
return currentUser;
}
@Override
public Result saveObjOnRedis() {
......
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