Browse Source

查询商品添加相关代码

liql 4 years ago
parent
commit
8b42f0e309

+ 14 - 0
carbon-back/carbon-back-service/src/main/java/com/hcloud/microserver/system/bank/bo/CreateOrderBO.java

@@ -0,0 +1,14 @@
+package com.hcloud.microserver.system.bank.bo;
+
+import lombok.Data;
+
+@Data
+public class CreateOrderBO {
+    private Long applyCostomerId;
+    private String productTypeGuid;
+    private String provinceId;
+    private String cityId;
+    private String countyId;
+    private String townId;
+    private String villageId;
+}

+ 28 - 0
carbon-back/carbon-back-service/src/main/java/com/hcloud/microserver/system/bank/controller/OrderInfoController.java

@@ -29,4 +29,32 @@ public class OrderInfoController extends BaseController {
         return responseSuccess(pageInfo);
     }
 
+    /**
+     * 创建订单:
+     *  1、查询商品
+     *  2、查询客户信息
+     *  3、生成订单
+     *  4、生成订单项:(减碳汇量)
+     *  5、生成证书
+     */
+
+    /**
+     * 订单列表:
+     * 条件:1、订单状态
+     *      2、企业账号
+     *      3、企业名称
+     *      4、订单号
+     */
+
+    /**
+     * 确认收款:
+     *  1、将订单状态改为已收款
+     */
+
+    /**
+     * 订单详情:
+     *  1、根据订单号查询主订单信息
+     *  2、根据订单号查询订单项
+     */
+
 }

+ 8 - 0
carbon-back/carbon-back-service/src/main/java/com/hcloud/microserver/system/bank/controller/ProductTypeController.java

@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * @author xiezt
@@ -83,4 +84,11 @@ public class ProductTypeController extends CarbonBaseController {
         }
         return responseResultFailure();
     }
+
+    @ApiOperation("查询所有产品类型2")
+    @GetMapping("/getAll")
+    public ResponseBase getAll() {
+        List<Map> list = this.productTypeService.getAll();
+        return responseResultSuccess(list);
+    }
 }

+ 2 - 0
carbon-back/carbon-back-service/src/main/java/com/hcloud/microserver/system/bank/dao/ProductTypeMapper.java

@@ -20,4 +20,6 @@ public interface ProductTypeMapper extends BaseMapper<ProductType, String> {
     int checkTypeVal(@Param("typeVal") String typeVal);
 
     String getCurrentCode();
+
+    List<Map> getAll();
 }

+ 8 - 0
carbon-back/carbon-back-service/src/main/java/com/hcloud/microserver/system/bank/service/PovertyAreaService.java

@@ -31,4 +31,12 @@ public interface PovertyAreaService {
      * @return
      */
     PovertyAreaForm getFullPovertyAreaInfoById(String guid);
+
+    /**
+     * 条件查询
+     * @param povertyArea
+     * @return
+     */
+    List<PovertyArea> findByFiveIds(PovertyArea povertyArea);
+
 }

+ 2 - 0
carbon-back/carbon-back-service/src/main/java/com/hcloud/microserver/system/bank/service/ProductTypeService.java

@@ -22,4 +22,6 @@ public interface ProductTypeService extends BaseServie<ProductType, String> {
     List<ProductType> queryAll(ProductTypeForm productTypeForm);
 
     int checkTypeVal(String typeVal);
+
+    List<Map> getAll();
 }

+ 5 - 0
carbon-back/carbon-back-service/src/main/java/com/hcloud/microserver/system/bank/service/impl/ProductTypeServiceImpl.java

@@ -246,6 +246,11 @@ public class ProductTypeServiceImpl implements ProductTypeService {
         return count;
     }
 
+    @Override
+    public List<Map> getAll() {
+        return this.productTypeMapper.getAll();
+    }
+
     private Integer getCurrentCode() {
         StringBuffer sbb = new StringBuffer();
         String maxCode = this.productTypeMapper.getCurrentCode();

+ 6 - 5
carbon-back/carbon-back-service/src/main/resources/carbon/PovertyAreaMapper.xml

@@ -305,11 +305,12 @@
         select <include refid="Base_Column_List"></include> from t_poverty_area
         <where>
             state = 1
-            and province_id = #{provinceId,jdbcType=VARCHAR}
-            and city_id = #{cityId,jdbcType=VARCHAR}
-            and town_id = #{townId,jdbcType=VARCHAR}
-            and county_id = #{countyId,jdbcType=VARCHAR}
-            and village_id = #{villageId,jdbcType=VARCHAR}
+            <if test="provinceId != null "> and province_id = #{provinceId}</if>
+            <if test="cityId != null "> and city_id = #{cityId}</if>
+            <if test="townId != null "> and town_id = #{townId}</if>
+            <if test="countyId != null "> and county_id = #{countyId}</if>
+            <if test="villageId != null "> and village_id = #{villageId}</if>
         </where>
     </select>
+
 </mapper>

+ 4 - 0
carbon-back/carbon-back-service/src/main/resources/carbon/ProductTypeMapper.xml

@@ -180,4 +180,8 @@
     <select id="getCurrentCode" resultType="string">
         select max(type_val) from t_product_type
     </select>
+
+    <select id="getAll" resultType="Map">
+        select guid,type_name,type_val from t_product_type where state=1
+    </select>
 </mapper>