Browse Source

1、添加token必传

master
Augcl 6 months ago
parent
commit
9d15904b57
3 changed files with 15 additions and 16 deletions
  1. +2
    -5
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/travelController/OrderApiController.java
  2. +8
    -7
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/travelController/UserInfoApiController.java
  3. +5
    -4
      jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/travelController/WaresApiController.java

+ 2
- 5
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/travelController/OrderApiController.java View File

@ -10,10 +10,7 @@ import org.jeecg.modules.apiService.OrderApiService;
import org.jeecg.modules.travelOrder.entity.TravelOrder;
import org.jeecg.modules.travelTime.entity.TravelTime;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@ -39,7 +36,7 @@ public class OrderApiController {
//查询订单信息
@ApiOperation(value="小程序-查询预约订单列表", notes="orderType:0-路径定制 1-遗产讲述 2-达人同游 3-我要跟拍 4-非遗体验 5-我要研学")
@RequestMapping(value = "/queryOrderList", method = {RequestMethod.GET})
public Result<?> queryOrderList(String token, String orderType, PageBean pageBean){
public Result<?> queryOrderList(@RequestHeader("X-Access-Token") String token, String orderType, PageBean pageBean){
return indexApiService.queryOrderList(token, orderType, pageBean);
}


+ 8
- 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/travelController/UserInfoApiController.java View File

@ -9,6 +9,7 @@ import org.jeecg.modules.apiService.IndexApiService;
import org.jeecg.modules.travelAddress.entity.TravelAddress;
import org.jeecg.modules.travelCollection.entity.TravelCollection;
import org.jeecg.modules.travelShopcar.entity.TravelShopcar;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ -41,49 +42,49 @@ public class UserInfoApiController {
//查询地址
@ApiOperation(value="小程序-查询地址", notes="小程序-查询地址")
@RequestMapping(value = "/queryAddress", method = {RequestMethod.GET})
public Result<?> queryAddress(String token, TravelAddress travelAddress, PageBean pageBean){
public Result<?> queryAddress(@RequestHeader("X-Access-Token") String token, TravelAddress travelAddress, PageBean pageBean){
return indexApiService.queryAddress(token, travelAddress, pageBean);
}
//新增地址
@ApiOperation(value="小程序-新增地址", notes="小程序-新增地址")
@RequestMapping(value = "/addAddress", method = {RequestMethod.POST})
public Result<?> addAddress(String token, TravelAddress travelAddress){
public Result<?> addAddress(@RequestHeader("X-Access-Token") String token, TravelAddress travelAddress){
return indexApiService.addAddress(token, travelAddress);
}
//删除地址
@ApiOperation(value="小程序-删除地址", notes="小程序-删除地址")
@RequestMapping(value = "/deleteAddress", method = {RequestMethod.DELETE})
public Result<?> deleteAddress(String token, String AddressId){
public Result<?> deleteAddress(@RequestHeader("X-Access-Token") String token, String AddressId){
return indexApiService.deleteAddress(token, AddressId);
}
//修改地址
@ApiOperation(value="小程序-修改地址", notes="小程序-修改地址")
@RequestMapping(value = "/updateAddress", method = {RequestMethod.POST})
public Result<?> updateAddress(String token, TravelAddress travelAddress){
public Result<?> updateAddress(@RequestHeader("X-Access-Token") String token, TravelAddress travelAddress){
return indexApiService.updateAddress(token, travelAddress);
}
//我的收藏
@ApiOperation(value="小程序-获取我的收藏列表", notes="collectionType:0-遗产讲述 1-达人同游 2-遗产路径 3-我要跟拍 4-非遗体验 5-我要研学 6-文创好物")
@RequestMapping(value = "/queryCollectionList", method = {RequestMethod.GET})
public Result<?> queryCollectionList(String token, String collectionType, PageBean pageBean){
public Result<?> queryCollectionList(@RequestHeader("X-Access-Token") String token, String collectionType, PageBean pageBean){
return indexApiService.queryCollectionList(token, collectionType, pageBean);
}
//添加收藏
@ApiOperation(value="小程序-添加收藏", notes="小程序-添加收藏")
@RequestMapping(value = "/addCollection", method = {RequestMethod.POST})
public Result<?> addCollection(String token, TravelCollection travelCollection){
public Result<?> addCollection(@RequestHeader("X-Access-Token") String token, TravelCollection travelCollection){
return indexApiService.addCollection(token, travelCollection);
}
//取消收藏
@ApiOperation(value="小程序-取消收藏", notes="小程序-取消收藏")
@RequestMapping(value = "/deleteCollection", method = {RequestMethod.POST})
public Result<?> deleteCollection(String token, String collectionId){
public Result<?> deleteCollection(@RequestHeader("X-Access-Token") String token, String collectionId){
return indexApiService.deleteCollection(token, collectionId);
}


+ 5
- 4
jeecg-boot-module-system/src/main/java/org/jeecg/modules/api/travelController/WaresApiController.java View File

@ -7,6 +7,7 @@ import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.apiBean.PageBean;
import org.jeecg.modules.apiService.IndexApiService;
import org.jeecg.modules.travelShopcar.entity.TravelShopcar;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@ -39,28 +40,28 @@ public class WaresApiController {
//获取购物车列表
@ApiOperation(value="小程序-获取购物车列表", notes="小程序-获取购物车列表")
@RequestMapping(value = "/queryShopcarList", method = {RequestMethod.GET})
public Result<?> queryShopcarList(String token, PageBean pageBean){
public Result<?> queryShopcarList(@RequestHeader("X-Access-Token") String token, PageBean pageBean){
return indexApiService.queryShopcarList(token, pageBean);
}
//添加购物车
@ApiOperation(value="小程序-添加购物车", notes="小程序-添加购物车")
@RequestMapping(value = "/addShopcar", method = {RequestMethod.GET})
public Result<?> addShopcar(String token, TravelShopcar travelShopcar){
public Result<?> addShopcar(@RequestHeader("X-Access-Token") String token, TravelShopcar travelShopcar){
return indexApiService.addShopcar(token,travelShopcar);
}
//取消购物车
@ApiOperation(value="小程序-取消购物车", notes="小程序-取消购物车")
@RequestMapping(value = "/deleteShopcar", method = {RequestMethod.GET})
public Result<?> deleteShopcar(String token, String shopcarId){
public Result<?> deleteShopcar(@RequestHeader("X-Access-Token") String token, String shopcarId){
return indexApiService.deleteShopcar(token,shopcarId);
}
//修改购物车商品数量
@ApiOperation(value="小程序-修改购物车信息", notes="小程序-修改购物车信息")
@RequestMapping(value = "/updateShopcar", method = {RequestMethod.GET})
public Result<?> updateShopcar(String token, TravelShopcar shopcar){
public Result<?> updateShopcar(@RequestHeader("X-Access-Token") String token, TravelShopcar shopcar){
return indexApiService.updateShopcar(token, shopcar);
}
}

Loading…
Cancel
Save