Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
self-service
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
廖旭伟
self-service
Commits
99d5ffb2
Commit
99d5ffb2
authored
Apr 17, 2023
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改测试bug
parent
ca840ed4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
4 deletions
+68
-4
sst-manager/src/main/java/com/mortals/xhx/module/matter/web/UserMatterApplyController.java
...tals/xhx/module/matter/web/UserMatterApplyController.java
+68
-4
No files found.
sst-manager/src/main/java/com/mortals/xhx/module/matter/web/UserMatterApplyController.java
View file @
99d5ffb2
package
com.mortals.xhx.module.matter.web
;
import
com.mortals.framework.annotation.RepeatSubmit
;
import
com.mortals.framework.annotation.UnAuth
;
import
com.mortals.framework.service.IUser
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -13,12 +16,10 @@ import com.mortals.xhx.module.matter.model.UserMatterApplyEntity;
import
com.mortals.xhx.module.matter.service.UserMatterApplyService
;
import
org.apache.commons.lang3.ArrayUtils
;
import
com.mortals.framework.util.StringUtils
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.alibaba.fastjson.JSONObject
;
import
java.util.Arrays
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.*;
...
...
@@ -46,5 +47,68 @@ public class UserMatterApplyController extends BaseCRUDJsonBodyMappingController
super
.
init
(
model
,
context
);
}
@PostMapping
({
"save"
})
@UnAuth
public
String
save
(
@RequestBody
UserMatterApplyEntity
entity
)
{
Map
<
String
,
Object
>
model
=
new
HashMap
();
Context
context
=
this
.
getContext
();
String
busiDesc
=
"保存"
+
this
.
getModuleDesc
();
int
code
;
try
{
this
.
saveBefore
(
entity
,
model
,
context
);
IUser
user
;
if
(
entity
.
newEntity
())
{
busiDesc
=
"新增"
+
this
.
getModuleDesc
();
entity
.
setCreateTime
(
new
Date
());
entity
.
setUpdateTime
(
entity
.
getCreateTime
());
user
=
this
.
getCurUser
();
if
(
user
!=
null
)
{
entity
.
setCreateUserId
(
user
.
getId
());
entity
.
setCreateUser
(
user
.
getLoginName
());
entity
.
setCreateUserName
(
user
.
getRealName
());
entity
.
setCreateUserDeptId
(
user
.
getDeptId
());
entity
.
setCreateUserDeptName
(
user
.
getDeptName
());
entity
.
setUpdateUserId
(
user
.
getId
());
entity
.
setUpdateUser
(
user
.
getLoginName
());
entity
.
setUpdateUserName
(
user
.
getRealName
());
entity
.
setUpdateUserDeptId
(
user
.
getDeptId
());
entity
.
setUpdateUserDeptName
(
user
.
getDeptName
());
}
this
.
service
.
save
(
entity
,
context
);
}
else
{
busiDesc
=
"修改"
+
this
.
getModuleDesc
();
entity
.
setUpdateTime
(
new
Date
());
user
=
this
.
getCurUser
();
if
(
user
!=
null
)
{
entity
.
setUpdateUserId
(
user
.
getId
());
entity
.
setUpdateUser
(
user
.
getLoginName
());
entity
.
setUpdateUserName
(
user
.
getRealName
());
entity
.
setUpdateUserDeptId
(
user
.
getDeptId
());
entity
.
setUpdateUserDeptName
(
user
.
getDeptName
());
}
this
.
service
.
update
(
entity
,
context
);
}
model
.
put
(
"id"
,
entity
.
getId
());
code
=
this
.
saveAfter
(
entity
,
model
,
context
);
model
.
put
(
"entity"
,
entity
);
model
.
put
(
"message_info"
,
busiDesc
+
"成功"
);
this
.
recordSysLog
(
this
.
request
,
busiDesc
+
" 【成功】 [id:"
+
entity
.
getId
()
+
"]"
);
}
catch
(
Exception
var7
)
{
this
.
doException
(
this
.
request
,
busiDesc
,
model
,
var7
);
model
.
put
(
"entity"
,
entity
);
this
.
init
(
model
,
context
);
code
=
this
.
saveException
(
entity
,
model
,
context
,
var7
);
}
this
.
init
(
model
,
context
);
JSONObject
ret
=
new
JSONObject
();
ret
.
put
(
"code"
,
code
);
ret
.
put
(
"msg"
,
model
.
remove
(
"message_info"
));
ret
.
put
(
"data"
,
model
);
return
ret
.
toJSONString
();
}
}
\ 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