代码优化
This commit is contained in:
+4
-2
@@ -16,9 +16,11 @@ public class FangjiaConstant {
|
|||||||
public static final byte POTENTIAL_SEND_TYPE = 4;
|
public static final byte POTENTIAL_SEND_TYPE = 4;
|
||||||
|
|
||||||
public static final int SUCCESS_RESPONSE_CODE = 200;
|
public static final int SUCCESS_RESPONSE_CODE = 200;
|
||||||
|
|
||||||
public static final int SEND_THREAD_NUM = 100;
|
public static final int SEND_THREAD_NUM = 100;
|
||||||
|
|
||||||
|
public static final int OPEN_APP_TYPE = 0;
|
||||||
|
|
||||||
public static final int URL_SEND_TYPE = 2;
|
public static final int URL_SEND_TYPE = 2;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-1
@@ -81,7 +81,8 @@ public class HousingEstateNewsSendJob implements SimpleJob {
|
|||||||
param.setTitle(n.getTitle());
|
param.setTitle(n.getTitle());
|
||||||
param.setContent(pushMsg);
|
param.setContent(pushMsg);
|
||||||
param.setOperation(FangjiaConstant.URL_SEND_TYPE);
|
param.setOperation(FangjiaConstant.URL_SEND_TYPE);
|
||||||
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
param.setOperationPage("/views/district/detail.html?city=" + n.getRecommendCity() + "®ion="
|
||||||
|
+ n.getRecommendDistrictRegion() + "&name=" + n.getRecommendDistrictName());
|
||||||
if (null != user) {
|
if (null != user) {
|
||||||
param.setPushClientId(user.getPushClientId());
|
param.setPushClientId(user.getPushClientId());
|
||||||
pushMessageService.push(param);
|
pushMessageService.push(param);
|
||||||
|
|||||||
+23
-1
@@ -82,7 +82,29 @@ public class TopNewsSendJob implements SimpleJob {
|
|||||||
param.setTitle(n.getTitle());
|
param.setTitle(n.getTitle());
|
||||||
param.setContent(pushMsg);
|
param.setContent(pushMsg);
|
||||||
param.setOperation(FangjiaConstant.URL_SEND_TYPE);
|
param.setOperation(FangjiaConstant.URL_SEND_TYPE);
|
||||||
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
switch (n.getType()) {
|
||||||
|
case "专题":
|
||||||
|
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
||||||
|
break;
|
||||||
|
case "新闻":
|
||||||
|
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
||||||
|
break;
|
||||||
|
case "推荐城市":
|
||||||
|
param.setOperationPage("/views/house/cityDetail.html?city=" + n.getCity());
|
||||||
|
break;
|
||||||
|
case "投票":
|
||||||
|
param.setOperation(FangjiaConstant.OPEN_APP_TYPE);
|
||||||
|
break;
|
||||||
|
case "活动":
|
||||||
|
param.setOperation(FangjiaConstant.OPEN_APP_TYPE);
|
||||||
|
break;
|
||||||
|
case "推荐小区":
|
||||||
|
param.setOperationPage("/views/district/detail.html?city=" + n.getRecommendCity() + "®ion="
|
||||||
|
+ n.getRecommendDistrictRegion() + "&name=" + n.getRecommendDistrictName());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
||||||
|
}
|
||||||
if (null != user) {
|
if (null != user) {
|
||||||
param.setPushClientId(user.getPushClientId());
|
param.setPushClientId(user.getPushClientId());
|
||||||
pushMessageService.push(param);
|
pushMessageService.push(param);
|
||||||
|
|||||||
Reference in New Issue
Block a user