|
@@ -16,6 +16,7 @@
|
|
*/
|
|
*/
|
|
package org.springblade.modules.finance.controller;
|
|
package org.springblade.modules.finance.controller;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
@@ -73,10 +74,6 @@ public class AfterSalesController extends BladeController {
|
|
@ApiOperation(value = "详情", notes = "传入afterSales")
|
|
@ApiOperation(value = "详情", notes = "传入afterSales")
|
|
public R<AfterSalesVO> detail(AfterSales afterSales) {
|
|
public R<AfterSalesVO> detail(AfterSales afterSales) {
|
|
AfterSalesVO vo = afterSalesService.getUserAfterSalesDetail(afterSales.getId());
|
|
AfterSalesVO vo = afterSalesService.getUserAfterSalesDetail(afterSales.getId());
|
|
- vo.setOrderNo(vo.getOrder().getOrderNo());
|
|
|
|
- for (OrderGoods goods : vo.getGoodsList()) {
|
|
|
|
- goods.setGoodsNum(vo.getReturnGoodsNum());
|
|
|
|
- }
|
|
|
|
return R.data(vo);
|
|
return R.data(vo);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -87,7 +84,9 @@ public class AfterSalesController extends BladeController {
|
|
@ApiOperationSupport(order = 2)
|
|
@ApiOperationSupport(order = 2)
|
|
@ApiOperation(value = "分页", notes = "传入afterSales")
|
|
@ApiOperation(value = "分页", notes = "传入afterSales")
|
|
public R<IPage<AfterSalesVO>> list(AfterSales afterSales, Query query) {
|
|
public R<IPage<AfterSalesVO>> list(AfterSales afterSales, Query query) {
|
|
- IPage<AfterSales> pages = afterSalesService.page(Condition.getPage(query), Condition.getQueryWrapper(afterSales));
|
|
|
|
|
|
+ QueryWrapper<AfterSales> queryWrapper = Condition.getQueryWrapper(afterSales);
|
|
|
|
+ queryWrapper.orderByDesc("create_time");
|
|
|
|
+ IPage<AfterSales> pages = afterSalesService.page(Condition.getPage(query), queryWrapper);
|
|
return R.data(AfterSalesWrapper.build().pageVO(pages));
|
|
return R.data(AfterSalesWrapper.build().pageVO(pages));
|
|
}
|
|
}
|
|
|
|
|