Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
map-parent
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
常超
map-parent
Commits
826a5368
Commit
826a5368
authored
Dec 09, 2022
by
宋珺琪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api返回结果失败处理
parent
22ba8197
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
2 deletions
+33
-2
common/service_base/src/main/java/com/founder/servicebase/controller/SkServiceController.java
+1
-1
common/service_base/src/main/java/com/founder/servicebase/meassage/WebSocketServer.java
+15
-0
service/publicapi/src/main/java/com/founder/publicapi/controller/ApprovalService/OrderController.java
+8
-0
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkServiceSqController.java
+1
-1
service/publicapi/src/main/java/com/founder/publicapi/service/serviceimpl/UserServiceImpl.java
+8
-0
No files found.
common/service_base/src/main/java/com/founder/servicebase/controller/SkServiceController.java
View file @
826a5368
...
...
@@ -59,7 +59,7 @@ public class SkServiceController extends ApiController {
public
MapRestResult
save
(
SkService
skService
)
throws
IOException
{
skService
.
setXxzjbh
(
KeyUtil
.
getUUIDKey
(
"FW"
));
skService
.
setCjsj
(
new
Date
());
skService
.
setServicetypename
(
skDictionaryService
.
findDmmcByDmAndDmlx
(
skService
.
getServicetype
(),
"ZF"
));
//
skService.setServicetypename(skDictionaryService.findDmmcByDmAndDmlx(skService.getServicetype(),"ZF"));
boolean
save
=
skServiceService
.
save
(
skService
);
if
(
save
)
{
...
...
common/service_base/src/main/java/com/founder/servicebase/meassage/WebSocketServer.java
View file @
826a5368
...
...
@@ -5,6 +5,7 @@ import com.founder.commonutils.util.JwtUser;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.socket.TextMessage
;
import
javax.annotation.PostConstruct
;
import
javax.websocket.*
;
...
...
@@ -85,7 +86,9 @@ public class WebSocketServer {
public
static
void
SendMessage
(
Session
session
,
String
message
)
{
try
{
// session.getBasicRemote().sendText(String.format("%s (From Server,Session ID=%s)",message,session.getId()));
if
(
session
.
isOpen
()){
session
.
getBasicRemote
().
sendText
(
message
);
}
}
catch
(
IOException
e
)
{
log
.
error
(
"发送消息出错:{}"
,
e
.
getMessage
());
e
.
printStackTrace
();
...
...
@@ -102,11 +105,23 @@ public class WebSocketServer {
try
{
for
(
Session
session
:
map
.
values
())
{
log
.
info
(
"服务端群发给客户端[{}]发送消息{}"
,
session
.
getId
(),
message
);
synchronized
(
session
)
{
SendMessage
(
session
,
message
);
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"服务端发送消息给客户端失败"
,
e
);
}
/*
try {
for (Session session : map.values()) {
log.info("服务端群发给客户端[{}]发送消息{}", session.getId(), message);
session.getBasicRemote().sendText(message);
}
} catch (Exception e) {
log.error("服务端发送消息给客户端失败", e);
}
*/
/* for (Session session : SessionSet) {
if(session.isOpen()){
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/ApprovalService/OrderController.java
View file @
826a5368
...
...
@@ -9,6 +9,7 @@ import com.founder.commonutils.model.newPublicEntity.MapRestResult;
import
com.founder.publicapi.service.OrderService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -178,6 +179,13 @@ public class OrderController {
Map
<
String
,
Object
>
mapResult
=
new
HashMap
<>();
Map
<
String
,
Object
>
objectMap
=
new
HashMap
<>();
try
{
if
(
StringUtils
.
isEmpty
(
orderCode
)){
mapResult
.
put
(
"data"
,
""
);
mapResult
.
put
(
"msg"
,
"获取申请详情失败"
);
mapResult
.
put
(
"status"
,
200
);
mapResult
.
put
(
"count"
,
""
);
return
mapResult
;
}
TbstApproveOrder
tbstApproveOrder
=
new
TbstApproveOrder
();
tbstApproveOrder
.
setOrderCode
(
orderCode
);
objectMap
=
orderService
.
getSqdDteail
(
tbstApproveOrder
);
...
...
service/publicapi/src/main/java/com/founder/publicapi/controller/SkDataOperation/SkServiceSqController.java
View file @
826a5368
...
...
@@ -110,7 +110,7 @@ public class SkServiceSqController {
if
(
updateById
)
{
return
new
MapRestResult
();
}
else
{
return
new
MapRestResult
(
).
error
(
);
return
new
MapRestResult
(
200
,
"此xxzjbh不存在"
,
null
);
}
}
}
service/publicapi/src/main/java/com/founder/publicapi/service/serviceimpl/UserServiceImpl.java
View file @
826a5368
...
...
@@ -300,8 +300,16 @@ public class UserServiceImpl implements UserService {
roleId
=
DLYJ_ROLEID
;
}
TbStApproveUserRole
userRoleInfo
=
userMapper
.
getUserRoleInfoByRoleId
(
agentUser
.
getId
(),
roleId
);
if
(
userRoleInfo
!=
null
){
paramMap
.
put
(
"id"
,
userRoleInfo
.
getId
());
paramMap
.
put
(
"scbz"
,
"1"
);
}
else
{
resultMap
.
put
(
"msg"
,
"获取id失败"
);
resultMap
.
put
(
"data"
,
""
);
resultMap
.
put
(
"status"
,
200
);
return
resultMap
;
}
int
r
=
userMapper
.
deleteApproveUserRole
(
paramMap
);
if
(
r
>
0
){
resultMap
.
put
(
"msg"
,
"success"
);
...
...
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