Commit 41f819a6 authored by hezhen's avatar hezhen

Merge branch 'master_activity' into base-modify

# Conflicts:
#	xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/entity/DailyVehicleOrderStatistics.java
parents 5c88b77a 3fe78583
......@@ -281,7 +281,7 @@ public class MyWalletBiz extends BaseBiz<MyWalletMapper, MyWallet> {
BigDecimal balnece=sumDto.getBalance();
//到账金额
BigDecimal realAmount=amount;
if (amount.compareTo(realAmount)>0){
if ((realAmount.add(commission)).compareTo(balnece)>0){
realAmount=balnece.subtract(commission);
}
log.info("-----提现申请-----proceduReates==="+sumDto.getProceduReates()+"----commission===="+commission+"---realAmount==="+realAmount);
......
......@@ -9,10 +9,10 @@
<if test=" userId!=null and userId!=''">
user_id=#{userId},
</if>
<if test="balance!=null and balance!='' ">
<if test="balance!=null ">
balance=#{balance},
</if>
<if test="balance!=null and balance!='' ">
<if test="withdrawals!=null and withdrawals!='' ">
withdrawals=#{withdrawals},
</if>
<if test="totalAmount!=null and totalAmount!='' ">
......
......@@ -57,6 +57,15 @@ public class DailyVehicleOrderStatistics extends DailyOrderStatistics {
private BigDecimal returnGmv;
// /**
// * 取消订单扣款总额
// */
// @Column(name = "penal_sum")
// private BigDecimal penalSum;
/**
* 违约总额
*/
......
......@@ -47,4 +47,10 @@ public class RentVehicleBO extends OrderRentVehicleDetail implements OrderDetail
* 创建用户 -1+后台用户id 后台系统
*/
String crtUser;
/**
* 用途 1 租车
*/
@ApiModelProperty(hidden = true)
Integer useType = 1;
}
......@@ -74,6 +74,8 @@ public class OrderRentVehicleController extends CommonBaseController {
bo.setAppUserDTO(userFeign.userDetailById(dto.getAppUserId()).getData());
bo.setCrtUser("-1"+ BaseContextHandler.getUserID());
//设置-1表示查询所有的车
bo.setUseType(-1);
orderRentVehicleService.createOrder(bo);
return ObjectRestResponse.succ(bo.getOrder());
}
......
......@@ -459,6 +459,8 @@ public class OrderRentVehicleService extends AbstractOrderHandle<OrderRentVehicl
rentVehicleBookDTO.setOrderNo(detail.getOrder().getNo());
rentVehicleBookDTO.setNumberPlate(numberPlate);
rentVehicleBookDTO.setStatus(status);
rentVehicleBookDTO.setUseType(detail.getUseType());
if(null != detail.getAccompanyItems()) {
rentVehicleBookDTO.setSelectedAccItem(detail.getAccompanyItems().parallelStream().collect(Collectors.toMap(OrderAccompanyDTO::getId, OrderAccompanyDTO::getNum)));
}
......
......@@ -47,17 +47,16 @@ public class WeixinController {
@RequestMapping(value ="/app/unauth/wxLogin",method = RequestMethod.GET)
@IgnoreUserToken
public String index(@RequestParam(value = "redirec_url",defaultValue = "")String redirec_url,
@RequestParam(value = "key",defaultValue = "")String key){
log.info("-----微信wxLogin---redirec_url=="+redirec_url+"-----key===="+key);
if (StringUtils.isBlank(redirec_url)||StringUtils.isBlank(key)){
public String wxLogin(@RequestParam(value = "callback",defaultValue = "")String redirec_url){
log.info("-----微信wxLogin---redirec_url=="+redirec_url);
if (StringUtils.isBlank(redirec_url)){
redirec_url="";
}
try {
String encrypt_curr_url = Base64.encode(redirec_url.getBytes("utf-8"));
encrypt_curr_url+=","+key;
redirec_url=url+"?" + WECHAT_AUTOLOGIN_CALLBACKURL_KEY+ "=" + encrypt_curr_url;
String oauth_api=weixinService.getAuthorize(redirec_url);
String oauth_api=redirec_url+"&code=111";//weixinService.getAuthorize(redirec_url);
log.info("-----微信wxLogin---oauth_api=="+oauth_api);
return String.format("redirect:"+oauth_api);
}catch (Exception e){
e.printStackTrace();
......@@ -76,6 +75,8 @@ public class WeixinController {
public String getUserInformation(String code, String callback, HttpServletRequest request) {
log.info("-----微信回调userInfo---code=="+code+"----redirec_url==="+callback);
try {
callback =new String(Base64.decode(callback), "utf-8");
log.info("-----微信回调----callback==="+callback);
String [] params=callback.split(",");
String key=null;
if (params.length>1){
......@@ -92,7 +93,6 @@ public class WeixinController {
}
log.info("-----微信回调userInfo---key=="+key+"----activityId==="+activityId+"----callback==="+callback);
userBiz.authUser(code,key,activityId,request);
//callback =new String(Base64.decode(callback), "utf-8");
if (StringUtils.isNotBlank(key)){
callback+="&key="+key;
}
......
......@@ -67,7 +67,7 @@ public class AliYunSmsBiz {
public static final String TEMPLATE_ID_CANCEL_E = "SMS_173345667";
//租车押金退还 22
//public static final String TEMPLATE_ID_FINISH_A = "460772";
public static final String TEMPLATE_ID_FINISH_A = "SMS_173340710";
public static final String TEMPLATE_ID_FINISH_A = "SMS_175240587";
//违章押金退还 23
//public static final String TEMPLATE_ID_FINISH_B = "460773";
public static final String TEMPLATE_ID_FINISH_B = "SMS_173340712";
......
......@@ -91,6 +91,12 @@ public class RentVehicleBookDTO extends PageParam {
@ApiModelProperty("扩展结束时间")
String endDateExtend;
/**
* 用途 1 租车
*/
@ApiModelProperty(hidden = true)
Integer useType = 1;
public void setBookStartDate(String bookStartDate) {
this.bookStartDate = bookStartDate;
//首次设置
......
......@@ -57,6 +57,12 @@ public class UsableVeicleDTO extends PageParam {
@ApiModelProperty(hidden = true)
Integer withoutRecordWhere = 1;
/**
* 用途 1 租车
*/
@ApiModelProperty(hidden = true)
Integer useType = 1;
public void setStartDateTamp(Long startDateTamp) {
this.startDateTamp = startDateTamp;
this.startDate = DEFAULT_DATE_TIME_FORMATTER.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(startDateTamp), ZoneOffset.ofHours(8)));
......
......@@ -1249,6 +1249,11 @@ public class VehicleBiz extends BaseBiz<VehicleMapper, Vehicle> implements UserR
}
public PageDataVO<Vehicle> searchUsableVehicle(RentVehicleBookDTO dto) {
//设置-1表示查询所有的车 由于null json序列化不会赋值过来
if(-1 == dto.getUseType()) {
dto.setUseType(null);
}
Map<String, Object> params = BeanUtil.beanToMap(dto);
List<String> notBookedDates = Lists.newArrayList();
if (StringUtils.isNotBlank(dto.getBookEndDate()) &&
......
......@@ -125,6 +125,27 @@ public class RentVehicleController extends BaseController<VehicleBiz> implements
return ObjectRestResponse.succ(vehicleBiz.searchUsableModel(dto));
}
/**
* 后台查询可用车辆(车型)
*
* @param dto
* @return
*/
@ApiOperation("可用车辆查询")
@RequestMapping(value = "/rent/back-stage/usable-vehicle", method = RequestMethod.GET)
@IgnoreUserToken
public ObjectRestResponse<PageDataVO<UsableVehicleModelVO>> rentBgUsableVehicle(UsableVeicleDTO dto) throws Exception {
//根据时间 获得 可用车辆
//结合车型
if (StringUtils.isNotBlank(dto.getCatasStr())) {
dto.setCatas(vehiclePlatCataBiz.groupCatasByParent(dto.getCatasStr()));
}
//设置显示是否有车
dto.setYearNo4Where(Boolean.TRUE);
dto.setUseType(null);
return ObjectRestResponse.succ(vehicleBiz.searchUsableModel(dto));
}
/**
* 热门车型
*
......
......@@ -682,7 +682,9 @@
</if>
and v.is_del = 0
and v.status != 3
and v.use_type = 1
<if test="useType != null">
and v.use_type = #{useType}
</if>
and bc.is_del = 0
and bc.is_show = 1
</where>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment