Parcourir la source

访客 注释掉公众号信息查询判断

wuchangfu il y a 1 mois
Parent
commit
d67f3bf0ee

+ 13 - 4
src/main/java/com/palmnest/service/estateserve/airconditioner/impl/ConditionerAddTimeServiceImpl.java

@@ -1,5 +1,6 @@
 package com.palmnest.service.estateserve.airconditioner.impl;
 
+import cn.superdesk.libs.common.json.JsonUtils;
 import com.alibaba.fastjson.JSON;
 import com.palmnest.application.AppConstants;
 import com.palmnest.application.CodeConstants;
@@ -173,7 +174,8 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
             String applyTimeStr = DateUtils.getTime(airConditionerAddTime.getUseStartTime(), "yyyy-MM-dd");
             try {
                 String jsonStr = HttpKit.holidayGet("https://timor.tech/api/holiday/info/" + applyTimeStr, false);
-                System.out.println("节假日接口调用返回===>" + jsonStr);
+                log.info("节假日接口调用返回===>" + jsonStr);
+
                 Map<String, Object> jsApiMap = com.alibaba.fastjson.JSONObject.parseObject(jsonStr);
                 if (null != jsApiMap && jsApiMap.containsKey("code")) {
                     if (jsApiMap.get("code").equals(0)) {
@@ -233,9 +235,10 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
              * 项目的空调使用规则信息
              */
             List<AirRule> airRules = airRuleManager.getAirRule(airConditionerAddTime.getOrganizationId(), applicationType, applicationAirAddTime, dataType, "", "");
-            log.info("空调加时申请,查询到到的空调加时规则为:{}", airRules);
+            log.info("空调加时申请,查询到到的空调加时规则为:{}", JsonUtils.toJson(airRules));
             AirRule airRule = null;
             if (null == airRules || airRules.isEmpty()) {
+                log.info("空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请 apply 1");
                 return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请");
             }
             int airRulesSize = 0;
@@ -252,8 +255,9 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
                     ++airRulesSize;
                 }
             }
-
+            log.info("空调加时申请:airRulesSize :" + airRulesSize);
             if (airRulesSize == 0) {
+                log.info("空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请 apply 2");
                 return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请");
             }
             if (airRulesSize > 1) {
@@ -1855,6 +1859,7 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
             String jsonStr;
 
             jsonStr = HttpKit.get("http://api.goseek.cn/Tools/holiday?date=" + applyTimeStr, false);
+            log.info("空调加时申请,getIsShowSelectBox jsonStr:{}", jsonStr);
             Map<String, Object> jsApiMap = com.alibaba.fastjson.JSONObject.parseObject(jsonStr);
             if (null != jsApiMap && jsApiMap.containsKey("code")) {
                 if (jsApiMap.get("code").equals(10000)) {
@@ -1906,7 +1911,10 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
 			}*/
             List<AirRule> airRules = airRuleManager.getAirRule(virtual.getOrganizationId(), applicationType, applicationMeeting, dataType, "", "");
             AirRule airRule = null;
+
+
             if (null == airRules || (null != airRules && airRules.size() == 0)) {
+                log.info("空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请 getIsShowSelectBox 1");
                 return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请");
             }
             int airRulesSize = 0;
@@ -1922,8 +1930,9 @@ public class ConditionerAddTimeServiceImpl implements ConditionerAddTimeService
                     ++airRulesSize;
                 }
             }
-
+            log.info("空调加时申请2 airRulesSize:  " + airRulesSize);
             if (airRulesSize == 0) {
+                log.info("空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请 getIsShowSelectBox 2");
                 return AppResultUtil.createErrorDto(AppConstants.ERROR_CODE, "空调加时申请失败,不能匹配到空调加时规则或该时段有免费的空调加时无需申请");
             }
             if (airRulesSize > 1) {

+ 1 - 1
src/main/java/com/palmnest/webapp/controller/wechat/WxAirConditionerAddTimeController.java

@@ -70,7 +70,7 @@ public class WxAirConditionerAddTimeController {
 	@ResponseBody
 	public AppResultDto apply(@ModelAttribute("airConditionerAddTimeInputDto") AirConditionerAddTimeInputDto dto, HttpServletRequest request) {
 
-		log.info("WxAirConditionerAddTimeController apply======");
+		log.info("WxAirConditionerAddTimeController apply======{}", JsonUtils.toJson(dto) );
 		dto.setBillSource("1");//空调加时
 		dto.setBillFrom(CodeConstants.WECHAT);
 		dto.setIsAppManageBook(0);