Commit 170afe91 authored by 冯秋丽's avatar 冯秋丽

post更改为get

parent 480ddf1a
...@@ -6,8 +6,6 @@ import java.util.HashMap; ...@@ -6,8 +6,6 @@ import java.util.HashMap;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import com.servicemall.right.data.Coupon;
import com.servicemall.right.service.CouponService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -339,17 +337,17 @@ public final class PlanMicro { ...@@ -339,17 +337,17 @@ public final class PlanMicro {
* *
* @return * @return
*/ */
@PostMapping("/queryloyaltyplanlist") @GetMapping("/queryloyaltyplanlist")
@ApiOperation(value = "获取计划列表", notes = "车龄不是必填其他都是必填", httpMethod = "POST") @ApiOperation(value = "获取计划列表", notes = "车龄不是必填其他都是必填", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "dms_code", value = "经销商code", dataType = "string",required = true), @ApiImplicitParam(paramType = "query", name = "dms_code", value = "经销商code", dataType = "string",required = true),
@ApiImplicitParam(paramType = "query", name = "baumuster", value = "车辆baumuster", dataType = "string",required = true), @ApiImplicitParam(paramType = "query", name = "baumuster", value = "车辆baumuster", dataType = "string",required = true),
@ApiImplicitParam(paramType = "query", name = "carAge", value = "车龄", dataType = "string"), @ApiImplicitParam(paramType = "query", name = "carAge", value = "车龄", dataType = "string"),
@ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "int",required = true), @ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "int",required = false),
@ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "int",required = true) @ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "int",required = false)
}) })
@ResponseBody @ResponseBody
public ResponseBase list(String baumuster,String dms_code, String carAge,Integer pageNo,Integer pageSize) { public ResponseBase list(String baumuster, String dms_code, String carAge,@RequestParam(defaultValue="1",required = false) Integer pageNo,@RequestParam(defaultValue="10",required = false) Integer pageSize) {
// 分页数据 // 分页数据
Pagination pagination = new Pagination(); Pagination pagination = new Pagination();
......
...@@ -35,15 +35,13 @@ public class SelectedMicro { ...@@ -35,15 +35,13 @@ public class SelectedMicro {
* *
* @return 返回结果记录,并转化为相应的POJO对象列表 * @return 返回结果记录,并转化为相应的POJO对象列表
*/ */
@PostMapping("/selectedlist") @GetMapping("/selectedlist")
@ApiOperation(value = "获取精选列表", notes = "精选包含计划/活动/轮胎等", httpMethod = "POST") @ApiOperation(value = "获取精选列表", notes = "精选包含计划/活动/轮胎等", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "Integer"), @ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "int"),
@ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "Integer") @ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "int")
}) })
public ResponseBase list(Integer pageNo, Integer pageSize) { public ResponseBase list(@RequestParam(defaultValue="1",required = false) Integer pageNo, @RequestParam(defaultValue="10",required = false) Integer pageSize) {
if(pageNo == null) pageNo = 1;
if(pageSize == null) pageSize = 10;
// 分页数据 // 分页数据
Pagination pagination = new Pagination(); Pagination pagination = new Pagination();
......
...@@ -9,11 +9,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -9,11 +9,7 @@ import javax.servlet.http.HttpServletRequest;
import com.servicemall.loyalty.data.Selected; import com.servicemall.loyalty.data.Selected;
import com.servicemall.loyalty.service.SeletedService; import com.servicemall.loyalty.service.SeletedService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.CrossOrigin; import org.springframework.web.bind.annotation.*;
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 springfox.documentation.annotations.ApiIgnore; import springfox.documentation.annotations.ApiIgnore;
import team.bangbang.common.data.Pagination; import team.bangbang.common.data.Pagination;
...@@ -334,16 +330,14 @@ public final class CouponMicro { ...@@ -334,16 +330,14 @@ public final class CouponMicro {
* *
* @return * @return
*/ */
@PostMapping("/querycouponlist") @GetMapping("/querycouponlist")
@ApiOperation(value = "获取优惠券列表", notes = "优惠券列表", httpMethod = "POST") @ApiOperation(value = "获取优惠券列表", notes = "优惠券列表", httpMethod = "GET")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(paramType = "query", name = "dms_code", value = "经销商code", dataType = "string"), @ApiImplicitParam(paramType = "query", name = "dms_code", value = "经销商code", dataType = "string",required = false),
@ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "Integer"), @ApiImplicitParam(paramType = "query", name = "pageNo", value = "分页参数 - 页号,默认为1", dataType = "int",required = false),
@ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "Integer") @ApiImplicitParam(paramType = "query", name = "pageSize", value = "分页参数 - 每页最大记录数量,默认为10", dataType = "int",required = false)
}) })
public ResponseBase list(String dms_code,Integer pageNo, Integer pageSize) { public ResponseBase list(String dms_code,@RequestParam(defaultValue="1",required = false)Integer pageNo,@RequestParam(defaultValue="10",required = false) Integer pageSize) {
if(pageNo == null) pageNo = 1;
if(pageSize == null) pageSize = 10;
// 分页数据 // 分页数据
Pagination pagination = new Pagination(); Pagination pagination = new Pagination();
......
...@@ -48,8 +48,8 @@ public final class SliderMicro { ...@@ -48,8 +48,8 @@ public final class SliderMicro {
* *
* @return 返回结果记录,并转化为相应的POJO对象列表 * @return 返回结果记录,并转化为相应的POJO对象列表
*/ */
@ApiOperation(value = "轮播图", notes = "首页轮播图", httpMethod = "POST") @ApiOperation(value = "轮播图", notes = "首页轮播图", httpMethod = "GET")
@PostMapping("/slidelist") @GetMapping("/slidelist")
@ResponseBody @ResponseBody
public ResponseBase slidelist() { public ResponseBase slidelist() {
DataResponse<Map<String, Object>> result = new DataResponse<Map<String, Object>>(); DataResponse<Map<String, Object>> result = new DataResponse<Map<String, Object>>();
......
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