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
7dff958c
Commit
7dff958c
authored
Nov 06, 2019
by
hanfeng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-modify-background-bug-hf' into base-modify
parents
860b98f7
6a9638a5
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
57 additions
and
34 deletions
+57
-34
UserFeign.java
...va/com/github/wxiaoqi/security/admin/feign/UserFeign.java
+2
-2
ActivityFeign.java
.../java/com/xxfc/platform/activity/feign/ActivityFeign.java
+5
-0
CouponBiz.java
...c/main/java/com/xxfc/platform/activity/biz/CouponBiz.java
+9
-1
CouponMapper.java
.../java/com/xxfc/platform/activity/mapper/CouponMapper.java
+2
-0
CouponController.java
...ava/com/xxfc/platform/activity/rest/CouponController.java
+9
-1
CouponMapper.xml
...ctivity-server/src/main/resources/mapper/CouponMapper.xml
+11
-0
OrderListVo.java
.../java/com/xxfc/platform/order/pojo/order/OrderListVo.java
+3
-3
OrderVehicleCrosstownDto.java
...c/platform/order/pojo/order/OrderVehicleCrosstownDto.java
+9
-0
BackStageOrderController.java
...om/xxfc/platform/order/rest/BackStageOrderController.java
+7
-27
No files found.
ace-modules/ace-admin-api/src/main/java/com/github/wxiaoqi/security/admin/feign/UserFeign.java
View file @
7dff958c
...
...
@@ -87,8 +87,8 @@ public interface UserFeign {
* @param ids
* @return
*/
@
RequestMapping
(
value
=
"/public/getByUserIds"
,
method
=
RequestMethod
.
GET
)
public
ObjectRestResponse
<
List
<
AppUserVo
>>
getByUserIds
(
@RequestParam
(
"ids"
)
List
<
Integer
>
ids
);
@
GetMapping
(
value
=
"/public/getByUserIds"
)
ObjectRestResponse
<
List
<
AppUserVo
>>
getByUserIds
(
@RequestParam
(
"ids"
)
List
<
Integer
>
ids
);
/**
* 购买会员
...
...
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/feign/ActivityFeign.java
View file @
7dff958c
...
...
@@ -81,4 +81,9 @@ public interface ActivityFeign {
@ApiOperation
(
"获取所用优惠卷"
)
@GetMapping
(
"/coupon/coupons"
)
Map
<
String
,
Coupon
>
coupons
();
@ApiOperation
(
"获取所用优惠卷"
)
@GetMapping
(
"/coupon/couponsBycouponIds"
)
List
<
Coupon
>
couponsByTickerNoList
(
@RequestParam
(
value
=
"tickerNoList"
)
List
<
String
>
tickerNoList
);
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/CouponBiz.java
View file @
7dff958c
...
...
@@ -9,10 +9,12 @@ import com.xxfc.platform.activity.constant.CouponUsed;
import
com.xxfc.platform.activity.dto.CouponDTO
;
import
com.xxfc.platform.activity.dto.CouponFindDTO
;
import
com.xxfc.platform.activity.entity.Coupon
;
import
com.xxfc.platform.activity.entity.UserCoupon
;
import
com.xxfc.platform.activity.vo.CouponPagVo
;
import
com.xxfc.platform.activity.vo.CouponTitleVo
;
import
com.xxfc.platform.activity.vo.CouponVo
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.xxfc.platform.activity.mapper.CouponMapper
;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
...
...
@@ -33,7 +35,8 @@ import java.util.*;
*/
@Service
public
class
CouponBiz
extends
BaseBiz
<
CouponMapper
,
Coupon
>
{
@Autowired
private
UserCouponBiz
userCouponBiz
;
//获取优惠卷
public
Coupon
getCouponByUsed
(
Integer
used
){
...
...
@@ -135,4 +138,9 @@ public class CouponBiz extends BaseBiz<CouponMapper, Coupon> {
}
return
map
;
}
public
List
<
Coupon
>
couponsByTickerNoList
(
List
<
String
>
tickerNoList
)
{
return
mapper
.
couponsByTickerNoList
(
tickerNoList
);
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/mapper/CouponMapper.java
View file @
7dff958c
...
...
@@ -2,6 +2,7 @@ package com.xxfc.platform.activity.mapper;
import
com.xxfc.platform.activity.entity.Coupon
;
import
com.xxfc.platform.activity.vo.CouponTitleVo
;
import
org.apache.ibatis.annotations.Param
;
import
tk.mybatis.mapper.common.Mapper
;
import
java.math.BigDecimal
;
...
...
@@ -22,4 +23,5 @@ public interface CouponMapper extends Mapper<Coupon> {
List
<
Coupon
>
getCoupons
();
List
<
Coupon
>
couponsByTickerNoList
(
@Param
(
value
=
"tickerNoList"
)
List
<
String
>
tickerNoList
);
}
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/rest/CouponController.java
View file @
7dff958c
...
...
@@ -4,7 +4,9 @@ import com.github.wxiaoqi.security.common.rest.BaseController;
import
com.xxfc.platform.activity.biz.CouponBiz
;
import
com.xxfc.platform.activity.entity.Coupon
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.math.BigDecimal
;
...
...
@@ -16,9 +18,15 @@ import java.util.Map;
public
class
CouponController
extends
BaseController
<
CouponBiz
,
Coupon
>
{
@ApiOperation
(
"获取所用优惠卷"
)
@
Reques
tMapping
(
"/coupons"
)
@
Ge
tMapping
(
"/coupons"
)
public
Map
<
String
,
Coupon
>
coupons
()
{
return
baseBiz
.
getCoupons
();
}
@ApiOperation
(
"获取所用优惠卷"
)
@GetMapping
(
"/couponsBycouponIds"
)
public
List
<
Coupon
>
couponsBycouponIds
(
@RequestParam
(
value
=
"tickerNoList"
)
List
<
String
>
tickerNoList
)
{
return
baseBiz
.
couponsByTickerNoList
(
tickerNoList
);
}
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/resources/mapper/CouponMapper.xml
View file @
7dff958c
...
...
@@ -46,4 +46,15 @@
select id ,title,used_amount from coupon
</select>
<select
id=
"couponsByTickerNoList"
resultType=
"com.xxfc.platform.activity.entity.Coupon"
>
select c.* from user_coupon u left join coupon c on u.coupon_id=c.id
<where>
u.ticker_no in
<foreach
collection=
"tickerNoList"
item=
"no"
index=
"index"
open=
"("
separator=
","
close=
")"
>
#{no}
</foreach>
</where>
</select>
</mapper>
\ No newline at end of file
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/OrderListVo.java
View file @
7dff958c
...
...
@@ -60,8 +60,8 @@ public class OrderListVo extends BaseOrder {
@ApiModelProperty
(
value
=
"使用优惠卷"
)
ArrayList
<
Coupon
>
couponList
;
List
<
Coupon
>
couponList
;
@ApiModelProperty
(
value
=
"退还优惠卷"
)
Array
List
<
Coupon
>
backCouponList
;
List
<
Coupon
>
backCouponList
;
}
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/OrderVehicleCrosstownDto.java
View file @
7dff958c
...
...
@@ -39,10 +39,19 @@ public class OrderVehicleCrosstownDto extends OrderVehicleCrosstown {
List
<
DepositRefundRecord
>
depositRefundRecord
;
/**
* 交付人名称
*/
private
String
deliveryName
;
/**
* 交付人手机号
*/
private
String
deliveryPhone
;
/**
* 交付时间
*/
private
Long
deliveryTime
;
}
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/BackStageOrderController.java
View file @
7dff958c
...
...
@@ -175,10 +175,7 @@ public class BackStageOrderController extends CommonBaseController implements Us
}
}
}
Map
<
String
,
Coupon
>
coupons
=
null
;
if
(
dto
.
getType
()==
1
)
{
coupons
=
activityFeign
.
coupons
();
}
for
(
OrderListVo
orderPageVO
:
list
)
{
AppUserVo
appUserVo
=
appvoMap
.
get
(
orderPageVO
.
getUserId
());
...
...
@@ -190,33 +187,16 @@ public class BackStageOrderController extends CommonBaseController implements Us
orderPageVO
.
setMemberName
(
appUserVo
.
getMemberName
());
}
if
(
dto
.
getType
()==
1
&&
coupons
!=
null
)
{
ArrayList
<
Coupon
>
couponList
=
Lists
.
newArrayList
();
ArrayList
<
Coupon
>
backCouponList
=
Lists
.
newArrayList
();
if
(
dto
.
getType
()==
1
)
{
if
(
StringUtils
.
isNotBlank
(
orderPageVO
.
getCouponTickerNos
()))
{
String
[]
couponIds
=
orderPageVO
.
getCouponTickerNos
().
split
(
","
);
for
(
String
couponId
:
couponIds
)
{
couponList
.
add
(
coupons
.
get
(
couponId
));
}
}
if
(
StringUtils
.
isNotBlank
(
orderPageVO
.
getBackCoupon
()))
{
String
[]
backCouponIds
=
orderPageVO
.
getBackCoupon
().
split
(
","
);
for
(
String
backCouponId
:
backCouponIds
)
{
backCouponList
.
add
(
coupons
.
get
(
backCouponId
));
List
<
Coupon
>
couponList
=
activityFeign
.
couponsByTickerNoList
(
Lists
.
newArrayList
(
couponIds
));
orderPageVO
.
setCouponList
(
couponList
);
}
}
orderPageVO
.
setCouponList
(
couponList
);
orderPageVO
.
setBackCouponList
(
backCouponList
);
}
// String carArticlesJson = orderPageVO.getCarArticlesJson();
// if (StringUtils.isNotBlank(carArticlesJson)){
// List<OrderAccompanyDTO> orderAccompanyDTOS = JSONObject.parseArray(carArticlesJson, OrderAccompanyDTO.class);
// orderPageVO.setOrderAccompanyDTOS(orderAccompanyDTOS);
// if (CollectionUtils.isNotEmpty(orderAccompanyDTOS)) {
// List<String> collect = orderAccompanyDTOS.parallelStream().map(OrderAccompanyDTO::getName).collect(Collectors.toList());
// orderPageVO.setCarArticles(collect);
// }
// }
if
(
orderPageVO
.
getOrderRentVehicleDetail
()
!=
null
&&
orderPageVO
.
getOrderRentVehicleDetail
().
getVehicleId
()
!=
null
)
{
RestResponse
<
Vehicle
>
restResponse
=
vehicleFeign
.
findById
(
orderPageVO
.
getOrderRentVehicleDetail
().
getVehicleId
());
log
.
info
(
"获取车辆信息返回消息:{}"
,
restResponse
.
getData
());
...
...
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