update 生成占桩订单

This commit is contained in:
2023-08-08 08:43:50 +08:00
parent 579d1619a8
commit 7dd0b1cdfc
4 changed files with 22 additions and 6 deletions

View File

@@ -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();

View File

@@ -35,4 +35,6 @@ public interface OrderPileOccupyService{
* 生成占桩订单
*/
void generateOccupyPileOrder(String memberId, String pileSn, String connectorCode);
void stopOccupyPileOrder(String occupyCode);
}

View File

@@ -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) {

View File

@@ -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>