浏览代码

'修改ip'

Zhouyiping 2 天之前
父节点
当前提交
11ce18c70c

+ 1 - 1
src/main/java/com/yys/scsp/controller/TDeviceController.java

@@ -597,7 +597,7 @@ public class TDeviceController {
     public ResultUtil updateDeviceStatus() {
         try {
             String emqxUrl = "http://8.138.199.128:18083/api/v3/connections/";
-            String result = SendRequest.sendGetAuth(emqxUrl, "admin", "Ytn@emqx");
+            String result = SendRequest.sendGetAuth(emqxUrl, "admin", "Tmy@emqx");
             JSONObject json = JSONObject.parseObject(result);
             List data = (List) json.get("data");
             List deviceCodes = new ArrayList();

+ 10 - 10
src/main/java/com/yys/scsp/controller/app/TAppOrderController.java

@@ -117,8 +117,8 @@ public class TAppOrderController {
         if (orderList.size() > 0)
             return ResultUtil.error("已提交订单,请勿重复提交");
 
-        //是否抽单
-        int isDraw = 0;
+//        //是否抽单
+//        int isDraw = 0;
 
         boolean canUseAnnual;
         boolean canUseMonthly = false;
@@ -158,13 +158,13 @@ public class TAppOrderController {
                     }
                 }
                 // 根据订单总数判断判断是否抽单
-                int orderCount = tOrderInfoService.getOrderCountByDeviceCode(deviceCode);
-                NetworkDot networkDot = networkDotService.findNetworkDotInfoById(StringISNULLUtil.mapToInteger(device.get("networkDotId")));
-                Integer drawOrderNumber = networkDot.getDrawNumber();
-                if (drawOrderNumber == null)
-                    drawOrderNumber = Integer.valueOf(configService.getGlobalConfig(SharingConfig.DRAW_ORDER_NUMBER));
-                if ((orderCount + 1) % drawOrderNumber == 0)
-                    isDraw = 1;
+//                int orderCount = tOrderInfoService.getOrderCountByDeviceCode(deviceCode);
+//                NetworkDot networkDot = networkDotService.findNetworkDotInfoById(StringISNULLUtil.mapToInteger(device.get("networkDotId")));
+//                Integer drawOrderNumber = networkDot.getDrawNumber();
+//                if (drawOrderNumber == null)
+//                    drawOrderNumber = Integer.valueOf(configService.getGlobalConfig(SharingConfig.DRAW_ORDER_NUMBER));
+//                if ((orderCount + 1) % drawOrderNumber == 0)
+//                    isDraw = 1;
             }
         }
 
@@ -191,7 +191,7 @@ public class TAppOrderController {
         } else {
             orderInfoMy.setIsContinued(0);
         }
-        orderInfoMy.setIsDraw(isDraw);
+        orderInfoMy.setIsDraw(0);
         orderInfoMy.setInsuranceFee(insuranceFee);// 保险费用
         orderInfoMy.setPriceType(Integer.parseInt(type));
 

+ 6 - 6
src/main/java/com/yys/scsp/service/impl/TMonthlyServiceImpl.java

@@ -81,12 +81,12 @@ public class TMonthlyServiceImpl extends ServiceImpl<TMonthlyMapper, TMonthly> i
             }
         } else {
             // 未购买过包月的用户,判断充电时长是否满足购买包月要求时长
-            String hour = configService.getGlobalConfig(SharingConfig.BUY_MONTH_HOUR);
-            int buyMonthHour = StringUtil.isEmpty(hour) ? 30 : Integer.parseInt(hour);
-            long chargingHour = orderInfoMapper.getOrderSumHourByUserId(userId);
-            if (chargingHour < buyMonthHour) {
-                return ResultUtil.error("您充电时长未满" + buyMonthHour + "小时,暂时不能购买包月");
-            }
+//            String hour = configService.getGlobalConfig(SharingConfig.BUY_MONTH_HOUR);
+//            int buyMonthHour = StringUtil.isEmpty(hour) ? 30 : Integer.parseInt(hour);
+//            long chargingHour = orderInfoMapper.getOrderSumHourByUserId(userId);
+//            if (chargingHour < buyMonthHour) {
+//                return ResultUtil.error("您充电时长未满" + buyMonthHour + "小时,暂时不能购买包月");
+//            }
         }
         return ResultUtil.success("可购买包月");
     }