袁野 1 year ago
parent de244978b6
commit 54a79af122
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 258
      hai-cweb/src/main/java/com/cweb/controller/Blx/BlxCarController.java
  3. 67
      hai-service/src/main/java/com/hai/blx/service/BlxCarService.java
  4. 88
      hai-service/src/main/java/com/hai/blx/service/impl/BlxCarServiceImpl.java
  5. 45
      hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapper.java
  6. 30
      hai-service/src/main/java/com/hai/dao/ApiBlxOrderSqlProvider.java
  7. 32
      hai-service/src/main/java/com/hai/entity/ApiBlxOrder.java
  8. 108
      hai-service/src/main/java/com/hai/entity/ApiBlxOrderExample.java
  9. 24
      hai-service/src/main/java/com/hai/openApi/config/BlxConfig.java
  10. 30
      hai-service/src/main/java/com/hai/openApi/service/ApiBlxCouponService.java
  11. 48
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiBlxCouponServiceImpl.java
  12. 75
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderCreateHandleServiceImpl.java
  13. 9
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiOrderServiceImpl.java
  14. 3
      hai-service/src/main/java/com/hai/order/model/CreateOrderChildModel.java
  15. 20
      hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java
  16. 57
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  17. 62
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  18. 25
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  19. 1
      hai-service/src/main/java/com/hai/order/type/OrderChildGoodsType.java
  20. 2
      hai-service/src/main/resources/dev/commonConfig.properties
  21. 93
      v1/src/main/java/com/v1/controller/business/BlxCouponController.java
  22. 10
      v1/src/main/java/com/v1/controller/orderController.java
  23. 5
      v1/src/main/resources/dev/application.yml

File diff suppressed because one or more lines are too long

@ -0,0 +1,258 @@
package com.cweb.controller.Blx;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.hai.blx.service.BlxCarService;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.BlxCarInfo;
import com.hai.model.HighUserModel;
import com.hai.model.ResponseData;
import com.hai.openApi.config.BlxConfig;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping(value = "/blxCar")
@Api(value = "比邻星车辆业务")
public class BlxCarController {
Logger log = LoggerFactory.getLogger(BlxCarController.class);
@Autowired
private UserCenter userCenter;
@Resource
private BlxConfig blxConfig;
@Resource
private BlxCarService blxCarService;
@RequestMapping(value = "/queryJsParking", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询附近停车场")
public ResponseData queryJsParking(
@RequestParam(value = "gps", required = true) String gps,
HttpServletRequest request
) {
try {
JSONObject jsonObject = new JSONObject();
jsonObject.put("range" , 10);
jsonObject.put("gps" , gps);
JSONObject data = blxConfig.queryJsParking(jsonObject);
if (data.getInteger("code") != 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, data.getString("msg"));
}
return ResponseMsgUtil.success(data.getJSONObject("data").getJSONArray("parkList"));
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/insertCarInfo",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "增加车辆信息")
public ResponseData insertCarInfo(@RequestBody BlxCarInfo carInfo, HttpServletRequest request) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
if (carInfo.getCarNoType() == null
|| StringUtils.isBlank(carInfo.getCarNo())) {
log.error("HighCouponController -> insertCoupon() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
carInfo.setCreateTime(new Date());
carInfo.setStatus(1);
carInfo.setUpdateTime(new Date());
carInfo.setUserId(userInfoModel.getHighUser().getId());
blxCarService.insertCar(carInfo);
return ResponseMsgUtil.success("新增成功");
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/updateCarInfo",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "修改车辆信息")
public ResponseData updateCarInfo(@RequestBody BlxCarInfo carInfo) {
try {
if (carInfo.getId() == null ||
carInfo.getCarNoType() == null
|| StringUtils.isBlank(carInfo.getCarNo())) {
log.error("HighCouponController -> insertCoupon() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
BlxCarInfo blxCarInfo = blxCarService.findCarInfoById(carInfo.getId());
blxCarInfo.setStatus(1);
blxCarInfo.setCarNoType(carInfo.getCarNoType());
blxCarInfo.setCarNo(carInfo.getCarNo());
blxCarInfo.setUpdateTime(new Date());
blxCarService.updateCar(blxCarInfo);
return ResponseMsgUtil.success("修改成功");
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/deleteCarNoInfo", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "删除车辆车牌信息")
public ResponseData deleteCarNoInfo(
@RequestParam(value = "id", required = true) Long id,
HttpServletRequest request
) {
try {
BlxCarInfo blxCarInfo = blxCarService.findCarInfoById(id);
blxCarInfo.setStatus(0);
blxCarService.updateCar(blxCarInfo);
return ResponseMsgUtil.success("删除成功!");
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getCarInfoList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询用户车辆")
public ResponseData getCarInfoList(HttpServletRequest request) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
Map<String , Object> map = new HashMap<>();
map.put("userId" , userInfoModel.getHighUser().getId());
return ResponseMsgUtil.success(blxCarService.getCarInfoList(map));
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getCarNoByOrder", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据车牌查询订单")
public ResponseData getCarNoByOrder(
@RequestParam(value = "carNo", required = true) String carNo,
HttpServletRequest request
) {
try {
JSONObject jsonObject = new JSONObject();
jsonObject.put("carNo" , carNo);
jsonObject.put("orderStatus" , "03");
JSONObject data = blxConfig.queryJsOrderList(jsonObject);
JSONObject jsonObject04 = new JSONObject();
jsonObject04.put("carNo" , carNo);
jsonObject04.put("orderStatus" , "04");
JSONObject data04 = blxConfig.queryJsOrderList(jsonObject04);
if (data.getInteger("code") != 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, data.getString("msg"));
}
JSONArray jsonArray = data.getJSONObject("data").getJSONArray("ordlist");
jsonArray.addAll(data04.getJSONObject("data").getJSONArray("ordlist"));
return ResponseMsgUtil.success(jsonArray);
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/defaultCarNoInfo", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "默认车牌")
public ResponseData defaultCarNoInfo(
@RequestParam(value = "id", required = true) Long id,
HttpServletRequest request
) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
Map<String , Object> map = new HashMap<>();
map.put("userId" , userInfoModel.getHighUser().getId());
List<BlxCarInfo> list = blxCarService.getCarInfoList(map);
for (BlxCarInfo carInfo : list) {
carInfo.setDefaultCarNo(false);
blxCarService.updateCar(carInfo);
}
BlxCarInfo blxCarInfo = blxCarService.findCarInfoById(id);
blxCarInfo.setDefaultCarNo(true);
blxCarService.updateCar(blxCarInfo);
return ResponseMsgUtil.success("设置成功!");
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,67 @@
package com.hai.blx.service;
import com.hai.entity.BlxCarInfo;
import com.hai.entity.GoodsPresent;
import java.util.List;
import java.util.Map;
/**
* @serviceName .java
* @author Sum1Dream
* @version 1.0.0
* @Description // 比邻星车辆业务
* @createTime 11:28 2023/9/5
**/
public interface BlxCarService {
/**
* @Author Sum1Dream
* @Name insertCar
* @Description // 新增车辆信息
* @Date 11:29 2023/9/5
* @Param carInfo
* @return void
*/
void insertCar(BlxCarInfo carInfo);
/**
* @Author Sum1Dream
* @Name updateCar
* @Description // 更新车辆信息
* @Date 11:29 2023/9/5
* @Param carInfo
* @return void
*/
void updateCar(BlxCarInfo carInfo);
/**
* @Author Sum1Dream
* @Name getCarInfoList
* @Description // 查询车辆信息列表
* @Date 11:30 2023/9/5
* @Param map
* @return java.util.List<com.hai.entity.BlxCarInfo>
*/
List<BlxCarInfo> getCarInfoList(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name findCarInfoByMap
* @Description //TODO
* @Date 14:14 2023/9/5
* @Param map
* @return com.hai.entity.BlxCarInfo
*/
BlxCarInfo findCarInfoByMap(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name findCarInfoById
* @Description // 根据ID查询详情
* @Date 15:13 2023/9/5
* @Param id
* @return com.hai.entity.BlxCarInfo
*/
BlxCarInfo findCarInfoById(Long id);
}

@ -0,0 +1,88 @@
package com.hai.blx.service.impl;
import com.hai.blx.service.BlxCarService;
import com.hai.dao.BlxCarInfoMapper;
import com.hai.entity.BlxCarInfo;
import com.hai.entity.BlxCarInfoExample;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service("blxCarService")
public class BlxCarServiceImpl implements BlxCarService {
@Resource
private BlxCarInfoMapper blxCarInfoMapper;
@Override
public void insertCar(BlxCarInfo carInfo) {
blxCarInfoMapper.insert(carInfo);
}
@Override
public void updateCar(BlxCarInfo carInfo) {
blxCarInfoMapper.updateByPrimaryKey(carInfo);
}
@Override
public List<BlxCarInfo> getCarInfoList(Map<String, Object> map) {
BlxCarInfoExample example = new BlxCarInfoExample();
BlxCarInfoExample.Criteria criteria = example.createCriteria();
if (MapUtils.getString(map, "carNo") != null) {
criteria.andCarNoEqualTo(MapUtils.getString(map, "carNo"));
}
if (MapUtils.getInteger(map, "carNoType") != null) {
criteria.andCarNoTypeEqualTo(MapUtils.getInteger(map, "carNoType") );
}
if (MapUtils.getLong(map, "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId") );
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status") );
} else {
criteria.andStatusEqualTo(1);
}
return blxCarInfoMapper.selectByExample(example);
}
@Override
public BlxCarInfo findCarInfoByMap(Map<String, Object> map) {
BlxCarInfoExample example = new BlxCarInfoExample();
BlxCarInfoExample.Criteria criteria = example.createCriteria();
if (MapUtils.getString(map, "carNo") != null) {
criteria.andCarNoEqualTo(MapUtils.getString(map, "carNo"));
}
if (MapUtils.getInteger(map, "carNoType") != null) {
criteria.andCarNoTypeEqualTo(MapUtils.getInteger(map, "carNoType") );
}
if (MapUtils.getLong(map, "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId") );
}
if (MapUtils.getLong(map, "id") != null) {
criteria.andIdEqualTo(MapUtils.getLong(map, "id") );
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status") );
}
List<BlxCarInfo> list = blxCarInfoMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public BlxCarInfo findCarInfoById(Long id) {
return blxCarInfoMapper.selectByPrimaryKey(id);
}
}

@ -42,23 +42,25 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
"insert into api_blx_order (mer_id, order_id, ", "insert into api_blx_order (mer_id, order_id, ",
"mer_order_id, park_order_id, ", "mer_order_id, park_order_id, ",
"in_time, out_time, ", "in_time, out_time, ",
"park_time, park_name, ", "over_time, park_time, ",
"park_id, car_seat_id, ", "park_name, park_id, ",
"prak_price, coupon_price, ", "car_seat_id, park_price, ",
"order_type, order_status, ", "coupon_price, order_type, ",
"create_time, update_time, ", "order_status, create_time, ",
"ext_1, ext_2, ext_3, ", "update_time, ext_1, ",
"ext_4, ext_5, ext_6)", "ext_2, ext_3, ext_4, ",
"ext_5, ext_6)",
"values (#{merId,jdbcType=VARCHAR}, #{orderId,jdbcType=BIGINT}, ", "values (#{merId,jdbcType=VARCHAR}, #{orderId,jdbcType=BIGINT}, ",
"#{merOrderId,jdbcType=VARCHAR}, #{parkOrderId,jdbcType=VARCHAR}, ", "#{merOrderId,jdbcType=VARCHAR}, #{parkOrderId,jdbcType=VARCHAR}, ",
"#{inTime,jdbcType=TIMESTAMP}, #{outTime,jdbcType=TIMESTAMP}, ", "#{inTime,jdbcType=TIMESTAMP}, #{outTime,jdbcType=TIMESTAMP}, ",
"#{parkTime,jdbcType=INTEGER}, #{parkName,jdbcType=VARCHAR}, ", "#{overTime,jdbcType=INTEGER}, #{parkTime,jdbcType=INTEGER}, ",
"#{parkId,jdbcType=BIGINT}, #{carSeatId,jdbcType=BIGINT}, ", "#{parkName,jdbcType=VARCHAR}, #{parkId,jdbcType=BIGINT}, ",
"#{prakPrice,jdbcType=DECIMAL}, #{couponPrice,jdbcType=DECIMAL}, ", "#{carSeatId,jdbcType=BIGINT}, #{parkPrice,jdbcType=DECIMAL}, ",
"#{orderType,jdbcType=INTEGER}, #{orderStatus,jdbcType=INTEGER}, ", "#{couponPrice,jdbcType=DECIMAL}, #{orderType,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{orderStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(ApiBlxOrder record); int insert(ApiBlxOrder record);
@ -76,11 +78,12 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="out_time", property="outTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="out_time", property="outTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="over_time", property="overTime", jdbcType=JdbcType.INTEGER),
@Result(column="park_time", property="parkTime", jdbcType=JdbcType.INTEGER), @Result(column="park_time", property="parkTime", jdbcType=JdbcType.INTEGER),
@Result(column="park_name", property="parkName", jdbcType=JdbcType.VARCHAR), @Result(column="park_name", property="parkName", jdbcType=JdbcType.VARCHAR),
@Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT), @Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT),
@Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.BIGINT), @Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.BIGINT),
@Result(column="prak_price", property="prakPrice", jdbcType=JdbcType.DECIMAL), @Result(column="park_price", property="parkPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL), @Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER), @Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER),
@Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER),
@ -97,9 +100,9 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Select({ @Select({
"select", "select",
"id, mer_id, order_id, mer_order_id, park_order_id, in_time, out_time, park_time, ", "id, mer_id, order_id, mer_order_id, park_order_id, in_time, out_time, over_time, ",
"park_name, park_id, car_seat_id, prak_price, coupon_price, order_type, order_status, ", "park_time, park_name, park_id, car_seat_id, park_price, coupon_price, order_type, ",
"create_time, update_time, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6", "order_status, create_time, update_time, ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from api_blx_order", "from api_blx_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -111,11 +114,12 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="out_time", property="outTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="out_time", property="outTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="over_time", property="overTime", jdbcType=JdbcType.INTEGER),
@Result(column="park_time", property="parkTime", jdbcType=JdbcType.INTEGER), @Result(column="park_time", property="parkTime", jdbcType=JdbcType.INTEGER),
@Result(column="park_name", property="parkName", jdbcType=JdbcType.VARCHAR), @Result(column="park_name", property="parkName", jdbcType=JdbcType.VARCHAR),
@Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT), @Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT),
@Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.BIGINT), @Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.BIGINT),
@Result(column="prak_price", property="prakPrice", jdbcType=JdbcType.DECIMAL), @Result(column="park_price", property="parkPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL), @Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER), @Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER),
@Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER),
@ -147,11 +151,12 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
"park_order_id = #{parkOrderId,jdbcType=VARCHAR},", "park_order_id = #{parkOrderId,jdbcType=VARCHAR},",
"in_time = #{inTime,jdbcType=TIMESTAMP},", "in_time = #{inTime,jdbcType=TIMESTAMP},",
"out_time = #{outTime,jdbcType=TIMESTAMP},", "out_time = #{outTime,jdbcType=TIMESTAMP},",
"over_time = #{overTime,jdbcType=INTEGER},",
"park_time = #{parkTime,jdbcType=INTEGER},", "park_time = #{parkTime,jdbcType=INTEGER},",
"park_name = #{parkName,jdbcType=VARCHAR},", "park_name = #{parkName,jdbcType=VARCHAR},",
"park_id = #{parkId,jdbcType=BIGINT},", "park_id = #{parkId,jdbcType=BIGINT},",
"car_seat_id = #{carSeatId,jdbcType=BIGINT},", "car_seat_id = #{carSeatId,jdbcType=BIGINT},",
"prak_price = #{prakPrice,jdbcType=DECIMAL},", "park_price = #{parkPrice,jdbcType=DECIMAL},",
"coupon_price = #{couponPrice,jdbcType=DECIMAL},", "coupon_price = #{couponPrice,jdbcType=DECIMAL},",
"order_type = #{orderType,jdbcType=INTEGER},", "order_type = #{orderType,jdbcType=INTEGER},",
"order_status = #{orderStatus,jdbcType=INTEGER},", "order_status = #{orderStatus,jdbcType=INTEGER},",

@ -52,6 +52,10 @@ public class ApiBlxOrderSqlProvider {
sql.VALUES("out_time", "#{outTime,jdbcType=TIMESTAMP}"); sql.VALUES("out_time", "#{outTime,jdbcType=TIMESTAMP}");
} }
if (record.getOverTime() != null) {
sql.VALUES("over_time", "#{overTime,jdbcType=INTEGER}");
}
if (record.getParkTime() != null) { if (record.getParkTime() != null) {
sql.VALUES("park_time", "#{parkTime,jdbcType=INTEGER}"); sql.VALUES("park_time", "#{parkTime,jdbcType=INTEGER}");
} }
@ -68,8 +72,8 @@ public class ApiBlxOrderSqlProvider {
sql.VALUES("car_seat_id", "#{carSeatId,jdbcType=BIGINT}"); sql.VALUES("car_seat_id", "#{carSeatId,jdbcType=BIGINT}");
} }
if (record.getPrakPrice() != null) { if (record.getParkPrice() != null) {
sql.VALUES("prak_price", "#{prakPrice,jdbcType=DECIMAL}"); sql.VALUES("park_price", "#{parkPrice,jdbcType=DECIMAL}");
} }
if (record.getCouponPrice() != null) { if (record.getCouponPrice() != null) {
@ -132,11 +136,12 @@ public class ApiBlxOrderSqlProvider {
sql.SELECT("park_order_id"); sql.SELECT("park_order_id");
sql.SELECT("in_time"); sql.SELECT("in_time");
sql.SELECT("out_time"); sql.SELECT("out_time");
sql.SELECT("over_time");
sql.SELECT("park_time"); sql.SELECT("park_time");
sql.SELECT("park_name"); sql.SELECT("park_name");
sql.SELECT("park_id"); sql.SELECT("park_id");
sql.SELECT("car_seat_id"); sql.SELECT("car_seat_id");
sql.SELECT("prak_price"); sql.SELECT("park_price");
sql.SELECT("coupon_price"); sql.SELECT("coupon_price");
sql.SELECT("order_type"); sql.SELECT("order_type");
sql.SELECT("order_status"); sql.SELECT("order_status");
@ -193,6 +198,10 @@ public class ApiBlxOrderSqlProvider {
sql.SET("out_time = #{record.outTime,jdbcType=TIMESTAMP}"); sql.SET("out_time = #{record.outTime,jdbcType=TIMESTAMP}");
} }
if (record.getOverTime() != null) {
sql.SET("over_time = #{record.overTime,jdbcType=INTEGER}");
}
if (record.getParkTime() != null) { if (record.getParkTime() != null) {
sql.SET("park_time = #{record.parkTime,jdbcType=INTEGER}"); sql.SET("park_time = #{record.parkTime,jdbcType=INTEGER}");
} }
@ -209,8 +218,8 @@ public class ApiBlxOrderSqlProvider {
sql.SET("car_seat_id = #{record.carSeatId,jdbcType=BIGINT}"); sql.SET("car_seat_id = #{record.carSeatId,jdbcType=BIGINT}");
} }
if (record.getPrakPrice() != null) { if (record.getParkPrice() != null) {
sql.SET("prak_price = #{record.prakPrice,jdbcType=DECIMAL}"); sql.SET("park_price = #{record.parkPrice,jdbcType=DECIMAL}");
} }
if (record.getCouponPrice() != null) { if (record.getCouponPrice() != null) {
@ -272,11 +281,12 @@ public class ApiBlxOrderSqlProvider {
sql.SET("park_order_id = #{record.parkOrderId,jdbcType=VARCHAR}"); sql.SET("park_order_id = #{record.parkOrderId,jdbcType=VARCHAR}");
sql.SET("in_time = #{record.inTime,jdbcType=TIMESTAMP}"); sql.SET("in_time = #{record.inTime,jdbcType=TIMESTAMP}");
sql.SET("out_time = #{record.outTime,jdbcType=TIMESTAMP}"); sql.SET("out_time = #{record.outTime,jdbcType=TIMESTAMP}");
sql.SET("over_time = #{record.overTime,jdbcType=INTEGER}");
sql.SET("park_time = #{record.parkTime,jdbcType=INTEGER}"); sql.SET("park_time = #{record.parkTime,jdbcType=INTEGER}");
sql.SET("park_name = #{record.parkName,jdbcType=VARCHAR}"); sql.SET("park_name = #{record.parkName,jdbcType=VARCHAR}");
sql.SET("park_id = #{record.parkId,jdbcType=BIGINT}"); sql.SET("park_id = #{record.parkId,jdbcType=BIGINT}");
sql.SET("car_seat_id = #{record.carSeatId,jdbcType=BIGINT}"); sql.SET("car_seat_id = #{record.carSeatId,jdbcType=BIGINT}");
sql.SET("prak_price = #{record.prakPrice,jdbcType=DECIMAL}"); sql.SET("park_price = #{record.parkPrice,jdbcType=DECIMAL}");
sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}"); sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}");
sql.SET("order_type = #{record.orderType,jdbcType=INTEGER}"); sql.SET("order_type = #{record.orderType,jdbcType=INTEGER}");
sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}"); sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}");
@ -322,6 +332,10 @@ public class ApiBlxOrderSqlProvider {
sql.SET("out_time = #{outTime,jdbcType=TIMESTAMP}"); sql.SET("out_time = #{outTime,jdbcType=TIMESTAMP}");
} }
if (record.getOverTime() != null) {
sql.SET("over_time = #{overTime,jdbcType=INTEGER}");
}
if (record.getParkTime() != null) { if (record.getParkTime() != null) {
sql.SET("park_time = #{parkTime,jdbcType=INTEGER}"); sql.SET("park_time = #{parkTime,jdbcType=INTEGER}");
} }
@ -338,8 +352,8 @@ public class ApiBlxOrderSqlProvider {
sql.SET("car_seat_id = #{carSeatId,jdbcType=BIGINT}"); sql.SET("car_seat_id = #{carSeatId,jdbcType=BIGINT}");
} }
if (record.getPrakPrice() != null) { if (record.getParkPrice() != null) {
sql.SET("prak_price = #{prakPrice,jdbcType=DECIMAL}"); sql.SET("park_price = #{parkPrice,jdbcType=DECIMAL}");
} }
if (record.getCouponPrice() != null) { if (record.getCouponPrice() != null) {

@ -49,6 +49,11 @@ public class ApiBlxOrder implements Serializable {
*/ */
private Date outTime; private Date outTime;
/**
* 超时时长
*/
private Integer overTime;
/** /**
* 停车时长 * 停车时长
*/ */
@ -72,7 +77,7 @@ public class ApiBlxOrder implements Serializable {
/** /**
* 停车金额 * 停车金额
*/ */
private BigDecimal prakPrice; private BigDecimal parkPrice;
/** /**
* 停车券金额 * 停车券金额
@ -187,6 +192,14 @@ public class ApiBlxOrder implements Serializable {
this.outTime = outTime; this.outTime = outTime;
} }
public Integer getOverTime() {
return overTime;
}
public void setOverTime(Integer overTime) {
this.overTime = overTime;
}
public Integer getParkTime() { public Integer getParkTime() {
return parkTime; return parkTime;
} }
@ -219,12 +232,12 @@ public class ApiBlxOrder implements Serializable {
this.carSeatId = carSeatId; this.carSeatId = carSeatId;
} }
public BigDecimal getPrakPrice() { public BigDecimal getParkPrice() {
return prakPrice; return parkPrice;
} }
public void setPrakPrice(BigDecimal prakPrice) { public void setParkPrice(BigDecimal parkPrice) {
this.prakPrice = prakPrice; this.parkPrice = parkPrice;
} }
public BigDecimal getCouponPrice() { public BigDecimal getCouponPrice() {
@ -334,11 +347,12 @@ public class ApiBlxOrder implements Serializable {
&& (this.getParkOrderId() == null ? other.getParkOrderId() == null : this.getParkOrderId().equals(other.getParkOrderId())) && (this.getParkOrderId() == null ? other.getParkOrderId() == null : this.getParkOrderId().equals(other.getParkOrderId()))
&& (this.getInTime() == null ? other.getInTime() == null : this.getInTime().equals(other.getInTime())) && (this.getInTime() == null ? other.getInTime() == null : this.getInTime().equals(other.getInTime()))
&& (this.getOutTime() == null ? other.getOutTime() == null : this.getOutTime().equals(other.getOutTime())) && (this.getOutTime() == null ? other.getOutTime() == null : this.getOutTime().equals(other.getOutTime()))
&& (this.getOverTime() == null ? other.getOverTime() == null : this.getOverTime().equals(other.getOverTime()))
&& (this.getParkTime() == null ? other.getParkTime() == null : this.getParkTime().equals(other.getParkTime())) && (this.getParkTime() == null ? other.getParkTime() == null : this.getParkTime().equals(other.getParkTime()))
&& (this.getParkName() == null ? other.getParkName() == null : this.getParkName().equals(other.getParkName())) && (this.getParkName() == null ? other.getParkName() == null : this.getParkName().equals(other.getParkName()))
&& (this.getParkId() == null ? other.getParkId() == null : this.getParkId().equals(other.getParkId())) && (this.getParkId() == null ? other.getParkId() == null : this.getParkId().equals(other.getParkId()))
&& (this.getCarSeatId() == null ? other.getCarSeatId() == null : this.getCarSeatId().equals(other.getCarSeatId())) && (this.getCarSeatId() == null ? other.getCarSeatId() == null : this.getCarSeatId().equals(other.getCarSeatId()))
&& (this.getPrakPrice() == null ? other.getPrakPrice() == null : this.getPrakPrice().equals(other.getPrakPrice())) && (this.getParkPrice() == null ? other.getParkPrice() == null : this.getParkPrice().equals(other.getParkPrice()))
&& (this.getCouponPrice() == null ? other.getCouponPrice() == null : this.getCouponPrice().equals(other.getCouponPrice())) && (this.getCouponPrice() == null ? other.getCouponPrice() == null : this.getCouponPrice().equals(other.getCouponPrice()))
&& (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType())) && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
&& (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus())) && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus()))
@ -363,11 +377,12 @@ public class ApiBlxOrder implements Serializable {
result = prime * result + ((getParkOrderId() == null) ? 0 : getParkOrderId().hashCode()); result = prime * result + ((getParkOrderId() == null) ? 0 : getParkOrderId().hashCode());
result = prime * result + ((getInTime() == null) ? 0 : getInTime().hashCode()); result = prime * result + ((getInTime() == null) ? 0 : getInTime().hashCode());
result = prime * result + ((getOutTime() == null) ? 0 : getOutTime().hashCode()); result = prime * result + ((getOutTime() == null) ? 0 : getOutTime().hashCode());
result = prime * result + ((getOverTime() == null) ? 0 : getOverTime().hashCode());
result = prime * result + ((getParkTime() == null) ? 0 : getParkTime().hashCode()); result = prime * result + ((getParkTime() == null) ? 0 : getParkTime().hashCode());
result = prime * result + ((getParkName() == null) ? 0 : getParkName().hashCode()); result = prime * result + ((getParkName() == null) ? 0 : getParkName().hashCode());
result = prime * result + ((getParkId() == null) ? 0 : getParkId().hashCode()); result = prime * result + ((getParkId() == null) ? 0 : getParkId().hashCode());
result = prime * result + ((getCarSeatId() == null) ? 0 : getCarSeatId().hashCode()); result = prime * result + ((getCarSeatId() == null) ? 0 : getCarSeatId().hashCode());
result = prime * result + ((getPrakPrice() == null) ? 0 : getPrakPrice().hashCode()); result = prime * result + ((getParkPrice() == null) ? 0 : getParkPrice().hashCode());
result = prime * result + ((getCouponPrice() == null) ? 0 : getCouponPrice().hashCode()); result = prime * result + ((getCouponPrice() == null) ? 0 : getCouponPrice().hashCode());
result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode()); result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode()); result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode());
@ -395,11 +410,12 @@ public class ApiBlxOrder implements Serializable {
sb.append(", parkOrderId=").append(parkOrderId); sb.append(", parkOrderId=").append(parkOrderId);
sb.append(", inTime=").append(inTime); sb.append(", inTime=").append(inTime);
sb.append(", outTime=").append(outTime); sb.append(", outTime=").append(outTime);
sb.append(", overTime=").append(overTime);
sb.append(", parkTime=").append(parkTime); sb.append(", parkTime=").append(parkTime);
sb.append(", parkName=").append(parkName); sb.append(", parkName=").append(parkName);
sb.append(", parkId=").append(parkId); sb.append(", parkId=").append(parkId);
sb.append(", carSeatId=").append(carSeatId); sb.append(", carSeatId=").append(carSeatId);
sb.append(", prakPrice=").append(prakPrice); sb.append(", parkPrice=").append(parkPrice);
sb.append(", couponPrice=").append(couponPrice); sb.append(", couponPrice=").append(couponPrice);
sb.append(", orderType=").append(orderType); sb.append(", orderType=").append(orderType);
sb.append(", orderStatus=").append(orderStatus); sb.append(", orderStatus=").append(orderStatus);

@ -576,6 +576,66 @@ public class ApiBlxOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andOverTimeIsNull() {
addCriterion("over_time is null");
return (Criteria) this;
}
public Criteria andOverTimeIsNotNull() {
addCriterion("over_time is not null");
return (Criteria) this;
}
public Criteria andOverTimeEqualTo(Integer value) {
addCriterion("over_time =", value, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeNotEqualTo(Integer value) {
addCriterion("over_time <>", value, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeGreaterThan(Integer value) {
addCriterion("over_time >", value, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeGreaterThanOrEqualTo(Integer value) {
addCriterion("over_time >=", value, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeLessThan(Integer value) {
addCriterion("over_time <", value, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeLessThanOrEqualTo(Integer value) {
addCriterion("over_time <=", value, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeIn(List<Integer> values) {
addCriterion("over_time in", values, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeNotIn(List<Integer> values) {
addCriterion("over_time not in", values, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeBetween(Integer value1, Integer value2) {
addCriterion("over_time between", value1, value2, "overTime");
return (Criteria) this;
}
public Criteria andOverTimeNotBetween(Integer value1, Integer value2) {
addCriterion("over_time not between", value1, value2, "overTime");
return (Criteria) this;
}
public Criteria andParkTimeIsNull() { public Criteria andParkTimeIsNull() {
addCriterion("park_time is null"); addCriterion("park_time is null");
return (Criteria) this; return (Criteria) this;
@ -826,63 +886,63 @@ public class ApiBlxOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceIsNull() { public Criteria andParkPriceIsNull() {
addCriterion("prak_price is null"); addCriterion("park_price is null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceIsNotNull() { public Criteria andParkPriceIsNotNull() {
addCriterion("prak_price is not null"); addCriterion("park_price is not null");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceEqualTo(BigDecimal value) { public Criteria andParkPriceEqualTo(BigDecimal value) {
addCriterion("prak_price =", value, "prakPrice"); addCriterion("park_price =", value, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceNotEqualTo(BigDecimal value) { public Criteria andParkPriceNotEqualTo(BigDecimal value) {
addCriterion("prak_price <>", value, "prakPrice"); addCriterion("park_price <>", value, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceGreaterThan(BigDecimal value) { public Criteria andParkPriceGreaterThan(BigDecimal value) {
addCriterion("prak_price >", value, "prakPrice"); addCriterion("park_price >", value, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceGreaterThanOrEqualTo(BigDecimal value) { public Criteria andParkPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("prak_price >=", value, "prakPrice"); addCriterion("park_price >=", value, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceLessThan(BigDecimal value) { public Criteria andParkPriceLessThan(BigDecimal value) {
addCriterion("prak_price <", value, "prakPrice"); addCriterion("park_price <", value, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceLessThanOrEqualTo(BigDecimal value) { public Criteria andParkPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("prak_price <=", value, "prakPrice"); addCriterion("park_price <=", value, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceIn(List<BigDecimal> values) { public Criteria andParkPriceIn(List<BigDecimal> values) {
addCriterion("prak_price in", values, "prakPrice"); addCriterion("park_price in", values, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceNotIn(List<BigDecimal> values) { public Criteria andParkPriceNotIn(List<BigDecimal> values) {
addCriterion("prak_price not in", values, "prakPrice"); addCriterion("park_price not in", values, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceBetween(BigDecimal value1, BigDecimal value2) { public Criteria andParkPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("prak_price between", value1, value2, "prakPrice"); addCriterion("park_price between", value1, value2, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPrakPriceNotBetween(BigDecimal value1, BigDecimal value2) { public Criteria andParkPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("prak_price not between", value1, value2, "prakPrice"); addCriterion("park_price not between", value1, value2, "parkPrice");
return (Criteria) this; return (Criteria) this;
} }

@ -261,6 +261,8 @@ public class BlxConfig {
log.info("头部参数: " + header); log.info("头部参数: " + header);
log.info("请求参数: " + map); log.info("请求参数: " + map);
log.info("响应参数: " + data); log.info("响应参数: " + data);
System.out.println(header);
System.out.println(map);
log.info("============ 比邻星停车券业务-查询车牌订单列表信息--捷顺-END ============="); log.info("============ 比邻星停车券业务-查询车牌订单列表信息--捷顺-END =============");
return data; return data;
@ -304,6 +306,28 @@ public class BlxConfig {
} }
/**
* @Author Sum1Dream
* @Name parkOrderPay
* @Description // 订单支付
* @Date 14:49 2023/9/4
* @Param object
* @return com.alibaba.fastjson.JSONObject
*/
public JSONObject parkOrderPay(JSONObject object) {
Map<String , Object> header = new HashMap<>();
header.put("token" , generateJw());
header.put("orderCode" , object.getString("orderCode"));
log.info("============ 比邻星停车券业务-停车场订单支付--捷顺-START =============");
JSONObject data = HttpsUtils.doPost(CommonSysConst.getSysConfig().getBlxPostUrl() + "/peration/member/parking/api/parkOrderPay" , new HashMap<>() , header);
log.info("头部参数: " + header);
log.info("响应参数: " + data);
log.info("============ 比邻星停车券业务-停车场订单支付--捷顺-END =============");
return data;
}

@ -1,6 +1,7 @@
package com.hai.openApi.service; package com.hai.openApi.service;
import com.hai.entity.ApiBlxCoupon; import com.hai.entity.ApiBlxCoupon;
import com.hai.entity.ApiBlxOrder;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -47,4 +48,33 @@ public interface ApiBlxCouponService {
*/ */
List<ApiBlxCoupon> getBlxCouponList(Map<String , Object> map); List<ApiBlxCoupon> getBlxCouponList(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name insertBlxOrder
* @Description // 新增停车订单
* @Date 15:08 2023/9/1
* @Param apiBlxOrder
* @return void
*/
void insertBlxOrder(ApiBlxOrder apiBlxOrder);
/**
* @Author Sum1Dream
* @Name editBlxOrder
* @Description // 修改停车订单
* @Date 15:09 2023/9/1
* @Param ApiBlxOrder
* @return void
*/
void editBlxOrder(ApiBlxOrder apiBlxOrder);
/**
* @Author Sum1Dream
* @Name findOrderByMap
* @Description // 根据条件查询停车订单
* @Date 15:10 2023/9/1
* @Param map
* @return com.hai.entity.ApiBlxOrder
*/
ApiBlxOrder findOrderByMap(Map<String , Object> map);
} }

@ -1,11 +1,16 @@
package com.hai.openApi.service.impl; package com.hai.openApi.service.impl;
import com.hai.dao.ApiBlxCouponMapper; import com.hai.dao.ApiBlxCouponMapper;
import com.hai.dao.ApiBlxOrderMapper;
import com.hai.entity.ApiBlxCoupon; import com.hai.entity.ApiBlxCoupon;
import com.hai.entity.ApiBlxCouponExample; import com.hai.entity.ApiBlxCouponExample;
import com.hai.entity.ApiBlxOrder;
import com.hai.entity.ApiBlxOrderExample;
import com.hai.openApi.service.ApiBlxCouponService; import com.hai.openApi.service.ApiBlxCouponService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -16,6 +21,9 @@ public class ApiBlxCouponServiceImpl implements ApiBlxCouponService {
@Resource @Resource
private ApiBlxCouponMapper apiBlxCouponMapper; private ApiBlxCouponMapper apiBlxCouponMapper;
@Resource
private ApiBlxOrderMapper apiBlxOrderMapper;
@Override @Override
public void insertBlxCoupon(ApiBlxCoupon apiBlxCoupon) { public void insertBlxCoupon(ApiBlxCoupon apiBlxCoupon) {
apiBlxCouponMapper.insert(apiBlxCoupon); apiBlxCouponMapper.insert(apiBlxCoupon);
@ -52,4 +60,44 @@ public class ApiBlxCouponServiceImpl implements ApiBlxCouponService {
return apiBlxCouponMapper.selectByExample(example); return apiBlxCouponMapper.selectByExample(example);
} }
@Override
public void insertBlxOrder(ApiBlxOrder apiBlxOrder) {
apiBlxOrderMapper.insert(apiBlxOrder);
}
@Override
public void editBlxOrder(ApiBlxOrder apiBlxOrder) {
apiBlxOrderMapper.updateByPrimaryKey(apiBlxOrder);
}
@Override
public ApiBlxOrder findOrderByMap(Map<String, Object> map) {
ApiBlxOrderExample example = new ApiBlxOrderExample();
ApiBlxOrderExample.Criteria criteria = example.createCriteria();
if (MapUtils.getString(map , "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getString(map , "merId"));
}
if (MapUtils.getLong(map , "orderId") != null) {
criteria.andOrderIdEqualTo(MapUtils.getLong(map , "orderId"));
}
if (MapUtils.getString(map , "merOrderId") != null) {
criteria.andMerOrderIdEqualTo(MapUtils.getString(map , "merOrderId"));
}
if (MapUtils.getString(map , "parkOrderId") != null) {
criteria.andParkOrderIdEqualTo(MapUtils.getString(map , "parkOrderId"));
}
List<ApiBlxOrder> list = apiBlxOrderMapper.selectByExample(example);
if (list.size() > 0 ) {
return list.get(0);
}
return null;
}
} }

@ -5,9 +5,11 @@ import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode; import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp; import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode; import com.hai.common.exception.SysCode;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.config.DataUtilConfig; import com.hai.config.DataUtilConfig;
import com.hai.config.QianZhuConfig; import com.hai.config.QianZhuConfig;
import com.hai.entity.*; import com.hai.entity.*;
import com.hai.openApi.config.BlxConfig;
import com.hai.openApi.config.PriceComputeConfig; import com.hai.openApi.config.PriceComputeConfig;
import com.hai.openApi.service.ApiBlxCouponService; import com.hai.openApi.service.ApiBlxCouponService;
import com.hai.openApi.service.ApiMchProductService; import com.hai.openApi.service.ApiMchProductService;
@ -51,6 +53,9 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
@Resource @Resource
private ApiBlxCouponService apiBlxCouponService; private ApiBlxCouponService apiBlxCouponService;
@Resource
private BlxConfig blxConfig;
@Override @Override
public ApiOrder oilHandle(JSONObject object) throws Exception { public ApiOrder oilHandle(JSONObject object) throws Exception {
@ -395,7 +400,7 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
} }
@Override @Override
public ApiOrder blxOrder(JSONObject object) throws Exception { public ApiOrder blxOrder(JSONObject object) {
// 获取下单内容 // 获取下单内容
JSONObject dataObject = JSONObject.parseObject(object.getString("content")); JSONObject dataObject = JSONObject.parseObject(object.getString("content"));
@ -403,6 +408,72 @@ public class ApiOrderCreateHandleServiceImpl implements ApiOrderCreateHandleServ
// 查询api商户 // 查询api商户
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId")); ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId"));
return null; int num = 0;
if (dataObject.getString("userCouponCode") != null) {
String[] strings = dataObject.getString("userCouponCode").split(",");
num = strings.length;
}
BigDecimal currentamt = dataObject.getBigDecimal("currentamt").divide(new BigDecimal(100));
BigDecimal prePrice = dataObject.getBigDecimal("prePrice").divide(new BigDecimal(100));
// 计算剩余扣款金额
BigDecimal postPrice = currentamt.subtract(new BigDecimal(num));
if (postPrice.compareTo(new BigDecimal(0)) < 0) {
postPrice = new BigDecimal(0);
}
// 判断金额是否充足
if (apiMerchants.getAmounts().compareTo(postPrice) < 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.INSUFFICIENT_BALANCE);
}
// 调用下单接口
JSONObject jsonObject = blxConfig.creatOrder(dataObject);
// 组装停车订单
ApiBlxOrder apiBlxOrder = new ApiBlxOrder();
apiBlxOrder.setMerOrderId((object.getString("orderNo")));
apiBlxOrder.setOrderType(dataObject.getInteger("orderType"));
apiBlxOrder.setCreateTime(new Date());
if (jsonObject.getInteger("code") == 1) {
apiBlxOrder.setParkOrderId(jsonObject.getJSONObject("data").getString("orderCode"));
apiBlxOrder.setOverTime(jsonObject.getJSONObject("data").getInteger("overtime"));
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR , jsonObject.getInteger("msg"));
}
apiBlxOrder.setCouponPrice(new BigDecimal(num));
apiBlxOrder.setInTime(dataObject.getDate("inTime"));
apiBlxOrder.setUpdateTime(new Date());
apiBlxOrder.setParkTime(dataObject.getInteger("parkTime"));
apiBlxOrder.setParkName(dataObject.getString("parkName"));
apiBlxOrder.setParkPrice(currentamt.add(prePrice));
apiBlxOrder.setOutTime(dataObject.getDate("outTime"));
apiBlxOrder.setMerId(object.getString("merchId"));
apiBlxOrder.setOrderStatus(4);
apiBlxCouponService.insertBlxOrder(apiBlxOrder);
// 组装api订单
ApiOrder apiOrder = new ApiOrder();
apiOrder.setCreateTime(new Date());
apiOrder.setTitle(apiMerchants.getMerchantName() + "|" + OrderProductType.PRODUCT_TYPE14.getName() + "|扣款" + postPrice);
apiOrder.setFacePrice(postPrice);
apiOrder.setCostPrice(postPrice);
apiOrder.setOrderPrice(currentamt);
apiOrder.setMchId(object.getString("merchId"));
apiOrder.setMchName(apiMerchants.getMerchantName());
apiOrder.setUpdateTime(new Date());
apiOrder.setProductType(object.getInteger("productType"));
apiOrder.setMchOrderNo(object.getString("orderNo"));
apiOrder.setNotifyUrl(object.getString("notifyUrl"));
apiOrder.setContent(object.toJSONString());
return apiOrder;
} }
} }

@ -212,6 +212,7 @@ public class ApiOrderServiceImpl implements ApiOrderService {
createOrderChildModel.setMemPhone(apiMerchants.getPhone()); createOrderChildModel.setMemPhone(apiMerchants.getPhone());
createOrderChildModel.setCompanyId(2L); createOrderChildModel.setCompanyId(2L);
createOrderChildModel.setGoodsType(OrderChildGoodsType.TYPE12.getNumber()); createOrderChildModel.setGoodsType(OrderChildGoodsType.TYPE12.getNumber());
createOrderChildModel.setPrice(apiOrder.getCostPrice());
createOrderChildModel.setCouponCode(dataObject.getString("couponCode")); createOrderChildModel.setCouponCode(dataObject.getString("couponCode"));
createOrderChildModel.setSaleCount(dataObject.getInteger("receiverCount")); createOrderChildModel.setSaleCount(dataObject.getInteger("receiverCount"));
createOrderChildModel.setIsTyAgent(false); createOrderChildModel.setIsTyAgent(false);
@ -225,16 +226,15 @@ public class ApiOrderServiceImpl implements ApiOrderService {
// 处理停车订单 // 处理停车订单
if (OrderProductType.PRODUCT_TYPE14.getNumber().equals(object.getInteger("productType"))) { if (OrderProductType.PRODUCT_TYPE14.getNumber().equals(object.getInteger("productType"))) {
apiOrder = orderCreateHandleService.blxCouponHandle(object); apiOrder = orderCreateHandleService.blxOrder(object);
// 组装子订单内容 // 组装子订单内容
CreateOrderChildModel createOrderChildModel = new CreateOrderChildModel(); CreateOrderChildModel createOrderChildModel = new CreateOrderChildModel();
createOrderChildModel.setMemName(apiMerchants.getMerchantName()); createOrderChildModel.setMemName(apiMerchants.getMerchantName());
createOrderChildModel.setMemPhone(apiMerchants.getPhone()); createOrderChildModel.setMemPhone(apiMerchants.getPhone());
createOrderChildModel.setCompanyId(2L); createOrderChildModel.setCompanyId(2L);
createOrderChildModel.setGoodsType(OrderChildGoodsType.TYPE12.getNumber()); createOrderChildModel.setGoodsType(OrderChildGoodsType.TYPE13.getNumber());
createOrderChildModel.setCouponCode(dataObject.getString("couponCode")); createOrderChildModel.setSaleCount(1);
createOrderChildModel.setSaleCount(dataObject.getInteger("receiverCount"));
createOrderChildModel.setIsTyAgent(false); createOrderChildModel.setIsTyAgent(false);
createOrderChildModel.setGoodsPrice(apiOrder.getOrderPrice()); createOrderChildModel.setGoodsPrice(apiOrder.getOrderPrice());
@ -385,6 +385,5 @@ public class ApiOrderServiceImpl implements ApiOrderService {
map.put("sourceContent", "退款金额:" + apiOrder.getCostPrice() + " 元"); map.put("sourceContent", "退款金额:" + apiOrder.getCostPrice() + " 元");
apiMerchantsService.recharge(merchants.getId(), apiOrder.getCostPrice(), map); apiMerchantsService.recharge(merchants.getId(), apiOrder.getCostPrice(), map);
} }
} }

@ -122,6 +122,9 @@ public class CreateOrderChildModel {
/** ======================= 比邻星停车券 start ======================== **/ /** ======================= 比邻星停车券 start ======================== **/
// 停车券编码 // 停车券编码
private String couponCode; private String couponCode;
// 实际单价
private BigDecimal price;
/** ======================= 比邻星停车券 end ======================== **/ /** ======================= 比邻星停车券 end ======================== **/
} }

@ -86,6 +86,26 @@ public interface OrderCreateHandleService {
*/ */
HighChildOrder goods(HighOrder order, CreateOrderChildModel createOrderChild) throws Exception; HighChildOrder goods(HighOrder order, CreateOrderChildModel createOrderChild) throws Exception;
/**
* @Author Sum1Dream
* @Name blxCoupon
* @Description // 比邻星停车券业务
* @Date 17:11 2023/9/1
* @Param order
* @Param createOrderChildModel
* @return com.hai.entity.HighChildOrder
*/
HighChildOrder blxCoupon(HighOrder order , CreateOrderChildModel createOrderChildModel) throws Exception; HighChildOrder blxCoupon(HighOrder order , CreateOrderChildModel createOrderChildModel) throws Exception;
/**
* @Author Sum1Dream
* @Name blxOrder
* @Description // 比邻星停车券核销
* @Date 17:11 2023/9/1
* @Param order
* @Param createOrderChildModel
* @return com.hai.entity.HighChildOrder
*/
HighChildOrder blxOrder(HighOrder order , CreateOrderChildModel createOrderChildModel) throws Exception;
} }

@ -17,6 +17,7 @@ import com.hai.goods.service.GoodsSkuService;
import com.hai.goods.service.ShoppingCartService; import com.hai.goods.service.ShoppingCartService;
import com.hai.model.GasPayPriceModel; import com.hai.model.GasPayPriceModel;
import com.hai.model.OutRechargePriceModel; import com.hai.model.OutRechargePriceModel;
import com.hai.openApi.service.ApiBlxCouponService;
import com.hai.order.model.CreateOrderChildModel; import com.hai.order.model.CreateOrderChildModel;
import com.hai.order.model.CreateOrderModel; import com.hai.order.model.CreateOrderModel;
import com.hai.order.service.OrderCreateHandleService; import com.hai.order.service.OrderCreateHandleService;
@ -53,6 +54,8 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
@Resource @Resource
private CommonService commonService; private CommonService commonService;
@Resource
private ApiBlxCouponService apiBlxCouponService;
@Resource @Resource
@ -971,6 +974,58 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
@Override @Override
public HighChildOrder blxCoupon(HighOrder order, CreateOrderChildModel createOrderChildModel) throws Exception { public HighChildOrder blxCoupon(HighOrder order, CreateOrderChildModel createOrderChildModel) throws Exception {
return null;
ApiBlxCoupon apiBlxCoupon = apiBlxCouponService.findBlxCoupon(createOrderChildModel.getCouponCode());
// 生成交易子订单
HighChildOrder childOrder = new HighChildOrder();
childOrder.setOrderNo(order.getOrderNo());
childOrder.setMemId(order.getMemId());
childOrder.setMemName(order.getMemName());
childOrder.setMemPhone(order.getMemPhone());
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE12.getNumber());
childOrder.setGoodsId(apiBlxCoupon.getId());
childOrder.setGoodsName(apiBlxCoupon.getCouponName());
childOrder.setGoodsSpecName(apiBlxCoupon.getCouponCode());
childOrder.setGoodsPrice(new BigDecimal(apiBlxCoupon.getDenomination()));
childOrder.setGoodsActualPrice(createOrderChildModel.getPrice());
childOrder.setSaleCount(createOrderChildModel.getSaleCount());
childOrder.setGiveawayType(false);
childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber());
childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount())));
childOrder.setTotalActualPrice(childOrder.getGoodsActualPrice().multiply(new BigDecimal(childOrder.getSaleCount())));
childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice()));
childOrder.setPraiseStatus(0);
childOrder.setCreateTime(new Date());
return childOrder;
}
@Override
public HighChildOrder blxOrder(HighOrder order, CreateOrderChildModel createOrderChildModel) {
// 生成交易子订单
HighChildOrder childOrder = new HighChildOrder();
childOrder.setOrderNo(order.getOrderNo());
childOrder.setMemId(order.getMemId());
childOrder.setMemName(order.getMemName());
childOrder.setMemPhone(order.getMemPhone());
childOrder.setChildOrderNo(OrderUtil.generateChildOrderNo());
childOrder.setGoodsType(OrderChildGoodsType.TYPE13.getNumber());
childOrder.setGoodsName("停车券核销");
childOrder.setGoodsPrice(createOrderChildModel.getGoodsPrice());
childOrder.setGoodsActualPrice(createOrderChildModel.getGoodsPrice());
childOrder.setSaleCount(createOrderChildModel.getSaleCount());
childOrder.setGiveawayType(false);
childOrder.setChildOrderStatus(OrderChildStatus.STATUS1.getNumber());
childOrder.setTotalPrice(childOrder.getGoodsPrice().multiply(new BigDecimal(childOrder.getSaleCount())));
childOrder.setTotalActualPrice(childOrder.getGoodsActualPrice().multiply(new BigDecimal(childOrder.getSaleCount())));
childOrder.setTotalDeductionPrice(childOrder.getTotalPrice().subtract(childOrder.getTotalActualPrice()));
childOrder.setPraiseStatus(0);
childOrder.setCreateTime(new Date());
return childOrder;
} }
} }

@ -12,6 +12,8 @@ import com.hai.enum_type.*;
import com.hai.goods.service.GoodsOrderExtService; import com.hai.goods.service.GoodsOrderExtService;
import com.hai.goods.service.GoodsPresentService; import com.hai.goods.service.GoodsPresentService;
import com.hai.msg.entity.MsgTopic; import com.hai.msg.entity.MsgTopic;
import com.hai.openApi.config.BlxConfig;
import com.hai.openApi.service.ApiBlxCouponService;
import com.hai.order.service.OrderPaySuccessService; import com.hai.order.service.OrderPaySuccessService;
import com.hai.order.service.OrderService; import com.hai.order.service.OrderService;
import com.hai.order.topic.OrderTopic; import com.hai.order.topic.OrderTopic;
@ -59,6 +61,9 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
@Resource @Resource
private HighCouponService couponService; private HighCouponService couponService;
@Resource
private BlxConfig blxConfig;
@Resource @Resource
private HighCouponCodeService couponCodeService; private HighCouponCodeService couponCodeService;
@ -109,6 +114,8 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
@Resource @Resource
private GoodsPresentService presentService; private GoodsPresentService presentService;
@Resource
private ApiBlxCouponService apiBlxCouponService;
@Override @Override
@ -227,6 +234,10 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
thirdOrderHandle(order); thirdOrderHandle(order);
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE11.getNumber())) { } else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE11.getNumber())) {
goodsRecharge(order , childOrder); goodsRecharge(order , childOrder);
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE12.getNumber())) {
blxCoupon(order , childOrder);
} else if (childOrder.getGoodsType().equals(OrderChildGoodsType.TYPE13.getNumber())) {
blxOrder(order , childOrder);
} }
} }
} }
@ -513,4 +524,55 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
presentService.presentUser(order , highChildOrder); presentService.presentUser(order , highChildOrder);
} }
private void blxCoupon(HighOrder order , HighChildOrder highChildOrder) {
// 派发停车券
ApiBlxCoupon apiBlxCoupon = apiBlxCouponService.findBlxCoupon(highChildOrder.getGoodsSpecName());
HighCoupon coupon = couponService.getCouponDetail(highChildOrder.getGoodsSpecName());
if (apiBlxCoupon == null || apiBlxCoupon.getCouponStatus() != 1) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "当前卡券不可购买");
}
// 计算上送卡券数量
int num = coupon.getSalesPrice().divide(new BigDecimal(apiBlxCoupon.getDenomination())).intValue();
if (num > 0) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("couponCode" , coupon.getCouponKey());
jsonObject.put("receiverPhone" , order.getMemPhone());
jsonObject.put("receiverCount" , num);
JSONObject object = blxConfig.sendCoupon(jsonObject);
if (object.getInteger("code") == 1) {
order.setOrderStatus(OrderStatus.STATUS3.getNumber());
order.setFinishTime(new Date());
orderService.updateOrderData(order);
}
}
}
private void blxOrder(HighOrder order , HighChildOrder highChildOrder) {
// 获取下单订单号
Map<String , Object> map = new HashMap<>();
map.put("orderId" , order.getId());
ApiBlxOrder apiBlxOrder = apiBlxCouponService.findOrderByMap(map);
if (apiBlxOrder != null) {
JSONObject jsonObject = new JSONObject();
jsonObject.put("orderCode" , apiBlxOrder.getParkOrderId());
JSONObject object = blxConfig.parkOrderPay(jsonObject);
if (object.getInteger("code") == 1) {
order.setOrderStatus(OrderStatus.STATUS3.getNumber());
order.setFinishTime(new Date());
orderService.updateOrderData(order);
}
}
}
} }

@ -164,7 +164,7 @@ public class OrderServiceImpl implements OrderService {
BsDistributionUserRel popularizeUser = bsDistributionUserRelService.findDistributionUserRel(mapUser); BsDistributionUserRel popularizeUser = bsDistributionUserRelService.findDistributionUserRel(mapUser);
HighOrder order = new HighOrder(); HighOrder order = new HighOrder();
if (popularizeUser != null) { if (popularizeUser != null && createOrderModel.getMemId() != null) {
order.setPromoteCode(popularizeUser.getAgentId().toString()); order.setPromoteCode(popularizeUser.getAgentId().toString());
} }
@ -332,6 +332,29 @@ public class OrderServiceImpl implements OrderService {
// 比邻星停车券 // 比邻星停车券
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE12.getNumber())) { } else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE12.getNumber())) {
HighChildOrder childOrder = orderCreateHandleService.blxCoupon(order , child); HighChildOrder childOrder = orderCreateHandleService.blxCoupon(order , child);
childOrderList.add(childOrder);
order.setProductType(OrderProductType.PRODUCT_TYPE13.getNumber());
order.setSecUserId(childOrder.getId());
if (StringUtils.isBlank(order.getTitle())) {
order.setTitle(childOrder.getGoodsName());
order.setExt6(childOrder.getGoodsImg());
} else {
order.setTitle(order.getTitle() + "+" +childOrder.getGoodsName());
order.setExt6(order.getExt6() + "," +childOrder.getGoodsImg());
}
// 比邻星停车券核销
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE13.getNumber())) {
HighChildOrder childOrder = orderCreateHandleService.blxOrder(order , child);
childOrderList.add(childOrder);
order.setProductType(OrderProductType.PRODUCT_TYPE13.getNumber());
order.setSecUserId(childOrder.getId());
if (StringUtils.isBlank(order.getTitle())) {
order.setTitle(childOrder.getGoodsName());
order.setExt6(childOrder.getGoodsImg());
} else {
order.setTitle(order.getTitle() + "+" +childOrder.getGoodsName());
order.setExt6(order.getExt6() + "," +childOrder.getGoodsImg());
}
} else { } else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知业务类型"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知业务类型");
} }

@ -21,6 +21,7 @@ public enum OrderChildGoodsType {
TYPE10(10, "第三方充值"), TYPE10(10, "第三方充值"),
TYPE11(11, "实物商品购买"), TYPE11(11, "实物商品购买"),
TYPE12(12, "比邻星停车券"), TYPE12(12, "比邻星停车券"),
TYPE13(13, "比邻星停车"),
; ;
private Integer number; private Integer number;

@ -132,4 +132,4 @@ filesystem=https://hsgcs.dctpay.com/filesystem/
#payPostUrl=http://localhost:9601/crest/ #payPostUrl=http://localhost:9601/crest/
# #
blxPostUrl=https://vertical-formats-gateway.blx.bodata.cn:18443 blxPostUrl=https://gateway.vf.bilinxing.com

@ -313,98 +313,5 @@ public class BlxCouponController {
} }
} }
@RequestMapping(value = "/creatOrder", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "停车添加订单")
public ResponseData creatOrder(@RequestBody JSONObject object , HttpServletRequest request ) {
try {
String ip = "";
// 有的user可能使用代理,为处理用户使用代理的情况,使用x-forwarded-for
if (request.getHeader("x-forwarded-for") == null) {
ip = request.getRemoteAddr();
} else {
ip = request.getHeader("x-forwarded-for");
}
if (!apiIpAddressService.validationIpAddressLegal(object.getString("merchId") , ip)) {
log.error("getRechargeProduct error!", "非法ip地址,请联系管理人员!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.IP_ERROR, "非法ip地址,请联系管理人员!");
}
if (
StringUtils.isBlank(object.getString("merchId")) ||
StringUtils.isBlank(object.getString("organizeCode")) ||
StringUtils.isBlank(object.getString("userMobile")) ||
StringUtils.isBlank(object.getString("userCouponCode")) ||
StringUtils.isBlank(object.getString("parkOrderId")) ||
StringUtils.isBlank(object.getString("orderType")) ||
StringUtils.isBlank(object.getString("prePrice")) ||
StringUtils.isBlank(object.getString("parkId")) ||
StringUtils.isBlank(object.getString("parkName")) ||
StringUtils.isBlank(object.getString("parkTime")) ||
StringUtils.isBlank(object.getString("carSeatId")) ||
StringUtils.isBlank(object.getString("inTime")) ||
StringUtils.isBlank(object.getString("outTime")) ||
StringUtils.isBlank(object.getString("carNo")) ||
StringUtils.isBlank(object.getString("parkType")) ||
StringUtils.isBlank(object.getString("sign"))
) {
log.error("getRechargeProduct error!", "请求参数校验失败!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR);
}
ApiMerchants apiMerchants = apiMerchantsService.findByMchId(object.getString("merchId"));
if (apiMerchants == null) {
log.error("getRechargeProduct error!", "帐户号错误!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_NOT_EXIST);
}
if (!secConfigService.isConfig(OrderProductType.PRODUCT_TYPE13.getApiCode(), object.getString("merchId"))) {
log.error("getAllCities error!", "当前帐户无权限查询!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MERCHANT_NOT_AUTHORIZED, "");
}
Map<String , Object> map = new HashMap<>();
map.put("apiKey" , apiMerchants.getApiKey());
map.put("merchId" , object.getString("merchId"));
map.put("organizeCode" , object.getString("organizeCode"));
map.put("userMobile" , object.getString("userMobile"));
map.put("userCouponCode" , object.getString("userCouponCode"));
map.put("parkOrderId" , object.getString("parkOrderId"));
map.put("orderType" , object.getString("orderType"));
map.put("prePrice" , object.getString("prePrice"));
map.put("parkId" , object.getString("parkId"));
map.put("parkName" , object.getString("parkName"));
map.put("parkTime" , object.getString("parkTime"));
map.put("carSeatId" , object.getString("carSeatId"));
map.put("inTime" , object.getString("inTime"));
map.put("outTime" , object.getString("outTime"));
map.put("carNo" , object.getString("carNo"));
map.put("parkType" , object.getString("parkType"));
if (!secConfigService.isSignVerify(map , object.getString("sign"))) {
log.error("getRechargeProduct error!", "签名校验失败!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.SIGN_VERIFY);
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("carNo" , object.getString("carNo"));
jsonObject.put("orderStatus" , object.getString("orderStatus"));
JSONObject data = blxConfig.queryJsOrderList(jsonObject);
if (data.getInteger("code") == 1) {
return ResponseMsgUtil.success(data.getJSONObject("data").getJSONArray("ordlist"));
}
return ResponseMsgUtil.success(null);
} catch (Exception e) {
log.error("HighOpenApiController --> getRechargeProduct() error!", e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -179,18 +179,20 @@ public class orderController {
} }
if (object.getInteger("productType").equals(OrderProductType.PRODUCT_TYPE14.getNumber())) { if (object.getInteger("productType").equals(OrderProductType.PRODUCT_TYPE14.getNumber())) {
if ( StringUtils.isBlank(dataObject.getString("userMobile")) if ( StringUtils.isBlank(dataObject.getString("userMobile"))
|| StringUtils.isBlank(dataObject.getString("userCouponCode"))
|| StringUtils.isBlank(dataObject.getString("parkOrderId")) || StringUtils.isBlank(dataObject.getString("parkOrderId"))
|| StringUtils.isBlank(dataObject.getString("parkName")) || StringUtils.isBlank(dataObject.getString("parkName"))
|| dataObject.getInteger("orderType") == null || dataObject.getInteger("orderType") == null
|| dataObject.getBigDecimal("prePrice") == null || dataObject.getBigDecimal("prePrice") == null
|| dataObject.getBigDecimal("currentamt") == null
|| dataObject.getInteger("parkId") == null || dataObject.getInteger("parkId") == null
|| dataObject.getInteger("parkTime") == null || dataObject.getInteger("parkTime") == null
|| dataObject.getDate("inTime") == null || dataObject.getString("inTime") == null
|| dataObject.getDate("outTime") == null || dataObject.getString("outTime") == null
|| dataObject.getDate("carNo") == null || dataObject.getString("carNo") == null
) { ) {
log.error("OrderController -> create() error!",""); log.error("OrderController -> create() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未填写卡券编码,手机号,购买数量"); throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未填写相关参数");
} }
} }

@ -56,8 +56,13 @@ spring:
rocketmq: rocketmq:
name-server: 139.9.154.68:9876 name-server: 139.9.154.68:9876
producer: producer:
access-key: huifukeji
secret-key: HF123456.
#必须指定group #必须指定group
group: default-group group: default-group
consumer:
access-key: huifukeji
secret-key: HF123456.
#配置日期返回至前台为时间戳 #配置日期返回至前台为时间戳
jackson: jackson:

Loading…
Cancel
Save