update 获取地锁列表先判断用户是否登录

This commit is contained in:
Lemon
2023-10-14 09:27:24 +08:00
parent c4bc83df05
commit 881a619d16
2 changed files with 17 additions and 2 deletions

View File

@@ -7,6 +7,7 @@ import com.jsowell.common.core.domain.AjaxResult;
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
import com.jsowell.common.exception.BusinessException;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.common.util.StringUtils;
import com.jsowell.common.util.file.AliyunOssUploadUtils;
import com.jsowell.common.util.file.FileUtils;
import com.jsowell.pile.service.IPileBasicInfoService;
@@ -107,13 +108,21 @@ public class JumpController extends BaseController {
* @return
*/
@GetMapping("/getGroundLockInfo/{stationId}")
public RestApiResponse<?> getGroundLockInfo(@PathVariable("stationId") String stationId) {
public RestApiResponse<?> getGroundLockInfo(@PathVariable("stationId") String stationId, HttpServletRequest request) {
logger.info("获取地锁列表信息 params:{}", stationId);
RestApiResponse<?> response = null;
try {
String memberId = getMemberIdByAuthorization(request);
if (StringUtils.isBlank(memberId)) {
throw new BusinessException(ReturnCodeEnum.CODE_TOKEN_ERROR);
}
List<GroundLockInfoVO> list = pileBasicInfoService.getGroundLockInfo(stationId);
response = new RestApiResponse<>(list);
} catch (Exception e) {
}catch (BusinessException e) {
logger.error("获取地锁列表信息 error,", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
}
catch (Exception e) {
logger.error("获取地锁列表信息 error, ", e);
response = new RestApiResponse<>(e);
}

View File

@@ -516,6 +516,12 @@ public class NRServiceImpl implements NRService {
return result;
}
/**
* 查询充电电量信息
* 此接口用于批量查询时间区段内交易记录
* @param dto
* @return
*/
@Override
public List<NROrderInfo> query_order_info(NRQueryOrderDTO dto) {
List<NROrderInfo> resultList = new ArrayList<>();