Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
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
周健威
rs-cloud-platform
Commits
7e817da3
Commit
7e817da3
authored
Nov 26, 2020
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into dev
parents
ccea5ec7
7a27a20a
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
514 additions
and
23 deletions
+514
-23
pom.xml
ace-common/pom.xml
+10
-1
RedisConfig.java
...ommon/src/main/java/com/ace/cache/config/RedisConfig.java
+170
-0
PageDataVO.java
...ava/com/github/wxiaoqi/security/common/vo/PageDataVO.java
+10
-0
PageParam.java
...java/com/github/wxiaoqi/security/common/vo/PageParam.java
+4
-1
AuthorityMenuTree.java
...m/github/wxiaoqi/security/admin/vo/AuthorityMenuTree.java
+10
-0
BaseUserVO.java
...java/com/github/wxiaoqi/security/admin/vo/BaseUserVO.java
+29
-0
MenuTree.java
...n/java/com/github/wxiaoqi/security/admin/vo/MenuTree.java
+13
-0
GroupBiz.java
.../java/com/github/wxiaoqi/security/admin/biz/GroupBiz.java
+20
-0
GroupController.java
...m/github/wxiaoqi/security/admin/rest/GroupController.java
+49
-5
MenuController.java
...om/github/wxiaoqi/security/admin/rest/MenuController.java
+8
-0
UserController.java
...om/github/wxiaoqi/security/admin/rest/UserController.java
+13
-3
DictionaryMapper.xml
...iversal-server/target/classes/mapper/DictionaryMapper.xml
+3
-3
IdInformationMapper.xml
...rsal-server/target/classes/mapper/IdInformationMapper.xml
+2
-2
MemberFamilyInfoMapper.xml
...l-server/target/classes/mapper/MemberFamilyInfoMapper.xml
+1
-1
MemberInfoMapper.xml
...iversal-server/target/classes/mapper/MemberInfoMapper.xml
+2
-2
OrderPayMapper.xml
...universal-server/target/classes/mapper/OrderPayMapper.xml
+1
-1
OrderRefundMapper.xml
...versal-server/target/classes/mapper/OrderRefundMapper.xml
+1
-1
SysRegionMapper.xml
...niversal-server/target/classes/mapper/SysRegionMapper.xml
+3
-3
RedisKey.java
...ava/com/upyuns/platform/rs/website/constant/RedisKey.java
+109
-0
CaptchaBaseParam.java
.../com/upyuns/platform/rs/website/dto/CaptchaBaseParam.java
+22
-0
Demo.java
...main/java/com/upyuns/platform/rs/website/entity/Demo.java
+19
-0
WebsiteFeign.java
...va/com/upyuns/platform/rs/website/feign/WebsiteFeign.java
+15
-0
No files found.
ace-common/pom.xml
View file @
7e817da3
...
...
@@ -12,6 +12,16 @@
<artifactId>
ace-common
</artifactId>
<version>
2.0-rscp-SNAPSHOT
</version>
<repositories>
<repository>
<id>
mvn-repo
</id>
<url>
https://raw.github.com/wxiaoqi/ace-cache/master
</url>
<snapshots>
<enabled>
true
</enabled>
<updatePolicy>
always
</updatePolicy>
</snapshots>
</repository>
</repositories>
<build>
<plugins>
<plugin>
...
...
@@ -141,7 +151,6 @@
<groupId>
com.github.wxiaoqi
</groupId>
<artifactId>
ace-cache
</artifactId>
<version>
0.0.2
</version>
<scope>
compile
</scope>
</dependency>
<!-- excel 组件 -->
...
...
ace-common/src/main/java/com/ace/cache/config/RedisConfig.java
0 → 100644
View file @
7e817da3
package
com
.
ace
.
cache
.
config
;
import
com.ace.cache.utils.PropertiesLoaderUtils
;
import
javax.annotation.PostConstruct
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.core.env.Environment
;
import
redis.clients.jedis.JedisPool
;
import
redis.clients.jedis.JedisPoolConfig
;
@Configuration
public
class
RedisConfig
{
@Autowired
private
Environment
env
;
private
JedisPool
pool
;
private
String
maxActive
;
private
String
maxIdle
;
private
String
maxWait
;
private
String
host
;
private
String
password
;
private
String
timeout
;
private
String
database
;
private
String
port
;
private
String
enable
;
private
String
sysName
;
public
RedisConfig
()
{
}
@PostConstruct
public
void
init
()
{
PropertiesLoaderUtils
prop
=
new
PropertiesLoaderUtils
(
new
String
[]{
"application.properties"
});
this
.
host
=
prop
.
getProperty
(
"redis.host"
);
if
(
StringUtils
.
isBlank
(
this
.
host
))
{
this
.
host
=
this
.
env
.
getProperty
(
"redis.host"
);
this
.
maxActive
=
this
.
env
.
getProperty
(
"redis.pool.maxActive"
);
this
.
maxIdle
=
this
.
env
.
getProperty
(
"redis.pool.maxIdle"
);
this
.
maxWait
=
this
.
env
.
getProperty
(
"redis.pool.maxWait"
);
this
.
password
=
this
.
env
.
getProperty
(
"redis.password"
);
this
.
timeout
=
this
.
env
.
getProperty
(
"redis.timeout"
);
this
.
database
=
this
.
env
.
getProperty
(
"redis.database"
);
this
.
port
=
this
.
env
.
getProperty
(
"redis.port"
);
this
.
sysName
=
this
.
env
.
getProperty
(
"redis.sysName"
);
this
.
enable
=
this
.
env
.
getProperty
(
"redis.enable"
);
}
else
{
this
.
maxActive
=
prop
.
getProperty
(
"redis.pool.maxActive"
);
this
.
maxIdle
=
prop
.
getProperty
(
"redis.pool.maxIdle"
);
this
.
maxWait
=
prop
.
getProperty
(
"redis.pool.maxWait"
);
this
.
password
=
prop
.
getProperty
(
"redis.password"
);
this
.
timeout
=
prop
.
getProperty
(
"redis.timeout"
);
this
.
database
=
prop
.
getProperty
(
"redis.database"
);
this
.
port
=
prop
.
getProperty
(
"redis.port"
);
this
.
sysName
=
prop
.
getProperty
(
"redis.sysName"
);
this
.
enable
=
prop
.
getProperty
(
"redis.enable"
);
}
}
@Bean
public
JedisPoolConfig
constructJedisPoolConfig
()
{
JedisPoolConfig
config
=
new
JedisPoolConfig
();
config
.
setMaxTotal
(
Integer
.
parseInt
(
this
.
maxActive
));
config
.
setMaxIdle
(
Integer
.
parseInt
(
this
.
maxIdle
));
config
.
setMaxWaitMillis
((
long
)
Integer
.
parseInt
(
this
.
maxWait
));
config
.
setTestOnBorrow
(
true
);
return
config
;
}
@Bean
(
name
=
{
"pool"
}
)
public
JedisPool
constructJedisPool
()
{
String
ip
=
this
.
host
;
int
port
=
Integer
.
parseInt
(
this
.
port
);
String
password
=
this
.
password
;
int
timeout
=
Integer
.
parseInt
(
this
.
timeout
);
int
database
=
Integer
.
parseInt
(
this
.
database
);
if
(
null
==
this
.
pool
)
{
if
(
StringUtils
.
isBlank
(
password
))
{
this
.
pool
=
new
JedisPool
(
this
.
constructJedisPoolConfig
(),
ip
,
port
,
timeout
,(
String
)
null
,
database
);
}
else
{
this
.
pool
=
new
JedisPool
(
this
.
constructJedisPoolConfig
(),
ip
,
port
,
timeout
,
password
,
database
);
}
}
return
this
.
pool
;
}
public
String
getMaxActive
()
{
return
this
.
maxActive
;
}
public
void
setMaxActive
(
String
maxActive
)
{
this
.
maxActive
=
maxActive
;
}
public
String
getMaxIdle
()
{
return
this
.
maxIdle
;
}
public
void
setMaxIdle
(
String
maxIdle
)
{
this
.
maxIdle
=
maxIdle
;
}
public
String
getMaxWait
()
{
return
this
.
maxWait
;
}
public
void
setMaxWait
(
String
maxWait
)
{
this
.
maxWait
=
maxWait
;
}
public
String
getHost
()
{
return
this
.
host
;
}
public
void
setHost
(
String
host
)
{
this
.
host
=
host
;
}
public
String
getPassword
()
{
return
this
.
password
;
}
public
void
setPassword
(
String
password
)
{
this
.
password
=
password
;
}
public
String
getTimeout
()
{
return
this
.
timeout
;
}
public
void
setTimeout
(
String
timeout
)
{
this
.
timeout
=
timeout
;
}
public
String
getDatabase
()
{
return
this
.
database
;
}
public
void
setDatabase
(
String
database
)
{
this
.
database
=
database
;
}
public
String
getSysName
()
{
return
this
.
sysName
;
}
public
void
setSysName
(
String
sysName
)
{
this
.
sysName
=
sysName
;
}
public
String
getEnable
()
{
return
this
.
enable
;
}
public
void
setEnable
(
String
enable
)
{
this
.
enable
=
enable
;
}
public
String
getPort
()
{
return
this
.
port
;
}
public
void
setPort
(
String
port
)
{
this
.
port
=
port
;
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/vo/PageDataVO.java
View file @
7e817da3
package
com
.
github
.
wxiaoqi
.
security
.
common
.
vo
;
import
cn.hutool.core.collection.CollUtil
;
import
cn.hutool.core.convert.Convert
;
import
com.github.pagehelper.ISelect
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -48,4 +50,12 @@ public class PageDataVO<T> {
public
static
<
M
>
PageDataVO
<
M
>
pageInfo
(
Query
query
,
ISelect
select
){
return
PageDataVO
.
pageInfo
(
PageHelper
.
startPage
(
query
.
getPage
(),
query
.
getLimit
()).
doSelectPageInfo
(
select
));
}
public
static
<
M
>
PageDataVO
<
M
>
pageInfo
(
Query
query
,
ISelect
select
,
Class
classz
){
PageDataVO
<
M
>
pageDataVo
=
pageInfo
(
query
,
select
);
if
(
CollUtil
.
isNotEmpty
(
pageDataVo
.
getData
())
&&
pageDataVo
.
getData
().
get
(
0
).
getClass
()
!=
classz
)
{
pageDataVo
.
setData
(
Convert
.
toList
(
classz
,
pageDataVo
.
getData
()));
}
return
pageDataVo
;
}
}
ace-common/src/main/java/com/github/wxiaoqi/security/common/vo/PageParam.java
View file @
7e817da3
package
com
.
github
.
wxiaoqi
.
security
.
common
.
vo
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
...
...
@@ -10,5 +11,7 @@ public class PageParam {
@ApiModelProperty
(
"每页限制"
)
Integer
limit
;
public
Query
initQuery
()
{
return
new
Query
(
this
);
}
}
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/AuthorityMenuTree.java
View file @
7e817da3
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
;
import
cn.hutool.core.collection.CollUtil
;
import
com.github.wxiaoqi.security.common.vo.TreeNode
;
import
org.springframework.beans.BeanUtils
;
...
...
@@ -17,6 +18,15 @@ public class AuthorityMenuTree extends TreeNode implements Serializable{
String
text
;
List
<
AuthorityMenuTree
>
nodes
=
new
ArrayList
<
AuthorityMenuTree
>();
String
icon
;
List
<
Integer
>
elementIds
=
CollUtil
.
newArrayList
();
public
List
<
Integer
>
getElementIds
()
{
return
elementIds
;
}
public
void
setElementIds
(
List
<
Integer
>
elementIds
)
{
this
.
elementIds
=
elementIds
;
}
public
String
getIcon
()
{
return
icon
;
...
...
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/BaseUserVO.java
0 → 100644
View file @
7e817da3
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
;
import
com.github.wxiaoqi.security.admin.entity.Group
;
import
com.github.wxiaoqi.security.admin.entity.User
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
import
java.util.stream.Collectors
;
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public
class
BaseUserVO
extends
User
{
private
List
<
Group
>
groupList
;
private
String
groupStr
;
public
String
getGroupStr
(){
if
(
groupList
!=
null
&&
groupList
.
size
()
>
0
){
groupStr
=
groupList
.
stream
().
map
(
Group:
:
getName
).
collect
(
Collectors
.
joining
(
","
));
}
return
groupStr
;
}
}
\ No newline at end of file
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/vo/MenuTree.java
View file @
7e817da3
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
vo
;
import
cn.hutool.core.collection.CollUtil
;
import
com.github.wxiaoqi.security.admin.entity.Element
;
import
com.github.wxiaoqi.security.common.vo.TreeNode
;
import
java.util.List
;
/**
* Created by Ace on 2017/6/12.
*/
...
...
@@ -16,6 +20,15 @@ public class MenuTree extends TreeNode {
String
redirect
;
String
code
;
String
type
;
List
<
Element
>
elements
=
CollUtil
.
newArrayList
();
public
List
<
Element
>
getElements
()
{
return
elements
;
}
public
void
setElements
(
List
<
Element
>
elements
)
{
this
.
elements
=
elements
;
}
public
String
getCode
()
{
return
code
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/GroupBiz.java
View file @
7e817da3
...
...
@@ -164,6 +164,24 @@ public class GroupBiz extends BaseBiz<GroupMapper, Group> {
findParentID
(
map
,
relationMenus
,
parentId
);
}
/**
* 分配资源权限(批量)
*
* @param groupId
* @param elements
*/
@CacheClear
(
keys
=
{
"permission:ele"
,
"permission:u"
,
"app:permission:ele"
,
"app:permission:u"
})
public
void
modifyAuthorityElements
(
int
groupId
,
String
[]
elements
)
{
resourceAuthorityMapper
.
deleteByAuthorityIdAndResourceType
(
groupId
+
""
,
AdminCommonConstant
.
RESOURCE_TYPE_BTN
);
if
(
elements
.
length
>
0
){
Set
<
String
>
relationElements
=
new
HashSet
<
String
>();
relationElements
.
addAll
(
Arrays
.
asList
(
elements
));
for
(
String
elementId
:
relationElements
)
{
modifyAuthorityElement
(
groupId
,
0
,
Integer
.
valueOf
(
elementId
));
}
}
}
/**
* 分配资源权限
*
...
...
@@ -207,10 +225,12 @@ public class GroupBiz extends BaseBiz<GroupMapper, Group> {
List
<
Menu
>
menus
=
menuMapper
.
selectMenuByAuthorityId
(
String
.
valueOf
(
groupId
),
AdminCommonConstant
.
AUTHORITY_TYPE_GROUP
);
List
<
AuthorityMenuTree
>
trees
=
new
ArrayList
<
AuthorityMenuTree
>();
AuthorityMenuTree
node
=
null
;
List
<
Integer
>
elementIds
=
getAuthorityElement
(
groupId
);
for
(
Menu
menu
:
menus
)
{
node
=
new
AuthorityMenuTree
();
node
.
setText
(
menu
.
getTitle
());
BeanUtils
.
copyProperties
(
menu
,
node
);
node
.
setElementIds
(
elementIds
);
trees
.
add
(
node
);
}
return
trees
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/GroupController.java
View file @
7e817da3
...
...
@@ -4,13 +4,18 @@ import com.github.wxiaoqi.security.admin.biz.GroupBiz;
import
com.github.wxiaoqi.security.admin.biz.ResourceAuthorityBiz
;
import
com.github.wxiaoqi.security.admin.constant.AdminCommonConstant
;
import
com.github.wxiaoqi.security.admin.entity.Group
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.admin.vo.AuthorityMenuTree
;
import
com.github.wxiaoqi.security.admin.vo.GroupTree
;
import
com.github.wxiaoqi.security.admin.vo.GroupUsers
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.TreeUtil
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
io.swagger.annotations.Api
;
import
lombok.Data
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -30,16 +35,24 @@ import java.util.List;
@Controller
@RequestMapping
(
"group"
)
@Api
(
"群组模块"
)
public
class
GroupController
extends
BaseController
<
GroupBiz
,
Group
>
{
public
class
GroupController
extends
BaseController
<
GroupBiz
,
Group
>
implements
UserRestInterface
{
@Autowired
private
ResourceAuthorityBiz
resourceAuthorityBiz
;
@Autowired
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
List
<
Group
>
list
(
String
name
,
String
groupType
)
{
if
(
StringUtils
.
isBlank
(
name
)&&
StringUtils
.
isBlank
(
groupType
))
{
return
new
ArrayList
<
Group
>();
}
//
if(StringUtils.isBlank(name)&&StringUtils.isBlank(groupType)) {
//
return new ArrayList<Group>();
//
}
Example
example
=
new
Example
(
Group
.
class
);
if
(
StringUtils
.
isNotBlank
(
name
))
{
example
.
createCriteria
().
andLike
(
"name"
,
"%"
+
name
+
"%"
);
...
...
@@ -50,13 +63,19 @@ public class GroupController extends BaseController<GroupBiz, Group> {
return
baseBiz
.
selectByExample
(
example
);
}
@RequestMapping
(
value
=
"/listPage"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
PageDataVO
<
Group
>>
listPage
(
ListPageDTO
dto
)
{
return
ObjectRestResponse
.
succ
(
PageDataVO
.
pageInfo
(
dto
.
initQuery
(),
()
->
list
(
dto
.
getName
(),
dto
.
getGroupType
())));
}
@GetMapping
(
value
=
"/list_all"
)
@ResponseBody
public
List
<
Group
>
listAll
()
{
return
baseBiz
.
selectListAll
();
}
@RequestMapping
(
value
=
"/{id}/user"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public
ObjectRestResponse
modifiyUsers
(
@PathVariable
int
id
,
String
members
,
String
leaders
){
...
...
@@ -70,6 +89,25 @@ public class GroupController extends BaseController<GroupBiz, Group> {
return
new
ObjectRestResponse
<
GroupUsers
>().
rel
(
true
).
data
(
baseBiz
.
getGroupUsers
(
id
));
}
@RequestMapping
(
value
=
"V2/{id}/authority/menu"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public
ObjectRestResponse
modifyMenuAuthorityV2
(
@PathVariable
int
id
,
String
menuTrees
,
String
elementTrees
){
String
[]
menus
=
new
String
[]{};
String
[]
elements
=
new
String
[]{};
if
(
StringUtils
.
isNotBlank
(
menuTrees
)){
menus
=
menuTrees
.
split
(
","
);
}
if
(
StringUtils
.
isNotBlank
(
elementTrees
)){
elements
=
elementTrees
.
split
(
","
);
}
baseBiz
.
modifyAuthorityMenu
(
id
,
menus
);
baseBiz
.
modifyAuthorityElements
(
id
,
elements
);
return
new
ObjectRestResponse
().
rel
(
true
);
}
@RequestMapping
(
value
=
"/{id}/authority/menu"
,
method
=
RequestMethod
.
PUT
)
@ResponseBody
public
ObjectRestResponse
modifyMenuAuthority
(
@PathVariable
int
id
,
String
menuTrees
){
...
...
@@ -158,4 +196,10 @@ public class GroupController extends BaseController<GroupBiz, Group> {
}
return
TreeUtil
.
bulid
(
trees
,
root
)
;
}
@Data
static
public
class
ListPageDTO
extends
PageParam
{
String
name
;
String
groupType
;
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/MenuController.java
View file @
7e817da3
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
com.github.wxiaoqi.security.admin.biz.ElementBiz
;
import
com.github.wxiaoqi.security.admin.biz.MenuBiz
;
import
com.github.wxiaoqi.security.admin.biz.UserBiz
;
import
com.github.wxiaoqi.security.admin.entity.Element
;
import
com.github.wxiaoqi.security.admin.entity.Menu
;
import
com.github.wxiaoqi.security.admin.vo.AuthorityMenuTree
;
import
com.github.wxiaoqi.security.admin.vo.MenuTree
;
...
...
@@ -32,6 +34,9 @@ public class MenuController extends BaseController<MenuBiz, Menu> {
@Autowired
private
UserBiz
userBiz
;
@Autowired
private
ElementBiz
elementBiz
;
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
List
<
Menu
>
list
(
String
title
)
{
...
...
@@ -122,6 +127,9 @@ public class MenuController extends BaseController<MenuBiz, Menu> {
node
=
new
MenuTree
();
BeanUtils
.
copyProperties
(
menu
,
node
);
node
.
setLabel
(
menu
.
getTitle
());
node
.
setElements
(
elementBiz
.
selectList
(
new
Element
(){{
setMenuId
(
menu
.
getId
().
toString
());
}}));
trees
.
add
(
node
);
}
return
TreeUtil
.
bulid
(
trees
,
root
)
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/UserController.java
View file @
7e817da3
...
...
@@ -7,6 +7,7 @@ import com.github.wxiaoqi.security.admin.entity.Menu;
import
com.github.wxiaoqi.security.admin.entity.User
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.rpc.service.PermissionService
;
import
com.github.wxiaoqi.security.admin.vo.BaseUserVO
;
import
com.github.wxiaoqi.security.admin.vo.FrontUser
;
import
com.github.wxiaoqi.security.admin.vo.GroupUsers
;
import
com.github.wxiaoqi.security.admin.vo.MenuTree
;
...
...
@@ -18,6 +19,7 @@ import com.github.wxiaoqi.security.common.msg.TableResultResponse;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -147,14 +149,22 @@ public class UserController extends CommonBaseController {
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
TableResultResponse
<
User
>
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
public
ObjectRestResponse
<
PageDataVO
<
BaseUserVO
>
>
list
(
@RequestParam
Map
<
String
,
Object
>
params
){
//查询列表数据
Query
query
=
new
Query
(
params
);
try
{
return
userBiz
.
selectPage
(
query
,
userBiz
.
getUserByUsername
(
userAuthUtil
.
getInfoFromToken
(
userAuthConfig
.
getToken
(
request
)).
getUniqueName
()));
PageDataVO
<
BaseUserVO
>
dataVO
=
PageDataVO
.
pageInfo
(
query
,
()->
userBiz
.
selectListAll
(),
BaseUserVO
.
class
);
List
<
BaseUserVO
>
list
=
dataVO
.
getData
();
if
(
list
!=
null
&&
list
.
size
()
>
0
){
for
(
BaseUserVO
baseUserVo:
list
){
baseUserVo
.
setGroupList
(
groupBiz
.
getUserGroups
(
baseUserVo
.
getId
()));
}
}
return
ObjectRestResponse
.
succ
(
dataVO
);
//return userBiz.selectPage(query, userBiz.getUserByUsername(userAuthUtil.getInfoFromToken(userAuthConfig.getToken(request)).getUniqueName()));
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
());
return
new
TableResultResponse
<
User
>
();
return
ObjectRestResponse
.
createDefaultFail
();
}
}
...
...
rs-universal/rs-universal-server/target/classes/mapper/DictionaryMapper.xml
View file @
7e817da3
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper
namespace=
"com.upyuns.platform.rs.universal.mapper.DictionaryMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"Dictionary"
>
<resultMap
id=
"BaseResultMap"
type=
"
com.upyuns.platform.rs.universal.entity.
Dictionary"
>
<!--
WARNING - @mbg.generated
-->
...
...
@@ -13,7 +13,7 @@
<result
column=
"detail"
property=
"detail"
jdbcType=
"VARCHAR"
/>
</resultMap>
<select
id=
"selectByCodeAndType"
parameterType=
"
Dictionary"
resultType=
"
Dictionary"
>
<select
id=
"selectByCodeAndType"
parameterType=
"
com.upyuns.platform.rs.universal.entity.Dictionary"
resultType=
"com.upyuns.platform.rs.universal.entity.
Dictionary"
>
select * from data_dictionary
<where>
<if
test=
"type != null"
>
...
...
@@ -28,7 +28,7 @@
</where>
</select>
<select
id =
"selectByPid"
parameterType=
"java.lang.Integer"
resultType=
"Dictionary"
>
<select
id =
"selectByPid"
parameterType=
"java.lang.Integer"
resultType=
"
com.upyuns.platform.rs.universal.entity.
Dictionary"
>
select * from data_dictionary
where pid = #{pid}
</select>
...
...
rs-universal/rs-universal-server/target/classes/mapper/IdInformationMapper.xml
View file @
7e817da3
...
...
@@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.upyuns.platform.rs.universal.mapper.IdInformationMapper"
>
<resultMap
type=
"IdInformation"
id=
"IdInformation"
>
<resultMap
type=
"
com.upyuns.platform.rs.universal.entity.
IdInformation"
id=
"IdInformation"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"idNumber"
column=
"id_number"
/>
<result
property=
"name"
column=
"name"
/>
...
...
@@ -13,7 +13,7 @@
<result
property=
"expirationDate"
column=
"expiration_date"
/>
<result
property=
"authenticationMethods"
column=
"authentication_methods"
/>
</resultMap>
<select
id=
"selectByUserId"
resultType=
"IdInformation"
parameterType=
"java.lang.Integer"
>
<select
id=
"selectByUserId"
resultType=
"
com.upyuns.platform.rs.universal.entity.
IdInformation"
parameterType=
"java.lang.Integer"
>
select * from id_information where user_login_id = #{userLoginId}
</select>
...
...
rs-universal/rs-universal-server/target/classes/mapper/MemberFamilyInfoMapper.xml
View file @
7e817da3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.upyuns.platform.rs.universal.mapper.MemberFamilyInfoMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"MemberFamilyInfo"
>
<resultMap
id=
"BaseResultMap"
type=
"
com.upyuns.platform.rs.universal.entity.
MemberFamilyInfo"
>
<!--
WARNING - @mbg.generated
-->
...
...
rs-universal/rs-universal-server/target/classes/mapper/MemberInfoMapper.xml
View file @
7e817da3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.upyuns.platform.rs.universal.mapper.MemberInfoMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"MemberInfo"
>
<resultMap
id=
"BaseResultMap"
type=
"
com.upyuns.platform.rs.universal.entity.
MemberInfo"
>
<!--
WARNING - @mbg.generated
-->
...
...
@@ -41,7 +41,7 @@
create_user_name, state
</sql>
<resultMap
id=
"MemberInfoVoResultMap"
type=
"MemberInfoVo"
>
<resultMap
id=
"MemberInfoVoResultMap"
type=
"
com.upyuns.platform.rs.universal.vo.
MemberInfoVo"
>
<id
column=
"id"
jdbcType=
"INTEGER"
property=
"id"
/>
<result
column=
"name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"sex"
jdbcType=
"BIT"
property=
"sex"
/>
...
...
rs-universal/rs-universal-server/target/classes/mapper/OrderPayMapper.xml
View file @
7e817da3
...
...
@@ -4,7 +4,7 @@
<mapper
namespace=
"com.upyuns.platform.rs.universal.mapper.OrderPayMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"OrderPay"
id=
"orderPayMap"
>
<resultMap
type=
"
com.upyuns.platform.rs.universal.entity.
OrderPay"
id=
"orderPayMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"tradeNo"
column=
"trade_no"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
...
...
rs-universal/rs-universal-server/target/classes/mapper/OrderRefundMapper.xml
View file @
7e817da3
...
...
@@ -4,7 +4,7 @@
<mapper
namespace=
"com.upyuns.platform.rs.universal.mapper.OrderRefundMapper"
>
<!-- 可根据自己的需求,是否要使用 -->
<resultMap
type=
"OrderRefund"
id=
"orderRefundMap"
>
<resultMap
type=
"
com.upyuns.platform.rs.universal.entity.
OrderRefund"
id=
"orderRefundMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"refundTradeNo"
column=
"refund_trade_no"
/>
<result
property=
"orderNo"
column=
"order_no"
/>
...
...
rs-universal/rs-universal-server/target/classes/mapper/SysRegionMapper.xml
View file @
7e817da3
...
...
@@ -3,12 +3,12 @@
<mapper
namespace=
"com.upyuns.platform.rs.universal.mapper.SysRegionMapper"
>
<select
id=
"getAllByPage"
parameterType=
"java.util.Map"
resultType=
"SysRegion"
>
resultType=
"
com.upyuns.platform.rs.universal.entity.
SysRegion"
>
select `id`, parent_id, `name`, `type`, agency_id from sys_region limit #{pageStart},${pageSize}
</select>
<select
id=
"getByIdList"
parameterType=
"java.util.List"
resultType=
"SysRegion"
>
resultType=
"
com.upyuns.platform.rs.universal.entity.
SysRegion"
>
select `id`, parent_id, `name`, `type`, agency_id from sys_region where id in
<foreach
collection=
"list"
index=
"i"
item=
"item"
open=
"("
close=
")"
separator=
","
>
#{item}
...
...
@@ -22,7 +22,7 @@
select `id` from sys_region where name like CONCAT('%',#{name},'%') and type=#{type} limit 1
</select>
<select
id=
"findByCityName"
resultType=
"RegionDTO"
>
<select
id=
"findByCityName"
resultType=
"
com.upyuns.platform.rs.universal.dto.
RegionDTO"
>
select `id`,`parent_id` as `parentId` from `sys_region` where `type`=2 and `name` like concat('%',#{city} ,'%')
</select>
</mapper>
\ No newline at end of file
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/constant/RedisKey.java
0 → 100644
View file @
7e817da3
package
com
.
upyuns
.
platform
.
rs
.
website
.
constant
;
public
class
RedisKey
{
/**
* 常量缓存key前缀
*/
public
static
final
String
TOKEN_CACHE_PREFIX
=
"cache:token:"
;
/**
* 地区常量缓存key前缀(子读取列表)
*/
public
static
final
String
SYS_REGION_SONS_CACHE_PREFIX
=
"cache:sysRegion:sons:"
;
/**
* 地区常量缓存key前缀(子读取列表)
*/
public
static
final
String
SYS_REGION_CACHE_PREFIX
=
"cache:sysRegion:"
;
/**
* 刷新常量缓存乐观锁前缀
*/
public
static
final
String
CONSTANT_REFRESH_LOCK_PREFIX
=
"lock:constant:"
;
/**
* 地区常量缓存key前缀
*/
public
static
final
String
SYS_REGION_REFRESH_LOCK
=
"lock:sysRegion:"
;
/**
* 迁移预定信息rediseky
*/
public
static
final
String
DEL_BOOK_INFO_LOCK_PREFIX
=
"lock:del:bookInfo:"
;
/**
* 迁移预定记录rediseky
*/
public
static
final
String
TRANSFER_BOOK_RECORD_LOCK_PREFIX
=
"lock:bookRecord:transfer"
;
/**
* 子公司列表缓存key前缀
*/
public
static
final
String
BRANCH_COMPANY_CACHE
=
"cache:brachCompany"
;
/**
* 子公司列表缓存key前缀
*/
public
static
final
String
BRANCH_COMPANY_CACHE_ALL
=
BRANCH_COMPANY_CACHE
+
":all"
;
/**
* 片区对应的子公司缓存key前缀
*/
public
static
final
String
BRANCH_COMPANY_CACHE_DATAZONE
=
BRANCH_COMPANY_CACHE
+
":dataZone{1}"
;
/**
* 营地列表缓存key前缀
*/
public
static
final
String
CAMPSITE_CACHE
=
"cache:campsite"
;
/**
* 营地列表缓存key前缀
*/
public
static
final
String
CAMPSITE_CACHE_ALL
=
CAMPSITE_CACHE
+
":all"
;
/**
* 片区对应的营地缓存key前缀
*/
public
static
final
String
CAMPSITE_CACHE_DATAZONE
=
CAMPSITE_CACHE
+
":dataZone{1}"
;
// 随车物品相关key
public
static
final
String
ACCOMPANYING_ITEM_CACHE_ALL
=
"cache:accompanyItem:all"
;
/**
* 服务器上传文件序号
*/
public
static
final
String
UPLOAD_FILE_NO_PREFIX
=
"upload:file:no:"
;
/**
* 预警信息检查乐观锁
*/
public
static
final
String
LOCK_VEHICLE_WARNING_MSG
=
"lock:vehicle:warningMsg"
;
/**
* 车辆预警,前一天检查的里程数redisKey前缀
*/
public
static
final
String
MILEAGE_LAST_DAY_PREFIX
=
"mileage:last_day:"
;
/**
* 车辆预警,前一天检查的里程数redisKey前缀
*/
public
static
final
String
CACHE_DICTIONARY_PREFIX
=
"cache:dictionary:"
;
public
static
final
String
CACHE_DICTIONARY_ALL
=
CACHE_DICTIONARY_PREFIX
+
"all:"
;
public
static
final
String
CACHE_DICTIONARY_ALL_MAP
=
CACHE_DICTIONARY_ALL
+
"map:"
;
public
static
final
String
ILLEGAL_VEHICLE_ENQUIRIES
=
"cache:violation"
;
/**
* 服务器上传压缩包文件序号
*/
public
static
final
String
UPLOAD_ZIP_NO_PREFIX
=
"upload:zip:no:"
;
public
static
final
String
CAPTCHA_PHONE_PREFIX
=
"captcha:phone:"
;
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/dto/CaptchaBaseParam.java
0 → 100644
View file @
7e817da3
package
com
.
upyuns
.
platform
.
rs
.
website
.
dto
;
import
java.io.Serializable
;
/**
* 基础入参对象
* @author stx
* @date 2018/11/5 16:35
* @desc
*/
public
class
CaptchaBaseParam
implements
Serializable
{
private
String
urlOrPath
;
public
String
getUrlOrPath
()
{
return
urlOrPath
;
}
public
void
setUrlOrPath
(
String
urlOrPath
)
{
this
.
urlOrPath
=
urlOrPath
;
}
}
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/Demo.java
0 → 100644
View file @
7e817da3
package
com
.
upyuns
.
platform
.
rs
.
website
.
entity
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
javax.persistence.Table
;
import
javax.persistence.Transient
;
import
java.io.Serializable
;
import
java.util.Set
;
@Data
@Table
(
name
=
"demo"
)
public
class
Demo
implements
Serializable
{
@Id
private
Integer
id
;
private
String
name
;
}
\ No newline at end of file
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/feign/WebsiteFeign.java
0 → 100644
View file @
7e817da3
package
com
.
upyuns
.
platform
.
rs
.
website
.
feign
;
import
org.springframework.cloud.openfeign.FeignClient
;
/**
* ${DESCRIPTION}
*
* @author wanghaobin
* @create 2017-06-21 8:11
*/
@FeignClient
(
value
=
"rs-website"
,
contextId
=
"website-base"
)
public
interface
WebsiteFeign
{
}
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