|
|
@@ -162,7 +162,7 @@ public class WechatMsgNotifyImpl implements IMsgNotify {
|
|
|
ownerAppUserDto.setAppType(OwnerAppUserDto.APP_TYPE_WECHAT);
|
|
|
ownerAppUserDto.setUserId(userId);
|
|
|
List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto);
|
|
|
- if (ownerAppUserDtos == null || ownerAppUserDtos.isEmpty()) {
|
|
|
+ if (ListUtil.isNull(ownerAppUserDtos)) {
|
|
|
throw new IllegalArgumentException("业主未绑定,没有获取到微信openId");
|
|
|
}
|
|
|
|
|
|
@@ -224,7 +224,7 @@ public class WechatMsgNotifyImpl implements IMsgNotify {
|
|
|
ownerAppUserDto.setAppType(OwnerAppUserDto.APP_TYPE_WECHAT);
|
|
|
ownerAppUserDto.setUserId(userId);
|
|
|
List<OwnerAppUserDto> ownerAppUserDtos = ownerAppUserInnerServiceSMOImpl.queryOwnerAppUsers(ownerAppUserDto);
|
|
|
- if (ownerAppUserDtos == null || ownerAppUserDtos.size() < 1) {
|
|
|
+ if (ListUtil.isNull(ownerAppUserDtos)) {
|
|
|
throw new IllegalArgumentException("业主未绑定,没有获取到微信openId");
|
|
|
}
|
|
|
openId = ownerAppUserDtos.get(0).getOpenId();
|
|
|
@@ -233,11 +233,9 @@ public class WechatMsgNotifyImpl implements IMsgNotify {
|
|
|
staffAppAuthDto.setStaffId(userId);
|
|
|
staffAppAuthDto.setAppType("WECHAT");
|
|
|
List<StaffAppAuthDto> staffAppAuthDtos = staffAppAuthInnerServiceSMOImpl.queryStaffAppAuths(staffAppAuthDto);
|
|
|
- if (staffAppAuthDtos == null || staffAppAuthDtos.size() < 1) {
|
|
|
+ if (ListUtil.isNull(staffAppAuthDtos)) {
|
|
|
throw new IllegalArgumentException("员工未认证,没有获取到微信openId");
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
openId = staffAppAuthDtos.get(0).getOpenId();
|
|
|
}
|
|
|
JSONObject data = new JSONObject();
|
|
|
@@ -245,8 +243,8 @@ public class WechatMsgNotifyImpl implements IMsgNotify {
|
|
|
templateMessage.setTemplate_id(templateId);
|
|
|
templateMessage.setTouser(openId);
|
|
|
String thing10 = content.getString("payFeeRoom");
|
|
|
- if(thing10.length()>20){
|
|
|
- thing10 = thing10.substring(0,19);
|
|
|
+ if (thing10.length() > 20) {
|
|
|
+ thing10 = thing10.substring(0, 19);
|
|
|
}
|
|
|
// data.put("thing2", new Content(content.getString("feeTypeCdName")));
|
|
|
data.put("thing2", new Content(content.getString("feeName")));
|