新增 运营端小程序通过订单编号查询订单详情接口

This commit is contained in:
Lemon
2024-09-06 10:38:00 +08:00
parent 7e194ec430
commit b573bfb015
11 changed files with 228 additions and 13 deletions

View File

@@ -5,15 +5,13 @@ import com.google.common.collect.ImmutableMap;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.dto.business.QueryConnectorInfoDTO;
import com.jsowell.pile.service.OrderBasicInfoService;
import com.jsowell.pile.service.PileConnectorInfoService;
import com.jsowell.pile.vo.uniapp.business.BusinessConnectorInfoVO;
import com.jsowell.pile.vo.uniapp.business.StationStatisticsInfosVO;
import com.jsowell.pile.vo.web.PileConnectorInfoVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -67,4 +65,27 @@ public class BusinessConnectorInfoController extends BaseController {
logger.info("搜索枪口信息接口 params:{}, result:{}", JSONObject.toJSONString(dto), response);
return response;
}
/**
* 通过枪口编号查询枪口信息详情
* @param pileConnectorCode
* @return
*/
@GetMapping("/getBusinessPileConnectorDetail/{pileConnectorCode}")
public RestApiResponse<?> getBusinessPileConnectorDetail(@PathVariable("pileConnectorCode") String pileConnectorCode) {
RestApiResponse<?> response = null;
try {
BusinessConnectorInfoVO businessPileConnectorDetail = pileConnectorInfoService.getBusinessPileConnectorDetail(pileConnectorCode);
response = new RestApiResponse<>(ImmutableMap.of("BusinessConnectorInfoVO", businessPileConnectorDetail));
} catch (Exception e) {
logger.error("通过枪口编号查询枪口信息详情 error", e);
response = new RestApiResponse<>(e);
}
logger.info("通过枪口编号查询枪口信息详情 pileConnectorCode:{}, result:{}", pileConnectorCode, response);
return response;
}
}

View File

@@ -0,0 +1,46 @@
package com.jsowell.api.uniapp.business;
import com.google.common.collect.ImmutableMap;
import com.jsowell.common.core.controller.BaseController;
import com.jsowell.common.response.RestApiResponse;
import com.jsowell.pile.service.OrderBasicInfoService;
import com.jsowell.pile.vo.uniapp.business.BusinessConnectorInfoVO;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.xml.ws.soap.Addressing;
/**
* 运营端小程序订单Controller
*
* @author Lemon
* @Date 2024/9/5 8:54:38
*/
@RestController
@RequestMapping("/business/pile/order")
public class BusinessOrderController extends BaseController {
@Addressing
private OrderBasicInfoService orderBasicInfoService;
/**
* 通过订单编号查询订单信息详情
* @param orderCode
* @return
*/
@GetMapping("/getBusinessOrderDetail/{orderCode}")
public RestApiResponse<?> getBusinessOrderDetail(@PathVariable("orderCode") String orderCode) {
RestApiResponse<?> response = null;
try {
orderBasicInfoService.getBusinessOrderDetail(orderCode);
// response = new RestApiResponse<>(ImmutableMap.of("BusinessConnectorInfoVO", businessPileConnectorDetail));
} catch (Exception e) {
logger.error("通过订单编号查询订单信息详情 error", e);
response = new RestApiResponse<>(e);
}
logger.info("通过订单编号查询订单信息详情 orderCode:{}, result:{}", orderCode, response);
return response;
}
}