mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
update 预约充电
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user