Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
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
youjj
cloud-platform
Commits
774183d3
Commit
774183d3
authored
Sep 25, 2020
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev-chw' of
http://113.105.137.151:22280/youjj/cloud-platform
into dev-chw
parents
aeb7191d
123699ee
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
0 deletions
+99
-0
BranchCompany.java
...m/github/wxiaoqi/security/admin/entity/BranchCompany.java
+7
-0
BranchCompanyBiz.java
...m/github/wxiaoqi/security/admin/biz/BranchCompanyBiz.java
+8
-0
GroupBiz.java
.../java/com/github/wxiaoqi/security/admin/biz/GroupBiz.java
+29
-0
AppBranchCompanyController.java
...iaoqi/security/admin/rest/AppBranchCompanyController.java
+37
-0
GroupController.java
...m/github/wxiaoqi/security/admin/rest/GroupController.java
+18
-0
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/BranchCompany.java
View file @
774183d3
...
@@ -172,4 +172,11 @@ public class BranchCompany {
...
@@ -172,4 +172,11 @@ public class BranchCompany {
@Column
(
name
=
"is_del"
)
@Column
(
name
=
"is_del"
)
private
Integer
isDel
;
private
Integer
isDel
;
//浏览量
@Column
(
name
=
"browse_num"
)
private
Integer
browseNum
;
//点赞数量
@Column
(
name
=
"give_num"
)
private
Integer
giveNum
;
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/BranchCompanyBiz.java
View file @
774183d3
...
@@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil;
...
@@ -5,6 +5,7 @@ import cn.hutool.json.JSONUtil;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.github.pagehelper.PageInfo
;
import
com.github.wxiaoqi.security.admin.dto.CompanySearchDTO
;
import
com.github.wxiaoqi.security.admin.dto.CompanySearchDTO
;
import
com.github.wxiaoqi.security.admin.entity.AppUserRelation
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompany
;
import
com.github.wxiaoqi.security.admin.entity.BranchCompany
;
import
com.github.wxiaoqi.security.admin.mapper.BranchCompanyMapper
;
import
com.github.wxiaoqi.security.admin.mapper.BranchCompanyMapper
;
import
com.github.wxiaoqi.security.admin.vo.CompanySearchVO
;
import
com.github.wxiaoqi.security.admin.vo.CompanySearchVO
;
...
@@ -16,6 +17,7 @@ import com.xxfc.platform.universal.feign.MQSenderFeign;
...
@@ -16,6 +17,7 @@ import com.xxfc.platform.universal.feign.MQSenderFeign;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
tk.mybatis.mapper.entity.Example
;
import
java.util.List
;
import
java.util.List
;
...
@@ -72,6 +74,12 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
...
@@ -72,6 +74,12 @@ public class BranchCompanyBiz extends BaseBiz<BranchCompanyMapper, BranchCompany
}
}
public
ObjectRestResponse
getHotCompany
(
Integer
page
,
Integer
limit
){
Example
example
=
new
Example
(
BranchCompany
.
class
);
example
.
orderBy
(
"browseNum"
).
asc
();
PageDataVO
<
BranchCompany
>
pageDataVO
=
PageDataVO
.
pageInfo
(
page
,
limit
,
()
->
mapper
.
selectByExample
(
example
));
return
ObjectRestResponse
.
succ
(
pageDataVO
);
}
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/GroupBiz.java
View file @
774183d3
...
@@ -164,6 +164,35 @@ public class GroupBiz extends BaseBiz<GroupMapper, Group> {
...
@@ -164,6 +164,35 @@ public class GroupBiz extends BaseBiz<GroupMapper, Group> {
findParentID
(
map
,
relationMenus
,
parentId
);
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
){
// List<Menu> menuList = menuMapper.selectAll();
// Map<String, String> map = new HashMap<String, String>();
// for (Menu menu : menuList) {
// map.put(menu.getId().toString(), menu.getParentId().toString());
// }
// Set<String> relationMenus = new HashSet<String>();
// relationMenus.addAll(Arrays.asList(menus));
// ResourceAuthority authority = null;
// for (String menuId : menus) {
// findParentID(map, relationMenus, menuId);
// }
Set
<
String
>
relationElements
=
new
HashSet
<
String
>();
relationElements
.
addAll
(
Arrays
.
asList
(
elements
));
for
(
String
elementId
:
relationElements
)
{
modifyAuthorityElement
(
groupId
,
0
,
Integer
.
valueOf
(
elementId
));
}
}
}
/**
/**
* 分配资源权限
* 分配资源权限
*
*
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/AppBranchCompanyController.java
0 → 100644
View file @
774183d3
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
com.github.wxiaoqi.security.admin.biz.BranchCompanyBiz
;
import
com.github.wxiaoqi.security.admin.biz.CompanyInfoApplyBiz
;
import
com.github.wxiaoqi.security.admin.biz.CompanyInfoOrderBiz
;
import
com.github.wxiaoqi.security.admin.entity.CompanyInfo
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
/**
* @author Administrator
*/
@Slf4j
@RestController
@RequestMapping
(
"app/branchCompany"
)
@RequiredArgsConstructor
(
onConstructor_
=
{
@Autowired
})
@Api
(
tags
=
{
"商家"
})
public
class
AppBranchCompanyController
extends
BaseController
<
CompanyInfoApplyBiz
>
{
@Autowired
BranchCompanyBiz
branchCompanyBiz
;
@GetMapping
(
"getHotCompany"
)
@ApiModelProperty
(
"获取热门商家"
)
public
ObjectRestResponse
getHotCompany
(
@RequestParam
(
"page"
)
Integer
page
,
@RequestParam
(
"limit"
)
Integer
limit
)
{
return
ObjectRestResponse
.
succ
(
branchCompanyBiz
.
getHotCompany
(
page
,
limit
));
}
}
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/GroupController.java
View file @
774183d3
...
@@ -93,6 +93,24 @@ public class GroupController extends BaseController<GroupBiz, Group> {
...
@@ -93,6 +93,24 @@ public class GroupController extends BaseController<GroupBiz, Group> {
return
new
ObjectRestResponse
().
rel
(
true
);
return
new
ObjectRestResponse
().
rel
(
true
);
}
}
@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
.
GET
)
@RequestMapping
(
value
=
"/{id}/authority/menu"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@ResponseBody
public
ObjectRestResponse
<
List
<
AuthorityMenuTree
>>
getMenuAuthority
(
@PathVariable
int
id
){
public
ObjectRestResponse
<
List
<
AuthorityMenuTree
>>
getMenuAuthority
(
@PathVariable
int
id
){
...
...
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