Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
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
base_platform_enterprise
gic-platform-enterprise
Commits
19afa8ac
Commit
19afa8ac
authored
Feb 09, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除策略接口
parent
930b6bdb
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
108 additions
and
28 deletions
+108
-28
ExceptionResultAop.java
...in/java/com/gic/enterprise/config/ExceptionResultAop.java
+63
-0
ParamAop.java
...ice/src/main/java/com/gic/enterprise/config/ParamAop.java
+2
-21
TabSysUnionEnterpriseAuthAppMapper.java
...rprise/dao/mapper/TabSysUnionEnterpriseAuthAppMapper.java
+2
-1
TabSysUnionEnterpriseAuthMapper.java
...nterprise/dao/mapper/TabSysUnionEnterpriseAuthMapper.java
+8
-0
UnionEnterpriseAuthAppService.java
...gic/enterprise/service/UnionEnterpriseAuthAppService.java
+1
-1
UnionEnterpriseAuthService.java
...om/gic/enterprise/service/UnionEnterpriseAuthService.java
+7
-0
UnionEnterpriseAuthAppServiceImpl.java
...prise/service/impl/UnionEnterpriseAuthAppServiceImpl.java
+1
-1
UnionEnterpriseAuthServiceImpl.java
...terprise/service/impl/UnionEnterpriseAuthServiceImpl.java
+5
-0
UnionEnterpriseAuthApiServiceImpl.java
...e/outer/impl/union/UnionEnterpriseAuthApiServiceImpl.java
+6
-2
TabSysUnionEnterpriseAuthAppMapper.xml
...n/resources/mapper/TabSysUnionEnterpriseAuthAppMapper.xml
+2
-2
TabSysUnionEnterpriseAuthMapper.xml
...main/resources/mapper/TabSysUnionEnterpriseAuthMapper.xml
+11
-0
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/config/ExceptionResultAop.java
0 → 100644
View file @
19afa8ac
package
com
.
gic
.
enterprise
.
config
;
import
javax.validation.ConstraintViolationException
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.aspectj.lang.ProceedingJoinPoint
;
import
org.aspectj.lang.Signature
;
import
org.aspectj.lang.annotation.Around
;
import
org.aspectj.lang.annotation.Aspect
;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.context.annotation.Configuration
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.CommonException
;
/**
* api层错误全部统一返回
* @ClassName:
* @Description:
* @author guojuxing
* @date 2021/2/9 9:46 AM
*/
@Aspect
@Configuration
public
class
ExceptionResultAop
{
private
Logger
logger
=
LogManager
.
getLogger
(
ExceptionResultAop
.
class
);
/**
* 环绕通知
*
* @param joinPoint
* @return
* @throws Throwable
*/
@Around
(
value
=
"execution(* com.gic.*.service.outer.impl.*(..))"
)
public
Object
around
(
ProceedingJoinPoint
joinPoint
)
throws
Throwable
{
try
{
// 执行当前方法
return
joinPoint
.
proceed
();
}
catch
(
Throwable
throwable
)
{
logger
.
warn
(
"拦截器错误"
,
throwable
);
return
handlerException
(
throwable
);
}
}
private
ServiceResponse
handlerException
(
Throwable
e
)
{
ServiceResponse
response
=
new
ServiceResponse
();
if
(
e
instanceof
CommonException
)
{
response
.
setCode
(((
CommonException
)
e
).
getErrorCode
());
}
else
if
(
e
instanceof
ConstraintViolationException
)
{
response
.
setCode
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
());
}
else
{
response
.
setCode
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
());
}
response
.
setMessage
(
e
.
getMessage
());
return
response
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/config/ParamAop.java
View file @
19afa8ac
package
com
.
gic
.
enterprise
.
config
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.exception.CommonException
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.aspectj.lang.ProceedingJoinPoint
;
...
...
@@ -12,11 +9,9 @@ import org.aspectj.lang.annotation.Aspect;
import
org.aspectj.lang.reflect.MethodSignature
;
import
org.springframework.context.annotation.Configuration
;
import
javax.validation.ConstraintViolationException
;
/**
* 采集GIC系统操作日志
*
*
* @author leeon
* @date 2019年6月28日
*/
...
...
@@ -45,22 +40,8 @@ public class ParamAop {
return
joinPoint
.
proceed
();
}
catch
(
Throwable
throwable
)
{
logger
.
warn
(
"拦截器错误"
,
throwable
);
return
handlerException
(
throwable
);
}
}
private
ServiceResponse
handlerException
(
Throwable
e
)
{
ServiceResponse
response
=
new
ServiceResponse
();
if
(
e
instanceof
CommonException
)
{
response
.
setCode
(((
CommonException
)
e
).
getErrorCode
());
}
else
if
(
e
instanceof
ConstraintViolationException
)
{
response
.
setCode
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
());
}
else
{
response
.
setCode
(
ErrorCode
.
SYSTEM_ERROR
.
getCode
());
throw
throwable
;
}
response
.
setMessage
(
e
.
getMessage
());
return
response
;
}
/**
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabSysUnionEnterpriseAuthAppMapper.java
View file @
19afa8ac
...
...
@@ -78,5 +78,5 @@ public interface TabSysUnionEnterpriseAuthAppMapper {
* @param unionEnterpriseAuthId
* @return
*/
int
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@Param
(
"unionEnterpriseAuthId"
)
Integer
unionEnterpriseAuthId
);
Integer
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@Param
(
"unionEnterpriseAuthId"
)
Integer
unionEnterpriseAuthId
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabSysUnionEnterpriseAuthMapper.java
View file @
19afa8ac
...
...
@@ -93,4 +93,11 @@ public interface TabSysUnionEnterpriseAuthMapper {
* @return
*/
List
<
TabSysUnionEnterpriseAuth
>
listAll
();
/**
* 查询
* @param ownEnterpriseId
* @return
*/
List
<
TabSysUnionEnterpriseAuth
>
listUnionEnterprise
(
@Param
(
"ownEnterpriseId"
)
Integer
ownEnterpriseId
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/UnionEnterpriseAuthAppService.java
View file @
19afa8ac
...
...
@@ -64,5 +64,5 @@ public interface UnionEnterpriseAuthAppService {
* @param unionEnterpriseAuthId
* @return
*/
int
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
);
Integer
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/UnionEnterpriseAuthService.java
View file @
19afa8ac
...
...
@@ -62,4 +62,11 @@ public interface UnionEnterpriseAuthService {
* @return
*/
List
<
TabSysUnionEnterpriseAuth
>
listAll
();
/**
* 查询
* @param ownEnterpriseId
* @return
*/
List
<
TabSysUnionEnterpriseAuth
>
listUnionEnterpriseAuth
(
@NotNull
Integer
ownEnterpriseId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/UnionEnterpriseAuthAppServiceImpl.java
View file @
19afa8ac
...
...
@@ -69,7 +69,7 @@ public class UnionEnterpriseAuthAppServiceImpl implements UnionEnterpriseAuthApp
}
@Override
public
int
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
)
{
public
Integer
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
)
{
return
tabSysUnionEnterpriseAuthAppMapper
.
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
unionEnterpriseAuthId
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/UnionEnterpriseAuthServiceImpl.java
View file @
19afa8ac
...
...
@@ -67,4 +67,9 @@ public class UnionEnterpriseAuthServiceImpl implements UnionEnterpriseAuthServic
return
tabSysUnionEnterpriseAuthMapper
.
listAll
();
}
@Override
public
List
<
TabSysUnionEnterpriseAuth
>
listUnionEnterpriseAuth
(
@NotNull
Integer
ownEnterpriseId
)
{
return
tabSysUnionEnterpriseAuthMapper
.
listUnionEnterprise
(
ownEnterpriseId
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/union/UnionEnterpriseAuthApiServiceImpl.java
View file @
19afa8ac
...
...
@@ -212,7 +212,11 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
@Override
public
ServiceResponse
<
List
<
UnionEnterpriseAuthDTO
>>
listUnionEnterpriseAuth
(
@NotNull
Integer
ownEnterpriseId
)
{
return
ServiceResponse
.
success
();
List
<
TabSysUnionEnterpriseAuth
>
list
=
unionEnterpriseAuthService
.
listUnionEnterpriseAuth
(
ownEnterpriseId
);
if
(
list
==
null
)
{
return
ServiceResponse
.
success
(
Collections
.
emptyList
());
}
return
ServiceResponse
.
success
(
EntityUtil
.
changeEntityListNew
(
UnionEnterpriseAuthDTO
.
class
,
list
));
}
@Override
...
...
@@ -282,7 +286,7 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
@Override
public
ServiceResponse
<
String
>
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
@NotNull
Integer
unionEnterpriseAuthId
)
{
int
num
=
unionEnterpriseAuthAppService
.
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
unionEnterpriseAuthId
);
unionEnterpriseAuthAppService
.
deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId
(
unionEnterpriseAuthId
);
return
ServiceResponse
.
success
();
}
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabSysUnionEnterpriseAuthAppMapper.xml
View file @
19afa8ac
...
...
@@ -144,7 +144,7 @@
and union_enterprise_auth_id = #{unionEnterpriseAuthId}
</select>
<select
id=
"countRepeatStrategyName"
resultType=
"
Integer
"
>
<select
id=
"countRepeatStrategyName"
resultType=
"
int
"
>
select count(1) from tab_sys_union_enterprise_auth_app
where delete_flag = 0
and union_enterprise_auth_id = #{unionEnterpriseAuthId}
...
...
@@ -154,7 +154,7 @@
and strategy_name = #{strategyName}
</select>
<select
id=
"deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId"
resultType=
"
I
nteger"
>
<select
id=
"deleteUnionEnterpriseAuthAppByUnionEnterpriseAuthId"
resultType=
"
i
nteger"
>
update tab_sys_union_enterprise_auth_app set delete_flag = 1
where delete_flag = 0
and union_enterprise_auth_id = #{unionEnterpriseAuthId}
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabSysUnionEnterpriseAuthMapper.xml
View file @
19afa8ac
...
...
@@ -309,4 +309,14 @@
and status_flag = 4
</select>
<select
id=
"listUnionEnterprise"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
></include>
from tab_sys_union_enterprise_auth
where delete_flag = 0
and status_flag != 3
and own_enterprise_id = #{ownEnterpriseId}
</select>
</mapper>
\ No newline at end of file
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