update 预约充电

This commit is contained in:
Guoqs
2024-05-30 15:08:21 +08:00
parent 45d1fd04ff
commit 39d7eb40c3
4 changed files with 39 additions and 4 deletions

View File

@@ -4,14 +4,17 @@ import com.alibaba.fastjson2.JSON;
import com.jsowell.adapay.dto.BalancePaymentRequestDTO;
import com.jsowell.adapay.service.AdapayService;
import com.jsowell.common.annotation.Anonymous;
import com.jsowell.common.constant.Constants;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.BytesUtil;
import com.jsowell.common.util.DateUtils;
import com.jsowell.pile.domain.AdapayMemberAccount;
import com.jsowell.pile.domain.MemberPlateNumberRelation;
import com.jsowell.pile.domain.OrderBasicInfo;
import com.jsowell.pile.domain.ykcCommond.ReservedChargingCommand;
import com.jsowell.pile.dto.ApplyRefundDTO;
import com.jsowell.pile.dto.CarVinDTO;
import com.jsowell.pile.dto.QueryOrderDTO;
@@ -70,6 +73,31 @@ public class TempController extends BaseController {
@Autowired
private PileMerchantInfoService pileMerchantInfoService;
@Autowired
private PileRemoteService pileRemoteService;
/**
* 预约充电测试
* http://localhost:8080/temp/reservedChargingTest
*/
@PostMapping("reservedChargingTest")
public RestApiResponse<?> reservedChargingTest(@RequestBody ReservedChargingCommand command) {
logger.info("发送预约充电指令, command:{}", JSON.toJSONString(command));
RestApiResponse<?> response = null;
try {
// 发送预约充电指令
pileRemoteService.reservedCharging(command);
} catch (BusinessException e) {
logger.warn("预约充电测试warn", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("预约充电测试error", e);
response = new RestApiResponse<>(ReturnCodeEnum.CODE_GET_PILE_DETAIL_ERROR);
}
return response;
}
/**
* 临时刷数据接口
* http://localhost:8080/temp/tempUpdateVirtualAmount