Commit 76cd062d authored by youjj's avatar youjj

修改

parent 2550938d
...@@ -10,17 +10,16 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -10,17 +10,16 @@ import org.springframework.beans.factory.annotation.Autowired;
@Slf4j @Slf4j
public class TourBaseController<Biz extends BaseBiz> extends CommonBaseController { public class TourBaseController<Biz extends BaseBiz> extends CommonBaseController {
@Autowired
protected Biz baseBiz;
@Autowired
protected UserFeign userFeign;
@Autowired
protected UserAuthConfig userAuthConfig;
public AppUserDTO getUserInfo(){ // @Autowired
return userFeign.userDetailByToken(userAuthConfig.getToken(request)).getData(); // protected UserFeign userFeign;
} // @Autowired
// protected UserAuthConfig userAuthConfig;
//
// public AppUserDTO getUserInfo(){
// return userFeign.userDetailByToken(userAuthConfig.getToken(request)).getData();
// }
} }
...@@ -14,19 +14,19 @@ import org.springframework.web.bind.annotation.*; ...@@ -14,19 +14,19 @@ import org.springframework.web.bind.annotation.*;
public class TourGoodSpeController extends TourBaseController<TourGoodSpeBiz> { public class TourGoodSpeController extends TourBaseController<TourGoodSpeBiz> {
//
//获取价格 // //获取价格
@RequestMapping(value = "/user/prices", method = RequestMethod.POST) // @RequestMapping(value = "/user/prices", method = RequestMethod.POST)
public ObjectRestResponse<TourSpePriceVo> prices(@RequestBody TourSpePriceDTO priceDto) { // public ObjectRestResponse<TourSpePriceVo> prices(@RequestBody TourSpePriceDTO priceDto) {
return baseBiz.getPricesByuserid(priceDto); // return baseBiz.getPricesByuserid(priceDto);
} // }
//
//减库存 // //减库存
@RequestMapping(value = "/stock", method = RequestMethod.GET) // @RequestMapping(value = "/stock", method = RequestMethod.GET)
public ObjectRestResponse<TourSpePriceVo> stock( // public ObjectRestResponse<TourSpePriceVo> stock(
@RequestParam(value = "speId",defaultValue = "0")Integer speId, // @RequestParam(value = "speId",defaultValue = "0")Integer speId,
@RequestParam(value = "number",defaultValue = "0") Integer number){ // @RequestParam(value = "number",defaultValue = "0") Integer number){
return baseBiz.cutStock(speId,number); // return baseBiz.cutStock(speId,number);
} // }
} }
\ No newline at end of file
package com.xxfc.platform.tour.rest; package com.xxfc.platform.tour.rest;
import cn.hutool.core.bean.BeanUtil;
import com.github.wxiaoqi.security.common.msg.ListRestResponse; import com.github.wxiaoqi.security.common.msg.ListRestResponse;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO; import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.github.wxiaoqi.security.common.vo.PageParam;
import com.xxfc.platform.tour.biz.TourTagBiz; import com.xxfc.platform.tour.biz.TourTagBiz;
import com.xxfc.platform.tour.entity.TourBanner; import com.xxfc.platform.tour.entity.TourBanner;
import com.xxfc.platform.tour.entity.TourTag; import com.xxfc.platform.tour.entity.TourTag;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import lombok.Data;
import org.beetl.core.om.ArrayAA;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -22,13 +27,13 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> { ...@@ -22,13 +27,13 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
private TourTagBiz tagBiz; private TourTagBiz tagBiz;
@GetMapping("/app/unauth/getTagList") @GetMapping("/app/unauth/getTagList")
public ListRestResponse getTagList(@RequestBody Map<Object,Integer> map){ public ListRestResponse getTagList(pageDTO dto){
if (map==null||map.keySet().size()==0) { if (dto==null) {
new ListRestResponse<>().result("错误"); new ListRestResponse<>().result("错误");
} }
Integer hot = map.get("hot"); Integer hot = dto.getHot();
...@@ -38,7 +43,7 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> { ...@@ -38,7 +43,7 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
} }
PageDataVO<TourTag> all = tagBiz.findAll(map); PageDataVO<TourTag> all = tagBiz.findAll(BeanUtil.beanToMap(dto));
return new ListRestResponse().result(all).count(all.getData().size()); return new ListRestResponse().result(all).count(all.getData().size());
...@@ -64,5 +69,12 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> { ...@@ -64,5 +69,12 @@ public class TourTagController extends BaseController<TourTagBiz,TourTag> {
} }
@Data
public class pageDTO extends PageParam {
@ApiModelProperty("是否热门")
Integer hot;
}
} }
\ No newline at end of file
...@@ -23,7 +23,7 @@ spring: ...@@ -23,7 +23,7 @@ spring:
cloud: cloud:
nacos: nacos:
config: config:
server-addr: 127.0.0.1:8848 server-addr: 10.1.37.192:8848
--- ---
spring: spring:
......
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