Browse Source

修改小程序接口

wangyuanbo 3 years ago
parent
commit
4dc9b6ab8b
23 changed files with 62 additions and 52 deletions
  1. 34 18
      imcs-bt-be/imcs-authority-server/src/main/java/com/github/zuihou/api/MiniApp.java
  2. 1 1
      imcs-bt-be/imcs-business-biz/src/main/resources/mapper_business/base/order/OrderMapper.xml
  3. 1 0
      imcs-bt-be/imcs-business-biz/src/main/resources/mapper_business/base/productionresource/ProductionresourceMapper.xml
  4. 0 4
      imcs-bt-be/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionresource/ProductionResourceController.java
  5. 0 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/index.html
  6. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-0e781e68.0a79404f.css.gz
  7. 0 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-1bc7af66.e062f103.css
  8. 0 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-54b07340.a3de049f.css
  9. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-54b07340.a3de049f.css.gz
  10. 0 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-70f400aa.4795eca4.css
  11. 0 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/app.34715999.js
  12. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/app.34715999.js.gz
  13. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/app.c9083382.js.gz
  14. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-0e781e68.8a93ee68.js.gz
  15. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-1bc7af66.10eef938.js.gz
  16. 0 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-54b07340.00ca59ff.js
  17. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-54b07340.00ca59ff.js.gz
  18. 0 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-70f400aa.52e138d9.js
  19. BIN
      imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-70f400aa.52e138d9.js.gz
  20. 11 1
      imcs-bt-fe/imcs-bt-fe/imcs-ui/src/api/Place.js
  21. 6 5
      imcs-bt-fe/imcs-bt-fe/imcs-ui/src/mixin/index.js
  22. 4 0
      imcs-bt-fe/imcs-bt-fe/imcs-ui/src/views/zuihou/place/Index.vue
  23. 5 23
      imcs-bt-fe/imcs-bt-fe/imcs-ui/src/views/zuihou/place/components/Edit.vue

+ 34 - 18
imcs-bt-be/imcs-authority-server/src/main/java/com/github/zuihou/api/MiniApp.java

@@ -177,9 +177,7 @@ public class MiniApp {
         QueryWrap<Member> memberQueryWrap = new QueryWrap<>();
         memberQueryWrap.eq("member_openId", openId);
         Member member = memberService.getOne(memberQueryWrap);
-//        查询订单状态不是未支付的订单
-        QueryWrap<Order> orderQueryWrap = new QueryWrap<>();
-        orderQueryWrap.notIn("order_status", "0");
+//        查询用户所有除了未支付状态的订单
         List<Order> orderList = orderService.getOrderList(member.getId());
 
         return R.success(orderList);
@@ -210,32 +208,50 @@ public class MiniApp {
     }
 
     /**
-     * @return 查询订单条数
+     * @return 查询订单条数  附近设备条数
      */
-    @GetMapping("/getOrdersTotal")
-    public R<Integer> getOrdersTotal() {
+    @GetMapping("/getTotal")
+    public R<Map<String, Integer>> getTotal() {
+        BaseContextHandler.setTenant("0000");
+        String openId = BaseContextHandler.get("openId");
+        QueryWrap<Member> memberQueryWrap = new QueryWrap<>();
+        memberQueryWrap.eq("member_openId", openId);
+        Member member = memberService.getOne(memberQueryWrap);
+
         QueryWrap<Order> orderQueryWrap = new QueryWrap<>();
-        orderQueryWrap.notIn("order_status", "0");
+        orderQueryWrap.eq("order_member_id", member.getId()).notIn("order_status", "0");
         int count = orderService.count(orderQueryWrap);
-        return R.success(count);
-    }
-
-
-    /**
-     * @return 查询附近设备条数
-     */
-    @GetMapping("/getEquTotal")
-    public R<Integer> getEquTotal() {
 
         QueryWrap<ProductionResource> queryWrap = new QueryWrap<>();
         queryWrap.orderByDesc("create_time").last("limit 5");
         List<ProductionResource> list = productionTenantResourceService.list(queryWrap);
+        HashMap<String, Integer> resultMap = new HashMap<>();
+        resultMap.put("goodsTotal", count);
         if (null == list) {
-            return R.success(0);
+            resultMap.put("equTotal", 0);
+            return R.success(resultMap);
         }
+        resultMap.put("equTotal", list.size());
 
-        return R.success(list.size());
+        return R.success(resultMap);
     }
 
 
+    /**
+     * @return 查询附近设备条数
+     */
+//    @GetMapping("/getEquTotal")
+//    public R<Integer> getEquTotal() {
+//
+//        QueryWrap<ProductionResource> queryWrap = new QueryWrap<>();
+//        queryWrap.orderByDesc("create_time").last("limit 5");
+//        List<ProductionResource> list = productionTenantResourceService.list(queryWrap);
+//        if (null == list) {
+//            return R.success(0);
+//        }
+//
+//        return R.success(list.size());
+//    }
+
+
 }

+ 1 - 1
imcs-bt-be/imcs-business-biz/src/main/resources/mapper_business/base/order/OrderMapper.xml

@@ -67,7 +67,7 @@
                  left join bt_goods g on o.order_goods_id = g.id
                  left join bt_spe s on o.order_specs = s.id
                  left join bt_member m on o.order_member_id = m.id
-        where o.order_member_id = #{memberId}
+        where o.order_member_id = #{memberId} and o.order_status!='0'
           and o.order_status!="0"
 
 

+ 1 - 0
imcs-bt-be/imcs-business-biz/src/main/resources/mapper_business/base/productionresource/ProductionresourceMapper.xml

@@ -107,6 +107,7 @@
                  left join bt_goods_cate gc on g.goods_cate_id = gc.id
                  left join bt_spe s on s.goods_id = g.id
         where eg.equ_id = #{equId}
+          and g.goods_status = '1'
         Group by g.id
     </select>
 

+ 0 - 4
imcs-bt-be/imcs-business-controller/src/main/java/com/github/zuihou/business/controller/productionresource/ProductionResourceController.java

@@ -114,7 +114,6 @@ public class ProductionResourceController extends SuperController<ProductionTena
     @ApiOperation(value = "查询设备商品", notes = "查询设备商品")
     @GetMapping("/getEquGoods")
     public R<List<EquGoodsDto>> getEquGoods(@RequestParam(name = "equId") Long equId) {
-
         List<EquGoodsDto> equGoodsDtoList = baseService.getEquGoods(equId);
 
         for (EquGoodsDto dto : equGoodsDtoList
@@ -123,10 +122,7 @@ public class ProductionResourceController extends SuperController<ProductionTena
             speQueryWrap.eq("goods_id", dto.getGoodsId());
             List<Spe> speList = speService.list(speQueryWrap);
             dto.setSpeList(speList);
-
         }
-
-
         return success(equGoodsDtoList);
     }
 

File diff suppressed because it is too large
+ 0 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/index.html


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-0e781e68.0a79404f.css.gz


File diff suppressed because it is too large
+ 0 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-1bc7af66.e062f103.css


File diff suppressed because it is too large
+ 0 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-54b07340.a3de049f.css


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-54b07340.a3de049f.css.gz


File diff suppressed because it is too large
+ 0 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/css/chunk-70f400aa.4795eca4.css


File diff suppressed because it is too large
+ 0 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/app.34715999.js


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/app.34715999.js.gz


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/app.c9083382.js.gz


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-0e781e68.8a93ee68.js.gz


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-1bc7af66.10eef938.js.gz


File diff suppressed because it is too large
+ 0 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-54b07340.00ca59ff.js


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-54b07340.00ca59ff.js.gz


File diff suppressed because it is too large
+ 0 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-70f400aa.52e138d9.js


BIN
imcs-bt-fe/imcs-bt-fe/imcs-ui/imcs-ui/static/js/chunk-70f400aa.52e138d9.js.gz


+ 11 - 1
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/api/Place.js

@@ -36,7 +36,12 @@ const apiList = {
   import: {
     method: 'POST',
     url: `/authority/place/import`
-  }
+  },
+  getAreaTree: {
+    method: 'GET',
+    url: `/authority/place/import`
+  },
+
 }
 
 export default {
@@ -103,5 +108,10 @@ export default {
       data,
       custom
     })
+  },
+  getAreaTree(){
+    return axiosApi({
+      ...apiList.getAreaTree,
+    })
   }
 }

+ 6 - 5
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/mixin/index.js

@@ -5,13 +5,14 @@ export default {
   install(Vue) {
     Vue.mixin({
       methods: {
-      	
+
       	/**
 				 * 根据,地址详情,逆地址解析,坐标-函数
 				 * */
       	$_getLngLat(address, reback){
 					this.$jsonp('https://api.map.baidu.com/geocoding/v3/', {
-					  	address: '北京市海淀区上地十街10号',
+					  	// address: '北京市海淀区上地十街10号',
+					  	address: address,
 					  	output: 'json',
 					  	ak: Setting.BMap_KEY
 					}).then(json => {
@@ -21,12 +22,12 @@ export default {
 					   	console.log("逆地址解析错误:", err);
 					})
 				},
-		    
+
 		    // 根据路由path,跳转到相应页面
 		    $_toRoute(path){
 		    	this.$router.push(path);
 		    },
-    
+
 	      /**
 				 * 滚动最顶部按钮-函数
 				 * */
@@ -40,4 +41,4 @@ export default {
       }
     })
   }
-}	
+}

+ 4 - 0
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/views/zuihou/place/Index.vue

@@ -433,6 +433,10 @@ export default {
       this.dialog.type = "edit";
       this.dialog.isVisible = true;
     },
+    getAreaTree(data) {
+
+    },
+
     fetch(params = {}) {
       this.loading = true;
       if (this.queryParams.timeRange) {

+ 5 - 23
imcs-bt-fe/imcs-bt-fe/imcs-ui/src/views/zuihou/place/components/Edit.vue

@@ -43,7 +43,7 @@
       </el-form-item>
       <el-form-item :label="$t('place.plcIscuspot')" prop="plcIscuspot">
         <template>
-          <el-radio v-model="place.plcIscuspot" label="1">{{ $t("place.yes") }}</el-radio>
+          <el-radio v-model="place.plcIscuspot" label="1">{{ $t("place.yes") }}</el-radio>1
           <el-radio v-model="place.plcIscuspot" label="0">{{ $t("place.no") }}</el-radio>
         </template>
       </el-form-item>
@@ -132,7 +132,8 @@ export default {
       // 枚举
       enums: {},
       // 字典
-      dicts: {}
+      dicts: {},
+      areaTree:[]
     };
   },
   computed: {
@@ -220,23 +221,11 @@ export default {
     },
 
     handleChange() {
-      // this.form.provinces = CodeToText[this.place.selectedOptions[0]]
-      // this.form.pCode = this.place.selectedOptions[0],
-      //   this.form.city = CodeToText[this.place.selectedOptions[1]],
-      //   this.form.cCode = this.place.selectedOptions[1],
-      //   this.form.area = CodeToText[this.place.selectedOptions[2]]
-      // this.form.aCode = this.place.selectedOptions[2]
-      // console.log("省市县数据:", this.form);
-
-      //this.place.plcPid = CodeToText[this.place.selectedOptions[0]];
-      //this.place.plcCid = CodeToText[this.place.selectedOptions[1]];
-      //this.place.plcAid = CodeToText[this.place.selectedOptions[2]];
       this.place.plcPid = this.place.selectedOptions[0];
       this.place.plcCid = this.place.selectedOptions[1];
       this.place.plcAid = this.place.selectedOptions[2];
       // 场地的,省市区地址
-      // this.address = this.form.provinces + this.form.city + this.form.area;
-      this.address = this.place.plcPid + this.place.plcCid + this.place.plcAid;
+      this.address=CodeToText[this.place.plcPid]+CodeToText[this.place.plcCid]+CodeToText[this.place.plcAid]
       console.log("省市县数据" + this.address)
     },
     initWidth() {
@@ -255,18 +244,11 @@ export default {
     },
     setPlace(val) {
       const vm = this;
-
-      // vm.dicts = val['dicts'];
-      // vm.enums = val['enums'];
-      // vm.place.selectedOptions[0] = vm.codeToName(val.row.plcPid);
-      // vm.place.selectedOptions[1] = vm.codeToName(val.row.plcCid);
-      // vm.place.selectedOptions[2] = vm.codeToName(val.row.plcPid);
+      //获取areaTree
 
 
-      // console.log("回显数据" + JSON.stringify(vm.place.selectedOptions))
       if (val['row']) {
         console.log("编辑,row=" + JSON.stringify(val['row']))
-
         vm.place = {...val['row']};
       }
     },

Some files were not shown because too many files changed in this diff