Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dm_project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姚本章
dm_project
Commits
c93dbcd9
Commit
c93dbcd9
authored
Jan 20, 2021
by
zhangc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commit
parent
2475bce1
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
33 deletions
+11
-33
OrganizationManageImpl.java
...n/java/com/jz/dm/service/impl/OrganizationManageImpl.java
+11
-11
ProducerServiceImpl.java
...main/java/com/jz/dm/service/impl/ProducerServiceImpl.java
+0
-22
No files found.
jz-dm-apigateway/src/main/java/com/jz/dm/service/impl/OrganizationManageImpl.java
View file @
c93dbcd9
...
@@ -86,17 +86,6 @@ public class OrganizationManageImpl implements OrganizationManageService {
...
@@ -86,17 +86,6 @@ public class OrganizationManageImpl implements OrganizationManageService {
*/
*/
@Override
@Override
public
Result
add
(
OrganizationManageAddReq
req
)
{
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
=
""
;
String
coding
=
""
;
ApiOrg
apiOrg
=
new
ApiOrg
();
ApiOrg
apiOrg
=
new
ApiOrg
();
BeanUtils
.
copyProperties
(
req
,
apiOrg
);
BeanUtils
.
copyProperties
(
req
,
apiOrg
);
...
@@ -110,6 +99,17 @@ public class OrganizationManageImpl implements OrganizationManageService {
...
@@ -110,6 +99,17 @@ public class OrganizationManageImpl implements OrganizationManageService {
return
Result
.
of_success
(
ResultMsg
.
UPDATE_SUCCESS
);
return
Result
.
of_success
(
ResultMsg
.
UPDATE_SUCCESS
);
}
}
}
else
{
//添加
}
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
())
//内部组织
if
(
StringUtils
.
isNotBlank
(
req
.
getOrgType
())
//内部组织
&&
Constants
.
AUTH_INT
.
equals
(
req
.
getOrgType
()))
{
&&
Constants
.
AUTH_INT
.
equals
(
req
.
getOrgType
()))
{
coding
=
generateCode
(
req
.
getOrgName
(),
Constants
.
AUTH_INT
);
coding
=
generateCode
(
req
.
getOrgName
(),
Constants
.
AUTH_INT
);
...
...
jz-dm-apigateway/src/main/java/com/jz/dm/service/impl/ProducerServiceImpl.java
View file @
c93dbcd9
...
@@ -3,8 +3,6 @@ package com.jz.dm.service.impl;
...
@@ -3,8 +3,6 @@ package com.jz.dm.service.impl;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
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.ResultCode
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.constant.ResultMsg
;
import
com.jz.common.exception.ResponseException
;
import
com.jz.common.exception.ResponseException
;
...
@@ -668,26 +666,6 @@ public class ProducerServiceImpl implements ProducerService {
...
@@ -668,26 +666,6 @@ public class ProducerServiceImpl implements ProducerService {
return
random
;
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
@Override
public
Result
saveObjOnRedis
()
{
public
Result
saveObjOnRedis
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment