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
7cab4dad
Commit
7cab4dad
authored
Aug 03, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
业务逻辑错误提示信息调整
parent
80c1521c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
AppletCustomPageApiServiceImpl.java
...se/service/outer/impl/AppletCustomPageApiServiceImpl.java
+10
-7
No files found.
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AppletCustomPageApiServiceImpl.java
View file @
7cab4dad
...
@@ -403,7 +403,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -403,7 +403,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(!
AppletPageTypeEnum
.
needCrowdWidget
(
record
.
getPageType
()))
{
if
(!
AppletPageTypeEnum
.
needCrowdWidget
(
record
.
getPageType
()))
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面种类错误,该页面没有序号"
);
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面种类错误,该页面没有序号"
);
}
}
validDefaultPage
(
record
.
getEnterpriseId
());
validDefaultPage
(
record
.
getEnterpriseId
()
,
null
);
boolean
serialNumberLimit
=
serialNumber
>
999
;
boolean
serialNumberLimit
=
serialNumber
>
999
;
if
(
serialNumberLimit
)
{
if
(
serialNumberLimit
)
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"序号不能超过999"
);
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"序号不能超过999"
);
...
@@ -443,7 +443,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -443,7 +443,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是发布状态"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是发布状态"
);
}
}
validDefaultPage
(
record
.
getEnterpriseId
());
validDefaultPage
(
record
.
getEnterpriseId
()
,
"默认数据不能操作状态"
);
if
(
AppletPageTypeEnum
.
isOnlyOneCode
(
record
.
getPageType
()))
{
if
(
AppletPageTypeEnum
.
isOnlyOneCode
(
record
.
getPageType
()))
{
//把其他的数据状态改为关闭
//把其他的数据状态改为关闭
appletCustomPageService
.
disableFetch
(
record
.
getEnterpriseId
(),
record
.
getAppType
(),
record
.
getAppId
(),
appletCustomPageService
.
disableFetch
(
record
.
getEnterpriseId
(),
record
.
getAppType
(),
record
.
getAppId
(),
...
@@ -459,7 +459,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -459,7 +459,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
if
(
record
.
getStatus
().
intValue
()
!=
1
)
{
if
(
record
.
getStatus
().
intValue
()
!=
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是关闭状态"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"已是关闭状态"
);
}
}
validDefaultPage
(
record
.
getEnterpriseId
());
validDefaultPage
(
record
.
getEnterpriseId
()
,
"默认数据不能关闭"
);
//没有必须要有开启记录的数据,不作处理
//没有必须要有开启记录的数据,不作处理
appletCustomPageService
.
updateStatus
(
pageId
,
2
);
appletCustomPageService
.
updateStatus
(
pageId
,
2
);
return
ServiceResponse
.
success
(
record
.
getTitle
());
return
ServiceResponse
.
success
(
record
.
getTitle
());
...
@@ -468,7 +468,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -468,7 +468,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
@Override
@Override
public
ServiceResponse
<
String
>
delete
(
Integer
pageId
)
{
public
ServiceResponse
<
String
>
delete
(
Integer
pageId
)
{
TabAppletCustomPage
record
=
exist
(
pageId
);
TabAppletCustomPage
record
=
exist
(
pageId
);
validDefaultPage
(
record
.
getEnterpriseId
());
validDefaultPage
(
record
.
getEnterpriseId
()
,
"默认数据不能删除"
);
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
}
}
...
@@ -489,7 +489,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -489,7 +489,7 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面id错误,数据格式非法"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"页面id错误,数据格式非法"
);
}
}
TabAppletCustomPage
record
=
exist
(
Integer
.
parseInt
(
pageId
));
TabAppletCustomPage
record
=
exist
(
Integer
.
parseInt
(
pageId
));
validDefaultPage
(
record
.
getEnterpriseId
());
validDefaultPage
(
record
.
getEnterpriseId
()
,
"默认数据不能删除"
);
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
if
(
record
.
getStatus
().
intValue
()
==
1
)
{
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
return
ServiceResponse
.
failure
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"发布状态不能删除"
);
}
}
...
@@ -611,9 +611,12 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
...
@@ -611,9 +611,12 @@ public class AppletCustomPageApiServiceImpl implements AppletCustomPageApiServic
return
record
;
return
record
;
}
}
public
void
validDefaultPage
(
Integer
enterpriseId
)
{
public
void
validDefaultPage
(
Integer
enterpriseId
,
String
errorMessage
)
{
if
(
StringUtils
.
isBlank
(
errorMessage
))
{
errorMessage
=
"默认数据不能操作"
;
}
if
(
enterpriseId
==
-
1
)
{
if
(
enterpriseId
==
-
1
)
{
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
"默认数据不能操作"
);
throw
new
CommonException
(
ErrorCode
.
PARAMETER_ERROR
.
getCode
(),
errorMessage
);
}
}
}
}
...
...
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