mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 生成占桩订单
This commit is contained in:
@@ -189,6 +189,23 @@ public class SpringBootTestController {
|
||||
@Autowired
|
||||
private ClearingWithdrawInfoService clearingWithdrawInfoService;
|
||||
|
||||
@Autowired
|
||||
private OrderPileOccupyService orderPileOccupyService;
|
||||
|
||||
@Test
|
||||
public void testGenerateOccupyPileOrder() {
|
||||
String memberId = "67569684";
|
||||
String pileSn = "88230000000135";
|
||||
String connectorCode = "01";
|
||||
orderPileOccupyService.generateOccupyPileOrder(memberId, pileSn, connectorCode);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testStopOccupyPileOrder() {
|
||||
String occupyCode = "OP82399061445";
|
||||
orderPileOccupyService.stopOccupyPileOrder(occupyCode);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateConfirmReverse() throws BaseAdaPayException {
|
||||
List<String> list = Lists.newArrayList();
|
||||
|
||||
@@ -35,4 +35,6 @@ public interface OrderPileOccupyService{
|
||||
* 生成占桩订单
|
||||
*/
|
||||
void generateOccupyPileOrder(String memberId, String pileSn, String connectorCode);
|
||||
|
||||
void stopOccupyPileOrder(String occupyCode);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.jsowell.pile.service.impl;
|
||||
|
||||
import com.jsowell.common.constant.Constants;
|
||||
import com.jsowell.common.enums.DelFlagEnum;
|
||||
import com.jsowell.common.util.DateUtils;
|
||||
import com.jsowell.common.util.id.IdUtils;
|
||||
import com.jsowell.pile.domain.OrderPileOccupy;
|
||||
@@ -115,12 +116,14 @@ public class OrderPileOccupyServiceImpl implements OrderPileOccupyService{
|
||||
orderPileOccupy.setConnectorCode(connectorCode);
|
||||
orderPileOccupy.setPileConnectorCode(pileSn + connectorCode);
|
||||
orderPileOccupy.setStartTime(DateUtils.getNowDate());
|
||||
orderPileOccupy.setDelFlag(DelFlagEnum.NORMAL.getValue());
|
||||
orderPileOccupyMapper.insertOrUpdate(orderPileOccupy);
|
||||
}
|
||||
|
||||
/**
|
||||
* 占桩订单停止计费
|
||||
*/
|
||||
@Override
|
||||
public void stopOccupyPileOrder(String occupyCode) {
|
||||
OrderPileOccupy orderPileOccupy = queryByOccupyCode(occupyCode);
|
||||
if (orderPileOccupy == null) {
|
||||
|
||||
@@ -481,9 +481,7 @@
|
||||
pile_sn,
|
||||
connector_code,
|
||||
pile_connector_code,
|
||||
create_time,
|
||||
create_by,
|
||||
update_time,
|
||||
update_by,
|
||||
del_flag,
|
||||
</trim>
|
||||
@@ -503,9 +501,7 @@
|
||||
#{pileSn,jdbcType=VARCHAR},
|
||||
#{connectorCode,jdbcType=VARCHAR},
|
||||
#{pileConnectorCode,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=TIMESTAMP},
|
||||
#{createBy,jdbcType=VARCHAR},
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
#{updateBy,jdbcType=VARCHAR},
|
||||
#{delFlag,jdbcType=CHAR},
|
||||
</trim>
|
||||
@@ -525,9 +521,7 @@
|
||||
pile_sn = #{pileSn,jdbcType=VARCHAR},
|
||||
connector_code = #{connectorCode,jdbcType=VARCHAR},
|
||||
pile_connector_code = #{pileConnectorCode,jdbcType=VARCHAR},
|
||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||
create_by = #{createBy,jdbcType=VARCHAR},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||
del_flag = #{delFlag,jdbcType=CHAR},
|
||||
</trim>
|
||||
|
||||
Reference in New Issue
Block a user