wuxw il y a 3 ans
Parent
commit
4622d5199c

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/resourceStoreTimes/ResourceStoreTimesDto.java

@@ -16,6 +16,7 @@ import java.util.Date;
 public class ResourceStoreTimesDto extends PageDto implements Serializable {
 
     private String price;
+    private String totalPrice;
     private String applyOrderId;
     private String storeId;
     private String stock;
@@ -102,4 +103,12 @@ public class ResourceStoreTimesDto extends PageDto implements Serializable {
     public void setHasStock(String hasStock) {
         this.hasStock = hasStock;
     }
+
+    public String getTotalPrice() {
+        return totalPrice;
+    }
+
+    public void setTotalPrice(String totalPrice) {
+        this.totalPrice = totalPrice;
+    }
 }

+ 2 - 1
java110-db/src/main/resources/mapper/store/ResourceStoreTimesV1ServiceDaoImplMapper.xml

@@ -18,7 +18,8 @@
     <!-- 查询物品次数信息 add by wuxw 2018-07-03 -->
     <select id="getResourceStoreTimesInfo" parameterType="Map" resultType="Map">
         select t.price,t.apply_order_id,t.apply_order_id applyOrderId,t.status_cd,t.status_cd
-        statusCd,t.store_id,t.store_id storeId,t.stock,t.res_code,t.res_code resCode,t.times_id,t.times_id timesId
+        statusCd,t.store_id,t.store_id storeId,t.stock,t.res_code,t.res_code resCode,t.times_id,t.times_id timesId,
+        (t.price * t.stock) totalPrice
         from resource_store_times t
         where 1 =1
         <if test="price !=null and price != ''">

+ 39 - 1
service-store/src/main/java/com/java110/store/cmd/resourceStoreTimes/ListResourceStoreTimesCmd.java

@@ -22,6 +22,7 @@ import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
 import com.java110.core.factory.GenerateCodeFactory;
+import com.java110.doc.annotation.*;
 import com.java110.intf.store.IResourceStoreTimesV1InnerServiceSMO;
 import com.java110.po.resourceStoreTimes.ResourceStoreTimesPo;
 import com.java110.utils.exception.CmdException;
@@ -39,7 +40,40 @@ import org.slf4j.LoggerFactory;
 
 
 /**
- * 类表述:查询
+ * 查询物品进货明细 功能
+ */
+
+@Java110CmdDoc(title = "查询物品进货明细",
+        description = "主要用于 查询物品进货明细",
+        httpMethod = "get",
+        url = "http://{ip}:{port}/app/resourceStoreTimes.listResourceStoreTimes",
+        resource = "storeDoc",
+        author = "吴学文",
+        serviceCode = "resourceStoreTimes.listResourceStoreTimes"
+)
+
+@Java110ParamsDoc(params = {
+        @Java110ParamDoc(name = "resCode", length = 30, remark = "物品编号"),
+})
+
+@Java110ResponseDoc(
+        params = {
+                @Java110ParamDoc(name = "code", type = "int", length = 11, defaultValue = "0", remark = "返回编号,0 成功 其他失败"),
+                @Java110ParamDoc(name = "msg", type = "String", length = 250, defaultValue = "成功", remark = "描述"),
+                @Java110ParamDoc(name = "data", type = "Array", length = 0, remark = "数据"),
+                @Java110ParamDoc(parentNodeName = "data",name = "resCode", type = "String", length = 30,  remark = "物品编号"),
+                @Java110ParamDoc(parentNodeName = "data",name = "price", type = "String", length = 30,  remark = "价格"),
+                @Java110ParamDoc(parentNodeName = "data",name = "stock", type = "String", length = 30,  remark = "库存"),
+        }
+)
+
+@Java110ExampleDoc(
+        reqBody="http://{ip}:{port}/app/resourceStoreTimes.listResourceStoreTimes?resCode=123123",
+        resBody="{'code':0,'msg':'成功','data':[{'resCode':'123','price':'1.2','stock':'12'}]}"
+)
+
+/**
+ * 类表述:查询物品进货明细
  * 服务编码:resourceStoreTimes.listResourceStoreTimes
  * 请求路劲:/app/resourceStoreTimes.ListResourceStoreTimes
  * add by 吴学文 at 2022-10-06 21:26:56 mail: 928255095@qq.com
@@ -65,6 +99,10 @@ public class ListResourceStoreTimesCmd extends Cmd {
 
            ResourceStoreTimesDto resourceStoreTimesDto = BeanConvertUtil.covertBean(reqJson, ResourceStoreTimesDto.class);
 
+           String storeId = cmdDataFlowContext.getReqHeaders().get("store-id");
+
+           resourceStoreTimesDto.setStoreId(storeId);
+
            int count = resourceStoreTimesV1InnerServiceSMOImpl.queryResourceStoreTimessCount(resourceStoreTimesDto);
 
            List<ResourceStoreTimesDto> resourceStoreTimesDtos = null;