mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-13 03:39:55 +08:00
add 新增 查询充电优免订单接口
This commit is contained in:
@@ -13,10 +13,12 @@ import com.jsowell.common.response.RestApiResponse;
|
|||||||
import com.jsowell.common.util.StringUtils;
|
import com.jsowell.common.util.StringUtils;
|
||||||
import com.jsowell.pile.domain.ChargeAlgorithmRecord;
|
import com.jsowell.pile.domain.ChargeAlgorithmRecord;
|
||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
|
import com.jsowell.pile.service.CarCouponRecordService;
|
||||||
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
|
import com.jsowell.pile.service.ChargeAlgorithmRecordService;
|
||||||
import com.jsowell.pile.vo.base.StationInfoVO;
|
import com.jsowell.pile.vo.base.StationInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.ChargeAlgorithmRecordVO;
|
import com.jsowell.pile.vo.uniapp.customer.ChargeAlgorithmRecordVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.ParkingOrderVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.UniAppOrderVO;
|
import com.jsowell.pile.vo.uniapp.customer.UniAppOrderVO;
|
||||||
import com.jsowell.service.OrderService;
|
import com.jsowell.service.OrderService;
|
||||||
import com.jsowell.wxpay.dto.WechatSendMsgDTO;
|
import com.jsowell.wxpay.dto.WechatSendMsgDTO;
|
||||||
@@ -46,6 +48,9 @@ public class OrderController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ChargeAlgorithmRecordService chargeAlgorithmRecordService;
|
private ChargeAlgorithmRecordService chargeAlgorithmRecordService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CarCouponRecordService carCouponRecordService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成订单/创建订单
|
* 生成订单/创建订单
|
||||||
* http://localhost:8080/uniapp/order/generateOrder
|
* http://localhost:8080/uniapp/order/generateOrder
|
||||||
@@ -412,4 +417,26 @@ public class OrderController extends BaseController {
|
|||||||
logger.info("查询电池充电报告 params:{}, result:{}", orderCode, response);
|
logger.info("查询电池充电报告 params:{}, result:{}", orderCode, response);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询停车优免订单
|
||||||
|
* @param request
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/queryParkingOrderList")
|
||||||
|
public RestApiResponse<?> queryParkingOrderList(HttpServletRequest request) {
|
||||||
|
RestApiResponse<?> response = null;
|
||||||
|
String memberId = null;
|
||||||
|
try {
|
||||||
|
memberId = getMemberIdByAuthorization(request);
|
||||||
|
List<ParkingOrderVO> list = carCouponRecordService.queryParkingOrderList(memberId);
|
||||||
|
response = new RestApiResponse<>(ImmutableMap.of("ParkingOrderVOList", list));
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("查询停车优免订单 error", e);
|
||||||
|
response = new RestApiResponse<>(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.info("查询停车优免订单 memberId:{}, result:{}", memberId, response);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -95,9 +95,6 @@ public class OrderService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private OrderPayRecordService orderPayRecordService;
|
private OrderPayRecordService orderPayRecordService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private WechatPayService wechatPayService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MemberTransactionRecordService memberTransactionRecordService;
|
private MemberTransactionRecordService memberTransactionRecordService;
|
||||||
|
|
||||||
@@ -134,15 +131,9 @@ public class OrderService {
|
|||||||
@Resource
|
@Resource
|
||||||
private PileMerchantInfoService pileMerchantInfoService;
|
private PileMerchantInfoService pileMerchantInfoService;
|
||||||
|
|
||||||
@Resource
|
|
||||||
private MemberWalletLogService memberWalletLogService;
|
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private ClearingBillInfoService clearingBillInfoService;
|
private ClearingBillInfoService clearingBillInfoService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ThirdPartyStationRelationService thirdPartyStationRelationService;
|
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IThirdpartySnRelationService snRelationService;
|
private IThirdpartySnRelationService snRelationService;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.CarCouponRecord;
|
import com.jsowell.pile.domain.CarCouponRecord;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.ParkingOrderVO;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -68,4 +69,11 @@ public interface CarCouponRecordMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
CarCouponRecord selectCarCouponRecord(@Param("orderCode") String orderCode);
|
CarCouponRecord selectCarCouponRecord(@Param("orderCode") String orderCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通过memberId查询充电优免订单
|
||||||
|
* @param memberId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ParkingOrderVO> queryParkingOrderList(@Param("memberId") String memberId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package com.jsowell.pile.service;
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
import com.jsowell.pile.domain.CarCouponRecord;
|
import com.jsowell.pile.domain.CarCouponRecord;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.ParkingOrderVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -63,4 +64,6 @@ public interface CarCouponRecordService {
|
|||||||
* 根据订单号与车牌号查询发券成功的记录
|
* 根据订单号与车牌号查询发券成功的记录
|
||||||
*/
|
*/
|
||||||
public CarCouponRecord selectCarCouponRecord(String orderCode);
|
public CarCouponRecord selectCarCouponRecord(String orderCode);
|
||||||
|
|
||||||
|
List<ParkingOrderVO> queryParkingOrderList(String memberId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.jsowell.common.util.DateUtils;
|
|||||||
import com.jsowell.pile.domain.CarCouponRecord;
|
import com.jsowell.pile.domain.CarCouponRecord;
|
||||||
import com.jsowell.pile.mapper.CarCouponRecordMapper;
|
import com.jsowell.pile.mapper.CarCouponRecordMapper;
|
||||||
import com.jsowell.pile.service.CarCouponRecordService;
|
import com.jsowell.pile.service.CarCouponRecordService;
|
||||||
|
import com.jsowell.pile.vo.uniapp.customer.ParkingOrderVO;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@@ -111,4 +112,9 @@ public class CarCouponRecordServiceImpl implements CarCouponRecordService {
|
|||||||
}
|
}
|
||||||
return carCouponRecord;
|
return carCouponRecord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<ParkingOrderVO> queryParkingOrderList(String memberId) {
|
||||||
|
return carCouponRecordMapper.queryParkingOrderList(memberId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.jsowell.pile.vo.uniapp.customer;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停车优免订单VO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2025/6/10 15:25:51
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ParkingOrderVO {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 会员id
|
||||||
|
*/
|
||||||
|
private String memberId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String orderCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private String createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 车牌号码
|
||||||
|
*/
|
||||||
|
private String plateNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点id
|
||||||
|
*/
|
||||||
|
private String stationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点名称
|
||||||
|
*/
|
||||||
|
private String stationName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停车优免平台返回码
|
||||||
|
*/
|
||||||
|
private String returnMsg;
|
||||||
|
}
|
||||||
@@ -90,4 +90,21 @@
|
|||||||
order by create_time desc
|
order by create_time desc
|
||||||
limit 1
|
limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryParkingOrderList" resultType="com.jsowell.pile.vo.uniapp.customer.ParkingOrderVO">
|
||||||
|
SELECT
|
||||||
|
t2.member_id AS memberId,
|
||||||
|
t1.order_code AS orderCode,
|
||||||
|
t1.station_id AS stationId,
|
||||||
|
t3.station_name AS stationName,
|
||||||
|
t1.plate_number AS plateNumber,
|
||||||
|
t1.return_msg AS returnMsg
|
||||||
|
FROM
|
||||||
|
car_coupon_record t1
|
||||||
|
JOIN order_basic_info t2 ON t1.order_code = t2.order_code
|
||||||
|
JOIN pile_station_info t3 ON t1.station_id = t3.id
|
||||||
|
WHERE
|
||||||
|
t1.del_flag = '0'
|
||||||
|
AND t2.member_id = #{memberId,jdbcType=VARCHAR}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
Reference in New Issue
Block a user