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
9fa02f55
Commit
9fa02f55
authored
Sep 24, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
类型品牌相关
parent
9f40890b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
4 deletions
+167
-4
User.java
...n/java/com/github/wxiaoqi/security/admin/entity/User.java
+4
-0
UserController.java
...om/github/wxiaoqi/security/admin/rest/UserController.java
+1
-2
ChwUserController.java
...ub/wxiaoqi/security/admin/rest/chw/ChwUserController.java
+130
-0
VehicleBrand.java
...n/java/com/xxfc/platform/vehicle/entity/VehicleBrand.java
+8
-1
VehicleCategory.java
...ava/com/xxfc/platform/vehicle/entity/VehicleCategory.java
+24
-1
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/entity/User.java
View file @
9fa02f55
...
...
@@ -10,6 +10,10 @@ import java.util.List;
@Table
(
name
=
"base_user"
)
@Data
public
class
User
{
public
static
final
int
BIZ_TYPE_OPERATE
=
1
;
public
static
final
int
BIZ_TYPE_BUSINESS
=
2
;
@Id
@GeneratedValue
(
generator
=
"JDBC"
)
//此处加上注解
private
Integer
id
;
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/UserController.java
View file @
9fa02f55
...
...
@@ -32,6 +32,7 @@ import org.springframework.web.bind.annotation.*;
import
java.util.List
;
import
java.util.Map
;
import
static
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
.
User
.
BIZ_TYPE_OPERATE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
auth
.
common
.
constatns
.
CommonConstants
.
DATA_ALL_TRUE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
auth
.
common
.
constatns
.
CommonConstants
.
DATA_ALL_FALSE
;
/**
...
...
@@ -170,8 +171,6 @@ public class UserController extends CommonBaseController implements UserRestInte
return
userBiz
.
selectList
(
baseUserDTO
);
}
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
public
ObjectRestResponse
<
User
>
get
(
@PathVariable
int
id
)
{
...
...
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/chw/ChwUserController.java
0 → 100644
View file @
9fa02f55
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
.
chw
;
import
com.github.wxiaoqi.security.admin.biz.GroupBiz
;
import
com.github.wxiaoqi.security.admin.biz.MenuBiz
;
import
com.github.wxiaoqi.security.admin.biz.UserBiz
;
import
com.github.wxiaoqi.security.admin.dto.BaseUserDTO
;
import
com.github.wxiaoqi.security.admin.entity.Menu
;
import
com.github.wxiaoqi.security.admin.entity.User
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.admin.rest.UserController
;
import
com.github.wxiaoqi.security.admin.rpc.service.PermissionService
;
import
com.github.wxiaoqi.security.admin.vo.FrontUser
;
import
com.github.wxiaoqi.security.admin.vo.GroupUsers
;
import
com.github.wxiaoqi.security.admin.vo.MenuTree
;
import
com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken
;
import
com.github.wxiaoqi.security.auth.client.config.UserAuthConfig
;
import
com.github.wxiaoqi.security.auth.client.jwt.UserAuthUtil
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.List
;
import
static
com
.
github
.
wxiaoqi
.
security
.
admin
.
entity
.
User
.
BIZ_TYPE_OPERATE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
auth
.
common
.
constatns
.
CommonConstants
.
DATA_ALL_FALSE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
auth
.
common
.
constatns
.
CommonConstants
.
DATA_ALL_TRUE
;
/**
* ${DESCRIPTION}
*
* @author wanghaobin
* @create 2017-06-08 11:51
*/
@Slf4j
@RestController
@RequestMapping
(
"user"
)
public
class
ChwUserController
extends
CommonBaseController
implements
UserRestInterface
{
public
final
static
Integer
CURRENT_COMPANY
=
1
;
public
final
static
Integer
CURRENT_ZONE
=
2
;
public
final
static
Integer
DATA_ALL
=
3
;
@Autowired
private
PermissionService
permissionService
;
@Autowired
private
MenuBiz
menuBiz
;
@Autowired
private
GroupBiz
groupBiz
;
@Autowired
private
UserBiz
userBiz
;
@Autowired
private
UserAuthUtil
userAuthUtil
;
@Autowired
private
UserAuthConfig
userAuthConfig
;
@Autowired
UserFeign
userFeign
;
@Override
public
UserFeign
getUserFeign
()
{
return
userFeign
;
}
//内部类
@Data
public
static
class
UserVO
extends
User
{
// List<Integer> dataLimit;
Integer
dataLimit
;
List
<
Integer
>
members
;
}
@RequestMapping
(
value
=
"/operate/page"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
operatePage
(
BaseUserDTO
baseUserDTO
){
baseUserDTO
.
setBizType
(
BIZ_TYPE_OPERATE
);
return
userBiz
.
selectList
(
baseUserDTO
);
}
@RequestMapping
(
value
=
"/business/page"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
businessPage
(
BaseUserDTO
baseUserDTO
){
setPowerData
(
baseUserDTO
,
true
);
return
userBiz
.
selectList
(
baseUserDTO
);
}
@RequestMapping
(
value
=
"/operate/addUser"
,
method
=
RequestMethod
.
POST
)
@IgnoreClientToken
public
ObjectRestResponse
<
User
>
add
(
@RequestBody
UserController
.
UserVO
vo
)
{
String
username
=
vo
.
getUsername
();
if
(
StringUtils
.
isNotBlank
(
username
))
{
List
<
User
>
list
=
userBiz
.
getCountByUsername
(
username
);
if
(
list
.
size
()
>
0
)
{
return
ObjectRestResponse
.
createFailedResult
(
ResCode
.
USER_IS_EXIST
.
getCode
(),
ResCode
.
USER_IS_EXIST
.
getDesc
());
}
}
userBiz
.
insertSelective
(
vo
);
//添加权限关系
groupBiz
.
modifyUserGroups
(
vo
.
getId
(),
vo
.
getMembers
());
return
ObjectRestResponse
.
succ
();
}
private
void
handleDataLimit
(
@RequestBody
UserController
.
UserVO
dto
)
{
if
(
null
!=
dto
.
getDataLimit
())
{
dto
.
setDataCompany
(
""
);
dto
.
setDataAll
(
DATA_ALL_FALSE
);
dto
.
setDataZone
(
""
);
if
(
dto
.
getDataLimit
()>=
CURRENT_COMPANY
&&
dto
.
getCompanyId
()
!=
null
)
{
dto
.
setDataCompany
(
dto
.
getCompanyId
().
toString
());
}
if
(
dto
.
getDataLimit
()>=
CURRENT_ZONE
&&
dto
.
getZoneId
()
!=
null
)
{
dto
.
setDataZone
(
dto
.
getZoneId
().
toString
());
}
if
(
dto
.
getDataLimit
()>=
DATA_ALL
)
{
dto
.
setDataAll
(
DATA_ALL_TRUE
);
}
}
}
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleBrand.java
View file @
9fa02f55
...
...
@@ -140,4 +140,11 @@ public class VehicleBrand implements Serializable {
private
String
version
;
/**
* 商品类型 1--房车;2--机车;3--游艇
*/
@Column
(
name
=
"goods_type"
)
@ApiModelProperty
(
value
=
"商品类型 1--房车;2--机车;3--游艇"
)
private
Integer
goodsType
;
}
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/entity/VehicleCategory.java
View file @
9fa02f55
...
...
@@ -83,5 +83,28 @@ public class VehicleCategory implements Serializable {
@ApiModelProperty
(
value
=
"修改时间"
,
hidden
=
true
)
private
Date
updTime
;
/**
* 商品类型 1--房车;2--机车;3--游艇
*/
@Column
(
name
=
"goods_type"
)
@ApiModelProperty
(
value
=
"商品类型 1--房车;2--机车;3--游艇"
)
private
Integer
goodsType
;
/**
* 封面图
*/
@Column
(
name
=
"banner"
)
@ApiModelProperty
(
value
=
"封面图"
)
private
String
banner
;
/**
* 轮播图
*/
@Column
(
name
=
"carousel"
)
@ApiModelProperty
(
value
=
"轮播图"
)
private
String
carousel
;
}
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