修改查询返回实体
This commit is contained in:
parent
10be655d16
commit
6f37b29eb7
|
|
@ -27,6 +27,7 @@ import com.ghy.payment.service.FinancialDetailService;
|
|||
import com.ghy.payment.service.FinancialMasterService;
|
||||
import com.ghy.web.pojo.vo.OrderDetailsResponseVo;
|
||||
import com.ghy.web.pojo.vo.OrderListResponse;
|
||||
import com.ghy.web.pojo.vo.OrderStandard;
|
||||
import com.ghy.worker.domain.Worker;
|
||||
import com.ghy.worker.service.WorkerService;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
|
@ -95,7 +96,7 @@ public class OrderMasterController extends BaseController {
|
|||
list.forEach(master->{
|
||||
// 初始化属性
|
||||
OrderListResponse orderListResponse = new OrderListResponse();
|
||||
List<Map<String, Integer>> standardList = new ArrayList<>();
|
||||
List<OrderStandard> standardList = new ArrayList<>();
|
||||
|
||||
// 师傅信息
|
||||
Worker worker = workerService.selectById(master.getWorkerId());
|
||||
|
|
@ -113,9 +114,10 @@ public class OrderMasterController extends BaseController {
|
|||
CustomerAddress customerAddress = addressService.selectByCustomerAddressId(master.getAddressId());
|
||||
|
||||
for(GoodsStandard goodsStandard : goodsStandardList){
|
||||
Map<String, Integer> standardMap = new HashMap<>();
|
||||
standardMap.put(goodsStandard.getGoodsStandardName(), goodsStandard.getGoodsNum());
|
||||
standardList.add(standardMap);
|
||||
OrderStandard orderStandard = new OrderStandard();
|
||||
orderStandard.setStandardName(goodsStandard.getGoodsStandardName());
|
||||
orderStandard.setStandardNum(goodsStandard.getGoodsNum());
|
||||
standardList.add(orderStandard);
|
||||
}
|
||||
|
||||
// 编辑返回属性
|
||||
|
|
|
|||
|
|
@ -33,5 +33,5 @@ public class OrderListResponse {
|
|||
|
||||
private String address;
|
||||
|
||||
private List<Map<String, Integer>> standardList;
|
||||
private List<OrderStandard> standardList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,12 @@
|
|||
package com.ghy.web.pojo.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class OrderStandard {
|
||||
|
||||
private String standardName;
|
||||
|
||||
private Integer standardNum;
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue