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
7451eb16
Commit
7451eb16
authored
Aug 13, 2019
by
jiaorz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改租車訂單地址,修改车辆预定时添加订单号
parent
789cd524
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
+24
-6
ResultCode.java
...thub/wxiaoqi/security/common/util/process/ResultCode.java
+8
-0
resultcod.properties
...common/src/main/resources/properties/resultcod.properties
+10
-1
UserController.java
...om/github/wxiaoqi/security/admin/rest/UserController.java
+6
-5
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/util/process/ResultCode.java
View file @
7451eb16
...
@@ -29,6 +29,14 @@ public class ResultCode {
...
@@ -29,6 +29,14 @@ public class ResultCode {
// 只能取消预定两个月内的车辆
// 只能取消预定两个月内的车辆
public
static
int
ONLY_UNBOOK_TWO_MONTH
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ONLY_UNBOOK_TWO_MONTH"
));
public
static
int
ONLY_UNBOOK_TWO_MONTH
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ONLY_UNBOOK_TWO_MONTH"
));
// 添加车辆太多
public
static
int
ADD_VEHICLE_MORE
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"ADD_VEHICLE_MORE"
));
// 停靠公司不能为空
public
static
int
RET_COMPANY_CAN_NOT_BE_NULL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"RET_COMPANY_CAN_NOT_BE_NULL"
));
// 车牌不能为空
public
static
int
NUMBER_PLAT_CAN_NOT_BE_NULL
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"NUMBER_PLAT_CAN_NOT_BE_NULL"
));
// 选择日期不可取消预定
// 选择日期不可取消预定
public
static
int
VEHICLE_CAN_NOT_UNBOOK
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"VEHICLE_CAN_NOT_UNBOOK"
));
public
static
int
VEHICLE_CAN_NOT_UNBOOK
=
Integer
.
valueOf
(
SystemProperty
.
getResultConfig
(
"VEHICLE_CAN_NOT_UNBOOK"
));
...
...
ace-common/src/main/resources/properties/resultcod.properties
View file @
7451eb16
...
@@ -238,4 +238,13 @@ BOOKED_DATE_IS_EMPTY = 4015
...
@@ -238,4 +238,13 @@ BOOKED_DATE_IS_EMPTY = 4015
4015
=
预定日期为空
4015
=
预定日期为空
TODAY_CAN_NOT_BOOK
=
4016
TODAY_CAN_NOT_BOOK
=
4016
4016
=
当天不可预定
4016
=
当天不可预定
\ No newline at end of file
ADD_VEHICLE_MORE
=
4017
4017
=
添加车辆过多,请分批添加
RET_COMPANY_CAN_NOT_BE_NULL
=
4018
4018
=
停靠公司不能为空
NUMBER_PLAT_CAN_NOT_BE_NULL
=
4019
4019
=
车牌不能为空
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/UserController.java
View file @
7451eb16
...
@@ -16,6 +16,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
...
@@ -16,6 +16,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import
com.github.wxiaoqi.security.common.msg.TableResultResponse
;
import
com.github.wxiaoqi.security.common.msg.TableResultResponse
;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.github.wxiaoqi.security.common.rest.CommonBaseController
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.xxfc.platform.vehicle.constant.ResCode.ResCode
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -78,13 +79,13 @@ public class UserController extends CommonBaseController {
...
@@ -78,13 +79,13 @@ public class UserController extends CommonBaseController {
if
(
StringUtils
.
isNotBlank
(
username
))
{
if
(
StringUtils
.
isNotBlank
(
username
))
{
List
<
User
>
list
=
userBiz
.
getCountByUsername
(
username
);
List
<
User
>
list
=
userBiz
.
getCountByUsername
(
username
);
if
(
list
.
size
()
>
0
)
{
if
(
list
.
size
()
>
0
)
{
throw
new
RuntimeException
(
"用户名不能重复"
);
return
ObjectRestResponse
.
createFailedResult
(
ResCode
.
USER_IS_EXIST
.
getCode
(),
ResCode
.
USER_IS_EXIST
.
getDesc
()
);
}
}
}
}
userBiz
.
insertSelective
(
vo
);
userBiz
.
insertSelective
(
vo
);
//添加权限关系
//添加权限关系
groupBiz
.
modifyUserGroups
(
vo
.
getId
(),
vo
.
getMembers
());
groupBiz
.
modifyUserGroups
(
vo
.
getId
(),
vo
.
getMembers
());
return
new
ObjectRestResponse
();
return
ObjectRestResponse
.
succ
();
}
}
private
void
handleDataLimit
(
@RequestBody
UserVO
dto
)
{
private
void
handleDataLimit
(
@RequestBody
UserVO
dto
)
{
...
@@ -166,12 +167,12 @@ public class UserController extends CommonBaseController {
...
@@ -166,12 +167,12 @@ public class UserController extends CommonBaseController {
if
(
StringUtils
.
isNotBlank
(
username
))
{
if
(
StringUtils
.
isNotBlank
(
username
))
{
List
<
User
>
list
=
userBiz
.
getCountByUsername
(
username
);
List
<
User
>
list
=
userBiz
.
getCountByUsername
(
username
);
if
(
list
.
size
()
>
1
)
{
if
(
list
.
size
()
>
1
)
{
throw
new
RuntimeException
(
"用户名不能重复"
);
return
ObjectRestResponse
.
createFailedResult
(
ResCode
.
USER_IS_EXIST
.
getCode
(),
ResCode
.
USER_IS_EXIST
.
getDesc
()
);
}
}
if
(
list
.
size
()
==
1
)
{
if
(
list
.
size
()
==
1
)
{
User
user
=
list
.
get
(
0
);
User
user
=
list
.
get
(
0
);
if
(!
user
.
getId
().
equals
(
vo
.
getId
()))
{
if
(!
user
.
getId
().
equals
(
vo
.
getId
()))
{
throw
new
RuntimeException
(
"用户名不能重复"
);
return
ObjectRestResponse
.
createFailedResult
(
ResCode
.
USER_IS_EXIST
.
getCode
(),
ResCode
.
USER_IS_EXIST
.
getDesc
()
);
}
}
}
}
}
}
...
...
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