张延森 4 years ago
parent
commit
fb8ad6b5a4

+ 1
- 1
pom.xml View File

10
 	</parent>
10
 	</parent>
11
 	<groupId>com.shigongli</groupId>
11
 	<groupId>com.shigongli</groupId>
12
 	<artifactId>shigongli</artifactId>
12
 	<artifactId>shigongli</artifactId>
13
-	<version>0.0.5</version>
13
+	<version>0.0.8</version>
14
 	<name>shigongli</name>
14
 	<name>shigongli</name>
15
 	<description>ShiGongli Service</description>
15
 	<description>ShiGongli Service</description>
16
 
16
 

+ 3
- 2
src/main/java/com/shigongli/controller/TaHouseSettingController.java View File

78
             return ResponseBean.error("填写房源设置出错", ResponseBean.ERROR_MISSING_PARAMS);
78
             return ResponseBean.error("填写房源设置出错", ResponseBean.ERROR_MISSING_PARAMS);
79
         }
79
         }
80
 
80
 
81
-        if (null == taHouseSetting.getPersonNum() || taHouseSetting.getPersonNum() < 1) {
82
-            return ResponseBean.error("房源入住人数至少1人", ResponseBean.ERROR_ILLEGAL_PARAMS);
81
+        if (null == taHouseSetting.getPersonNum()) {
82
+            taHouseSetting.setPersonNum(0);
83
+//            return ResponseBean.error("房源入住人数至少1人", ResponseBean.ERROR_ILLEGAL_PARAMS);
83
         }
84
         }
84
 
85
 
85
         if (StringUtils.isEmpty(taHouseSetting.getHouseId())) {
86
         if (StringUtils.isEmpty(taHouseSetting.getHouseId())) {

+ 6
- 4
src/main/java/com/shigongli/service/impl/TaHousePersonServiceImpl.java View File

12
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
12
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
13
 import com.shigongli.service.ITaShopKeeperService;
13
 import com.shigongli.service.ITaShopKeeperService;
14
 import lombok.extern.slf4j.Slf4j;
14
 import lombok.extern.slf4j.Slf4j;
15
-import me.chanjar.weixin.mp.api.WxMpService;
16
-import me.chanjar.weixin.mp.bean.subscribe.WxMpSubscribeMessage;
17
-import org.checkerframework.checker.units.qual.A;
18
 import org.springframework.beans.factory.annotation.Autowired;
15
 import org.springframework.beans.factory.annotation.Autowired;
19
 import org.springframework.scheduling.annotation.Async;
16
 import org.springframework.scheduling.annotation.Async;
20
 import org.springframework.stereotype.Service;
17
 import org.springframework.stereotype.Service;
76
 
73
 
77
             // 发送内容
74
             // 发送内容
78
             List<WxMaSubscribeMessage.Data> dataList = new ArrayList<>();
75
             List<WxMaSubscribeMessage.Data> dataList = new ArrayList<>();
79
-            dataList.add(new WxMaSubscribeMessage.Data("thing6", taHouse.getTitle().substring(0, 10)));
76
+            String title = null != taHouse.getTitle() ? taHouse.getTitle() : "";
77
+            if (title.length() > 10) {
78
+                title = title.substring(0, 10) + "...";
79
+            }
80
+
81
+            dataList.add(new WxMaSubscribeMessage.Data("thing6", title));
80
             dataList.add(new WxMaSubscribeMessage.Data("date2", dateStr));
82
             dataList.add(new WxMaSubscribeMessage.Data("date2", dateStr));
81
 
83
 
82
             //
84
             //