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
718d151e
Commit
718d151e
authored
Oct 24, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
de2d49f5
16115059
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
69 additions
and
44 deletions
+69
-44
base-manager-ui/admin/src/pages/basicset/appmarket/components/DataUpdate.vue
...in/src/pages/basicset/appmarket/components/DataUpdate.vue
+14
-23
base-manager-ui/admin/src/pages/basicset/system/parameter/Parameter.vue
...i/admin/src/pages/basicset/system/parameter/Parameter.vue
+0
-7
portal-manager/src/main/java/com/mortals/xhx/module/user/dao/UserDao.java
...rc/main/java/com/mortals/xhx/module/user/dao/UserDao.java
+1
-0
portal-manager/src/main/java/com/mortals/xhx/module/user/dao/ibatis/UserDaoImpl.java
...a/com/mortals/xhx/module/user/dao/ibatis/UserDaoImpl.java
+8
-6
portal-manager/src/main/java/com/mortals/xhx/module/user/service/UserService.java
...java/com/mortals/xhx/module/user/service/UserService.java
+7
-1
portal-manager/src/main/java/com/mortals/xhx/module/user/service/impl/UserServiceImpl.java
...mortals/xhx/module/user/service/impl/UserServiceImpl.java
+16
-5
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
.../java/com/mortals/xhx/module/user/web/UserController.java
+18
-2
portal-manager/src/main/resources/sqlmap/module/user/userExt.xml
...manager/src/main/resources/sqlmap/module/user/userExt.xml
+5
-0
No files found.
base-manager-ui/admin/src/pages/basicset/appmarket/components/DataUpdate.vue
View file @
718d151e
...
@@ -255,32 +255,23 @@ export default {
...
@@ -255,32 +255,23 @@ export default {
// 获取数据列表
// 获取数据列表
async
getDatasetList
()
{
async
getDatasetList
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
let
orConditionList
=
[
let
obj
=
{};
{
let
orConditionList
=
[];
fieldCode
:
this
.
fieldCode
,
let
form
=
{
fieldValue
:
`%
${
this
.
searchVal
}
%`
,
},
...
this
.
sortSearch
,
];
let
res
=
await
getDatasetList
({
page
:
this
.
current
,
page
:
this
.
current
,
size
:
this
.
size
,
size
:
this
.
size
,
appId
:
this
.
appId
,
appId
:
this
.
appId
,
orConditionList
,
};
// fieldCode: this.fieldCode,
if
(
this
.
fieldCode
)
{
// fieldValue: `%${this.searchVal}%`,
obj
.
fieldCode
=
this
.
fieldCode
;
// orConditionList: [
obj
.
fieldValue
=
`%
${
this
.
searchVal
}
%`
;
// {
orConditionList
.
push
(
obj
);
// fieldCode: this.fieldCode,
}
// fieldValue: `%${this.searchVal}%`,
orConditionList
=
[...
orConditionList
,
...
this
.
sortSearch
];
// },
if
(
orConditionList
.
length
)
{
// {
form
.
orConditionList
=
orConditionList
;
// fieldCode: "top",
}
// fieldValue: `%%`,
let
res
=
await
getDatasetList
(
form
);
// },
// ],
});
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
data
.
code
===
1
)
{
if
(
res
.
data
.
code
===
1
)
{
let
{
data
,
total
}
=
res
.
data
.
data
;
let
{
data
,
total
}
=
res
.
data
.
data
;
...
...
base-manager-ui/admin/src/pages/basicset/system/parameter/Parameter.vue
View file @
718d151e
...
@@ -14,11 +14,6 @@
...
@@ -14,11 +14,6 @@
v-model=
"searchForm.name"
v-model=
"searchForm.name"
allowClear
allowClear
/>
/>
<a-input
placeholder=
"请输入二级组织搜索"
v-model=
"searchForm.secondOrganize"
allowClear
/>
<a-button
type=
"primary"
@
click=
"onSearch"
>
搜索
</a-button>
<a-button
type=
"primary"
@
click=
"onSearch"
>
搜索
</a-button>
<a-button
@
click=
"resetSearch"
>
重置
</a-button>
<a-button
@
click=
"resetSearch"
>
重置
</a-button>
</a-space>
</a-space>
...
@@ -185,7 +180,6 @@ export default {
...
@@ -185,7 +180,6 @@ export default {
searchValue
:
""
,
// 搜索
searchValue
:
""
,
// 搜索
searchForm
:
{
searchForm
:
{
name
:
""
,
name
:
""
,
secondOrganize
:
""
,
},
},
tableData
:
[],
tableData
:
[],
selectedRowKeys
:
[],
selectedRowKeys
:
[],
...
@@ -205,7 +199,6 @@ export default {
...
@@ -205,7 +199,6 @@ export default {
page
:
this
.
current
,
page
:
this
.
current
,
size
:
this
.
size
,
size
:
this
.
size
,
name
:
`%
${
this
.
searchForm
.
name
}
%`
,
name
:
`%
${
this
.
searchForm
.
name
}
%`
,
secondOrganize
:
`%
${
this
.
searchForm
.
secondOrganize
}
%`
,
});
});
this
.
loading
=
false
;
this
.
loading
=
false
;
if
(
res
.
data
.
code
==
1
)
{
if
(
res
.
data
.
code
==
1
)
{
...
...
portal-manager/src/main/java/com/mortals/xhx/module/user/dao/UserDao.java
View file @
718d151e
...
@@ -17,4 +17,5 @@ import java.util.List;
...
@@ -17,4 +17,5 @@ import java.util.List;
public
interface
UserDao
extends
ICRUDDao
<
UserEntity
,
Long
>{
public
interface
UserDao
extends
ICRUDDao
<
UserEntity
,
Long
>{
List
<
Long
>
getAuthListById
(
Long
id
);
List
<
Long
>
getAuthListById
(
Long
id
);
Result
<
UserEntityExt
>
getListExt
(
UserEntity
params
,
PageInfo
pageInfo
);
Result
<
UserEntityExt
>
getListExt
(
UserEntity
params
,
PageInfo
pageInfo
);
int
initUser
(
UserEntity
userEntity
);
}
}
portal-manager/src/main/java/com/mortals/xhx/module/user/dao/ibatis/UserDaoImpl.java
View file @
718d151e
package
com.mortals.xhx.module.user.dao.ibatis
;
package
com.mortals.xhx.module.user.dao.ibatis
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.ParamDto
;
import
com.mortals.framework.model.ParamDto
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.xhx.module.user.dao.UserDao
;
import
com.mortals.xhx.module.user.model.UserEntity
;
import
com.mortals.xhx.module.user.model.UserEntityExt
;
import
com.mortals.xhx.module.user.model.UserEntityExt
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.session.RowBounds
;
import
org.springframework.stereotype.Repository
;
import
org.springframework.stereotype.Repository
;
import
com.mortals.xhx.module.user.dao.UserDao
;
import
com.mortals.xhx.module.user.model.UserEntity
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
com.mortals.framework.dao.ibatis.BaseCRUDDaoMybatis
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -69,4 +66,9 @@ public class UserDaoImpl extends BaseCRUDDaoMybatis<UserEntity, Long> implements
...
@@ -69,4 +66,9 @@ public class UserDaoImpl extends BaseCRUDDaoMybatis<UserEntity, Long> implements
return
result
;
return
result
;
}
}
@Override
public
int
initUser
(
UserEntity
userEntity
)
{
return
getSqlSession
().
update
(
this
.
getSqlId
(
"initUser"
),
userEntity
);
}
}
}
portal-manager/src/main/java/com/mortals/xhx/module/user/service/UserService.java
View file @
718d151e
...
@@ -5,7 +5,6 @@ import com.mortals.framework.model.Context;
...
@@ -5,7 +5,6 @@ import com.mortals.framework.model.Context;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.service.ICRUDCacheService
;
import
com.mortals.framework.service.ICRUDCacheService
;
import
com.mortals.framework.service.ICRUDService
;
import
com.mortals.xhx.module.user.model.UserEntity
;
import
com.mortals.xhx.module.user.model.UserEntity
;
import
com.mortals.xhx.module.user.model.UserEntityExt
;
import
com.mortals.xhx.module.user.model.UserEntityExt
;
...
@@ -80,4 +79,11 @@ public interface UserService extends ICRUDCacheService<UserEntity,Long> {
...
@@ -80,4 +79,11 @@ public interface UserService extends ICRUDCacheService<UserEntity,Long> {
*/
*/
boolean
resetUserPwd
(
String
loginName
,
String
newPwd
,
Context
context
)
throws
AppException
;
boolean
resetUserPwd
(
String
loginName
,
String
newPwd
,
Context
context
)
throws
AppException
;
/***
* 初始化用户数据
* @param userEntity
* @throws AppException
*/
int
initUser
(
UserEntity
userEntity
)
throws
AppException
;
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/user/service/impl/UserServiceImpl.java
View file @
718d151e
...
@@ -32,6 +32,7 @@ import com.mortals.xhx.module.user.service.UserService;
...
@@ -32,6 +32,7 @@ import com.mortals.xhx.module.user.service.UserService;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.util.ObjectUtils
;
...
@@ -61,6 +62,10 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
...
@@ -61,6 +62,10 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
@Autowired
@Autowired
private
UserPwdRecordDao
userPwdRecordDao
;
private
UserPwdRecordDao
userPwdRecordDao
;
// 当日密码错误次数(默认60分钟)
@Value
(
"${login.errorCount:5}"
)
private
int
ErrorCount
;
/**
/**
* @param data
* @param data
* @return
* @return
...
@@ -208,14 +213,16 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
...
@@ -208,14 +213,16 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
if
(
sysUser
.
getLoginLock
()
==
null
)
{
if
(
sysUser
.
getLoginLock
()
==
null
)
{
sysUser
.
setLoginLock
(
0
);
sysUser
.
setLoginLock
(
0
);
}
}
//
取消
账户锁定功能
//账户锁定功能
/*
if (sysUser.getLoginLock() == 1 && sysUser.getLockTime() != null) {
if
(
sysUser
.
getLoginLock
()
==
1
&&
sysUser
.
getLockTime
()
!=
null
)
{
String
nowStr
=
DateUtils
.
getCurrStrDate
();
String
nowStr
=
DateUtils
.
getCurrStrDate
();
String
loginDateStr
=
DateUtils
.
getDateTime
(
sysUser
.
getLockTime
(),
"yyyy-MM-dd"
);
String
loginDateStr
=
DateUtils
.
getDateTime
(
sysUser
.
getLockTime
(),
"yyyy-MM-dd"
);
if
(
nowStr
.
equals
(
loginDateStr
))
{
if
(
nowStr
.
equals
(
loginDateStr
))
{
throw new AppException("此账号当天密码错误次数已达上限,已被锁定");
throw
new
AppException
(
"此账号当天密码错误次数已达上限"
+
ErrorCount
+
"次,已被锁定"
);
}
else
{
sysUser
.
setLoginLock
(
0
);
}
}
}
}*/
try
{
try
{
if
(
StringUtils
.
isNotEmpty
(
sysUser
.
getSaltKey
()))
{
if
(
StringUtils
.
isNotEmpty
(
sysUser
.
getSaltKey
()))
{
...
@@ -225,7 +232,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
...
@@ -225,7 +232,7 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
UserEntity
update
=
new
UserEntity
();
UserEntity
update
=
new
UserEntity
();
update
.
setId
(
sysUser
.
getId
());
update
.
setId
(
sysUser
.
getId
());
update
.
setErrorCount
(
sysUser
.
getErrorCount
()
+
1
);
update
.
setErrorCount
(
sysUser
.
getErrorCount
()
+
1
);
if
(
update
.
getErrorCount
()
==
5
)
{
if
(
update
.
getErrorCount
()
==
ErrorCount
)
{
update
.
setLoginLock
(
1
);
update
.
setLoginLock
(
1
);
update
.
setLockTime
(
new
Date
());
update
.
setLockTime
(
new
Date
());
}
}
...
@@ -561,4 +568,8 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
...
@@ -561,4 +568,8 @@ public class UserServiceImpl extends AbstractCRUDCacheServiceImpl<UserDao, UserE
}
}
@Override
public
int
initUser
(
UserEntity
userEntity
)
throws
AppException
{
return
dao
.
initUser
(
userEntity
);
}
}
}
\ No newline at end of file
portal-manager/src/main/java/com/mortals/xhx/module/user/web/UserController.java
View file @
718d151e
...
@@ -31,8 +31,6 @@ import java.util.List;
...
@@ -31,8 +31,6 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
static
com
.
mortals
.
framework
.
ap
.
SysConstains
.
MESSAGE_INFO
;
/**
/**
* 用户信息业务
* 用户信息业务
*
*
...
@@ -325,4 +323,22 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
...
@@ -325,4 +323,22 @@ public class UserController extends BaseCRUDJsonBodyMappingController<UserServic
public
String
importData
(
MultipartFile
file
,
boolean
updateSupport
)
{
public
String
importData
(
MultipartFile
file
,
boolean
updateSupport
)
{
return
super
.
importData
(
file
,
updateSupport
);
return
super
.
importData
(
file
,
updateSupport
);
}
}
/**
* 初始化用户数据
* @return
*/
@PostMapping
(
value
=
"initData"
)
@UnAuth
public
Rest
<
String
>
initData
(
UserEntity
user
)
{
try
{
this
.
service
.
initUser
(
user
);
return
Rest
.
ok
(
"初始化用户数据成功!"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"初始化用户数据错误"
,
e
);
return
Rest
.
fail
(
"初始化用户数据异常!"
);
}
}
}
}
\ No newline at end of file
portal-manager/src/main/resources/sqlmap/module/user/userExt.xml
View file @
718d151e
...
@@ -163,4 +163,9 @@
...
@@ -163,4 +163,9 @@
</where>
</where>
</trim>
</trim>
</select>
</select>
<!-- 初始化用户登录密码admin -->
<update
id=
"initUser"
parameterType=
"UserEntity"
>
update mortals_xhx_user set loginPwd='43442676c74ae59f219c2d87fd6bad52',errorCount=0,lockTime=NULL,loginLock=0,saltKey=NULL,status=1,siteIds=#{siteIds},areaCodes=#{areaCodes},areaNames=#{areaNames}
</update>
</mapper>
</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