张延森 4 years ago
parent
commit
fb8ad6b5a4

+ 1
- 1
pom.xml View File

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

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

@@ -78,8 +78,9 @@ public class TaHouseSettingController extends BaseController {
78 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 86
         if (StringUtils.isEmpty(taHouseSetting.getHouseId())) {

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

@@ -12,9 +12,6 @@ import com.shigongli.service.ITaHousePersonService;
12 12
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
13 13
 import com.shigongli.service.ITaShopKeeperService;
14 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 15
 import org.springframework.beans.factory.annotation.Autowired;
19 16
 import org.springframework.scheduling.annotation.Async;
20 17
 import org.springframework.stereotype.Service;
@@ -76,7 +73,12 @@ public class TaHousePersonServiceImpl extends ServiceImpl<TaHousePersonMapper, T
76 73
 
77 74
             // 发送内容
78 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 82
             dataList.add(new WxMaSubscribeMessage.Data("date2", dateStr));
81 83
 
82 84
             //