Commit dcc1647e authored by libin's avatar libin

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform into base-modify

# Conflicts:
#	xx-tour/xx-tour-server/src/main/java/com/xxfc/platform/tour/rest/TourGoodVerificationController.java
parents 65ffe662 1dac6e43
...@@ -78,4 +78,12 @@ public class BaseController<Biz extends BaseBiz,Entity> extends CommonBaseContro ...@@ -78,4 +78,12 @@ public class BaseController<Biz extends BaseBiz,Entity> extends CommonBaseContro
Query query = new Query(params); Query query = new Query(params);
return baseBiz.selectByQuery(query); return baseBiz.selectByQuery(query);
} }
@ApiOperation("根据参数查询,等于")
@RequestMapping(value = "/entityList",method = RequestMethod.GET)
@ResponseBody
public ObjectRestResponse<List<Entity>> entityList(Entity entity){
//查询列表数据
return ObjectRestResponse.succ(baseBiz.selectList(entity));
}
} }
...@@ -100,6 +100,10 @@ public class OrderTourDetail implements Serializable { ...@@ -100,6 +100,10 @@ public class OrderTourDetail implements Serializable {
@ApiModelProperty(value = "具体商品(商品项)id") @ApiModelProperty(value = "具体商品(商品项)id")
private Integer spePriceId; private Integer spePriceId;
@Column(name = "verification_id")
@ApiModelProperty(value = "核销id")
private Integer verificationId;
//联系人 //联系人
@Column(name = "contact_man") @Column(name = "contact_man")
@ApiModelProperty(value = "联系人") @ApiModelProperty(value = "联系人")
...@@ -140,6 +144,4 @@ public class OrderTourDetail implements Serializable { ...@@ -140,6 +144,4 @@ public class OrderTourDetail implements Serializable {
@ApiModelProperty(value = "出发城市名称") @ApiModelProperty(value = "出发城市名称")
private String startCityName; private String startCityName;
} }
...@@ -19,4 +19,5 @@ public class TourBO extends OrderTourDetail implements OrderDetail { ...@@ -19,4 +19,5 @@ public class TourBO extends OrderTourDetail implements OrderDetail {
TourGood tourGood; TourGood tourGood;
List<TourUser> tourUsers; List<TourUser> tourUsers;
AppUserDTO appUserDTO; AppUserDTO appUserDTO;
private Integer siteId;
} }
package com.xxfc.platform.order.config;
import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.msg.BaseResponse;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
@RestControllerAdvice
public class PlatformExceptionHandler {
@ExceptionHandler(BaseException.class)
public BaseResponse baseExceptionHandler(BaseException e) {
return new BaseResponse(e.getStatus(), e.getMessage());
}
}
...@@ -26,6 +26,7 @@ import com.xxfc.platform.order.pojo.price.RentVehiclePriceVO; ...@@ -26,6 +26,7 @@ import com.xxfc.platform.order.pojo.price.RentVehiclePriceVO;
import com.xxfc.platform.order.pojo.price.TourPriceVO; import com.xxfc.platform.order.pojo.price.TourPriceVO;
import com.xxfc.platform.tour.dto.TourSpePriceDTO; import com.xxfc.platform.tour.dto.TourSpePriceDTO;
import com.xxfc.platform.tour.entity.TourGood; import com.xxfc.platform.tour.entity.TourGood;
import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.entity.TourUser; import com.xxfc.platform.tour.entity.TourUser;
import com.xxfc.platform.tour.feign.TourFeign; import com.xxfc.platform.tour.feign.TourFeign;
import com.xxfc.platform.tour.vo.TourSpePriceVo; import com.xxfc.platform.tour.vo.TourSpePriceVo;
...@@ -111,6 +112,13 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To ...@@ -111,6 +112,13 @@ public class OrderTourService extends AbstractOrderHandle<OrderTourDetailBiz, To
bo.setStartCity(sysRegion.getId().intValue()); bo.setStartCity(sysRegion.getId().intValue());
bo.setStartCityName(sysRegion.getName()); bo.setStartCityName(sysRegion.getName());
//设置verificationId 核销id
bo.setVerificationId(tourFeign.entityList(BeanUtil.beanToMap(new TourGoodVerification(){{
setSpeId(bo.getSpePriceId());
setGoodId(bo.getGoodId());
setSiteId(bo.getSiteId());
}})).getData().get(0).getId());
//扣減庫存 //扣減庫存
tourFeign.stock(bo.getSpePriceId(), bo.getTotalNumber()); tourFeign.stock(bo.getSpePriceId(), bo.getTotalNumber());
......
...@@ -5,6 +5,7 @@ import com.github.wxiaoqi.security.common.msg.ListRestResponse; ...@@ -5,6 +5,7 @@ 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.xxfc.platform.tour.dto.TourSpePriceDTO; import com.xxfc.platform.tour.dto.TourSpePriceDTO;
import com.xxfc.platform.tour.entity.TourGood; import com.xxfc.platform.tour.entity.TourGood;
import com.xxfc.platform.tour.entity.TourGoodVerification;
import com.xxfc.platform.tour.entity.TourUser; import com.xxfc.platform.tour.entity.TourUser;
import com.xxfc.platform.tour.vo.TourSpePriceVo; import com.xxfc.platform.tour.vo.TourSpePriceVo;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
...@@ -12,6 +13,7 @@ import org.springframework.cloud.openfeign.FeignClient; ...@@ -12,6 +13,7 @@ import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
...@@ -41,4 +43,7 @@ public interface TourFeign { ...@@ -41,4 +43,7 @@ public interface TourFeign {
@GetMapping("/tourUser/app/unauth/getTourUsers") @GetMapping("/tourUser/app/unauth/getTourUsers")
public ObjectRestResponse<List<TourUser>> getTourUsers(@RequestParam String ids); public ObjectRestResponse<List<TourUser>> getTourUsers(@RequestParam String ids);
@GetMapping("/tourGoodVerification/entityList")
public ObjectRestResponse<List<TourGoodVerification>> entityList(@RequestParam Map<String, Object> entity);
} }
package com.xxfc.platform.tour.rest;
import com.github.pagehelper.Page;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.tour.biz.TourGoodVerificationBiz;
import com.xxfc.platform.tour.vo.TourGoodOrderFindVo;
import com.xxfc.platform.tour.vo.TourGoodOrderVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @author libin
* @version 1.0
* @description 核销
* @data 2019/6/14 15:16
*/
@RestController
@RequestMapping("/tourGood/verification")
@Api("旅游订单")
public class TourGoodVerificationController {
@Autowired
private TourGoodVerificationBiz tourGoodVerificationBiz;
/**
* 查询订单列表
* @param tourGoodOrderFindVo
* @return
*/
@ApiOperation("订单列表的查询")
@GetMapping("/orders")
public ObjectRestResponse<PageDataVO<TourGoodOrderVo>> findTourGoodOrders(TourGoodOrderFindVo tourGoodOrderFindVo){
PageDataVO<TourGoodOrderVo> tourGoodOrderPageDataVo = tourGoodVerificationBiz.findTourGoodOrdersPage(tourGoodOrderFindVo);
return ObjectRestResponse.succ(tourGoodOrderPageDataVo);
}
}
\ No newline at end of file
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