Commit 7db9d5ad by 程飞祥

[新增] 添加获取餐盒费接口

parent 3ae06873
...@@ -552,7 +552,7 @@ public class OrderController { ...@@ -552,7 +552,7 @@ public class OrderController {
*/ */
@PostMapping("/orderConfig/get") @PostMapping("/orderConfig/get")
@ApiAnnotation(logMessage = "/orderConfig/get") @ApiAnnotation(logMessage = "/orderConfig/get")
public BaseResponse<GetOrderConfigResponseVo> getOrderConfig(@Validated @LogParams @RequestBody GetOrderConfigRequestVo request){ public BaseResponse<String> getOrderConfig(@Validated @LogParams @RequestBody GetOrderConfigRequestVo request){
return ResponseUtil.success(orderAdapterService.getOrderConfig(request)); return ResponseUtil.success(orderAdapterService.getOrderConfig(request));
} }
......
package cn.freemud.entities.vo.order;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @description:
* @author: chengfeixiang<feixiang.cheng @ freemud.cn>
* @date: 2022/1/25 15:08
* @version: v1.0
* @copyright: 2022 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目的
*/
@Data
public class GetOrderConfigResponseVo {
private List<Detail> collectType;
@Data
private static class Detail {
@ApiModelProperty("订单价格,单位:分")
private Integer orderAmount;
@ApiModelProperty("餐盒费,单位:分")
private Integer fee;
}
}
...@@ -417,7 +417,7 @@ public class OrderAdapterServiceImpl { ...@@ -417,7 +417,7 @@ public class OrderAdapterServiceImpl {
/** /**
* 获取餐盒费配置 * 获取餐盒费配置
*/ */
public GetOrderConfigResponseVo getOrderConfig(GetOrderConfigRequestVo request) { public String getOrderConfig(GetOrderConfigRequestVo request) {
OrderConfigEnum configType = OrderConfigEnum.getOrderConfigType(request.getType()); OrderConfigEnum configType = OrderConfigEnum.getOrderConfigType(request.getType());
if (null == configType) if (null == configType)
throw new ServiceException(ResponseResult.PARAMETER_MISSING); throw new ServiceException(ResponseResult.PARAMETER_MISSING);
...@@ -430,8 +430,7 @@ public class OrderAdapterServiceImpl { ...@@ -430,8 +430,7 @@ public class OrderAdapterServiceImpl {
configStr = openPlatformOrderConfig.getTypeValue(); configStr = openPlatformOrderConfig.getTypeValue();
} }
} }
GetOrderConfigResponseVo response = JSON.parseObject(configStr, GetOrderConfigResponseVo.class);
return response; return configStr;
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment