--升级兼容pc端
This commit is contained in:
@ -45,6 +45,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@ -83,7 +84,7 @@ public class StoreCombinationController {
|
||||
@ApiOperation(value = "拼团产品列表",notes = "拼团产品列表")
|
||||
public ApiResult<CombinationQueryVo> getList(@RequestParam(value = "page",defaultValue = "1") int page,
|
||||
@RequestParam(value = "limit",defaultValue = "10") int limit){
|
||||
return ApiResult.ok(storeCombinationService.getList(page, limit));
|
||||
return ApiResult.resultPage(storeCombinationService.getList(page, limit),limit);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -42,6 +42,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
@ -76,7 +77,8 @@ public class StoreSeckillController {
|
||||
if (StrUtil.isBlank(time) || !NumberUtil.isNumber(time)){
|
||||
throw new YshopException("参数错误");
|
||||
}
|
||||
return ApiResult.ok(yxStoreSeckillService.getList(page, limit, Integer.valueOf(time)));
|
||||
return ApiResult.resultPage(yxStoreSeckillService.getList(page, limit, Integer.valueOf(time)),limit);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -97,9 +97,10 @@ public class ShoperController {
|
||||
@AuthCheck
|
||||
@GetMapping("/admin/order/list")
|
||||
@ApiOperation(value = "订单列表",notes = "订单列表")
|
||||
public ApiResult<List<YxStoreOrderQueryVo>> orderList(ShoperQueryParam queryParam) {
|
||||
return ApiResult.ok(storeOrderService.orderList(null, queryParam.getStatus(),
|
||||
queryParam.getPage(), queryParam.getLimit()));
|
||||
public ApiResult<Object> orderList(ShoperQueryParam queryParam) {
|
||||
Map<String, Object> map = storeOrderService.orderList(null, queryParam.getStatus(),
|
||||
queryParam.getPage(), queryParam.getLimit());
|
||||
return ApiResult.ok(map.get("list"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -64,10 +64,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@ -171,6 +168,7 @@ public class StoreOrderController {
|
||||
orderDTO.setOrderId(orderId);
|
||||
map.put("status",OrderLogEnum.CREATE_ORDER_SUCCESS.getValue());
|
||||
map.put("result",orderDTO);
|
||||
map.put("createTime",order.getCreateTime());
|
||||
|
||||
//开始处理支付
|
||||
//处理金额为0的情况
|
||||
@ -239,16 +237,17 @@ public class StoreOrderController {
|
||||
@AuthCheck
|
||||
@GetMapping("/order/list")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "type", value = "商品状态,默认为0未支付 1待发货 2待收货 3待评价 4已完成 5退款中 6已退款 7退款", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(name = "type", value = "商品状态,-1全部 默认为0未支付 1待发货 2待收货 3待评价 4已完成 5退款中 6已退款 7退款", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(name = "page", value = "页码,默认为1", paramType = "query", dataType = "int"),
|
||||
@ApiImplicitParam(name = "limit", value = "页大小,默认为10", paramType = "query", dataType = "int")
|
||||
})
|
||||
@ApiOperation(value = "订单列表",notes = "订单列表")
|
||||
public ApiResult<List<YxStoreOrderQueryVo>> orderList(@RequestParam(value = "type",defaultValue = "0") int type,
|
||||
public ApiResult<Object> orderList(@RequestParam(value = "type",defaultValue = "0") int type,
|
||||
@RequestParam(value = "page",defaultValue = "1") int page,
|
||||
@RequestParam(value = "limit",defaultValue = "10") int limit){
|
||||
Long uid = LocalUser.getUser().getUid();
|
||||
return ApiResult.ok(storeOrderService.orderList(uid,type, page,limit));
|
||||
Map<String, Object> map = storeOrderService.orderList(uid, type, page, limit);
|
||||
return ApiResult.resultPage((Integer) map.get("total"),(Integer) map.get("totalPage"),map.get("list"));
|
||||
}
|
||||
|
||||
|
||||
|
@ -221,11 +221,12 @@ public class OrderSupplyService {
|
||||
}else if(AppFromEnum.PC.getValue().equals(from)){ //扫码支付
|
||||
map.put("status","WECHAT_PC_PAY");
|
||||
WxPayNativeOrderResult wxPayNativeOrderResult = (WxPayNativeOrderResult)weixinPayService
|
||||
.unifyPay(orderId,from, BillDetailEnum.TYPE_3.getValue(),"APP商品购买");
|
||||
.unifyPay(orderId,from, BillDetailEnum.TYPE_3.getValue(),"pc商品购买");
|
||||
jsConfig.put("codeUrl",wxPayNativeOrderResult.getCodeUrl());
|
||||
orderDTO.setJsConfig(jsConfig);
|
||||
map.put("result",orderDTO);
|
||||
map.put("payMsg","订单创建成功");
|
||||
return map;
|
||||
}
|
||||
else{//公众号
|
||||
map.put("status","WECHAT_PAY");
|
||||
|
@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@ -60,7 +61,7 @@ public class ArticleController {
|
||||
@ApiOperation(value = "文章列表",notes = "文章列表")
|
||||
public ApiResult<List<YxArticleQueryVo>> getYxArticlePageList(@RequestParam(value = "page",defaultValue = "1") int page,
|
||||
@RequestParam(value = "limit",defaultValue = "10") int limit){
|
||||
return ApiResult.ok(articleService.getList(page,limit));
|
||||
return ApiResult.resultPage(articleService.getList(page,limit),limit);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,10 +43,7 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @ClassName UserBillController
|
||||
@ -186,7 +183,7 @@ public class UserBillController {
|
||||
newType = Integer.valueOf(type);
|
||||
}
|
||||
Long uid = LocalUser.getUser().getUid();
|
||||
return ApiResult.ok(userBillService.getUserBillList(page,limit,uid,newType));
|
||||
return ApiResult.resultPage(Collections.singletonList(userBillService.getUserBillList(page,limit,uid,newType)),limit);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user