Your Name пре 3 година
родитељ
комит
358cfd59e0

+ 74 - 38
java110-bean/src/main/java/com/java110/dto/reserveGoods/ReserveGoodsDto.java

@@ -1,6 +1,8 @@
 package com.java110.dto.reserveGoods;
 
 import com.java110.dto.PageDto;
+import com.java110.dto.reserveParams.ReserveParamsDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -12,21 +14,22 @@ import java.util.Date;
  * @Version 1.0
  * add by wuxw 2019/4/24
  **/
-public class ReserveGoodsDto extends PageDto implements Serializable {
+public class ReserveGoodsDto extends ReserveParamsDto implements Serializable {
 
     private String endDate;
-private String goodsId;
-private String sort;
-private String type;
-private String imgUrl;
-private String catalogId;
-private String paramsId;
-private String price;
-private String state;
-private String communityId;
-private String goodsName;
-private String startDate;
-private String goodsDesc;
+    private String goodsId;
+    private String sort;
+    private String type;
+    private String imgUrl;
+    private String catalogId;
+    private String paramsId;
+    private String paramsName;
+    private String price;
+    private String state;
+    private String communityId;
+    private String goodsName;
+    private String startDate;
+    private String goodsDesc;
 
 
     private Date createTime;
@@ -37,79 +40,104 @@ private String goodsDesc;
     public String getEndDate() {
         return endDate;
     }
-public void setEndDate(String endDate) {
+
+    public void setEndDate(String endDate) {
         this.endDate = endDate;
     }
-public String getGoodsId() {
+
+    public String getGoodsId() {
         return goodsId;
     }
-public void setGoodsId(String goodsId) {
+
+    public void setGoodsId(String goodsId) {
         this.goodsId = goodsId;
     }
-public String getSort() {
+
+    public String getSort() {
         return sort;
     }
-public void setSort(String sort) {
+
+    public void setSort(String sort) {
         this.sort = sort;
     }
-public String getType() {
+
+    public String getType() {
         return type;
     }
-public void setType(String type) {
+
+    public void setType(String type) {
         this.type = type;
     }
-public String getImgUrl() {
+
+    public String getImgUrl() {
         return imgUrl;
     }
-public void setImgUrl(String imgUrl) {
+
+    public void setImgUrl(String imgUrl) {
         this.imgUrl = imgUrl;
     }
-public String getCatalogId() {
+
+    public String getCatalogId() {
         return catalogId;
     }
-public void setCatalogId(String catalogId) {
+
+    public void setCatalogId(String catalogId) {
         this.catalogId = catalogId;
     }
-public String getParamsId() {
+
+    public String getParamsId() {
         return paramsId;
     }
-public void setParamsId(String paramsId) {
+
+    public void setParamsId(String paramsId) {
         this.paramsId = paramsId;
     }
-public String getPrice() {
+
+    public String getPrice() {
         return price;
     }
-public void setPrice(String price) {
+
+    public void setPrice(String price) {
         this.price = price;
     }
-public String getState() {
+
+    public String getState() {
         return state;
     }
-public void setState(String state) {
+
+    public void setState(String state) {
         this.state = state;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getGoodsName() {
+
+    public String getGoodsName() {
         return goodsName;
     }
-public void setGoodsName(String goodsName) {
+
+    public void setGoodsName(String goodsName) {
         this.goodsName = goodsName;
     }
-public String getStartDate() {
+
+    public String getStartDate() {
         return startDate;
     }
-public void setStartDate(String startDate) {
+
+    public void setStartDate(String startDate) {
         this.startDate = startDate;
     }
-public String getGoodsDesc() {
+
+    public String getGoodsDesc() {
         return goodsDesc;
     }
-public void setGoodsDesc(String goodsDesc) {
+
+    public void setGoodsDesc(String goodsDesc) {
         this.goodsDesc = goodsDesc;
     }
 
@@ -129,4 +157,12 @@ public void setGoodsDesc(String goodsDesc) {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getParamsName() {
+        return paramsName;
+    }
+
+    public void setParamsName(String paramsName) {
+        this.paramsName = paramsName;
+    }
 }

+ 4 - 1
java110-db/src/main/resources/mapper/store/ReserveGoodsV1ServiceDaoImplMapper.xml

@@ -20,8 +20,11 @@
         select t.end_date,t.end_date endDate,t.goods_id,t.goods_id goodsId,t.status_cd,t.status_cd
         statusCd,t.sort,t.type,t.img_url,t.img_url imgUrl,t.catalog_id,t.catalog_id catalogId,t.params_id,t.params_id
         paramsId,t.price,t.state,t.community_id,t.community_id communityId,t.goods_name,t.goods_name
-        goodsName,t.start_date,t.start_date startDate,t.goods_desc,t.goods_desc goodsDesc,t.create_time createTime
+        goodsName,t.start_date,t.start_date startDate,t.goods_desc,t.goods_desc goodsDesc,t.create_time createTime,
+        rp.param_way paramWay,rp.max_quantity  maxQuantity,rp.name paramsName,rp.start_time startTime,
+        rp.hours_max_quantity hoursMaxQuantity
         from reserve_goods t
+        left join reserve_params rp on t.params_id = rp.params_id and rp.status_cd='0'
         where 1 =1
         <if test="endDate !=null and endDate != ''">
             and t.end_date= #{endDate}

+ 10 - 10
service-store/src/main/java/com/java110/store/cmd/reserve/SaveReserveGoodsCmd.java

@@ -55,15 +55,15 @@ public class SaveReserveGoodsCmd extends Cmd {
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
-Assert.hasKeyAndValue(reqJson, "catalogId", "请求报文中未包含catalogId");
-Assert.hasKeyAndValue(reqJson, "goodsName", "请求报文中未包含goodsName");
-Assert.hasKeyAndValue(reqJson, "goodsDesc", "请求报文中未包含goodsDesc");
-Assert.hasKeyAndValue(reqJson, "type", "请求报文中未包含type");
-Assert.hasKeyAndValue(reqJson, "paramsId", "请求报文中未包含paramsId");
-Assert.hasKeyAndValue(reqJson, "price", "请求报文中未包含price");
-Assert.hasKeyAndValue(reqJson, "startDate", "请求报文中未包含startDate");
-Assert.hasKeyAndValue(reqJson, "endDate", "请求报文中未包含endDate");
-Assert.hasKeyAndValue(reqJson, "imgUrl", "请求报文中未包含imgUrl");
+        Assert.hasKeyAndValue(reqJson, "catalogId", "请求报文中未包含catalogId");
+        Assert.hasKeyAndValue(reqJson, "goodsName", "请求报文中未包含goodsName");
+        Assert.hasKeyAndValue(reqJson, "goodsDesc", "请求报文中未包含goodsDesc");
+        Assert.hasKeyAndValue(reqJson, "type", "请求报文中未包含type");
+        Assert.hasKeyAndValue(reqJson, "paramsId", "请求报文中未包含paramsId");
+        Assert.hasKeyAndValue(reqJson, "price", "请求报文中未包含price");
+        Assert.hasKeyAndValue(reqJson, "startDate", "请求报文中未包含startDate");
+        Assert.hasKeyAndValue(reqJson, "endDate", "请求报文中未包含endDate");
+        Assert.hasKeyAndValue(reqJson, "imgUrl", "请求报文中未包含imgUrl");
 
     }
 
@@ -71,7 +71,7 @@ Assert.hasKeyAndValue(reqJson, "imgUrl", "请求报文中未包含imgUrl");
     @Java110Transactional
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
 
-       ReserveGoodsPo reserveGoodsPo = BeanConvertUtil.covertBean(reqJson, ReserveGoodsPo.class);
+        ReserveGoodsPo reserveGoodsPo = BeanConvertUtil.covertBean(reqJson, ReserveGoodsPo.class);
         reserveGoodsPo.setGoodsId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         int flag = reserveGoodsV1InnerServiceSMOImpl.saveReserveGoods(reserveGoodsPo);