Merge branch 'FSHJOB1.2' of 192.168.0.27:dev0/fangjia-job into FSHJOB1.2
This commit is contained in:
+2
@@ -19,6 +19,8 @@ public class FangjiaConstant {
|
|||||||
|
|
||||||
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;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+22
-3
@@ -17,6 +17,26 @@ public class CityStatInfoDto {
|
|||||||
// 是否关注该城市(定位城市数据页面使用)
|
// 是否关注该城市(定位城市数据页面使用)
|
||||||
private boolean follow;
|
private boolean follow;
|
||||||
|
|
||||||
|
public CityStatInfoDto() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public CityStatInfoDto(String id, String city, Integer statDate, Integer avgPrice, Integer index, Double markup,
|
||||||
|
Double rentRate, Double yoyMarkup, int rangeLevel, Integer downChance, boolean follow) {
|
||||||
|
super();
|
||||||
|
this.id = id;
|
||||||
|
this.city = city;
|
||||||
|
this.statDate = statDate;
|
||||||
|
this.avgPrice = avgPrice;
|
||||||
|
this.index = index;
|
||||||
|
this.markup = markup;
|
||||||
|
this.rentRate = rentRate;
|
||||||
|
this.yoyMarkup = yoyMarkup;
|
||||||
|
this.rangeLevel = rangeLevel;
|
||||||
|
this.downChance = downChance;
|
||||||
|
this.follow = follow;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isFollow() {
|
public boolean isFollow() {
|
||||||
return follow;
|
return follow;
|
||||||
}
|
}
|
||||||
@@ -125,9 +145,8 @@ public class CityStatInfoDto {
|
|||||||
// 为实现深copy
|
// 为实现深copy
|
||||||
@Override
|
@Override
|
||||||
public CityStatInfoDto clone() throws CloneNotSupportedException {
|
public CityStatInfoDto clone() throws CloneNotSupportedException {
|
||||||
CityStatInfoDto dto = null;
|
return new CityStatInfoDto(this.id, this.city, this.statDate, this.avgPrice, this.index, this.markup,
|
||||||
dto = (CityStatInfoDto) super.clone();
|
this.rentRate, this.yoyMarkup, this.rangeLevel, this.downChance, this.follow);
|
||||||
return dto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+7
-3
@@ -145,7 +145,7 @@ public class CityRankingSendJob implements SimpleJob {
|
|||||||
List<CitySendLog> sendList = citySendLogService.find(city.getUid(), null, sendType);
|
List<CitySendLog> sendList = citySendLogService.find(city.getUid(), null, sendType);
|
||||||
if ((null == sendList || sendList.isEmpty()) && !list.isEmpty()) {
|
if ((null == sendList || sendList.isEmpty()) && !list.isEmpty()) {
|
||||||
//取排名并发送
|
//取排名并发送
|
||||||
for (int i = 0; i <= list.size(); i++) {
|
for (int i = 0; i < list.size(); i++) {
|
||||||
if (city.getCity().equals(list.get(i).getCity())) {
|
if (city.getCity().equals(list.get(i).getCity())) {
|
||||||
int rankings = i + 1;// 排名
|
int rankings = i + 1;// 排名
|
||||||
baseSend(city, rankings, sendType);
|
baseSend(city, rankings, sendType);
|
||||||
@@ -197,8 +197,12 @@ public class CityRankingSendJob implements SimpleJob {
|
|||||||
param.setContent(title);
|
param.setContent(title);
|
||||||
param.setOperation(FangjiaConstant.URL_SEND_TYPE);
|
param.setOperation(FangjiaConstant.URL_SEND_TYPE);
|
||||||
param.setOperationPage("/views/house/cityDetail.html?city="+city.getCity());
|
param.setOperationPage("/views/house/cityDetail.html?city="+city.getCity());
|
||||||
param.setPushClientId(user.getPushClientId());
|
if (null != user) {
|
||||||
pushMessageService.push(param);
|
param.setPushClientId(user.getPushClientId());
|
||||||
|
pushMessageService.push(param);
|
||||||
|
} else {
|
||||||
|
LOG.info("PushClientId查询不到,uid:" + city.getUid());
|
||||||
|
}
|
||||||
// 记录
|
// 记录
|
||||||
citySendLogService.save(city.getCity(), city.getUid(), 0L, sendType);
|
citySendLogService.save(city.getCity(), city.getUid(), 0L, sendType);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-3
@@ -81,9 +81,14 @@ 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.getRecommendDistrictCity() + "®ion="
|
||||||
param.setPushClientId(user.getPushClientId());
|
+ n.getRecommendDistrictRegion() + "&name=" + n.getRecommendDistrictName());
|
||||||
pushMessageService.push(param);
|
if (null != user) {
|
||||||
|
param.setPushClientId(user.getPushClientId());
|
||||||
|
pushMessageService.push(param);
|
||||||
|
} else {
|
||||||
|
LOG.info("PushClientId查询不到,uid:" + city.getUid());
|
||||||
|
}
|
||||||
// 4.记录
|
// 4.记录
|
||||||
citySendLogService.save(city.getCity(), city.getUid(), n.getId(),
|
citySendLogService.save(city.getCity(), city.getUid(), n.getId(),
|
||||||
FangjiaConstant.HOUSING_ESTATE_SEND_TYPE);
|
FangjiaConstant.HOUSING_ESTATE_SEND_TYPE);
|
||||||
|
|||||||
+32
-3
@@ -82,9 +82,38 @@ 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()) {
|
||||||
param.setPushClientId(user.getPushClientId());
|
case "专题":
|
||||||
pushMessageService.push(param);
|
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
||||||
|
break;
|
||||||
|
case "新闻":
|
||||||
|
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
||||||
|
param.setUserId(city.getUid());
|
||||||
|
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.getRecommendDistrictCity() + "®ion="
|
||||||
|
+ n.getRecommendDistrictRegion() + "&name=" + n.getRecommendDistrictName());
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
param.setOperationPage("/views/news/newsDetail.html?newsId=" + n.getId());
|
||||||
|
}
|
||||||
|
if (null != user) {
|
||||||
|
param.setPushClientId(user.getPushClientId());
|
||||||
|
//LOG.info("param:" + JsonUtils.toJson(param));
|
||||||
|
pushMessageService.push(param);
|
||||||
|
} else {
|
||||||
|
LOG.info("PushClientId查询不到,uid:" + city.getUid());
|
||||||
|
}
|
||||||
// 4.记录
|
// 4.记录
|
||||||
citySendLogService.save(city.getCity(), city.getUid(), n.getId(), FangjiaConstant.NEWS_SEND_TYPE);
|
citySendLogService.save(city.getCity(), city.getUid(), n.getId(), FangjiaConstant.NEWS_SEND_TYPE);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-4
@@ -14,8 +14,6 @@ public class NewsServiceImpl extends EntityService<News> implements NewsService
|
|||||||
|
|
||||||
private static final int ON_LINE_STATUS = 1;
|
private static final int ON_LINE_STATUS = 1;
|
||||||
|
|
||||||
private static final String NEWS_TYPE = "新闻";
|
|
||||||
|
|
||||||
private static final String HOUSING_ESTATE_TYPE = "推荐小区";
|
private static final String HOUSING_ESTATE_TYPE = "推荐小区";
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -32,8 +30,8 @@ public class NewsServiceImpl extends EntityService<News> implements NewsService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<News> findTopNews(String city) {
|
public List<News> findTopNews(String city) {
|
||||||
return super.list(new String[] { "status", "top_status", "type", "city" },
|
return super.list(new String[] { "status", "top_status", "city" },
|
||||||
new Object[] { ON_LINE_STATUS, TOP_STATUS, NEWS_TYPE, city });
|
new Object[] { ON_LINE_STATUS, TOP_STATUS, city });
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user