Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
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
赵啸非
smart_gov_platform
Commits
91f031da
Commit
91f031da
authored
Feb 01, 2023
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加服务检测拉起脚本
parent
88ce81d7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
base-manager/src/main/java/com/mortals/xhx/module/workman/service/impl/WorkmanServiceImpl.java
...s/xhx/module/workman/service/impl/WorkmanServiceImpl.java
+2
-3
base-manager/src/main/java/com/mortals/xhx/module/workman/web/WorkmanController.java
...com/mortals/xhx/module/workman/web/WorkmanController.java
+8
-1
No files found.
base-manager/src/main/java/com/mortals/xhx/module/workman/service/impl/WorkmanServiceImpl.java
View file @
91f031da
...
...
@@ -53,7 +53,6 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
@Override
protected
void
saveBefore
(
WorkmanEntity
entity
,
Context
context
)
throws
AppException
{
if
(
StringUtils
.
isNull
(
entity
.
getLoginName
()))
{
throw
new
AppException
(
"账号不能为空!"
);
}
...
...
@@ -61,8 +60,8 @@ public class WorkmanServiceImpl extends AbstractCRUDCacheServiceImpl<WorkmanDao,
if
(
StringUtils
.
isNull
(
entity
.
getLoginPwd
()))
{
throw
new
AppException
(
"密码不能为空!"
);
}
List
<
WorkmanEntity
>
list
=
this
.
find
(
new
WorkmanQuery
().
loginName
(
entity
.
getLoginName
())
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)
)
{
int
count
=
this
.
count
(
new
WorkmanQuery
().
loginName
(
entity
.
getLoginName
()),
context
);
if
(
count
>
0
)
{
throw
new
AppException
(
"账号已存在!"
);
}
...
...
base-manager/src/main/java/com/mortals/xhx/module/workman/web/WorkmanController.java
View file @
91f031da
package
com.mortals.xhx.module.workman.web
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.util.StrUtil
;
import
cn.hutool.extra.pinyin.PinyinUtil
;
import
com.alibaba.fastjson.JSON
;
...
...
@@ -187,7 +188,7 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
workmanEntity
.
setLoginName
(
loginName
);
}
if
(
ObjectUtils
.
isEmpty
(
workmanEntity
.
getLoginPwd
()))
{
if
(
ObjectUtils
.
isEmpty
(
workmanEntity
.
getLoginPwd
())
||
""
.
equals
(
workmanEntity
.
getLoginPwd
().
trim
())
)
{
workmanEntity
.
setLoginPwd
(
"123"
);
}
...
...
@@ -222,6 +223,12 @@ public class WorkmanController extends BaseCRUDJsonBodyMappingController<Workman
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
StrUtil
.
cleanBlank
(
PinyinUtil
.
getPinyin
(
"张 三"
,
""
)));
//
// System.out.println(Base64.encode(new JSONObject().toJSONString()));
// System.out.println( com.mortals.framework.util.Base64.encode(new JSONObject().toJSONString().getBytes()));
//
//
System
.
out
.
println
(
Base64
.
encode
(
"[]"
));
}
...
...
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