Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
Project
Project
Details
Activity
Releases
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
TCM
tcm-system
Commits
4725ed0c
Commit
4725ed0c
authored
Dec 30, 2025
by
dmy
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into product
parents
c5bc81d3
ac8039e0
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
196 additions
and
14 deletions
+196
-14
prod.cmd
prod.cmd
+1
-1
PositionVo.java
src/main/java/com/tcm/system/position/vo/PositionVo.java
+72
-1
TcmRoleDaoImpl.java
...ain/java/com/tcm/system/role/dao/impl/TcmRoleDaoImpl.java
+1
-1
UserDaoImpl.java
src/main/java/com/tcm/system/user/dao/impl/UserDaoImpl.java
+8
-3
UserService.java
src/main/java/com/tcm/system/user/service/UserService.java
+2
-0
UserServiceImpl.java
...ava/com/tcm/system/user/service/impl/UserServiceImpl.java
+5
-0
swagger.java
src/main/java/com/tcm/system/user/swagger.java
+3
-3
TcmUserVo.java
src/main/java/com/tcm/system/user/vo/TcmUserVo.java
+48
-0
TcmUserPageReqVo.java
...ain/java/com/tcm/system/user/vo/req/TcmUserPageReqVo.java
+48
-4
TcmUserController.java
src/main/java/com/tcm/system/user/web/TcmUserController.java
+8
-1
No files found.
prod.cmd
View file @
4725ed0c
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
SET SH=docker rm -f tcm-system;
SET SH=docker rm -f tcm-system;
SET SH=%SH% docker run --name tcm-system -it -d --restart always
SET SH=%SH% docker run --name tcm-system -it -d --restart always
SET SH=%SH% -v /home/other/home/pangd/conf:/home/java/conf/ -v /home/other/home/cache/:/home/cache/ -v /home/other/home/pangd/:/home/pangd/ --net pd
SET SH=%SH% -v /home/other/home/pangd/conf:/home/java/conf/ -v /home/other/home/cache/:/home/cache/ -v /home/other/home/pangd/:/home/pangd/ --net pd
SET SH=%SH%
pd-user
:latest --spring.profiles.active=prod --yzg.config.url=/home/java/conf/pd_all.properties
SET SH=%SH%
tcm-system
:latest --spring.profiles.active=prod --yzg.config.url=/home/java/conf/pd_all.properties
SET SH1_NAME=tcm-system
SET SH1_NAME=tcm-system
SET SH1=docker rm -f %SH1_NAME%;
SET SH1=docker rm -f %SH1_NAME%;
...
...
src/main/java/com/tcm/system/position/vo/PositionVo.java
View file @
4725ed0c
package
com
.
tcm
.
system
.
position
.
vo
;
package
com
.
tcm
.
system
.
position
.
vo
;
public
class
PositionVo
{
import
com.yanzuoguang.dao.TableAnnotation
;
import
com.yanzuoguang.util.vo.BaseVo
;
import
com.yanzuoguang.util.vo.InitDao
;
import
io.swagger.annotations.ApiModelProperty
;
@TableAnnotation
(
"tcm_sys_position"
)
public
class
PositionVo
extends
BaseVo
implements
InitDao
{
@ApiModelProperty
(
notes
=
"角色编号"
)
@TableAnnotation
(
"position_id"
)
private
String
positionId
;
@ApiModelProperty
(
notes
=
"角色名称"
)
@TableAnnotation
(
"position_name"
)
private
String
positionName
;
@ApiModelProperty
(
notes
=
"权限"
)
@TableAnnotation
(
"position_pid"
)
private
String
positionPid
;
@ApiModelProperty
(
notes
=
"创建时间"
)
@TableAnnotation
(
"create_time"
)
private
String
createTime
;
@ApiModelProperty
(
notes
=
"创建时间"
)
@TableAnnotation
(
"update_time"
)
private
String
updateTime
;
@Override
public
void
init
()
{
}
public
String
getPositionId
()
{
return
positionId
;
}
public
void
setPositionId
(
String
positionId
)
{
this
.
positionId
=
positionId
;
}
public
String
getPositionName
()
{
return
positionName
;
}
public
void
setPositionName
(
String
positionName
)
{
this
.
positionName
=
positionName
;
}
public
String
getPositionPid
()
{
return
positionPid
;
}
public
void
setPositionPid
(
String
positionPid
)
{
this
.
positionPid
=
positionPid
;
}
public
String
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
String
createTime
)
{
this
.
createTime
=
createTime
;
}
public
String
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
}
src/main/java/com/tcm/system/role/dao/impl/TcmRoleDaoImpl.java
View file @
4725ed0c
...
@@ -17,7 +17,7 @@ public class TcmRoleDaoImpl extends BaseDaoImpl implements TcmRoleDao {
...
@@ -17,7 +17,7 @@ public class TcmRoleDaoImpl extends BaseDaoImpl implements TcmRoleDao {
protected
void
init
()
{
protected
void
init
()
{
register
(
TcmRoleVo
.
class
);
register
(
TcmRoleVo
.
class
);
table
.
add
(
QUERY_LIST
,
"select COUNT(a.id) as userNum,a.* from tcm_sys_role a "
+
table
.
add
(
QUERY_LIST
,
"select COUNT(a.
role_
id) as userNum,a.* from tcm_sys_role a "
+
" LEFT JOIN tcm_sys_user b on a.role_id = b.role_id where 1=1 {WHERE}"
+
" LEFT JOIN tcm_sys_user b on a.role_id = b.role_id where 1=1 {WHERE}"
+
"GROUP BY a.role_id"
)
"GROUP BY a.role_id"
)
.
add
(
"roleId"
,
" and a.role_id = ? "
)
.
add
(
"roleId"
,
" and a.role_id = ? "
)
...
...
src/main/java/com/tcm/system/user/dao/impl/UserDaoImpl.java
View file @
4725ed0c
...
@@ -30,15 +30,20 @@ public class UserDaoImpl extends BaseDaoImpl implements UserDao {
...
@@ -30,15 +30,20 @@ public class UserDaoImpl extends BaseDaoImpl implements UserDao {
.
add
(
"loginAccount"
,
"and (username = ? or phone = ?) "
)
.
add
(
"loginAccount"
,
"and (username = ? or phone = ?) "
)
.
add
(
"roleId"
,
" role_id = ? "
);
.
add
(
"roleId"
,
" role_id = ? "
);
table
.
add
(
QUERY_LIST
,
"select a.*,b.
*,c.*
from tcm_sys_user a "
+
table
.
add
(
QUERY_LIST
,
"select a.*,b.
role_name,c.position_name
from tcm_sys_user a "
+
" LEFT JOIN tcm_sys_role b on a.role_id = b.role_id "
+
" LEFT JOIN tcm_sys_role b on a.role_id = b.role_id "
+
" LEFT JOIN tcm_sys_position c on c.position_id = a.position_id "
+
" LEFT JOIN tcm_sys_position c on c.position_id = a.position_id "
+
" where 1=1 "
)
" where 1=1 "
)
.
add
(
"companyId"
,
"and company_id = ? "
)
.
add
(
"startDate"
,
" a.create_time >= ? "
)
.
add
(
"endDate"
,
" a.create_time <= ? "
)
.
add
(
"roleId"
,
" role_id = ? "
)
.
add
(
"account"
,
"and username = ? "
)
.
add
(
"account"
,
"and username = ? "
)
.
add
(
"phone"
,
"and phone = ? "
)
.
add
(
"phone"
,
"and phone = ? "
)
.
add
(
"loginAccount"
,
"and (username = ? or phone = ?) "
)
.
add
(
"loginAccount"
,
"and (username = ? or phone = ?) "
)
.
add
(
"roleId"
,
" role_id = ? "
);
.
add
(
"search"
,
" a.username LIKE concat(?,'%') "
+
" or a.real_name LIKE concat(?,'%') "
+
" or a.phone LIKE concat(?,'%') "
+
" or a.id_card LIKE concat(?,'%') "
);
}
}
@Override
@Override
...
...
src/main/java/com/tcm/system/user/service/UserService.java
View file @
4725ed0c
...
@@ -25,4 +25,6 @@ public interface UserService {
...
@@ -25,4 +25,6 @@ public interface UserService {
String
saveUser
(
TcmUserSaveReqVo
req
);
String
saveUser
(
TcmUserSaveReqVo
req
);
void
delUser
(
TcmUserSaveReqVo
req
);
}
}
src/main/java/com/tcm/system/user/service/impl/UserServiceImpl.java
View file @
4725ed0c
...
@@ -79,6 +79,11 @@ public class UserServiceImpl implements UserService {
...
@@ -79,6 +79,11 @@ public class UserServiceImpl implements UserService {
return
req
.
getUserId
();
return
req
.
getUserId
();
}
}
public
void
delUser
(
TcmUserSaveReqVo
req
){
userDao
.
remove
(
req
.
getUserId
());
}
// @Override
// @Override
public
void
isValid
(
String
account
)
{
public
void
isValid
(
String
account
)
{
String
regex
=
"^(?!\\d+$)[\\da-zA-Z]+$"
;
String
regex
=
"^(?!\\d+$)[\\da-zA-Z]+$"
;
...
...
src/main/java/com/tcm/system/user/swagger.java
View file @
4725ed0c
...
@@ -22,9 +22,9 @@ public class swagger {
...
@@ -22,9 +22,9 @@ public class swagger {
.
select
()
.
select
()
//为当前包路径
//为当前包路径
.
apis
(
SwaggerHelper
.
basePackage
(
.
apis
(
SwaggerHelper
.
basePackage
(
"com.
pangding.web
.authority.web"
,
"com.
tcm.system
.authority.web"
,
"com.
pangding.web
.user.web"
,
"com.
tcm.system
.user.web"
,
"com.
pangding.web
.role.web"
"com.
tcm.system
.role.web"
))
))
.
paths
(
PathSelectors
.
any
())
.
paths
(
PathSelectors
.
any
())
.
build
();
.
build
();
...
...
src/main/java/com/tcm/system/user/vo/TcmUserVo.java
View file @
4725ed0c
...
@@ -22,6 +22,14 @@ public class TcmUserVo extends BaseVo implements InitDao {
...
@@ -22,6 +22,14 @@ public class TcmUserVo extends BaseVo implements InitDao {
@TableAnnotation
(
"real_name"
)
@TableAnnotation
(
"real_name"
)
private
String
realName
;
private
String
realName
;
@ApiModelProperty
(
notes
=
"性别"
)
@TableAnnotation
(
"user_sex"
)
private
String
userSex
;
@ApiModelProperty
(
notes
=
"身份证"
)
@TableAnnotation
(
"id_card"
)
private
String
idCard
;
@ApiModelProperty
(
notes
=
"头像"
)
@ApiModelProperty
(
notes
=
"头像"
)
@TableAnnotation
(
"head_pic"
)
@TableAnnotation
(
"head_pic"
)
private
String
headPic
;
private
String
headPic
;
...
@@ -53,6 +61,14 @@ public class TcmUserVo extends BaseVo implements InitDao {
...
@@ -53,6 +61,14 @@ public class TcmUserVo extends BaseVo implements InitDao {
@TableAnnotation
(
"user_status"
)
@TableAnnotation
(
"user_status"
)
private
Integer
userStatus
;
private
Integer
userStatus
;
@ApiModelProperty
(
notes
=
"状态:0-启用,1-禁用"
)
@TableAnnotation
(
"user_examine_status"
)
private
Integer
userExamineStatus
;
@ApiModelProperty
(
notes
=
"状态:0-启用,1-禁用"
)
@TableAnnotation
(
"examine_message"
)
private
Integer
examineMessage
;
@ApiModelProperty
(
notes
=
"创建时间"
)
@ApiModelProperty
(
notes
=
"创建时间"
)
@TableAnnotation
(
"create_time"
)
@TableAnnotation
(
"create_time"
)
private
String
createTime
;
private
String
createTime
;
...
@@ -106,6 +122,22 @@ public class TcmUserVo extends BaseVo implements InitDao {
...
@@ -106,6 +122,22 @@ public class TcmUserVo extends BaseVo implements InitDao {
this
.
realName
=
realName
;
this
.
realName
=
realName
;
}
}
public
String
getUserSex
()
{
return
userSex
;
}
public
void
setUserSex
(
String
userSex
)
{
this
.
userSex
=
userSex
;
}
public
String
getIdCard
()
{
return
idCard
;
}
public
void
setIdCard
(
String
idCard
)
{
this
.
idCard
=
idCard
;
}
public
String
getHeadPic
()
{
public
String
getHeadPic
()
{
return
headPic
;
return
headPic
;
}
}
...
@@ -201,4 +233,20 @@ public class TcmUserVo extends BaseVo implements InitDao {
...
@@ -201,4 +233,20 @@ public class TcmUserVo extends BaseVo implements InitDao {
public
void
setUpdateTime
(
String
updateTime
)
{
public
void
setUpdateTime
(
String
updateTime
)
{
this
.
updateTime
=
updateTime
;
this
.
updateTime
=
updateTime
;
}
}
public
Integer
getUserExamineStatus
()
{
return
userExamineStatus
;
}
public
void
setUserExamineStatus
(
Integer
userExamineStatus
)
{
this
.
userExamineStatus
=
userExamineStatus
;
}
public
Integer
getExamineMessage
()
{
return
examineMessage
;
}
public
void
setExamineMessage
(
Integer
examineMessage
)
{
this
.
examineMessage
=
examineMessage
;
}
}
}
src/main/java/com/tcm/system/user/vo/req/TcmUserPageReqVo.java
View file @
4725ed0c
...
@@ -5,15 +5,20 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -5,15 +5,20 @@ import io.swagger.annotations.ApiModelProperty;
public
class
TcmUserPageReqVo
extends
PageSizeReqVo
{
public
class
TcmUserPageReqVo
extends
PageSizeReqVo
{
@ApiModelProperty
(
notes
=
"开始时间"
)
private
String
startDate
;
@ApiModelProperty
(
notes
=
"结束时间"
)
private
String
endDate
;
@ApiModelProperty
(
notes
=
"用户编号"
)
@ApiModelProperty
(
notes
=
"用户编号"
)
private
String
userId
;
private
String
userId
;
@ApiModelProperty
(
notes
=
"角色编号"
)
private
String
roleId
;
private
String
roleId
;
@ApiModelProperty
(
notes
=
"职务编号"
)
private
String
positionId
;
private
String
positionId
;
@ApiModelProperty
(
notes
=
"角色名称"
)
private
String
roleName
;
private
String
roleName
;
@ApiModelProperty
(
notes
=
"职务编号"
)
private
String
positionName
;
private
String
positionName
;
@ApiModelProperty
(
notes
=
"账户"
)
@ApiModelProperty
(
notes
=
"账户"
)
...
@@ -28,6 +33,13 @@ public class TcmUserPageReqVo extends PageSizeReqVo {
...
@@ -28,6 +33,13 @@ public class TcmUserPageReqVo extends PageSizeReqVo {
@ApiModelProperty
(
notes
=
"状态:0-启用,1-禁用"
)
@ApiModelProperty
(
notes
=
"状态:0-启用,1-禁用"
)
private
Integer
userStatus
;
private
Integer
userStatus
;
@ApiModelProperty
(
notes
=
"审核状态:0-未审核,1-审核通过,2-审核不通过"
)
private
Integer
userExamineStatus
;
@ApiModelProperty
(
notes
=
"姓名、电话查询"
)
private
String
search
;
public
String
getUserId
()
{
public
String
getUserId
()
{
return
userId
;
return
userId
;
}
}
...
@@ -99,4 +111,36 @@ public class TcmUserPageReqVo extends PageSizeReqVo {
...
@@ -99,4 +111,36 @@ public class TcmUserPageReqVo extends PageSizeReqVo {
public
void
setUserStatus
(
Integer
userStatus
)
{
public
void
setUserStatus
(
Integer
userStatus
)
{
this
.
userStatus
=
userStatus
;
this
.
userStatus
=
userStatus
;
}
}
public
String
getStartDate
()
{
return
startDate
;
}
public
void
setStartDate
(
String
startDate
)
{
this
.
startDate
=
startDate
;
}
public
String
getEndDate
()
{
return
endDate
;
}
public
void
setEndDate
(
String
endDate
)
{
this
.
endDate
=
endDate
;
}
public
Integer
getUserExamineStatus
()
{
return
userExamineStatus
;
}
public
void
setUserExamineStatus
(
Integer
userExamineStatus
)
{
this
.
userExamineStatus
=
userExamineStatus
;
}
public
String
getSearch
()
{
return
search
;
}
public
void
setSearch
(
String
search
)
{
this
.
search
=
search
;
}
}
}
src/main/java/com/tcm/system/user/web/TcmUserController.java
View file @
4725ed0c
...
@@ -39,7 +39,7 @@ public class TcmUserController {
...
@@ -39,7 +39,7 @@ public class TcmUserController {
return
ResponseResult
.
result
(
userService
.
findUserPage
(
req
));
return
ResponseResult
.
result
(
userService
.
findUserPage
(
req
));
}
}
@ApiOperation
(
value
=
"查询员工信息"
,
notes
=
"返回员工信息列表"
)
@ApiOperation
(
value
=
"查询员工信息
列表
"
,
notes
=
"返回员工信息列表"
)
@RequestMapping
(
value
=
"/findUserList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"/findUserList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
List
<
TcmUserResVo
>>
findUserList
(
@RequestBody
TcmUserReqVo
req
)
{
public
ResponseResult
<
List
<
TcmUserResVo
>>
findUserList
(
@RequestBody
TcmUserReqVo
req
)
{
return
ResponseResult
.
result
(
userService
.
findUserList
(
req
));
return
ResponseResult
.
result
(
userService
.
findUserList
(
req
));
...
@@ -56,4 +56,11 @@ public class TcmUserController {
...
@@ -56,4 +56,11 @@ public class TcmUserController {
public
ResponseResult
<
String
>
saveUser
(
@RequestBody
TcmUserSaveReqVo
req
)
{
public
ResponseResult
<
String
>
saveUser
(
@RequestBody
TcmUserSaveReqVo
req
)
{
return
ResponseResult
.
result
(
userService
.
saveUser
(
req
));
return
ResponseResult
.
result
(
userService
.
saveUser
(
req
));
}
}
@ApiOperation
(
value
=
"删除员工信息"
,
notes
=
"返回成功失败"
)
@RequestMapping
(
value
=
"/delUser"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseResult
<
String
>
delUser
(
@RequestBody
TcmUserSaveReqVo
req
)
{
userService
.
delUser
(
req
);
return
ResponseResult
.
result
(
"删除成功"
);
}
}
}
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