mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
保存蓝牙充电记录
This commit is contained in:
@@ -18,6 +18,7 @@ import com.jsowell.pile.vo.PileReservationInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.PersonPileConnectorSumInfoVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.PersonPileRealTimeVO;
|
||||
import com.jsowell.pile.vo.uniapp.customer.PersonalPileInfoVO;
|
||||
import com.jsowell.service.OrderService;
|
||||
import com.jsowell.service.PileService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -39,6 +40,9 @@ public class PersonPileController extends BaseController {
|
||||
@Autowired
|
||||
private PileService pileService;
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@Autowired
|
||||
private PileMerchantInfoService pileMerchantInfoService;
|
||||
|
||||
@@ -482,4 +486,27 @@ public class PersonPileController extends BaseController {
|
||||
logger.info("根据充电桩查询预约状态params:{}, result:{}", dto, JSON.toJSONString(response));
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存蓝牙充电记录
|
||||
* http://localhost:8080/uniapp/personalPile/saveBluetoothChargingRecord
|
||||
*/
|
||||
@PostMapping("/saveBluetoothChargingRecord")
|
||||
public RestApiResponse<?> saveBluetoothChargingRecord(HttpServletRequest request, @RequestBody BluetoothChargingRecordDTO dto) {
|
||||
RestApiResponse<?> response = null;
|
||||
try {
|
||||
String memberId = getMemberIdByAuthorization(request);
|
||||
dto.setMemberId(memberId);
|
||||
orderService.saveBluetoothChargingRecord(dto);
|
||||
response = new RestApiResponse<>();
|
||||
} catch (BusinessException e) {
|
||||
logger.error("保存蓝牙充电记录error, params:{}", dto, e);
|
||||
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||
} catch (Exception e) {
|
||||
logger.error("保存蓝牙充电记录error, params:{}", dto, e);
|
||||
response = new RestApiResponse<>(ReturnCodeEnum.CODE_QUERY_RESERVATION_STATUS_ERROR);
|
||||
}
|
||||
logger.info("保存蓝牙充电记录params:{}, result:{}", dto, JSON.toJSONString(response));
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1445,4 +1445,11 @@ public class OrderService {
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存蓝牙充电记录
|
||||
* @param dto
|
||||
*/
|
||||
public void saveBluetoothChargingRecord(BluetoothChargingRecordDTO dto) {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user