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
973f614c
Commit
973f614c
authored
Jul 21, 2019
by
hezhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'base-modify' of
http://113.105.137.151:22280/youjj/cloud-platform
into base-modify
parents
d928e592
197d6487
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
133 additions
and
23 deletions
+133
-23
AwardDTO.java
...rc/main/java/com/xxfc/platform/activity/dto/AwardDTO.java
+30
-0
AwardItemDTO.java
...ain/java/com/xxfc/platform/activity/dto/AwardItemDTO.java
+20
-0
ActivityPopularizeBiz.java
...com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
+16
-1
BaseOrderBiz.java
...c/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
+2
-2
OrderTourVerificationBiz.java
...com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
+21
-4
OrderRefundController.java
...a/com/xxfc/platform/order/rest/OrderRefundController.java
+13
-13
TourFeign.java
...src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
+4
-0
pom.xml
xx-tour/xx-tour-server/pom.xml
+0
-1
TourGoodSpeBiz.java
.../main/java/com/xxfc/platform/tour/biz/TourGoodSpeBiz.java
+8
-0
TourGoodSpeController.java
...va/com/xxfc/platform/tour/rest/TourGoodSpeController.java
+6
-0
VehicleFeign.java
...in/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
+1
-1
BranchCompanyVo.java
.../java/com/xxfc/platform/vehicle/pojo/BranchCompanyVo.java
+8
-0
BranchCompanyMapper.xml
...-server/src/main/resources/mapper/BranchCompanyMapper.xml
+4
-1
No files found.
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/dto/AwardDTO.java
0 → 100644
View file @
973f614c
package
com
.
xxfc
.
platform
.
activity
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
@Data
public
class
AwardDTO
{
public
static
final
int
CONDITION_INVITE
=
1
;
/**
* 条件类型 1--邀请
*/
@ApiModelProperty
(
"条件类型 1--邀请"
)
Integer
conditionType
;
/**
* 数量
*/
@ApiModelProperty
(
"数量"
)
Integer
num
;
/**
* 奖励项
*/
@ApiModelProperty
(
"奖励项"
)
List
<
AwardItemDTO
>
awardItems
;
}
\ No newline at end of file
xx-activity/xx-activity-api/src/main/java/com/xxfc/platform/activity/dto/AwardItemDTO.java
0 → 100644
View file @
973f614c
package
com
.
xxfc
.
platform
.
activity
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
@Data
public
class
AwardItemDTO
{
/**
* 奖励类型 1--现金;2--优惠券
*/
@ApiModelProperty
(
"奖励类型"
)
Integer
type
;
/**
* 奖励内容(根据类型决定具体填什么,如优惠券就优惠券号)
*/
@ApiModelProperty
(
"奖励"
)
String
award
;
}
\ No newline at end of file
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityPopularizeBiz.java
View file @
973f614c
package
com
.
xxfc
.
platform
.
activity
.
biz
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.json.JSONUtil
;
import
com.github.wxiaoqi.security.admin.dto.RegisterQueueDTO
;
import
com.github.wxiaoqi.security.admin.entity.MyWalletDetail
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.dto.AppUserDTO
;
import
com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant
;
import
com.xxfc.platform.activity.dto.AwardDTO
;
import
com.xxfc.platform.activity.entity.ActivityPopularizeLog
;
import
com.xxfc.platform.activity.entity.ActivityPopularizeRelation
;
import
com.xxfc.platform.activity.entity.ActivityPopularizeUser
;
import
com.xxfc.platform.universal.feign.MQSenderFeign
;
import
com.xxfc.platform.universal.feign.ThirdFeign
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -19,6 +22,7 @@ import com.xxfc.platform.activity.mapper.ActivityPopularizeMapper;
import
com.github.wxiaoqi.security.common.biz.BaseBiz
;
import
java.math.BigDecimal
;
import
java.util.Date
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_TRUE
;
...
...
@@ -31,6 +35,7 @@ import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_TR
* @date 2019-07-05 15:23:04
*/
@Service
@Slf4j
public
class
ActivityPopularizeBiz
extends
BaseBiz
<
ActivityPopularizeMapper
,
ActivityPopularize
>
{
@Autowired
...
...
@@ -65,12 +70,21 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper,Acti
//获取活动code,并且注册来源是app 并且 非普通登录
if
(
POPULARIZE_0101
.
equals
(
activityCode
)
&&
!
RegisterQueueDTO
.
SIGN_LOGIN
.
equals
(
registerQueueDTO
.
getSign
()))
{
//查询出活动
ActivityPopularize
activityPopularize
=
popularizeBiz
.
selectOne
(
new
ActivityPopularize
(){{
setCode
(
activityCode
);
}});
Date
now
=
DateUtil
.
date
();
Date
start
=
DateUtil
.
date
(
activityPopularize
.
getStartTime
());
Date
end
=
DateUtil
.
date
(
activityPopularize
.
getEndTime
());
//判断是否活动超时
if
(
now
.
before
(
start
)
||
now
.
after
(
end
))
{
log
.
error
(
"不在活动范围内 入参Json:"
+
JSONUtil
.
toJsonStr
(
registerQueueDTO
));
return
;
}
Integer
majorUserId
=
Integer
.
valueOf
(
appUserDTO
.
getInviterAccount
());
//添加活动关系
...
...
@@ -103,6 +117,7 @@ public class ActivityPopularizeBiz extends BaseBiz<ActivityPopularizeMapper,Acti
//任务没有完成
if
(!
SYS_TRUE
.
equals
(
activityPopularizeUser
.
getStatus
()))
{
// AwardDTO awardDTO = JSONUtil.toBean(activityPopularize.getValue(), AwardDTO.class);
//检查是否满足奖励
if
(
relationBiz
.
selectList
(
new
ActivityPopularizeRelation
(){{
setMajorUserId
(
appUserDTO
.
getUserid
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/BaseOrderBiz.java
View file @
973f614c
...
...
@@ -320,7 +320,8 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
if
(
null
==
depositAmount
)
{
depositAmount
=
BigDecimal
.
ZERO
;
}
BigDecimal
refundGoodsAmount
=
calculateRefund
(
baseOrder
.
getGoodsAmount
(),
timeLag
,
dicParentKey
,
refundDesc
);
//商品价格 - 优惠券减免的价格
BigDecimal
refundGoodsAmount
=
calculateRefund
(
baseOrder
.
getGoodsAmount
().
subtract
(
baseOrder
.
getCouponAmount
()),
timeLag
,
dicParentKey
,
refundDesc
);
//退款金额
BigDecimal
refundAmount
=
depositAmount
.
add
(
refundGoodsAmount
);
...
...
@@ -501,7 +502,6 @@ public class BaseOrderBiz extends BaseBiz<BaseOrderMapper,BaseOrder> {
if
(
OrderTypeEnum
.
MEMBER
.
getCode
().
equals
(
baseOrder
.
getType
()))
{
sendOrderMq
(
orvd
,
otd
,
omd
,
baseOrder
,
OrderMQDTO
.
ORDER_FINISH
);
}
}
}
else
{
log
.
error
(
" order has payed , orderNo:{}, tradeNo:{} "
,
orderNo
,
tradeNo
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/OrderTourVerificationBiz.java
View file @
973f614c
package
com
.
xxfc
.
platform
.
order
.
biz
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.github.wxiaoqi.security.admin.feign.dto.UserDTO
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
...
...
@@ -18,6 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.stereotype.Service
;
import
java.time.Instant
;
import
java.time.LocalTime
;
import
java.time.temporal.ChronoUnit
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -90,15 +92,30 @@ public class OrderTourVerificationBiz{
}
// 出发时间 是否已经发车
Long
departureTime
=
tourFeign
.
selectDepartureTimeByStartCompanyIdAndRouteId
(
tourDetail
.
getStartCompanyId
(),
tourDetail
.
getGoodId
());
if
(
Instant
.
now
().
toEpochMilli
()<
departureTime
){
Date
departureDate
=
tourFeign
.
selectDepartureDataBySpeId
(
tourDetail
.
getSpePriceId
());
Long
departureTime
=
tourFeign
.
selectDepartureTimeByStartCompanyIdAndRouteId
(
tourDetail
.
getStartCompanyId
(),
tourDetail
.
getGoodId
());
Integer
departureStatus
=
tourFeign
.
selectDepartureStatusByVerificationId
(
verificationId
);
LocalTime
localDepartureTime
=
LocalTime
.
ofSecondOfDay
(
departureTime
);
departureDate
.
setHours
(
localDepartureTime
.
getHour
());
departureDate
.
setMinutes
(
localDepartureTime
.
getMinute
());
departureDate
.
setSeconds
(
localDepartureTime
.
getSecond
());
if
(
Instant
.
now
().
toEpochMilli
()<
departureDate
.
toInstant
().
toEpochMilli
()){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"还未到发车时间"
,
0
);
}
Integer
departureStatus
=
tourFeign
.
selectDepartureStatusByVerificationId
(
verificationId
);
departureDate
.
setHours
(
0
);
departureDate
.
setMinutes
(
0
);
departureDate
.
setSeconds
(
0
);
Instant
seconddayInstant
=
departureDate
.
toInstant
().
plus
(
1
,
ChronoUnit
.
DAYS
);
if
(
Instant
.
now
().
toEpochMilli
()>
seconddayInstant
.
toEpochMilli
()){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"该票已无效"
,
2
);
}
if
(
departureStatus
==
1
){
return
ObjectRestResponse
.
createFailedResultWithObj
(
400
,
"已经发车"
,
1
);
}
baseOrder
=
new
BaseOrder
();
baseOrder
.
setId
(
orderId
);
baseOrder
.
setStatus
(
OrderStatusEnum
.
ORDER_FINISH
.
getCode
());
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/rest/OrderRefundController.java
View file @
973f614c
...
...
@@ -43,7 +43,7 @@ public class OrderRefundController extends BaseController<OrderRefundBiz,OrderRe
@RequestMapping
(
value
=
"/price/calculate/{type}/{no}"
,
method
=
RequestMethod
.
GET
)
@ResponseBody
@IgnoreClientToken
public
ObjectRestResponse
get
OrderParam
(
@PathVariable
(
value
=
"no
"
)
String
type
,
@PathVariable
(
value
=
"no"
)
String
no
)
{
public
ObjectRestResponse
get
PriceCalculate
(
@PathVariable
(
value
=
"type
"
)
String
type
,
@PathVariable
(
value
=
"no"
)
String
no
)
{
checkAppUser
();
//根据no 查订单
OrderPageVO
orderPageVO
=
baseOrderBiz
.
pageByParm
(
new
Query
(
new
PageParam
(){{
...
...
@@ -59,22 +59,22 @@ public class OrderRefundController extends BaseController<OrderRefundBiz,OrderRe
switch
(
orderTypeEnum
)
{
case
RENT_VEHICLE:
// orp.setRefundGoodsAmount(baseOrderBiz.calculateRefund(orderPageVO.getGoodsAmount()
baseOrderBiz
.
calculateRefund
(
orderPageVO
.
getGoodsAmount
()
,
System
.
currentTimeMillis
()
-
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
()
,
DictionaryKey
.
APP_ORDER
+
"_"
+
DictionaryKey
.
RENT_REFUND
,
"取消订单退款:"
);
break
;
case
TOUR:
// String dicParentKey = DictionaryKey.APP_ORDER+ "_"+ DictionaryKey.TOUR_REFUND;
// //不是省外,
// if(SYS_FALSE.equals(orderPageVO.getOrderTourDetail().getIsOutside())) {
// dicParentKey = DictionaryKey.APP_ORDER+ "_"+ DictionaryKey.TOUR_IN_REFUND;
// }
// orp.setRefundAmount(baseOrderBiz.calculateRefund(orderPageVO.getGoodsAmount().subtract(orderPageVO.getCouponAmount())
// , System.currentTimeMillis() - orderPageVO.getOrderRentVehicleDetail().getStartTime()
// , DictionaryKey.APP_ORDER+ "_"+ DictionaryKey.RENT_REFUND
// , "取消订单退款:"));
break
;
case
TOUR:
String
dicParentKey
=
DictionaryKey
.
APP_ORDER
+
"_"
+
DictionaryKey
.
TOUR_REFUND
;
//不是省外,
if
(
SYS_FALSE
.
equals
(
orderPageVO
.
getOrderTourDetail
().
getIsOutside
()))
{
dicParentKey
=
DictionaryKey
.
APP_ORDER
+
"_"
+
DictionaryKey
.
TOUR_IN_REFUND
;
}
orp
.
setRefundAmount
(
baseOrderBiz
.
calculateRefund
(
orderPageVO
.
getGoodsAmount
()
,
System
.
currentTimeMillis
()
-
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
()
,
DictionaryKey
.
APP_ORDER
+
"_"
+
DictionaryKey
.
RENT_REFUND
,
"取消订单退款:"
));
break
;
default
:
// orp.setRefundAmount(orderPageVO);
break
;
...
...
xx-tour/xx-tour-api/src/main/java/com/xxfc/platform/tour/feign/TourFeign.java
View file @
973f614c
...
...
@@ -15,6 +15,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -100,4 +101,7 @@ public interface TourFeign {
@GetMapping
(
"/tourGood/verfication/departure_status"
)
Integer
selectDepartureStatusByVerificationId
(
@RequestParam
(
value
=
"verificationId"
)
Integer
verificationId
);
@GetMapping
(
"/spe/departure_date"
)
Date
selectDepartureDataBySpeId
(
@RequestParam
(
value
=
"speIds"
)
Integer
speIds
);
}
xx-tour/xx-tour-server/pom.xml
View file @
973f614c
...
...
@@ -21,7 +21,6 @@
</dependencies>
<build>
<finalName>
xx-tour
</finalName>
<plugins>
<!-- 此插件用来生成通用mapper的代码 -->
<plugin>
...
...
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/biz/TourGoodSpeBiz.java
View file @
973f614c
...
...
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.xxfc.platform.tour.dto.TourSpePriceDTO
;
import
com.xxfc.platform.tour.entity.TourGoodSpe
;
import
com.xxfc.platform.tour.entity.TourGoodSpePrice
;
import
com.xxfc.platform.tour.mapper.TourGoodSpePriceMapper
;
import
com.xxfc.platform.tour.vo.TourSpePriceVo
;
...
...
@@ -15,6 +16,7 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.util.Date
;
import
java.util.List
;
/**
...
...
@@ -101,4 +103,10 @@ public class TourGoodSpeBiz extends BaseBiz<TourGoodSpePriceMapper, TourGoodSpeP
public
void
delGoodSpe
(
Integer
goodId
,
List
<
Integer
>
ids
){
mapper
.
delSpe
(
goodId
,
ids
);}
public
Date
selectDepartureDataBySpeId
(
Integer
speIds
)
{
TourGoodSpePrice
tourGoodSpePrice
=
new
TourGoodSpePrice
();
tourGoodSpePrice
.
setId
(
speIds
);
TourGoodSpePrice
spePrice
=
mapper
.
selectOne
(
tourGoodSpePrice
);
return
spePrice
.
getStartTime
();
}
}
\ No newline at end of file
xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodSpeController.java
View file @
973f614c
...
...
@@ -8,6 +8,8 @@ import com.xxfc.platform.tour.dto.TourSpePriceDTO;
import
com.xxfc.platform.tour.vo.TourSpePriceVo
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Date
;
@RestController
@RequestMapping
(
"spe"
)
@IgnoreClientToken
...
...
@@ -32,4 +34,8 @@ public class TourGoodSpeController extends TourBaseController<TourGoodSpeBiz> {
return
baseBiz
.
cutStock
(
speId
,
number
,
type
);
}
@GetMapping
(
"/departure_date"
)
public
Date
selectDepartureDataBySpeId
(
@RequestParam
(
value
=
"speIds"
)
Integer
spePriceId
){
return
baseBiz
.
selectDepartureDataBySpeId
(
spePriceId
);
}
}
\ No newline at end of file
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/feign/VehicleFeign.java
View file @
973f614c
...
...
@@ -67,7 +67,7 @@ public interface VehicleFeign {
@RequestMapping
(
value
=
"/user/license/company/getOne"
,
method
=
RequestMethod
.
GET
)
public
RestResponse
<
VehicleUserLicense
>
getOne
(
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
@RequestParam
(
value
=
"id"
,
defaultValue
=
"0"
)
Integer
id
)
throws
Exception
;
/**
* 获取优质车型接口
...
...
xx-vehicle/xx-vehicle-api/src/main/java/com/xxfc/platform/vehicle/pojo/BranchCompanyVo.java
View file @
973f614c
...
...
@@ -78,4 +78,12 @@ public class BranchCompanyVo {
*/
private
Integer
zoneId
;
/**
* 租车客服电话
*/
private
String
vehiceServicePhone
;
/**
* 旅游客服电话
*/
private
String
tourServicePhone
;
}
\ No newline at end of file
xx-vehicle/xx-vehicle-server/src/main/resources/mapper/BranchCompanyMapper.xml
View file @
973f614c
...
...
@@ -9,13 +9,16 @@
<result
column=
"name"
property=
"name"
jdbcType=
"VARCHAR"
/>
<result
column=
"branch_type"
property=
"branchType"
jdbcType=
"INTEGER"
/>
<result
column=
"subordinate_branch"
property=
"subordinateBranch"
jdbcType=
"INTEGER"
/>
<result
column=
"location"
property=
"location"
jdbcType=
"VARCHAR"
/>
<result
column=
"addr_province"
property=
"addrProvince"
jdbcType=
"INTEGER"
/>
<result
column=
"addr_city"
property=
"addrCity"
jdbcType=
"INTEGER"
/>
<result
column=
"addr_town"
property=
"addrTown"
jdbcType=
"INTEGER"
/>
<result
column=
"addr_detail"
property=
"addrDetail"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"vehice_service_phone"
property=
"vehiceServicePhone"
/>
<result
column=
"tour_service_phone"
property=
"tourServicePhone"
/>
<result
column=
"longitude"
property=
"longitude"
/>
<result
column=
"latitude"
property=
"latitude"
/>
</resultMap>
<select
id=
"search"
resultType=
"com.xxfc.platform.vehicle.pojo.CompanySearchVO"
>
...
...
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