mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
新增 占桩订单相关接口
This commit is contained in:
@@ -91,4 +91,12 @@ public interface OrderPileOccupyMapper {
|
||||
* @return
|
||||
*/
|
||||
List<OrderPileOccupyVO> getOccupyOrderInfo(String memberId);
|
||||
|
||||
/**
|
||||
* 根据桩编号、枪口号查询最近一条占桩订单
|
||||
* @param pileSn
|
||||
* @param connectorCode
|
||||
* @return
|
||||
*/
|
||||
OrderPileOccupy getOrderInfoByPile(@Param("pileSn") String pileSn, @Param("connectorCode") String connectorCode);
|
||||
}
|
||||
@@ -58,4 +58,12 @@ public interface OrderPileOccupyService{
|
||||
* @return
|
||||
*/
|
||||
List<OrderPileOccupyVO> getOccupyOrderInfo(String memberId);
|
||||
|
||||
/**
|
||||
* 根据桩编号、枪口号查询最近一条占桩订单
|
||||
* @param pileSn
|
||||
* @param connectorCode
|
||||
* @return
|
||||
*/
|
||||
OrderPileOccupy getOrderInfoByPile(String pileSn, String connectorCode);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService{
|
||||
String occupyCode = "OP" + IdUtils.getOrderCode();
|
||||
orderPileOccupy.setOccupyCode(occupyCode);
|
||||
orderPileOccupy.setMemberId(memberId);
|
||||
orderPileOccupy.setStatus(Constants.ZERO); // 占桩中
|
||||
orderPileOccupy.setStatus(OrderPileOccupyStatusEnum.DRAFT_ORDER.getCode()); // 占桩中
|
||||
orderPileOccupy.setPayStatus(Constants.ZERO); // 未支付
|
||||
orderPileOccupy.setPileSn(pileSn);
|
||||
PileInfoVO pileInfoVO = pileBasicInfoService.selectPileInfoBySn(pileSn);
|
||||
@@ -147,7 +147,7 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService{
|
||||
}
|
||||
orderPileOccupy.setConnectorCode(connectorCode);
|
||||
orderPileOccupy.setPileConnectorCode(pileSn + connectorCode);
|
||||
orderPileOccupy.setStartTime(DateUtils.getNowDate());
|
||||
// orderPileOccupy.setStartTime(DateUtils.getNowDate());
|
||||
orderPileOccupy.setDelFlag(DelFlagEnum.NORMAL.getValue());
|
||||
orderPileOccupyMapper.insertSelective(orderPileOccupy);
|
||||
|
||||
@@ -287,5 +287,16 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService{
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据桩编号、枪口号查询最近一条占桩订单
|
||||
* @param pileSn
|
||||
* @param connectorCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public OrderPileOccupy getOrderInfoByPile(String pileSn, String connectorCode) {
|
||||
return orderPileOccupyMapper.getOrderInfoByPile(pileSn, connectorCode);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -844,7 +844,7 @@
|
||||
t1.status,
|
||||
t1.station_id as stationId,
|
||||
t2.station_name as stationName,
|
||||
t1.start_time as startime,
|
||||
t1.start_time as startTime,
|
||||
t1.end_time as endTime,
|
||||
t1.pay_status as payStatus,
|
||||
t1.order_amount as orderAmount
|
||||
@@ -854,4 +854,18 @@
|
||||
where
|
||||
member_id = #{memberId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<select id="getOrderInfoByPile" resultMap="BaseResultMap">
|
||||
select
|
||||
<include refid="Base_Column_List"/>
|
||||
from
|
||||
order_pile_occupy
|
||||
where
|
||||
pile_sn = #{pileSn,jdbcType=VARCHAR}
|
||||
and
|
||||
connector_code = #{connectorCode,jdbcType=VARCHAR}
|
||||
order by
|
||||
create_time DESC
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user