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
552a0b06
Commit
552a0b06
authored
Sep 29, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zjw' into dev
parents
41a59735
5b2da448
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
7 deletions
+33
-7
PublicController.java
.../github/wxiaoqi/security/admin/rest/PublicController.java
+22
-0
AbstractOrderHandle.java
.../com/xxfc/platform/order/service/AbstractOrderHandle.java
+6
-4
OrderRentVehicleService.java
.../xxfc/platform/order/service/OrderRentVehicleService.java
+5
-3
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rest/PublicController.java
View file @
552a0b06
package
com
.
github
.
wxiaoqi
.
security
.
admin
.
rest
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.biz.*
;
import
com.github.wxiaoqi.security.admin.entity.*
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
...
...
@@ -40,6 +41,10 @@ public class PublicController {
@Autowired
private
AppUserDetailBiz
detailBiz
;
@Autowired
private
AppUserLoginBiz
appUserLoginBiz
;
@Autowired
private
BaseUserMemberBiz
userMemberBiz
;
...
...
@@ -85,6 +90,23 @@ public class PublicController {
return
ObjectRestResponse
.
succ
(
getAppUserInfoById
(
id
));
}
@RequestMapping
(
value
=
"/app/userinfo-by-username"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
ObjectRestResponse
<
AppUserDTO
>
userDetailByUsername
(
String
name
)
throws
Exception
{
AppUserLogin
appUserLogin
;
if
(
StrUtil
.
isNotBlank
(
name
))
{
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
}
else
{
appUserLogin
=
appUserLoginBiz
.
selectOne
(
new
AppUserLogin
(){{
setUsername
(
name
);}});
if
(
null
==
appUserLogin
)
{
throw
new
BaseException
(
ResultCode
.
NOTEXIST_CODE
,
new
HashSet
<
String
>()
{{
add
(
"用户名不存在!"
);}});
}
}
return
ObjectRestResponse
.
succ
(
getAppUserInfoById
(
appUserLogin
.
getId
()));
}
private
AppUserDTO
getAppUserInfoById
(
Integer
userid
)
throws
IllegalAccessException
,
InvocationTargetException
{
AppUserDTO
userDTO
=
new
AppUserDTO
();
//获取用户基础信息
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/AbstractOrderHandle.java
View file @
552a0b06
package
com
.
xxfc
.
platform
.
order
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
...
...
@@ -120,10 +121,11 @@ public abstract class AbstractOrderHandle<Biz extends BaseBiz, Detail extends Or
detail
.
setOrderId
(
detail
.
getOrder
().
getId
());
detailBiz
.
insertSelective
(
detail
);
detail
.
getOrder
().
setDetailId
(
detail
.
getId
());
int
updateResult
=
baseOrderBiz
.
updateSelectiveByIdRe
(
detail
.
getOrder
());
if
(
updateResult
>
0
)
{
detail
.
getOrder
().
setVersion
(
detail
.
getOrder
().
getVersion
()
+
1
);
}
// int updateResult =baseOrderBiz.updateSelectiveByIdRe(detail.getOrder());
// if(updateResult > 0) {
// detail.getOrder().setVersion(detail.getOrder().getVersion() + 1);
// }
detail
.
setOrder
(
baseOrderBiz
.
updateSelectiveByIdReT
(
detail
.
getOrder
()));
//插入item
if
(
null
!=
detail
.
getItems
()
&&
detail
.
getItems
().
size
()
>
0
)
{
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/service/OrderRentVehicleService.java
View file @
552a0b06
...
...
@@ -92,9 +92,6 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
@Override
public
void
initDetail
(
RentVehicleBO
bo
)
{
super
.
initDetail
(
bo
);
if
(
StrUtil
.
isNotBlank
(
bo
.
getCrtUser
()))
{
bo
.
getOrder
().
setCrtUser
(
bo
.
getCrtUser
());
}
initDetailSecond
(
bo
);
}
...
...
@@ -199,6 +196,11 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
accompanyItem
.
setOrderId
(
bo
.
getOrder
().
getId
());
orderItemBiz
.
insertSelective
(
accompanyItem
);
//设置后台系统创建人
if
(
StrUtil
.
isNotBlank
(
bo
.
getCrtUser
()))
{
bo
.
getOrder
().
setCrtUser
(
bo
.
getCrtUser
());
}
super
.
handleDetail
(
bo
);
//发送定时取消订单(数据字典设置--5分钟)
...
...
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