+1
-1
@@ -16,7 +16,7 @@ public class CustomJobExceptionHandler implements JobExceptionHandler {
|
||||
@Override
|
||||
public void handleException(String jobName, Throwable cause) {
|
||||
logger.error(String.format("Job '%s' exception occur in job processing", jobName), cause);
|
||||
DingDingMessageUtil.sendTextMessage("【"+jobName+"】任务异常。" + cause.getMessage());
|
||||
DingDingMessageUtil.sendTextMessage("FSH【"+jobName+"】任务异常。" + cause.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<?xml version="1.0"?>
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.fangjia</groupId>
|
||||
<artifactId>fangjia-job</artifactId>
|
||||
<version>1.0</version>
|
||||
</parent>
|
||||
<artifactId>fangjia-job-youfang</artifactId>
|
||||
<name>fangjia-job-youfang</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.fangjia</groupId>
|
||||
<artifactId>fangjia-job-common</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.dangdang</groupId>
|
||||
<artifactId>elastic-job-lite-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.dangdang</groupId>
|
||||
<artifactId>elastic-job-lite-spring</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.cxytiandi</groupId>
|
||||
<artifactId>cxytiandi-jdbc</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<configuration>
|
||||
<executable>true</executable>
|
||||
<mainClass>com.fangjia.job.youfang.YouFangJobApp</mainClass>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.fangjia.job.youfang;
|
||||
|
||||
/**
|
||||
* 有房定时作业启动入口
|
||||
* @author yinjihuan
|
||||
*/
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.annotation.ImportResource;
|
||||
|
||||
@SpringBootApplication
|
||||
@ImportResource(locations = { "classpath:applicationContext*.xml" })
|
||||
public class YouFangJobApp {
|
||||
|
||||
public static void main(String[] args) {
|
||||
new SpringApplicationBuilder().sources(YouFangJobApp.class).web(false).run(args);
|
||||
try {
|
||||
new CountDownLatch(1).await();
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.fangjia.job.youfang.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.mongodb.MongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.SimpleMongoDbFactory;
|
||||
import org.springframework.data.mongodb.core.convert.DefaultMongoTypeMapper;
|
||||
import org.springframework.data.mongodb.core.convert.MappingMongoConverter;
|
||||
import org.springframework.data.mongodb.core.mapping.MongoMappingContext;
|
||||
import com.mongodb.MongoClient;
|
||||
import com.mongodb.MongoClientOptions;
|
||||
import com.mongodb.ServerAddress;
|
||||
|
||||
@Configuration
|
||||
public class SpringMongoConfig {
|
||||
|
||||
public @Bean MongoDbFactory mongoDbFactory() throws Exception {
|
||||
List<ServerAddress> seeds = Arrays.asList(new ServerAddress("mongo.db.fangjia.com", 27017));
|
||||
MongoClientOptions.Builder builder = new MongoClientOptions.Builder();
|
||||
int connPerHost = 10;
|
||||
builder.connectionsPerHost(connPerHost);
|
||||
int threadCount = 10;
|
||||
builder.threadsAllowedToBlockForConnectionMultiplier(threadCount);
|
||||
int maxWaitTime = 10000;
|
||||
builder.maxWaitTime(maxWaitTime);
|
||||
int timeOut = 10000;
|
||||
builder.connectTimeout(timeOut);
|
||||
MongoClientOptions options = builder.build();
|
||||
MongoClient mongoClient = new MongoClient(seeds, options);
|
||||
return new SimpleMongoDbFactory(mongoClient, "fangjia_youfang");
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public @Bean MongoTemplate mongoTemplate() throws Exception {
|
||||
//remove _class
|
||||
MappingMongoConverter converter = new MappingMongoConverter(mongoDbFactory(), new MongoMappingContext());
|
||||
converter.setTypeMapper(new DefaultMongoTypeMapper(null));
|
||||
MongoTemplate mongoTemplate = new MongoTemplate(mongoDbFactory(), converter);
|
||||
return mongoTemplate;
|
||||
}
|
||||
|
||||
}
|
||||
+153
@@ -0,0 +1,153 @@
|
||||
package com.fangjia.job.youfang.document;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
/**
|
||||
* 理财和贷款潜客统计
|
||||
* @author yinjihuan
|
||||
*/
|
||||
@Document(collection="customer_stat")
|
||||
public class CustomerStat {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
@Field(value="eid")
|
||||
private Long eid;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Field(value="uid")
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@Field(value="city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
@Field(value="region")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 房产总数量
|
||||
*/
|
||||
@Field(value="h_count")
|
||||
private Long houseCount;
|
||||
|
||||
/**
|
||||
* 房产总价格(万元)
|
||||
*/
|
||||
@Field(value="h_price")
|
||||
private Double housePrice;
|
||||
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
@Field(value="level")
|
||||
private int level;
|
||||
|
||||
/**
|
||||
* 类型 1理财或者2贷款
|
||||
*/
|
||||
@Field(value="type")
|
||||
private int type;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Field(value="c_date")
|
||||
private Date createDate;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public Long getHouseCount() {
|
||||
return houseCount;
|
||||
}
|
||||
|
||||
public void setHouseCount(Long houseCount) {
|
||||
this.houseCount = houseCount;
|
||||
}
|
||||
|
||||
public Double getHousePrice() {
|
||||
return housePrice;
|
||||
}
|
||||
|
||||
public void setHousePrice(Double housePrice) {
|
||||
this.housePrice = housePrice;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
}
|
||||
+420
@@ -0,0 +1,420 @@
|
||||
package com.fangjia.job.youfang.document;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
/**
|
||||
* 企业相关数据统计
|
||||
* @author yinjihuan
|
||||
*/
|
||||
@Document(collection="enterprise_stat")
|
||||
public class EnterpriseStat {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
@Field(value="eid")
|
||||
private Long eid;
|
||||
|
||||
/**
|
||||
* 用户昨日新增数量
|
||||
*/
|
||||
@Field(value="td_add_u_count")
|
||||
private Long terdayAddUserCount;
|
||||
|
||||
/**
|
||||
* 总用户数
|
||||
*/
|
||||
@Field(value="total_u_count")
|
||||
private Long totalUserCount;
|
||||
|
||||
/**
|
||||
* 昨日登录数
|
||||
*/
|
||||
@Field(value="td_login_count")
|
||||
private Long terdayLoginCount;
|
||||
|
||||
/**
|
||||
* 总登录数
|
||||
*/
|
||||
@Field(value="total_login_count")
|
||||
private Long totalLoginCount;
|
||||
|
||||
/**
|
||||
* 昨日新增贷款评估数量
|
||||
*/
|
||||
@Field(value="td_le_count")
|
||||
private Long terdayLoanEvalCount;
|
||||
|
||||
/**
|
||||
* 总贷款评估数量
|
||||
*/
|
||||
@Field(value="total_le_count")
|
||||
private Long totalLoanEvalCount;
|
||||
|
||||
/**
|
||||
* 昨日新增意向申请数量
|
||||
*/
|
||||
@Field(value="td_it_count")
|
||||
private Long terdayIntentionCount;
|
||||
|
||||
/**
|
||||
* 本月新增意向申请数量
|
||||
*/
|
||||
@Field(value="mt_it_count")
|
||||
private Long monthIntentionCount;
|
||||
|
||||
/**
|
||||
* 昨日意向申请金额(万元)
|
||||
*/
|
||||
@Field(value="td_it_money")
|
||||
private Double terdayIntentionMoney;
|
||||
|
||||
/**
|
||||
* 本月意向申请金额(万元)
|
||||
*/
|
||||
@Field(value="mt_it_money")
|
||||
private Double monthIntentionMoney;
|
||||
|
||||
/**
|
||||
* 本月pv
|
||||
*/
|
||||
@Field(value="mt_pv_count")
|
||||
private Long monthPvCount;
|
||||
|
||||
/**
|
||||
* 上月pv
|
||||
*/
|
||||
@Field(value="tmt_pv_count")
|
||||
private Long topMonthPvCount;
|
||||
|
||||
/**
|
||||
* 本月uv
|
||||
*/
|
||||
@Field(value="mt_uv_count")
|
||||
private Long monthUvCount;
|
||||
|
||||
/**
|
||||
* 上月uv
|
||||
*/
|
||||
@Field(value="tmt_uv_count")
|
||||
private Long topMonthUvCount;
|
||||
|
||||
/**
|
||||
* 本月广告pv
|
||||
*/
|
||||
@Field(value="mt_ad_pv_count")
|
||||
private Long monthAdPvCount;
|
||||
|
||||
/**
|
||||
* 上月广告pv
|
||||
*/
|
||||
@Field(value="tmt_ad_pv_count")
|
||||
private Long topMonthAdPvCount;
|
||||
|
||||
/**
|
||||
* 本月广告uv
|
||||
*/
|
||||
@Field(value="mt_ad_uv_count")
|
||||
private Long monthAdUvCount;
|
||||
|
||||
/**
|
||||
* 上月广告uv
|
||||
*/
|
||||
@Field(value="tmt_ad_uv_count")
|
||||
private Long topMonthAdUvCount;
|
||||
|
||||
/**
|
||||
* 昨日新增房产数量
|
||||
*/
|
||||
@Field(value="td_add_house_count")
|
||||
private Long terdayAddHouseCount;
|
||||
|
||||
/**
|
||||
* 昨日新增房产估值(万元)
|
||||
*/
|
||||
@Field(value="td_add_house_price")
|
||||
private Double terdayAddHousePrice;
|
||||
|
||||
/**
|
||||
* 房产总数
|
||||
*/
|
||||
@Field(value="hosue_count")
|
||||
private Long houseCount;
|
||||
|
||||
/**
|
||||
* 房产总估值(万元)
|
||||
*/
|
||||
@Field(value="house_total_price")
|
||||
private Double houseTotalPrice;
|
||||
|
||||
/**
|
||||
* 人均房产数量
|
||||
*/
|
||||
@Field(value="avg_house_count")
|
||||
private Double avgHouseCount;
|
||||
|
||||
/**
|
||||
* 人均身价(万元)
|
||||
*/
|
||||
@Field(value="avg_worth")
|
||||
private Double avgWorth;
|
||||
|
||||
/**
|
||||
* 房屋状态
|
||||
*/
|
||||
@Field(value="house_status")
|
||||
private HouseStatus houseStatus;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Field(value="m_date")
|
||||
private Date modifyDate;
|
||||
|
||||
/**
|
||||
* 城市房产数量TOP 10 key:上海 value:1000
|
||||
*/
|
||||
@Field(value="city_house_top")
|
||||
private Map<String, Long> cityHouseTop;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public Long getTerdayAddUserCount() {
|
||||
return terdayAddUserCount;
|
||||
}
|
||||
|
||||
public void setTerdayAddUserCount(Long terdayAddUserCount) {
|
||||
this.terdayAddUserCount = terdayAddUserCount;
|
||||
}
|
||||
|
||||
public Long getTotalUserCount() {
|
||||
return totalUserCount;
|
||||
}
|
||||
|
||||
public void setTotalUserCount(Long totalUserCount) {
|
||||
this.totalUserCount = totalUserCount;
|
||||
}
|
||||
|
||||
public Long getTerdayLoginCount() {
|
||||
return terdayLoginCount;
|
||||
}
|
||||
|
||||
public void setTerdayLoginCount(Long terdayLoginCount) {
|
||||
this.terdayLoginCount = terdayLoginCount;
|
||||
}
|
||||
|
||||
public Long getTotalLoginCount() {
|
||||
return totalLoginCount;
|
||||
}
|
||||
|
||||
public void setTotalLoginCount(Long totalLoginCount) {
|
||||
this.totalLoginCount = totalLoginCount;
|
||||
}
|
||||
|
||||
public Long getTerdayLoanEvalCount() {
|
||||
return terdayLoanEvalCount;
|
||||
}
|
||||
|
||||
public void setTerdayLoanEvalCount(Long terdayLoanEvalCount) {
|
||||
this.terdayLoanEvalCount = terdayLoanEvalCount;
|
||||
}
|
||||
|
||||
public Long getTotalLoanEvalCount() {
|
||||
return totalLoanEvalCount;
|
||||
}
|
||||
|
||||
public void setTotalLoanEvalCount(Long totalLoanEvalCount) {
|
||||
this.totalLoanEvalCount = totalLoanEvalCount;
|
||||
}
|
||||
|
||||
public Long getTerdayIntentionCount() {
|
||||
return terdayIntentionCount;
|
||||
}
|
||||
|
||||
public void setTerdayIntentionCount(Long terdayIntentionCount) {
|
||||
this.terdayIntentionCount = terdayIntentionCount;
|
||||
}
|
||||
|
||||
public Long getMonthIntentionCount() {
|
||||
return monthIntentionCount;
|
||||
}
|
||||
|
||||
public void setMonthIntentionCount(Long monthIntentionCount) {
|
||||
this.monthIntentionCount = monthIntentionCount;
|
||||
}
|
||||
|
||||
public Double getTerdayIntentionMoney() {
|
||||
return terdayIntentionMoney;
|
||||
}
|
||||
|
||||
public void setTerdayIntentionMoney(Double terdayIntentionMoney) {
|
||||
this.terdayIntentionMoney = terdayIntentionMoney;
|
||||
}
|
||||
|
||||
public Double getMonthIntentionMoney() {
|
||||
return monthIntentionMoney;
|
||||
}
|
||||
|
||||
public void setMonthIntentionMoney(Double monthIntentionMoney) {
|
||||
this.monthIntentionMoney = monthIntentionMoney;
|
||||
}
|
||||
|
||||
public Long getMonthPvCount() {
|
||||
return monthPvCount;
|
||||
}
|
||||
|
||||
public void setMonthPvCount(Long monthPvCount) {
|
||||
this.monthPvCount = monthPvCount;
|
||||
}
|
||||
|
||||
public Long getTopMonthPvCount() {
|
||||
return topMonthPvCount;
|
||||
}
|
||||
|
||||
public void setTopMonthPvCount(Long topMonthPvCount) {
|
||||
this.topMonthPvCount = topMonthPvCount;
|
||||
}
|
||||
|
||||
public Long getMonthUvCount() {
|
||||
return monthUvCount;
|
||||
}
|
||||
|
||||
public void setMonthUvCount(Long monthUvCount) {
|
||||
this.monthUvCount = monthUvCount;
|
||||
}
|
||||
|
||||
public Long getTopMonthUvCount() {
|
||||
return topMonthUvCount;
|
||||
}
|
||||
|
||||
public void setTopMonthUvCount(Long topMonthUvCount) {
|
||||
this.topMonthUvCount = topMonthUvCount;
|
||||
}
|
||||
|
||||
public Long getMonthAdPvCount() {
|
||||
return monthAdPvCount;
|
||||
}
|
||||
|
||||
public void setMonthAdPvCount(Long monthAdPvCount) {
|
||||
this.monthAdPvCount = monthAdPvCount;
|
||||
}
|
||||
|
||||
public Long getTopMonthAdPvCount() {
|
||||
return topMonthAdPvCount;
|
||||
}
|
||||
|
||||
public void setTopMonthAdPvCount(Long topMonthAdPvCount) {
|
||||
this.topMonthAdPvCount = topMonthAdPvCount;
|
||||
}
|
||||
|
||||
public Long getMonthAdUvCount() {
|
||||
return monthAdUvCount;
|
||||
}
|
||||
|
||||
public void setMonthAdUvCount(Long monthAdUvCount) {
|
||||
this.monthAdUvCount = monthAdUvCount;
|
||||
}
|
||||
|
||||
public Long getTopMonthAdUvCount() {
|
||||
return topMonthAdUvCount;
|
||||
}
|
||||
|
||||
public void setTopMonthAdUvCount(Long topMonthAdUvCount) {
|
||||
this.topMonthAdUvCount = topMonthAdUvCount;
|
||||
}
|
||||
|
||||
public Long getTerdayAddHouseCount() {
|
||||
return terdayAddHouseCount;
|
||||
}
|
||||
|
||||
public void setTerdayAddHouseCount(Long terdayAddHouseCount) {
|
||||
this.terdayAddHouseCount = terdayAddHouseCount;
|
||||
}
|
||||
|
||||
public Double getTerdayAddHousePrice() {
|
||||
return terdayAddHousePrice;
|
||||
}
|
||||
|
||||
public void setTerdayAddHousePrice(Double terdayAddHousePrice) {
|
||||
this.terdayAddHousePrice = terdayAddHousePrice;
|
||||
}
|
||||
|
||||
public Long getHouseCount() {
|
||||
return houseCount;
|
||||
}
|
||||
|
||||
public void setHouseCount(Long houseCount) {
|
||||
this.houseCount = houseCount;
|
||||
}
|
||||
|
||||
public Double getHouseTotalPrice() {
|
||||
return houseTotalPrice;
|
||||
}
|
||||
|
||||
public void setHouseTotalPrice(Double houseTotalPrice) {
|
||||
this.houseTotalPrice = houseTotalPrice;
|
||||
}
|
||||
|
||||
public Double getAvgHouseCount() {
|
||||
return avgHouseCount;
|
||||
}
|
||||
|
||||
public void setAvgHouseCount(Double avgHouseCount) {
|
||||
this.avgHouseCount = avgHouseCount;
|
||||
}
|
||||
|
||||
public Double getAvgWorth() {
|
||||
return avgWorth;
|
||||
}
|
||||
|
||||
public void setAvgWorth(Double avgWorth) {
|
||||
this.avgWorth = avgWorth;
|
||||
}
|
||||
|
||||
public HouseStatus getHouseStatus() {
|
||||
return houseStatus;
|
||||
}
|
||||
|
||||
public void setHouseStatus(HouseStatus houseStatus) {
|
||||
this.houseStatus = houseStatus;
|
||||
}
|
||||
|
||||
public Date getModifyDate() {
|
||||
return modifyDate;
|
||||
}
|
||||
|
||||
public void setModifyDate(Date modifyDate) {
|
||||
this.modifyDate = modifyDate;
|
||||
}
|
||||
|
||||
public Map<String, Long> getCityHouseTop() {
|
||||
return cityHouseTop;
|
||||
}
|
||||
|
||||
public void setCityHouseTop(Map<String, Long> cityHouseTop) {
|
||||
this.cityHouseTop = cityHouseTop;
|
||||
}
|
||||
|
||||
}
|
||||
+66
@@ -0,0 +1,66 @@
|
||||
package com.fangjia.job.youfang.document;
|
||||
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
/**
|
||||
* 房产状态统计,内嵌到企业统计中
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class HouseStatus {
|
||||
/**
|
||||
* 自住
|
||||
*/
|
||||
@Field(value="zz")
|
||||
private Long ziZhu;
|
||||
|
||||
/**
|
||||
* 空置
|
||||
*/
|
||||
@Field(value="kz")
|
||||
private Long kongZhi;
|
||||
|
||||
/**
|
||||
* 出租
|
||||
*/
|
||||
@Field(value="cz")
|
||||
private Long chuZu;
|
||||
|
||||
/**
|
||||
* 我是租客
|
||||
*/
|
||||
@Field(value="wszk")
|
||||
private Long zuKe;
|
||||
|
||||
public Long getZiZhu() {
|
||||
return ziZhu;
|
||||
}
|
||||
|
||||
public void setZiZhu(Long ziZhu) {
|
||||
this.ziZhu = ziZhu;
|
||||
}
|
||||
|
||||
public Long getKongZhi() {
|
||||
return kongZhi;
|
||||
}
|
||||
|
||||
public void setKongZhi(Long kongZhi) {
|
||||
this.kongZhi = kongZhi;
|
||||
}
|
||||
|
||||
public Long getChuZu() {
|
||||
return chuZu;
|
||||
}
|
||||
|
||||
public void setChuZu(Long chuZu) {
|
||||
this.chuZu = chuZu;
|
||||
}
|
||||
|
||||
public Long getZuKe() {
|
||||
return zuKe;
|
||||
}
|
||||
|
||||
public void setZuKe(Long zuKe) {
|
||||
this.zuKe = zuKe;
|
||||
}
|
||||
|
||||
}
|
||||
+118
@@ -0,0 +1,118 @@
|
||||
package com.fangjia.job.youfang.document;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
/**
|
||||
* 页面访问统计
|
||||
* @author yinjihuan
|
||||
*/
|
||||
@Document(collection="page_stat")
|
||||
public class PageStat {
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 企业编号
|
||||
*/
|
||||
@Field(value="eid")
|
||||
private Long eid;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@Field(value="city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 页面地址
|
||||
*/
|
||||
@Field(value="uri")
|
||||
private String uri;
|
||||
|
||||
@Field(value="uv")
|
||||
private Long uv;
|
||||
|
||||
@Field(value="pv")
|
||||
private Long pv;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Field(value="c_date")
|
||||
private Date createDate;
|
||||
|
||||
/**
|
||||
* 格式化的时间,分组用
|
||||
*/
|
||||
@Field(value="f_date")
|
||||
private String formatDate;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public void setUri(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
public Long getUv() {
|
||||
return uv;
|
||||
}
|
||||
|
||||
public void setUv(Long uv) {
|
||||
this.uv = uv;
|
||||
}
|
||||
|
||||
public Long getPv() {
|
||||
return pv;
|
||||
}
|
||||
|
||||
public void setPv(Long pv) {
|
||||
this.pv = pv;
|
||||
}
|
||||
|
||||
public Date getCreateDate() {
|
||||
return createDate;
|
||||
}
|
||||
|
||||
public void setCreateDate(Date createDate) {
|
||||
this.createDate = createDate;
|
||||
}
|
||||
|
||||
public String getFormatDate() {
|
||||
return formatDate;
|
||||
}
|
||||
|
||||
public void setFormatDate(String formatDate) {
|
||||
this.formatDate = formatDate;
|
||||
}
|
||||
}
|
||||
|
||||
+208
@@ -0,0 +1,208 @@
|
||||
package com.fangjia.job.youfang.document;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import org.springframework.data.annotation.Id;
|
||||
import org.springframework.data.mongodb.core.mapping.Document;
|
||||
import org.springframework.data.mongodb.core.mapping.Field;
|
||||
|
||||
/**
|
||||
* 用户相关数据统计
|
||||
* @author yinjihuan
|
||||
*/
|
||||
@Document(collection="user_stat")
|
||||
public class UserStat {
|
||||
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 企业ID
|
||||
*/
|
||||
@Field(value="eid")
|
||||
private Long eid;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
@Field(value="uid")
|
||||
private String uid;
|
||||
|
||||
/**
|
||||
* 用户添加时间
|
||||
*/
|
||||
@Field(value="u_at")
|
||||
private Date userAddTime;
|
||||
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@Field(value="city")
|
||||
private String city;
|
||||
|
||||
/**
|
||||
* 区域
|
||||
*/
|
||||
@Field(value="region")
|
||||
private String region;
|
||||
|
||||
/**
|
||||
* 房产总数量
|
||||
*/
|
||||
@Field(value="h_count")
|
||||
private Long houseCount;
|
||||
|
||||
/**
|
||||
* 房产总价格(万元)
|
||||
*/
|
||||
@Field(value="h_price")
|
||||
private Double housePrice;
|
||||
|
||||
/**
|
||||
* 置换总次数
|
||||
*/
|
||||
@Field(value="s_count")
|
||||
private Long substitutionCount;
|
||||
|
||||
/**
|
||||
* 置换最高价格(买房预算)(万元)
|
||||
*/
|
||||
@Field(value="s_mprice")
|
||||
private Double substitutionMaxPrice;
|
||||
|
||||
/**
|
||||
* 贷款评估总次数
|
||||
*/
|
||||
@Field(value="le_count")
|
||||
private Long loanEvalCount;
|
||||
|
||||
/**
|
||||
* 贷款评估最高价格(万元)
|
||||
*/
|
||||
@Field(value="le_mprice")
|
||||
private Double loanEvalMaxPrice;
|
||||
|
||||
/**
|
||||
* 贷款申请次数
|
||||
*/
|
||||
@Field(value="la_count")
|
||||
private Long loanCount;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@Field(value="m_date")
|
||||
private Date modifyDate;
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Date getUserAddTime() {
|
||||
return userAddTime;
|
||||
}
|
||||
|
||||
public void setUserAddTime(Date userAddTime) {
|
||||
this.userAddTime = userAddTime;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public Long getHouseCount() {
|
||||
return houseCount;
|
||||
}
|
||||
|
||||
public void setHouseCount(Long houseCount) {
|
||||
this.houseCount = houseCount;
|
||||
}
|
||||
|
||||
public Double getHousePrice() {
|
||||
return housePrice;
|
||||
}
|
||||
|
||||
public void setHousePrice(Double housePrice) {
|
||||
this.housePrice = housePrice;
|
||||
}
|
||||
|
||||
public Long getSubstitutionCount() {
|
||||
return substitutionCount;
|
||||
}
|
||||
|
||||
public void setSubstitutionCount(Long substitutionCount) {
|
||||
this.substitutionCount = substitutionCount;
|
||||
}
|
||||
|
||||
public Double getSubstitutionMaxPrice() {
|
||||
return substitutionMaxPrice;
|
||||
}
|
||||
|
||||
public void setSubstitutionMaxPrice(Double substitutionMaxPrice) {
|
||||
this.substitutionMaxPrice = substitutionMaxPrice;
|
||||
}
|
||||
|
||||
public Long getLoanEvalCount() {
|
||||
return loanEvalCount;
|
||||
}
|
||||
|
||||
public void setLoanEvalCount(Long loanEvalCount) {
|
||||
this.loanEvalCount = loanEvalCount;
|
||||
}
|
||||
|
||||
public Double getLoanEvalMaxPrice() {
|
||||
return loanEvalMaxPrice;
|
||||
}
|
||||
|
||||
public void setLoanEvalMaxPrice(Double loanEvalMaxPrice) {
|
||||
this.loanEvalMaxPrice = loanEvalMaxPrice;
|
||||
}
|
||||
|
||||
public Long getLoanCount() {
|
||||
return loanCount;
|
||||
}
|
||||
|
||||
public void setLoanCount(Long loanCount) {
|
||||
this.loanCount = loanCount;
|
||||
}
|
||||
|
||||
public Date getModifyDate() {
|
||||
return modifyDate;
|
||||
}
|
||||
|
||||
public void setModifyDate(Date modifyDate) {
|
||||
this.modifyDate = modifyDate;
|
||||
}
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
package com.fangjia.job.youfang.handler;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import com.dangdang.ddframe.job.executor.handler.JobExceptionHandler;
|
||||
import com.fangjia.job.common.util.DingDingMessageUtil;
|
||||
|
||||
/**
|
||||
* 自定义异常处理,在任务异常时使用钉钉发送通知
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class CustomJobExceptionHandler implements JobExceptionHandler {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(CustomJobExceptionHandler.class);
|
||||
|
||||
@Override
|
||||
public void handleException(String jobName, Throwable cause) {
|
||||
logger.error(String.format("Job '%s' exception occur in job processing", jobName), cause);
|
||||
DingDingMessageUtil.sendTextMessage("YOUFANG【"+jobName+"】任务异常。" + cause.getMessage());
|
||||
}
|
||||
|
||||
}
|
||||
+194
@@ -0,0 +1,194 @@
|
||||
package com.fangjia.job.youfang.job;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.time.DateUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.cxytiandi.jdbc.util.PageBean;
|
||||
import com.dangdang.ddframe.job.api.ShardingContext;
|
||||
import com.dangdang.ddframe.job.api.simple.SimpleJob;
|
||||
import com.fangjia.job.common.util.DateUtilCustom;
|
||||
import com.fangjia.job.common.util.DingDingMessageUtil;
|
||||
import com.fangjia.job.youfang.document.EnterpriseStat;
|
||||
import com.fangjia.job.youfang.document.HouseStatus;
|
||||
import com.fangjia.job.youfang.document.PageStat;
|
||||
import com.fangjia.job.youfang.po.Enterprise;
|
||||
import com.fangjia.job.youfang.service.AdVisitLogService;
|
||||
import com.fangjia.job.youfang.service.EnterpriseProductUserService;
|
||||
import com.fangjia.job.youfang.service.EnterpriseService;
|
||||
import com.fangjia.job.youfang.service.EnterpriseStatService;
|
||||
import com.fangjia.job.youfang.service.HouseInfoService;
|
||||
import com.fangjia.job.youfang.service.LoanApplyService;
|
||||
import com.fangjia.job.youfang.service.PageStatService;
|
||||
import com.fangjia.job.youfang.service.VisitLogService;
|
||||
|
||||
/**
|
||||
* 企业统计任务,每天0点1分开始执行<br>
|
||||
* 主要统计企业相关的数据,统计内容参考 EnterpriseStat
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class EnterpriseStatJob implements SimpleJob {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(EnterpriseStatJob.class);
|
||||
|
||||
@Autowired
|
||||
private EnterpriseService enterpriseService;
|
||||
|
||||
@Autowired
|
||||
private EnterpriseStatService enterpriseStatService;
|
||||
|
||||
@Autowired
|
||||
private EnterpriseProductUserService enterpriseProductUserService;
|
||||
|
||||
@Autowired
|
||||
private VisitLogService visitLogService;
|
||||
|
||||
@Autowired
|
||||
private LoanApplyService loanApplyService;
|
||||
|
||||
@Autowired
|
||||
private AdVisitLogService adVisitLogService;
|
||||
|
||||
@Autowired
|
||||
private HouseInfoService houseInfoService;
|
||||
|
||||
@Autowired
|
||||
private PageStatService pageStatService;
|
||||
|
||||
@Override
|
||||
public void execute(ShardingContext shardingContext) {
|
||||
logger.info("开始执行EnterpriseStatJob");
|
||||
long total = enterpriseService.queryCount();
|
||||
int pages = PageBean.calcPages(total, 1000);
|
||||
for (int i = 1; i <= pages; i++) {
|
||||
List<Enterprise> ens = enterpriseService.queryByPage(i, 1000);
|
||||
for (Enterprise enterprise : ens) {
|
||||
try {
|
||||
processStat(enterprise);
|
||||
} catch (Exception e) {
|
||||
logger.error("企业统计任务异常", e);
|
||||
DingDingMessageUtil.sendTextMessage("企业统计任务异常:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//按天统计某企业访问不同城市不同页面的pv及uv
|
||||
processPageStat();
|
||||
|
||||
logger.info("EnterpriseStatJob执行结束");
|
||||
}
|
||||
|
||||
private void processStat(Enterprise enterprise) {
|
||||
Map<String, String> dateMap = DateUtilCustom.getYesterday();
|
||||
String start = dateMap.get("start");
|
||||
String end = dateMap.get("end");
|
||||
|
||||
Map<String, String> monthMap = DateUtilCustom.getCurrentMonth();
|
||||
String startMonth = monthMap.get("start");
|
||||
String endMonth = monthMap.get("end");
|
||||
|
||||
Map<String, String> topMonthMap = DateUtilCustom.getTopMonth();
|
||||
String topStartMonth = topMonthMap.get("start");
|
||||
String topEndMonth = topMonthMap.get("end");
|
||||
|
||||
Long eid = enterprise.getId();
|
||||
EnterpriseStat stat = enterpriseStatService.getByEid(eid);
|
||||
if (stat == null) {
|
||||
stat = new EnterpriseStat();
|
||||
stat.setEid(eid);
|
||||
}
|
||||
|
||||
stat.setModifyDate(new Date());
|
||||
stat.setTerdayAddUserCount(enterpriseProductUserService.queryAddUserCount(eid, start, end));
|
||||
stat.setTotalUserCount(enterpriseProductUserService.queryUserCount(eid));
|
||||
stat.setTerdayLoginCount(visitLogService.queryPvCount(eid, "/user/smsLogin", start, end));
|
||||
stat.setTotalLoginCount(visitLogService.queryPvCount(eid, "/user/smsLogin"));
|
||||
stat.setTerdayLoanEvalCount(loanApplyService.queryCountByType(eid, 2, start, end));
|
||||
stat.setTotalLoanEvalCount(loanApplyService.queryCountByType(eid, 2));
|
||||
stat.setTerdayIntentionCount(loanApplyService.queryCountByType(eid, 1, start, end));
|
||||
stat.setMonthIntentionCount(loanApplyService.queryCountByType(eid, 1, startMonth, endMonth));
|
||||
stat.setTerdayIntentionMoney(loanApplyService.queryLoanMoney(eid, start, end));
|
||||
stat.setMonthIntentionMoney(loanApplyService.queryLoanMoney(eid, startMonth, endMonth));
|
||||
stat.setMonthPvCount(visitLogService.queryPvCount(eid, startMonth, endMonth));
|
||||
stat.setTopMonthPvCount(visitLogService.queryPvCount(eid, topStartMonth, topEndMonth));
|
||||
stat.setMonthUvCount(visitLogService.queryUvCount(eid, startMonth, endMonth));
|
||||
stat.setTopMonthUvCount(visitLogService.queryUvCount(eid, topStartMonth, topEndMonth));
|
||||
stat.setMonthAdPvCount(adVisitLogService.queryPvCount(eid, startMonth, endMonth));
|
||||
stat.setTopMonthAdPvCount(adVisitLogService.queryPvCount(eid, topStartMonth, topEndMonth));
|
||||
stat.setMonthAdUvCount(adVisitLogService.queryUvCount(eid, startMonth, endMonth));
|
||||
stat.setTopMonthAdUvCount(adVisitLogService.queryUvCount(eid, topStartMonth, topEndMonth));
|
||||
stat.setTerdayAddHouseCount(houseInfoService.queryHouseCount(eid, start, end));
|
||||
stat.setTerdayAddHousePrice(houseInfoService.queryHouseSumMoney(eid, start, end));
|
||||
stat.setHouseCount(houseInfoService.queryHouseAllCount(eid));
|
||||
stat.setHouseTotalPrice(houseInfoService.queryHouseAllSumMoney(eid));
|
||||
stat.setCityHouseTop(houseInfoService.queryHouseCountGroupByCity(eid, 10));
|
||||
|
||||
if (stat.getTotalUserCount() > 0) {
|
||||
double avgHouseCount = stat.getHouseCount() / stat.getTotalUserCount();
|
||||
stat.setAvgHouseCount(avgHouseCount);
|
||||
double avgWorth = stat.getHouseTotalPrice() / stat.getTotalUserCount();
|
||||
stat.setAvgWorth(avgWorth);
|
||||
} else {
|
||||
stat.setAvgHouseCount(0.0);
|
||||
stat.setAvgWorth(0.0);
|
||||
}
|
||||
|
||||
// 居住状态统计
|
||||
HouseStatus houseStatus = new HouseStatus();
|
||||
houseStatus.setChuZu(houseInfoService.queryCountByLiveStatus(eid, "出租"));
|
||||
houseStatus.setKongZhi(houseInfoService.queryCountByLiveStatus(eid, "空置"));
|
||||
houseStatus.setZiZhu(houseInfoService.queryCountByLiveStatus(eid, "自住"));
|
||||
houseStatus.setZuKe(houseInfoService.queryCountByLiveStatus(eid, "我是租客"));
|
||||
stat.setHouseStatus(houseStatus);
|
||||
enterpriseStatService.save(stat);
|
||||
}
|
||||
|
||||
|
||||
private void processPageStat(){
|
||||
|
||||
int startNum = 1;
|
||||
// while(startNum<=10){
|
||||
Date date = DateUtilCustom.add(new Date(), -1*startNum);
|
||||
String fDate = DateUtilCustom.formatByPattern(date, "yyyy-MM-dd");
|
||||
|
||||
//删除老数据
|
||||
pageStatService.deleteByParams(fDate);
|
||||
|
||||
//Map<String, String> dateMap = DateUtilCustom.getYesterday(startNum);
|
||||
Map<String, String> dateMap = DateUtilCustom.getYesterday();
|
||||
String start = dateMap.get("start");
|
||||
String end = dateMap.get("end");
|
||||
|
||||
List<Map<String, Object>> result = visitLogService.queryPvList(start, end);
|
||||
if(result.size() > 0){
|
||||
List<PageStat> list = new ArrayList<PageStat>();
|
||||
for(Map<String, Object> m : result){
|
||||
String city = (String) m.get("city");
|
||||
if(StringUtils.isNotBlank(city)){
|
||||
PageStat stat = new PageStat();
|
||||
stat.setCity((String) m.get("city"));
|
||||
stat.setEid((Long) m.get("eid"));
|
||||
stat.setUri((String) m.get("uri"));
|
||||
stat.setPv((Long) m.get("pv"));
|
||||
stat.setUv((Long) m.get("uv"));
|
||||
stat.setCreateDate(date);
|
||||
stat.setFormatDate(fDate);
|
||||
list.add(stat);
|
||||
}
|
||||
}
|
||||
pageStatService.saveAll(list);
|
||||
}
|
||||
|
||||
//startNum = startNum + 1;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.fangjia.job.youfang.job;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import com.dangdang.ddframe.job.api.ShardingContext;
|
||||
import com.dangdang.ddframe.job.api.simple.SimpleJob;
|
||||
import com.fangjia.job.common.base.Response;
|
||||
import com.fangjia.job.common.util.DingDingMessageUtil;
|
||||
import com.fangjia.job.common.util.JsonUtils;
|
||||
import com.fangjia.job.common.util.RestApiCallUtils;
|
||||
import com.fangjia.job.youfang.remote.FshApiRemoteService;
|
||||
|
||||
/**
|
||||
* 房产租金提醒任务<br>
|
||||
* 每天触发一次,逻辑在服务端
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class HouseRentNoticeJob implements SimpleJob {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(HouseRentNoticeJob.class);
|
||||
|
||||
@Value("${fsh.url}")
|
||||
private String fshApiUrl;
|
||||
|
||||
@Override
|
||||
public void execute(ShardingContext shardingContext) {
|
||||
logger.info("开始执行HouseRentNoticeJob");
|
||||
FshApiRemoteService fshApiRemoteService = RestApiCallUtils.getRestClient(FshApiRemoteService.class, fshApiUrl);
|
||||
for (int i = 0; i < 300; i++) {
|
||||
try {
|
||||
Response response = fshApiRemoteService.sendHouseRentNotice("goojia123456");
|
||||
DingDingMessageUtil.sendTextMessage("房产租金提醒任务发送结果:" + JsonUtils.toJson(response));
|
||||
if (response.getStatus()) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("房产租金提醒任务异常:", e);
|
||||
DingDingMessageUtil.sendTextMessage("房产租金提醒任务异常:" + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(1000 * 60);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
logger.info("HouseRentNoticeJob执行结束");
|
||||
}
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.fangjia.job.youfang.job;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import com.dangdang.ddframe.job.api.ShardingContext;
|
||||
import com.dangdang.ddframe.job.api.simple.SimpleJob;
|
||||
import com.fangjia.job.common.base.Response;
|
||||
import com.fangjia.job.common.util.DingDingMessageUtil;
|
||||
import com.fangjia.job.common.util.JsonUtils;
|
||||
import com.fangjia.job.common.util.RestApiCallUtils;
|
||||
import com.fangjia.job.youfang.remote.FshApiRemoteService;
|
||||
/**
|
||||
* 房产月涨幅通知任务<br>
|
||||
* 每个月1号触发,目前计算逻辑在服务端
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class HouseRoseMonthNoticeJob implements SimpleJob {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(HouseRoseMonthNoticeJob.class);
|
||||
|
||||
@Value("${fsh.url}")
|
||||
private String fshApiUrl;
|
||||
|
||||
@Override
|
||||
public void execute(ShardingContext shardingContext) {
|
||||
logger.info("开始执行HouseRoseMonthNoticeJob");
|
||||
FshApiRemoteService fshApiRemoteService = RestApiCallUtils.getRestClient(FshApiRemoteService.class, fshApiUrl);
|
||||
for (int i = 0; i < 300; i++) {
|
||||
try {
|
||||
Response response = fshApiRemoteService.sendHouseRoseMonthNotice("goojia123456");
|
||||
DingDingMessageUtil.sendTextMessage("房产月涨幅通知任务发送结果:" + JsonUtils.toJson(response));
|
||||
if (response.getStatus()) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("房产月涨幅通知任务异常:", e);
|
||||
DingDingMessageUtil.sendTextMessage("房产月涨幅通知任务异常:" + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(1000 * 60);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
logger.info("HouseRoseMonthNoticeJob执行结束");
|
||||
}
|
||||
|
||||
}
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
package com.fangjia.job.youfang.job;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import com.dangdang.ddframe.job.api.ShardingContext;
|
||||
import com.dangdang.ddframe.job.api.simple.SimpleJob;
|
||||
import com.fangjia.job.common.base.Response;
|
||||
import com.fangjia.job.common.util.DingDingMessageUtil;
|
||||
import com.fangjia.job.common.util.JsonUtils;
|
||||
import com.fangjia.job.common.util.RestApiCallUtils;
|
||||
import com.fangjia.job.youfang.remote.FshApiRemoteService;
|
||||
|
||||
/**
|
||||
* 房产每周一定时估价任务<br>
|
||||
* 逻辑在服务端,同时需要算出周涨幅通知
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class HouseWeekEvalJob implements SimpleJob {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(HouseWeekEvalJob.class);
|
||||
|
||||
@Value("${fsh.url}")
|
||||
private String fshApiUrl;
|
||||
|
||||
@Override
|
||||
public void execute(ShardingContext shardingContext) {
|
||||
logger.info("开始执行HouseWeekEvalJob");
|
||||
FshApiRemoteService fshApiRemoteService = RestApiCallUtils.getRestClient(FshApiRemoteService.class, fshApiUrl);
|
||||
for (int i = 0; i < 300; i++) {
|
||||
try {
|
||||
Response response = fshApiRemoteService.evalAllHousePrice("goojia123456");
|
||||
DingDingMessageUtil.sendTextMessage("房产每周一定时估价任务发送结果:" + JsonUtils.toJson(response));
|
||||
if (response.getStatus()) {
|
||||
break;
|
||||
}
|
||||
} catch (Exception e) {
|
||||
logger.error("房产每周一定时估价任务异常:", e);
|
||||
DingDingMessageUtil.sendTextMessage("房产每周一定时估价任务异常:" + e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
Thread.sleep(1000 * 60);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
}
|
||||
logger.info("HouseWeekEvalJob执行结束");
|
||||
}
|
||||
|
||||
}
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
package com.fangjia.job.youfang.job;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import com.cxytiandi.jdbc.util.PageBean;
|
||||
import com.dangdang.ddframe.job.api.ShardingContext;
|
||||
import com.dangdang.ddframe.job.api.simple.SimpleJob;
|
||||
import com.fangjia.job.common.util.DataUtil;
|
||||
import com.fangjia.job.common.util.DingDingMessageUtil;
|
||||
import com.fangjia.job.youfang.document.UserStat;
|
||||
import com.fangjia.job.youfang.po.EnterpriseProductUser;
|
||||
import com.fangjia.job.youfang.po.FinancialCustomersConfig;
|
||||
import com.fangjia.job.youfang.po.LoanCustomersConfig;
|
||||
import com.fangjia.job.youfang.po.PotentialCustomersFilterConfig;
|
||||
import com.fangjia.job.youfang.service.CustomerStatService;
|
||||
import com.fangjia.job.youfang.service.EnterpriseProductUserService;
|
||||
import com.fangjia.job.youfang.service.FinancialCustomersConfigService;
|
||||
import com.fangjia.job.youfang.service.HouseInfoService;
|
||||
import com.fangjia.job.youfang.service.HouseSubstitutionService;
|
||||
import com.fangjia.job.youfang.service.LoanApplyService;
|
||||
import com.fangjia.job.youfang.service.LoanCustomersConfigService;
|
||||
import com.fangjia.job.youfang.service.PotentialCustomersFilterConfigService;
|
||||
import com.fangjia.job.youfang.service.UserStatService;
|
||||
|
||||
/**
|
||||
* 用户维度统计任务<br>统计出用户的房产,置换,贷款等信息
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class UserStatJob implements SimpleJob {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(UserStatJob.class);
|
||||
|
||||
@Autowired
|
||||
private EnterpriseProductUserService enterpriseProductUserService;
|
||||
|
||||
@Autowired
|
||||
private UserStatService userStatService;
|
||||
|
||||
@Autowired
|
||||
private HouseInfoService houseInfoService;
|
||||
|
||||
@Autowired
|
||||
private HouseSubstitutionService houseSubstitutionService;
|
||||
|
||||
@Autowired
|
||||
private LoanApplyService loanApplyService;
|
||||
|
||||
@Autowired
|
||||
private CustomerStatService customerStatService;
|
||||
|
||||
@Autowired
|
||||
private PotentialCustomersFilterConfigService potentialCustomersFilterConfigService;
|
||||
|
||||
@Autowired
|
||||
private FinancialCustomersConfigService financialCustomersConfigService;
|
||||
|
||||
@Autowired
|
||||
private LoanCustomersConfigService loanCustomersConfigService;
|
||||
|
||||
@Override
|
||||
public void execute(ShardingContext shardingContext) {
|
||||
logger.info("开始执行UserStatJob");
|
||||
// 理财潜客过滤条件
|
||||
PotentialCustomersFilterConfig financiaFilterConfig = potentialCustomersFilterConfigService.get(1);
|
||||
// 贷款潜客过滤条件
|
||||
PotentialCustomersFilterConfig loanFilterConfig = potentialCustomersFilterConfigService.get(2);
|
||||
// 理财潜客分析条件
|
||||
List<FinancialCustomersConfig> financialCustomersList = financialCustomersConfigService.queryAll();
|
||||
// 贷款潜客分析条件
|
||||
List<LoanCustomersConfig> LoanCustomersConfigList = loanCustomersConfigService.queryAll();
|
||||
long total = enterpriseProductUserService.queryCount();
|
||||
int pages = PageBean.calcPages(total, 1000);
|
||||
for (int i = 1; i <= pages; i++) {
|
||||
List<EnterpriseProductUser> users = enterpriseProductUserService.queryByPage(i, 1000);
|
||||
for (EnterpriseProductUser user : users) {
|
||||
try {
|
||||
processStat(user);
|
||||
|
||||
// 理财和贷款潜客统计
|
||||
customerStatService.customerStat(user, financiaFilterConfig, loanFilterConfig, financialCustomersList, LoanCustomersConfigList);
|
||||
} catch (Exception e) {
|
||||
logger.error("用户维度统计任务异常", e);
|
||||
DingDingMessageUtil.sendTextMessage("用户维度统计任务异常:" + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.info("UserStatJob执行结束");
|
||||
}
|
||||
|
||||
private void processStat(EnterpriseProductUser user) {
|
||||
UserStat stat = userStatService.getByUid(user.getEid(), user.getId()+"");
|
||||
Long eid = user.getEid();
|
||||
String uid = user.getId()+"";
|
||||
if (stat == null) {
|
||||
stat = new UserStat();
|
||||
stat.setEid(eid);
|
||||
stat.setUid(uid);
|
||||
stat.setUserAddTime(user.getAddTime());
|
||||
stat.setCity(user.getCity());
|
||||
stat.setRegion(user.getRegion());
|
||||
}
|
||||
stat.setHouseCount(houseInfoService.queryCountByEidAndUid(eid, uid));
|
||||
Double totalPrice = houseInfoService.querySumMoneyByEidAndUid(eid, uid);
|
||||
stat.setHousePrice(totalPrice > 0 ? DataUtil.getDoubleRound(2, totalPrice) : totalPrice);
|
||||
stat.setSubstitutionCount(houseSubstitutionService.queryCount(eid, uid));
|
||||
stat.setSubstitutionMaxPrice(houseSubstitutionService.queryMaxBudget(eid, uid));
|
||||
stat.setLoanEvalCount(loanApplyService.queryUserCountByType(eid, uid, 2));
|
||||
stat.setLoanEvalMaxPrice(loanApplyService.queryMaxEvalMoney(eid, uid));
|
||||
stat.setLoanCount(loanApplyService.queryUserCountByType(eid, uid, 1));
|
||||
stat.setModifyDate(new Date());
|
||||
userStatService.save(stat);
|
||||
}
|
||||
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.fangjia.job.youfang.listener;
|
||||
|
||||
import java.util.Date;
|
||||
import com.cxytiandi.jdbc.util.DateUtils;
|
||||
import com.dangdang.ddframe.job.executor.ShardingContexts;
|
||||
import com.dangdang.ddframe.job.lite.api.listener.ElasticJobListener;
|
||||
import com.fangjia.job.common.util.DingDingMessageUtil;
|
||||
import com.fangjia.job.common.util.JsonUtils;
|
||||
/**
|
||||
* 作业监听器, 执行前后发送钉钉消息进行通知
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public class MessageElasticJobListener implements ElasticJobListener {
|
||||
|
||||
@Override
|
||||
public void beforeJobExecuted(ShardingContexts shardingContexts) {
|
||||
String date = DateUtils.date2Str(new Date());
|
||||
String msg = date + " 【YOUFANG-" + shardingContexts.getJobName() + "】任务开始执行====" + JsonUtils.toJson(shardingContexts);
|
||||
DingDingMessageUtil.sendTextMessage(msg);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void afterJobExecuted(ShardingContexts shardingContexts) {
|
||||
String date = DateUtils.date2Str(new Date());
|
||||
String msg = date + " 【YOUFANG-" + shardingContexts.getJobName() + "】任务执行结束====" + JsonUtils.toJson(shardingContexts);
|
||||
DingDingMessageUtil.sendTextMessage(msg);
|
||||
}
|
||||
|
||||
}
|
||||
+95
@@ -0,0 +1,95 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.cxytiandi.jdbc.Orders;
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "ad_visit_log", author = "yinjihuan", desc = "广告访问日志表")
|
||||
public class AdVisitLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 7721155919354832229L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="eid", desc="企业ID")
|
||||
private Long eid;
|
||||
|
||||
@Field(value="uid", desc="用户ID")
|
||||
private String uid;
|
||||
|
||||
@Field(value="visit_time", desc="访问时间")
|
||||
private Date visitTime;
|
||||
|
||||
@Field(value="url", desc="广告url")
|
||||
private String url;
|
||||
|
||||
@Field(value="adid", desc="广告ID")
|
||||
private Long adid;
|
||||
|
||||
@Field(value="ad_position", desc="广告位(0:房产分析/出租管理-租金回报率, 1:房产分析/出租管理-出租状态, 2:出售分析-增长率收益,3:出售分析-挂牌建议, 4:置换建议-小区详情-顶部描述)")
|
||||
private int adPosition = -1;
|
||||
|
||||
public int getAdPosition() {
|
||||
return adPosition;
|
||||
}
|
||||
|
||||
public void setAdPosition(int adPosition) {
|
||||
this.adPosition = adPosition;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Date getVisitTime() {
|
||||
return visitTime;
|
||||
}
|
||||
|
||||
public void setVisitTime(Date visitTime) {
|
||||
this.visitTime = visitTime;
|
||||
}
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public Long getAdid() {
|
||||
return adid;
|
||||
}
|
||||
|
||||
public void setAdid(Long adid) {
|
||||
this.adid = adid;
|
||||
}
|
||||
|
||||
public static Orders[] id_orders = new Orders[] { new Orders("id", Orders.OrderyType.DESC)};
|
||||
}
|
||||
+273
@@ -0,0 +1,273 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.cxytiandi.jdbc.Orders;
|
||||
import com.cxytiandi.jdbc.Orders.OrderyType;
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "enterprise", author = "yinjihuan", desc = "企业表")
|
||||
public class Enterprise implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 3415389324075143092L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="企业编号")
|
||||
private Long id;
|
||||
|
||||
@Field(value="name", desc="企业名称")
|
||||
private String name;
|
||||
|
||||
@Field(value="address", desc="办公地址")
|
||||
private String address;
|
||||
|
||||
@Field(value="website", desc="企业官网")
|
||||
private String website;
|
||||
|
||||
@Field(value="open_api_token", desc="申请TOKEN的APPKEY")
|
||||
private String openApiToken;
|
||||
|
||||
@Field(value="open_api_uname", desc="申请TOKEN的账号")
|
||||
private String openApiName;
|
||||
|
||||
@Field(value="open_api_pass", desc="申请TOKEN的密码")
|
||||
private String openApiPass;
|
||||
|
||||
@Field(value="enterprise_person", desc="企业负责人")
|
||||
private String enterprisePerson;
|
||||
|
||||
@Field(value="enterprise_person_mobile", desc="联系手机")
|
||||
private String enterprisePersonMobile;
|
||||
|
||||
@Field(value="enterprise_person_telphone", desc="办公座机")
|
||||
private String enterprisePersonTelPhone;
|
||||
|
||||
@Field(value="enterprise_person_email", desc="联系邮箱")
|
||||
private String enterprisePersonEmail;
|
||||
|
||||
@Field(value="product_name", desc="产品名称")
|
||||
private String productName;
|
||||
|
||||
@Field(value="product_type", desc="产品类型")
|
||||
private String productType;
|
||||
|
||||
@Field(value="status", desc="企业状态(0 禁用 1启用)")
|
||||
private int status;
|
||||
|
||||
@Field(value="sales_person", desc="销售负责人")
|
||||
private String salesPerson;
|
||||
|
||||
@Field(value="sales_mobile", desc="销售联系手机")
|
||||
private String salesMobile;
|
||||
|
||||
@Field(value="open_status", desc="开通情况(0试用 1正式)")
|
||||
private int openStatus;
|
||||
|
||||
@Field(value="open_date", desc="开通日期")
|
||||
private Date openDate;
|
||||
|
||||
@Field(value="start_date", desc="有效期开始时间")
|
||||
private Date startDate;
|
||||
|
||||
@Field(value="end_date", desc="有效期结束时间")
|
||||
private Date endDate;
|
||||
|
||||
@Field(value="add_date", desc="添加时间")
|
||||
private Date addDate;
|
||||
|
||||
@Field(value="modify_date", desc="修改时间")
|
||||
private Date modifyDate;
|
||||
|
||||
@Field(value="remarks", desc="备注")
|
||||
private String remarks;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getOpenApiToken() {
|
||||
return openApiToken;
|
||||
}
|
||||
|
||||
public void setOpenApiToken(String openApiToken) {
|
||||
this.openApiToken = openApiToken;
|
||||
}
|
||||
|
||||
public String getEnterprisePerson() {
|
||||
return enterprisePerson;
|
||||
}
|
||||
|
||||
public void setEnterprisePerson(String enterprisePerson) {
|
||||
this.enterprisePerson = enterprisePerson;
|
||||
}
|
||||
|
||||
public String getEnterprisePersonMobile() {
|
||||
return enterprisePersonMobile;
|
||||
}
|
||||
|
||||
public void setEnterprisePersonMobile(String enterprisePersonMobile) {
|
||||
this.enterprisePersonMobile = enterprisePersonMobile;
|
||||
}
|
||||
|
||||
public String getEnterprisePersonTelPhone() {
|
||||
return enterprisePersonTelPhone;
|
||||
}
|
||||
|
||||
public void setEnterprisePersonTelPhone(String enterprisePersonTelPhone) {
|
||||
this.enterprisePersonTelPhone = enterprisePersonTelPhone;
|
||||
}
|
||||
|
||||
public String getEnterprisePersonEmail() {
|
||||
return enterprisePersonEmail;
|
||||
}
|
||||
|
||||
public void setEnterprisePersonEmail(String enterprisePersonEmail) {
|
||||
this.enterprisePersonEmail = enterprisePersonEmail;
|
||||
}
|
||||
|
||||
public String getProductName() {
|
||||
return productName;
|
||||
}
|
||||
|
||||
public void setProductName(String productName) {
|
||||
this.productName = productName;
|
||||
}
|
||||
|
||||
public String getProductType() {
|
||||
return productType;
|
||||
}
|
||||
|
||||
public void setProductType(String productType) {
|
||||
this.productType = productType;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getSalesPerson() {
|
||||
return salesPerson;
|
||||
}
|
||||
|
||||
public void setSalesPerson(String salesPerson) {
|
||||
this.salesPerson = salesPerson;
|
||||
}
|
||||
|
||||
public String getSalesMobile() {
|
||||
return salesMobile;
|
||||
}
|
||||
|
||||
public void setSalesMobile(String salesMobile) {
|
||||
this.salesMobile = salesMobile;
|
||||
}
|
||||
|
||||
public int getOpenStatus() {
|
||||
return openStatus;
|
||||
}
|
||||
|
||||
public void setOpenStatus(int openStatus) {
|
||||
this.openStatus = openStatus;
|
||||
}
|
||||
|
||||
public Date getOpenDate() {
|
||||
return openDate;
|
||||
}
|
||||
|
||||
public void setOpenDate(Date openDate) {
|
||||
this.openDate = openDate;
|
||||
}
|
||||
|
||||
public Date getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(Date startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public Date getEndDate() {
|
||||
return endDate;
|
||||
}
|
||||
|
||||
public void setEndDate(Date endDate) {
|
||||
this.endDate = endDate;
|
||||
}
|
||||
|
||||
public Date getAddDate() {
|
||||
return addDate;
|
||||
}
|
||||
|
||||
public void setAddDate(Date addDate) {
|
||||
this.addDate = addDate;
|
||||
}
|
||||
|
||||
public Date getModifyDate() {
|
||||
return modifyDate;
|
||||
}
|
||||
|
||||
public void setModifyDate(Date modifyDate) {
|
||||
this.modifyDate = modifyDate;
|
||||
}
|
||||
|
||||
public String getRemarks() {
|
||||
return remarks;
|
||||
}
|
||||
|
||||
public void setRemarks(String remarks) {
|
||||
this.remarks = remarks;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getWebsite() {
|
||||
return website;
|
||||
}
|
||||
|
||||
public void setWebsite(String website) {
|
||||
this.website = website;
|
||||
}
|
||||
|
||||
public String getOpenApiName() {
|
||||
return openApiName;
|
||||
}
|
||||
|
||||
public void setOpenApiName(String openApiName) {
|
||||
this.openApiName = openApiName;
|
||||
}
|
||||
|
||||
public String getOpenApiPass() {
|
||||
return openApiPass;
|
||||
}
|
||||
|
||||
public void setOpenApiPass(String openApiPass) {
|
||||
this.openApiPass = openApiPass;
|
||||
}
|
||||
|
||||
|
||||
public static Orders[] id_orders = new Orders[] { new Orders("id", OrderyType.DESC)};
|
||||
}
|
||||
+182
@@ -0,0 +1,182 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
|
||||
@TableName(value = "enterprise_product_user", author = "yinjihuan", desc = "企业产品中的用户表")
|
||||
public class EnterpriseProductUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5813079687876757814L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="eid", desc="企业ID")
|
||||
private Long eid;
|
||||
|
||||
@Field(value="add_time", desc="注册时间")
|
||||
private Date addTime;
|
||||
|
||||
@Field(value="province", desc="省份")
|
||||
private String province;
|
||||
|
||||
@Field(value="city", desc="城市")
|
||||
private String city;
|
||||
|
||||
@Field(value="region", desc="区域")
|
||||
private String region;
|
||||
|
||||
@Field(value="name", desc="姓名")
|
||||
private String name;
|
||||
|
||||
@Field(value="mobile", desc="手机")
|
||||
private String mobile;
|
||||
|
||||
@Field(value="wechat", desc="微信账号 openid,只在特定应用内唯一")
|
||||
private String wechat;
|
||||
|
||||
@Field(value="unionid", desc="微信unionid,微信平台下全局唯一标识用户")
|
||||
private String unionid;
|
||||
|
||||
@Field(value="wechat_nickname", desc="微信昵称")
|
||||
private String wechatNickname;
|
||||
|
||||
@Field(value="head_img", desc="微信头像")
|
||||
private String headImg;
|
||||
|
||||
@Field(value="pass", desc="密码")
|
||||
private String pass;
|
||||
|
||||
@Field(value="push_client_id", desc="个推的客户端ID,标识每个用户")
|
||||
private String pushClientId;
|
||||
|
||||
@Field(value="device_id", desc="手机设备ID")
|
||||
private String deviceId;
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public Date getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(Date addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getProvince() {
|
||||
return province;
|
||||
}
|
||||
|
||||
public void setProvince(String province) {
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public void setMobile(String mobile) {
|
||||
this.mobile = mobile;
|
||||
}
|
||||
|
||||
public String getWechat() {
|
||||
return wechat;
|
||||
}
|
||||
|
||||
public void setWechat(String wechat) {
|
||||
this.wechat = wechat;
|
||||
}
|
||||
|
||||
public String getPass() {
|
||||
return pass;
|
||||
}
|
||||
|
||||
public void setPass(String pass) {
|
||||
this.pass = pass;
|
||||
}
|
||||
|
||||
public String getPushClientId() {
|
||||
return pushClientId;
|
||||
}
|
||||
|
||||
public void setPushClientId(String pushClientId) {
|
||||
this.pushClientId = pushClientId;
|
||||
}
|
||||
|
||||
public String getUnionid() {
|
||||
return unionid;
|
||||
}
|
||||
|
||||
public void setUnionid(String unionid) {
|
||||
this.unionid = unionid;
|
||||
}
|
||||
|
||||
public String getWechatNickname() {
|
||||
return wechatNickname;
|
||||
}
|
||||
|
||||
public void setWechatNickname(String wechatNickname) {
|
||||
this.wechatNickname = wechatNickname;
|
||||
}
|
||||
|
||||
public String getHeadImg() {
|
||||
return headImg;
|
||||
}
|
||||
|
||||
public void setHeadImg(String headImg) {
|
||||
this.headImg = headImg;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
}
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "financial_customers_config", author = "yinjihuan", desc = "理财潜在客户设置表")
|
||||
public class FinancialCustomersConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -1463438428120590218L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="star_level", desc="星级(1就代表1星)")
|
||||
private int starLevel;
|
||||
|
||||
@Field(value="analy_time", desc="分析时间(近N天)")
|
||||
private int analyTime;
|
||||
|
||||
@Field(value="ad_click_rate", desc="理财广告点击率(大于%之多少)")
|
||||
private double adClickRate;
|
||||
|
||||
@Field(value="house_count_rank", desc="房产数量排名(大于N套)")
|
||||
private int houseCountRank;
|
||||
|
||||
@Field(value="house_price_rank", desc="房产价值排名(大于%之多少)")
|
||||
private double housePriceRank;
|
||||
|
||||
@Field(value="house_analy_pv", desc="房产分析PV(大于多少)")
|
||||
private int houseAnalyPv;
|
||||
|
||||
@Field(value="sale_analy_pv", desc="出售分析PV(大于多少)")
|
||||
private int saleAnalyPv;
|
||||
|
||||
@Field(value="rent_manager_pv", desc="出租管理PV(大于多少)")
|
||||
private int rentManagerPv;
|
||||
|
||||
@Field(value="modify_time", desc="修改时间")
|
||||
private Date modifyTime;
|
||||
|
||||
@Field(value="modify_user", desc="修改用户ID")
|
||||
private Long modifyUser;
|
||||
|
||||
@Field(value="house_level", desc="房产评级(1:豪宅级、2:公寓级、3:平房级、4:草屋级、5:山洞级)")
|
||||
private int houseLevel;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getStarLevel() {
|
||||
return starLevel;
|
||||
}
|
||||
|
||||
public void setStarLevel(int starLevel) {
|
||||
this.starLevel = starLevel;
|
||||
}
|
||||
|
||||
public int getAnalyTime() {
|
||||
return analyTime;
|
||||
}
|
||||
|
||||
public void setAnalyTime(int analyTime) {
|
||||
this.analyTime = analyTime;
|
||||
}
|
||||
|
||||
public double getAdClickRate() {
|
||||
return adClickRate;
|
||||
}
|
||||
|
||||
public void setAdClickRate(double adClickRate) {
|
||||
this.adClickRate = adClickRate;
|
||||
}
|
||||
|
||||
public int getHouseCountRank() {
|
||||
return houseCountRank;
|
||||
}
|
||||
|
||||
public void setHouseCountRank(int houseCountRank) {
|
||||
this.houseCountRank = houseCountRank;
|
||||
}
|
||||
|
||||
public double getHousePriceRank() {
|
||||
return housePriceRank;
|
||||
}
|
||||
|
||||
public void setHousePriceRank(double housePriceRank) {
|
||||
this.housePriceRank = housePriceRank;
|
||||
}
|
||||
|
||||
public int getHouseAnalyPv() {
|
||||
return houseAnalyPv;
|
||||
}
|
||||
|
||||
public void setHouseAnalyPv(int houseAnalyPv) {
|
||||
this.houseAnalyPv = houseAnalyPv;
|
||||
}
|
||||
|
||||
public int getSaleAnalyPv() {
|
||||
return saleAnalyPv;
|
||||
}
|
||||
|
||||
public void setSaleAnalyPv(int saleAnalyPv) {
|
||||
this.saleAnalyPv = saleAnalyPv;
|
||||
}
|
||||
|
||||
public int getRentManagerPv() {
|
||||
return rentManagerPv;
|
||||
}
|
||||
|
||||
public void setRentManagerPv(int rentManagerPv) {
|
||||
this.rentManagerPv = rentManagerPv;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public Long getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(Long modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
public int getHouseLevel() {
|
||||
return houseLevel;
|
||||
}
|
||||
|
||||
public void setHouseLevel(int houseLevel) {
|
||||
this.houseLevel = houseLevel;
|
||||
}
|
||||
|
||||
}
|
||||
+537
@@ -0,0 +1,537 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.cxytiandi.jdbc.Orders;
|
||||
import com.cxytiandi.jdbc.Orders.OrderyType;
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "house_info", author = "yinjihuan", desc = "我的房产信息表")
|
||||
public class HouseInfo implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 9044745992169573318L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="city", desc="城市")
|
||||
private String city = "";
|
||||
|
||||
@Field(value="region", desc="区域")
|
||||
private String region = "";
|
||||
|
||||
@Field(value="name", desc="小区")
|
||||
private String name = "";
|
||||
|
||||
@Field(value="address", desc="地址")
|
||||
private String address = "";
|
||||
|
||||
@Field(value="lng", desc="经度")
|
||||
private double lng = 0;
|
||||
|
||||
@Field(value="lat", desc="纬度")
|
||||
private double lat = 0;
|
||||
|
||||
@Field(value="estate_type", desc="物业类型")
|
||||
private String estatetype = "";
|
||||
|
||||
@Field(value="house_num", desc="楼栋")
|
||||
private String houseNum = "";
|
||||
|
||||
@Field(value="room_num", desc="室号")
|
||||
private String roomNum = "";
|
||||
|
||||
@Field(value="floor", desc="当前楼层")
|
||||
private int floor = 0;
|
||||
|
||||
@Field(value="height", desc="总共层数")
|
||||
private int height = 0;
|
||||
|
||||
@Field(value="area", desc="面积")
|
||||
private double area = 0;
|
||||
|
||||
@Field(value="room_count", desc="几室")
|
||||
private int roomCount = 0;
|
||||
|
||||
@Field(value="hall_count", desc="几厅")
|
||||
private int hallCount = 0;
|
||||
|
||||
@Field(value="rent", desc="租金,单位元")
|
||||
private int rent = 0;
|
||||
|
||||
@Field(value="purchase_date", desc="购入时间")
|
||||
private Date purchaseDate;
|
||||
|
||||
@Field(value="purchase_price", desc="购入价格,单位元")
|
||||
private int purchasePrice = 0;
|
||||
|
||||
@Field(value="price", desc="评估单价,单位元")
|
||||
private int price = 0;
|
||||
|
||||
@Field(value="total_price", desc="评估总价,单位元")
|
||||
private int totalPrice = 0;
|
||||
|
||||
@Field(value="eval_date", desc="评估时间")
|
||||
private Date evalDate = new Date();
|
||||
|
||||
@Field(value="add_date", desc="添加时间")
|
||||
private Date addDate = new Date();
|
||||
|
||||
@Field(value="live_status", desc="居住状态(自住,我是租客,出租,空置)")
|
||||
private String liveStatus = "自住";
|
||||
|
||||
@Field(value="remove_status", desc="是否删除 0正常 1删除")
|
||||
private int removeStatus = 0;
|
||||
|
||||
@Field(value="uid", desc="用户ID")
|
||||
private String uid = "";
|
||||
|
||||
@Field(value="eid", desc="企业ID")
|
||||
private Long eid = 0L;
|
||||
|
||||
@Field(value="level", desc="HouseLevelEnum:房产等级(1:豪宅级、2:公寓级、3:平房级、4:草屋级、5:山洞级)")
|
||||
private int level = 100;
|
||||
|
||||
@Field(value="growth_rate", desc="复合增长率")
|
||||
private double growthRate = 0;
|
||||
|
||||
@Field(value="appreciation", desc="房屋已升值")
|
||||
private int appreciation = 0;
|
||||
|
||||
@Field(value="rose_ranking", desc="均价排名涨幅")
|
||||
private double roseRanking = 0;
|
||||
|
||||
@Field(value="avgprice_ranking", desc="均价排名均价")
|
||||
private double avgpriceRanking = 0;
|
||||
|
||||
@Field(value="rental_ratio", desc="租售比(1:650)")
|
||||
private String rentalRatio = "";
|
||||
|
||||
@Field(value="max_loan_money", desc="最高可贷,单位万元")
|
||||
private double maxloanMoney = 0;
|
||||
|
||||
@Field(value="tag", desc="小区标签,下环线分割")
|
||||
private String tag = "";
|
||||
|
||||
@Field(value="liquidity_rating", desc="流动性评级(0:0-26很差, 1:26-38较差, 2:38-70良好 3:70-100很好)")
|
||||
private int liquidityRating = 0;
|
||||
|
||||
@Field(value="one_year_total_price", desc="1年前的总价")
|
||||
private int oneYearTotalPrice = 0;
|
||||
|
||||
@Field(value="house_room_num", desc="楼栋室号联合字段")
|
||||
private String houseRoomNum;
|
||||
|
||||
@Field(value = "lease_start_date", desc = "起租日期")
|
||||
private Date leaseStartDate;
|
||||
|
||||
@Field(value = "lease_end_date", desc = "到期日期")
|
||||
private Date leaseEndDate;
|
||||
|
||||
@Field(value = "rent_cycle", desc = "收租周期")
|
||||
private Integer rentCycle;
|
||||
|
||||
@Field(value = "rent_cycle_unit", desc = "收租周期单位(年,季,月)")
|
||||
private String rentCycleUnit;
|
||||
|
||||
@Field(value = "last_rent_date", desc = "下次收租日期")
|
||||
private Date lastRentDate;
|
||||
|
||||
|
||||
@Field(value = "min_sell_price", desc = "城市相对最低均价")
|
||||
private int minSellPrice = 0;
|
||||
|
||||
@Field(value = "max_sell_price", desc = "城市相对最高均价")
|
||||
private int maxSellPrice = 0;
|
||||
|
||||
@Field(value="total_score", desc="流动性评级得分")
|
||||
private double totalScore = 0;
|
||||
|
||||
@Field(value="min_advice_value", desc="挂牌建议总价下限")
|
||||
private double minAdviceValue = 0;
|
||||
|
||||
@Field(value="max_advice_value", desc="挂牌建议总价上限")
|
||||
private double maxAdviceValue = 0;
|
||||
|
||||
public Date getAddDate() {
|
||||
return addDate;
|
||||
}
|
||||
|
||||
public void setAddDate(Date addDate) {
|
||||
this.addDate = addDate;
|
||||
}
|
||||
|
||||
public double getMinAdviceValue() {
|
||||
return minAdviceValue;
|
||||
}
|
||||
|
||||
public void setMinAdviceValue(double minAdviceValue) {
|
||||
this.minAdviceValue = minAdviceValue;
|
||||
}
|
||||
|
||||
public double getMaxAdviceValue() {
|
||||
return maxAdviceValue;
|
||||
}
|
||||
|
||||
public void setMaxAdviceValue(double maxAdviceValue) {
|
||||
this.maxAdviceValue = maxAdviceValue;
|
||||
}
|
||||
|
||||
public double getTotalScore() {
|
||||
return totalScore;
|
||||
}
|
||||
|
||||
public void setTotalScore(double totalScore) {
|
||||
this.totalScore = totalScore;
|
||||
}
|
||||
|
||||
public int getMinSellPrice() {
|
||||
return minSellPrice;
|
||||
}
|
||||
|
||||
public void setMinSellPrice(int minSellPrice) {
|
||||
this.minSellPrice = minSellPrice;
|
||||
}
|
||||
|
||||
public int getMaxSellPrice() {
|
||||
return maxSellPrice;
|
||||
}
|
||||
|
||||
public void setMaxSellPrice(int maxSellPrice) {
|
||||
this.maxSellPrice = maxSellPrice;
|
||||
}
|
||||
|
||||
public String getHouseRoomNum() {
|
||||
return houseRoomNum;
|
||||
}
|
||||
|
||||
public void setHouseRoomNum(String houseRoomNum) {
|
||||
this.houseRoomNum = houseRoomNum;
|
||||
}
|
||||
|
||||
public int getOneYearTotalPrice() {
|
||||
return oneYearTotalPrice;
|
||||
}
|
||||
|
||||
public void setOneYearTotalPrice(int oneYearTotalPrice) {
|
||||
this.oneYearTotalPrice = oneYearTotalPrice;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public double getLng() {
|
||||
return lng;
|
||||
}
|
||||
|
||||
public void setLng(double lng) {
|
||||
this.lng = lng;
|
||||
}
|
||||
|
||||
public double getLat() {
|
||||
return lat;
|
||||
}
|
||||
|
||||
public void setLat(double lat) {
|
||||
this.lat = lat;
|
||||
}
|
||||
|
||||
public String getEstatetype() {
|
||||
return estatetype;
|
||||
}
|
||||
|
||||
public void setEstatetype(String estatetype) {
|
||||
this.estatetype = estatetype;
|
||||
}
|
||||
|
||||
public String getHouseNum() {
|
||||
return houseNum;
|
||||
}
|
||||
|
||||
public void setHouseNum(String houseNum) {
|
||||
this.houseNum = houseNum;
|
||||
}
|
||||
|
||||
public String getRoomNum() {
|
||||
return roomNum;
|
||||
}
|
||||
|
||||
public void setRoomNum(String roomNum) {
|
||||
this.roomNum = roomNum;
|
||||
}
|
||||
|
||||
public int getFloor() {
|
||||
return floor;
|
||||
}
|
||||
|
||||
public void setFloor(int floor) {
|
||||
this.floor = floor;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(int height) {
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public double getArea() {
|
||||
return area;
|
||||
}
|
||||
|
||||
public void setArea(double area) {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public int getRoomCount() {
|
||||
return roomCount;
|
||||
}
|
||||
|
||||
public void setRoomCount(int roomCount) {
|
||||
this.roomCount = roomCount;
|
||||
}
|
||||
|
||||
public int getHallCount() {
|
||||
return hallCount;
|
||||
}
|
||||
|
||||
public void setHallCount(int hallCount) {
|
||||
this.hallCount = hallCount;
|
||||
}
|
||||
|
||||
public int getRent() {
|
||||
return rent;
|
||||
}
|
||||
|
||||
public void setRent(int rent) {
|
||||
this.rent = rent;
|
||||
}
|
||||
|
||||
public Date getPurchaseDate() {
|
||||
return purchaseDate;
|
||||
}
|
||||
|
||||
public void setPurchaseDate(Date purchaseDate) {
|
||||
this.purchaseDate = purchaseDate;
|
||||
}
|
||||
|
||||
public int getPurchasePrice() {
|
||||
return purchasePrice;
|
||||
}
|
||||
|
||||
public void setPurchasePrice(int purchasePrice) {
|
||||
this.purchasePrice = purchasePrice;
|
||||
}
|
||||
|
||||
public int getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(int price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public int getTotalPrice() {
|
||||
return totalPrice;
|
||||
}
|
||||
|
||||
public void setTotalPrice(int totalPrice) {
|
||||
this.totalPrice = totalPrice;
|
||||
}
|
||||
|
||||
public Date getEvalDate() {
|
||||
return evalDate;
|
||||
}
|
||||
|
||||
public void setEvalDate(Date evalDate) {
|
||||
this.evalDate = evalDate;
|
||||
}
|
||||
|
||||
public String getLiveStatus() {
|
||||
return liveStatus;
|
||||
}
|
||||
|
||||
public void setLiveStatus(String liveStatus) {
|
||||
this.liveStatus = liveStatus;
|
||||
}
|
||||
|
||||
public int getRemoveStatus() {
|
||||
return removeStatus;
|
||||
}
|
||||
|
||||
public void setRemoveStatus(int removeStatus) {
|
||||
this.removeStatus = removeStatus;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public double getGrowthRate() {
|
||||
return growthRate;
|
||||
}
|
||||
|
||||
public void setGrowthRate(double growthRate) {
|
||||
this.growthRate = growthRate;
|
||||
}
|
||||
|
||||
public int getAppreciation() {
|
||||
return appreciation;
|
||||
}
|
||||
|
||||
public void setAppreciation(int appreciation) {
|
||||
this.appreciation = appreciation;
|
||||
}
|
||||
|
||||
public double getRoseRanking() {
|
||||
return roseRanking;
|
||||
}
|
||||
|
||||
public void setRoseRanking(double roseRanking) {
|
||||
this.roseRanking = roseRanking;
|
||||
}
|
||||
|
||||
public double getAvgpriceRanking() {
|
||||
return avgpriceRanking;
|
||||
}
|
||||
|
||||
public void setAvgpriceRanking(double avgpriceRanking) {
|
||||
this.avgpriceRanking = avgpriceRanking;
|
||||
}
|
||||
|
||||
public String getRentalRatio() {
|
||||
return rentalRatio;
|
||||
}
|
||||
|
||||
public void setRentalRatio(String rentalRatio) {
|
||||
this.rentalRatio = rentalRatio;
|
||||
}
|
||||
|
||||
public double getMaxloanMoney() {
|
||||
return maxloanMoney;
|
||||
}
|
||||
|
||||
public void setMaxloanMoney(double maxloanMoney) {
|
||||
this.maxloanMoney = maxloanMoney;
|
||||
}
|
||||
|
||||
public String getTag() {
|
||||
return tag;
|
||||
}
|
||||
|
||||
public void setTag(String tag) {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
public int getLiquidityRating() {
|
||||
return liquidityRating;
|
||||
}
|
||||
|
||||
public void setLiquidityRating(int liquidityRating) {
|
||||
this.liquidityRating = liquidityRating;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public static Orders[] level_orders = new Orders[] { new Orders("level", OrderyType.ASC)};
|
||||
|
||||
public Date getLeaseStartDate() {
|
||||
return leaseStartDate;
|
||||
}
|
||||
|
||||
public void setLeaseStartDate(Date leaseStartDate) {
|
||||
this.leaseStartDate = leaseStartDate;
|
||||
}
|
||||
|
||||
public Date getLeaseEndDate() {
|
||||
return leaseEndDate;
|
||||
}
|
||||
|
||||
public void setLeaseEndDate(Date leaseEndDate) {
|
||||
this.leaseEndDate = leaseEndDate;
|
||||
}
|
||||
|
||||
public Integer getRentCycle() {
|
||||
return rentCycle;
|
||||
}
|
||||
|
||||
public void setRentCycle(Integer rentCycle) {
|
||||
this.rentCycle = rentCycle;
|
||||
}
|
||||
|
||||
public String getRentCycleUnit() {
|
||||
return rentCycleUnit;
|
||||
}
|
||||
|
||||
public void setRentCycleUnit(String rentCycleUnit) {
|
||||
this.rentCycleUnit = rentCycleUnit;
|
||||
}
|
||||
|
||||
public Date getLastRentDate() {
|
||||
return lastRentDate;
|
||||
}
|
||||
|
||||
public void setLastRentDate(Date lastRentDate) {
|
||||
this.lastRentDate = lastRentDate;
|
||||
}
|
||||
}
|
||||
+214
@@ -0,0 +1,214 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "house_substitution", author = "yinjihuan", desc = "房产置换信息表")
|
||||
public class HouseSubstitution implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -5535708206578110561L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="house_id", desc="置换房产ID,house_info中的主键")
|
||||
private Long houseId;
|
||||
|
||||
@Field(value="substitution_type", desc="置换方式(0先买后卖, 1先卖后买)")
|
||||
private int substitutionType;
|
||||
|
||||
@Field(value="cur_money", desc="当前资金,单位万元")
|
||||
private double curMoney;
|
||||
|
||||
@Field(value="budget", desc="买房预算,单位万元")
|
||||
private double budget;
|
||||
|
||||
@Field(value="shoufu", desc="首付比例,数字存储,30就代表30%")
|
||||
private int shoufu;
|
||||
|
||||
@Field(value="intention_district", desc="意向小区")
|
||||
private String intentionDistrict;
|
||||
|
||||
@Field(value="reason", desc="置换原因")
|
||||
private String reason;
|
||||
|
||||
@Field(value="intention_area", desc="意向面积(0:50平以下,1:50-70,2:70-90,3:90-110,4:110-150,5:150-200,6:200-300,7:300以上)")
|
||||
private int intentionArea;
|
||||
|
||||
@Field(value="intention_city", desc="意向城市")
|
||||
private String intentionCity;
|
||||
|
||||
@Field(value="intention_region", desc="意向区域")
|
||||
private String intentionRegion;
|
||||
|
||||
@Field(value="intention_tags", desc="意向小区标签")
|
||||
private String intentionTags;
|
||||
|
||||
@Field(value="uid", desc="用户ID")
|
||||
private String uid;
|
||||
|
||||
@Field(value="eid", desc="企业ID")
|
||||
private String eid;
|
||||
|
||||
@Field(value="add_time", desc="添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@Field(value="match_count", desc="匹配结果总数")
|
||||
private int matchCount;
|
||||
|
||||
@Field(value="dis_click_count", desc="结果小区点击次数")
|
||||
private int disClickCount;
|
||||
|
||||
|
||||
@Field(value="tax_rate", desc="税费占比,数字存储,30就代表30%")
|
||||
private int taxRate;
|
||||
|
||||
public int getDisClickCount() {
|
||||
return disClickCount;
|
||||
}
|
||||
|
||||
public void setDisClickCount(int disClickCount) {
|
||||
this.disClickCount = disClickCount;
|
||||
}
|
||||
|
||||
public int getMatchCount() {
|
||||
return matchCount;
|
||||
}
|
||||
|
||||
public void setMatchCount(int matchCount) {
|
||||
this.matchCount = matchCount;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getHouseId() {
|
||||
return houseId;
|
||||
}
|
||||
|
||||
public void setHouseId(Long houseId) {
|
||||
this.houseId = houseId;
|
||||
}
|
||||
|
||||
public int getSubstitutionType() {
|
||||
return substitutionType;
|
||||
}
|
||||
|
||||
public void setSubstitutionType(int substitutionType) {
|
||||
this.substitutionType = substitutionType;
|
||||
}
|
||||
|
||||
public double getCurMoney() {
|
||||
return curMoney;
|
||||
}
|
||||
|
||||
public void setCurMoney(double curMoney) {
|
||||
this.curMoney = curMoney;
|
||||
}
|
||||
|
||||
public double getBudget() {
|
||||
return budget;
|
||||
}
|
||||
|
||||
public void setBudget(double budget) {
|
||||
this.budget = budget;
|
||||
}
|
||||
|
||||
public int getShoufu() {
|
||||
return shoufu;
|
||||
}
|
||||
|
||||
public void setShoufu(int shoufu) {
|
||||
this.shoufu = shoufu;
|
||||
}
|
||||
|
||||
public String getIntentionDistrict() {
|
||||
return intentionDistrict;
|
||||
}
|
||||
|
||||
public void setIntentionDistrict(String intentionDistrict) {
|
||||
this.intentionDistrict = intentionDistrict;
|
||||
}
|
||||
|
||||
public String getReason() {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public void setReason(String reason) {
|
||||
this.reason = reason;
|
||||
}
|
||||
|
||||
public int getIntentionArea() {
|
||||
return intentionArea;
|
||||
}
|
||||
|
||||
public void setIntentionArea(int intentionArea) {
|
||||
this.intentionArea = intentionArea;
|
||||
}
|
||||
|
||||
public String getIntentionCity() {
|
||||
return intentionCity;
|
||||
}
|
||||
|
||||
public void setIntentionCity(String intentionCity) {
|
||||
this.intentionCity = intentionCity;
|
||||
}
|
||||
|
||||
public String getIntentionRegion() {
|
||||
return intentionRegion;
|
||||
}
|
||||
|
||||
public void setIntentionRegion(String intentionRegion) {
|
||||
this.intentionRegion = intentionRegion;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(String eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public Date getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(Date addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public int getTaxRate() {
|
||||
return taxRate;
|
||||
}
|
||||
|
||||
public void setTaxRate(int taxRate) {
|
||||
this.taxRate = taxRate;
|
||||
}
|
||||
|
||||
public String getIntentionTags() {
|
||||
return intentionTags;
|
||||
}
|
||||
|
||||
public void setIntentionTags(String intentionTags) {
|
||||
this.intentionTags = intentionTags;
|
||||
}
|
||||
|
||||
}
|
||||
+180
@@ -0,0 +1,180 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "loan_apply", author = "yinjihuan", desc = "贷款申请表")
|
||||
public class LoanApply implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -8945420378322104237L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="type", desc="1:贷款申请 2:贷款评估")
|
||||
private int type;
|
||||
|
||||
@Field(value="eid", desc="企业ID")
|
||||
private Long eid;
|
||||
|
||||
@Field(value="uid", desc="用户ID")
|
||||
private String uid;
|
||||
|
||||
@Field(value="eval_money", desc="评估金额(万元")
|
||||
private double evalMoney;
|
||||
|
||||
@Field(value="city", desc="所在城市")
|
||||
private String city;
|
||||
|
||||
@Field(value="apply_money", desc="申请金额(万元)")
|
||||
private double applyMoney;
|
||||
|
||||
@Field(value="mortgage", desc="是否接收抵押(0否 1是)")
|
||||
private int mortgage;
|
||||
|
||||
@Field(value="hid", desc="抵押房产编号")
|
||||
private Long hid;
|
||||
|
||||
@Field(value="add_time", desc="添加时间")
|
||||
private Date addTime;
|
||||
|
||||
@Field(value="purpose", desc="贷款用途(1买房 2买车 3个人消费 4企业经营)")
|
||||
private int purpose;
|
||||
|
||||
@Field(value="work", desc="职业(1上班族 2企业主 3学生 4无业)")
|
||||
private int work;
|
||||
|
||||
@Field(value="wages", desc="月收入(1:5千以下 2:5千到1万 3:1万到2万 4:2万以上)")
|
||||
private int wages;
|
||||
|
||||
@Field(value="assets", desc="我的资产(1我有房 2我有车 3有信用卡 4都没有)")
|
||||
private int assets;
|
||||
|
||||
@Field(value="credit", desc="信用情况(1:无信用卡无贷款 2:有信用卡或贷款,无逾期 3:1年内逾期少于3次且少于90天 4:1年内逾期超过3次或超过90天)")
|
||||
private int credit;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public double getEvalMoney() {
|
||||
return evalMoney;
|
||||
}
|
||||
|
||||
public void setEvalMoney(double evalMoney) {
|
||||
this.evalMoney = evalMoney;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
public double getApplyMoney() {
|
||||
return applyMoney;
|
||||
}
|
||||
|
||||
public void setApplyMoney(double applyMoney) {
|
||||
this.applyMoney = applyMoney;
|
||||
}
|
||||
|
||||
public int getMortgage() {
|
||||
return mortgage;
|
||||
}
|
||||
|
||||
public void setMortgage(int mortgage) {
|
||||
this.mortgage = mortgage;
|
||||
}
|
||||
|
||||
public Long getHid() {
|
||||
return hid;
|
||||
}
|
||||
|
||||
public void setHid(Long hid) {
|
||||
this.hid = hid;
|
||||
}
|
||||
|
||||
public Date getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
public void setAddTime(Date addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
public int getPurpose() {
|
||||
return purpose;
|
||||
}
|
||||
|
||||
public void setPurpose(int purpose) {
|
||||
this.purpose = purpose;
|
||||
}
|
||||
|
||||
public int getWork() {
|
||||
return work;
|
||||
}
|
||||
|
||||
public void setWork(int work) {
|
||||
this.work = work;
|
||||
}
|
||||
|
||||
public int getWages() {
|
||||
return wages;
|
||||
}
|
||||
|
||||
public void setWages(int wages) {
|
||||
this.wages = wages;
|
||||
}
|
||||
|
||||
public int getAssets() {
|
||||
return assets;
|
||||
}
|
||||
|
||||
public void setAssets(int assets) {
|
||||
this.assets = assets;
|
||||
}
|
||||
|
||||
public int getCredit() {
|
||||
return credit;
|
||||
}
|
||||
|
||||
public void setCredit(int credit) {
|
||||
this.credit = credit;
|
||||
}
|
||||
|
||||
}
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "loan_customers_config", author = "yinjihuan", desc = "贷款潜在客户设置表")
|
||||
public class LoanCustomersConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -300390333187645627L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="analy_time", desc="分析时间(近N天)")
|
||||
private int analyTime;
|
||||
|
||||
@Field(value="ad_click_rate", desc="贷款广告点击率(大于%之多少)")
|
||||
private double adClickRate;
|
||||
|
||||
@Field(value="loan_eval_count", desc="贷款评估次数(大于多少次)")
|
||||
private int loanEvalCount;
|
||||
|
||||
@Field(value="loan_eval_pv", desc="贷款评估PV(大于多少次)")
|
||||
private int loanEvalPv;
|
||||
|
||||
@Field(value="loan_apply_pv", desc="贷款申请PV(大于多少次)")
|
||||
private int loanApplyPv;
|
||||
|
||||
@Field(value="loan_index_page_pv", desc="我要贷款首页PV(大于多少)")
|
||||
private int loanIndexPagePv;
|
||||
|
||||
@Field(value="sub_index_page_pv", desc="我要置换首页PV(大于多少)")
|
||||
private int subIndexPagePv;
|
||||
|
||||
@Field(value="rent_manager_pv", desc="出租管理PV(大于多少)")
|
||||
private int rentManagerPv;
|
||||
|
||||
@Field(value="sale_analy_pv", desc="出售分析PV(大于多少)")
|
||||
private int saleAnalyPv;
|
||||
|
||||
@Field(value="star_level", desc="星级(1就代表1星)")
|
||||
private int starLevel;
|
||||
|
||||
@Field(value="modify_time", desc="修改时间")
|
||||
private Date modifyTime;
|
||||
|
||||
@Field(value="modify_user", desc="修改用户ID")
|
||||
private Long modifyUser;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getAnalyTime() {
|
||||
return analyTime;
|
||||
}
|
||||
|
||||
public void setAnalyTime(int analyTime) {
|
||||
this.analyTime = analyTime;
|
||||
}
|
||||
|
||||
public double getAdClickRate() {
|
||||
return adClickRate;
|
||||
}
|
||||
|
||||
public void setAdClickRate(double adClickRate) {
|
||||
this.adClickRate = adClickRate;
|
||||
}
|
||||
|
||||
public int getLoanEvalCount() {
|
||||
return loanEvalCount;
|
||||
}
|
||||
|
||||
public void setLoanEvalCount(int loanEvalCount) {
|
||||
this.loanEvalCount = loanEvalCount;
|
||||
}
|
||||
|
||||
public int getLoanEvalPv() {
|
||||
return loanEvalPv;
|
||||
}
|
||||
|
||||
public void setLoanEvalPv(int loanEvalPv) {
|
||||
this.loanEvalPv = loanEvalPv;
|
||||
}
|
||||
|
||||
public int getLoanApplyPv() {
|
||||
return loanApplyPv;
|
||||
}
|
||||
|
||||
public void setLoanApplyPv(int loanApplyPv) {
|
||||
this.loanApplyPv = loanApplyPv;
|
||||
}
|
||||
|
||||
public int getLoanIndexPagePv() {
|
||||
return loanIndexPagePv;
|
||||
}
|
||||
|
||||
public void setLoanIndexPagePv(int loanIndexPagePv) {
|
||||
this.loanIndexPagePv = loanIndexPagePv;
|
||||
}
|
||||
|
||||
public int getSubIndexPagePv() {
|
||||
return subIndexPagePv;
|
||||
}
|
||||
|
||||
public void setSubIndexPagePv(int subIndexPagePv) {
|
||||
this.subIndexPagePv = subIndexPagePv;
|
||||
}
|
||||
|
||||
public int getRentManagerPv() {
|
||||
return rentManagerPv;
|
||||
}
|
||||
|
||||
public void setRentManagerPv(int rentManagerPv) {
|
||||
this.rentManagerPv = rentManagerPv;
|
||||
}
|
||||
|
||||
public int getSaleAnalyPv() {
|
||||
return saleAnalyPv;
|
||||
}
|
||||
|
||||
public void setSaleAnalyPv(int saleAnalyPv) {
|
||||
this.saleAnalyPv = saleAnalyPv;
|
||||
}
|
||||
|
||||
public int getStarLevel() {
|
||||
return starLevel;
|
||||
}
|
||||
|
||||
public void setStarLevel(int starLevel) {
|
||||
this.starLevel = starLevel;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public Long getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(Long modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
}
|
||||
+93
@@ -0,0 +1,93 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "potential_customers_filter_config", author = "yinjihuan", desc = "贷款理财潜在客户过滤条件设置表")
|
||||
public class PotentialCustomersFilterConfig implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 395735765985199357L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="analy_time", desc="分析时间(近多少天)")
|
||||
private int analyTime;
|
||||
|
||||
@Field(value="all_page_visit", desc="所有页面浏览(访问较频繁),大于多少次")
|
||||
private int allPageVisit;
|
||||
|
||||
@Field(value="house_count", desc="房产数量,含删除(大于多少套)")
|
||||
private int houseCount;
|
||||
|
||||
@Field(value="type", desc="类型(1:理财潜客设置 2:贷款潜客设置)")
|
||||
private int type;
|
||||
|
||||
@Field(value="modify_time", desc="修改时间")
|
||||
private Date modifyTime;
|
||||
|
||||
@Field(value="modify_user", desc="修改用户ID")
|
||||
private Long modifyUser;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getAnalyTime() {
|
||||
return analyTime;
|
||||
}
|
||||
|
||||
public void setAnalyTime(int analyTime) {
|
||||
this.analyTime = analyTime;
|
||||
}
|
||||
|
||||
public int getAllPageVisit() {
|
||||
return allPageVisit;
|
||||
}
|
||||
|
||||
public void setAllPageVisit(int allPageVisit) {
|
||||
this.allPageVisit = allPageVisit;
|
||||
}
|
||||
|
||||
public int getHouseCount() {
|
||||
return houseCount;
|
||||
}
|
||||
|
||||
public void setHouseCount(int houseCount) {
|
||||
this.houseCount = houseCount;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
public Long getModifyUser() {
|
||||
return modifyUser;
|
||||
}
|
||||
|
||||
public void setModifyUser(Long modifyUser) {
|
||||
this.modifyUser = modifyUser;
|
||||
}
|
||||
|
||||
}
|
||||
+110
@@ -0,0 +1,110 @@
|
||||
package com.fangjia.job.youfang.po;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import com.cxytiandi.jdbc.Orders;
|
||||
import com.cxytiandi.jdbc.annotation.AutoId;
|
||||
import com.cxytiandi.jdbc.annotation.Field;
|
||||
import com.cxytiandi.jdbc.annotation.TableName;
|
||||
|
||||
@TableName(value = "visit_log", author = "yinjihuan", desc = "访问日志表")
|
||||
public class VisitLog implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -7402223049704716248L;
|
||||
|
||||
@AutoId
|
||||
@Field(value="id", desc="ID")
|
||||
private Long id;
|
||||
|
||||
@Field(value="uri", desc="uri")
|
||||
private String uri;
|
||||
|
||||
@Field(value="page", desc="访问的页面")
|
||||
private String page;
|
||||
|
||||
@Field(value="visit_time", desc="访问的时间")
|
||||
private Date visitTime;
|
||||
|
||||
@Field(value="eid", desc="企业ID")
|
||||
private Long eid;
|
||||
|
||||
@Field(value="uid", desc="用户ID")
|
||||
private String uid;
|
||||
|
||||
@Field(value="ip", desc="用户IP")
|
||||
private String ip;
|
||||
|
||||
@Field(value="city", desc="根据IP定位的城市")
|
||||
private String city;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getUri() {
|
||||
return uri;
|
||||
}
|
||||
|
||||
public void setUri(String uri) {
|
||||
this.uri = uri;
|
||||
}
|
||||
|
||||
public String getPage() {
|
||||
return page;
|
||||
}
|
||||
|
||||
public void setPage(String page) {
|
||||
this.page = page;
|
||||
}
|
||||
|
||||
public Date getVisitTime() {
|
||||
return visitTime;
|
||||
}
|
||||
|
||||
public void setVisitTime(Date visitTime) {
|
||||
this.visitTime = visitTime;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public String getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(String uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getIp() {
|
||||
return ip;
|
||||
}
|
||||
|
||||
public void setIp(String ip) {
|
||||
this.ip = ip;
|
||||
}
|
||||
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
|
||||
public static Orders[] id_orders = new Orders[] { new Orders("id", Orders.OrderyType.DESC)};
|
||||
|
||||
public static String[] query_params = new String[] { "eid", "uid" };
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.fangjia.job.youfang.remote;
|
||||
|
||||
import com.fangjia.job.common.base.Response;
|
||||
import feign.Param;
|
||||
import feign.RequestLine;
|
||||
|
||||
/**
|
||||
* API调用接口定义
|
||||
* @author yinjihuan
|
||||
*/
|
||||
public interface FshApiRemoteService {
|
||||
|
||||
/**
|
||||
* 发送月涨幅计算通知
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
@RequestLine("GET /rest/houses/rose/month?token={token}")
|
||||
public Response sendHouseRoseMonthNotice(@Param("token")String token);
|
||||
|
||||
/**
|
||||
* 发送租金提醒计算通知
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
@RequestLine("GET /rest/houses/rent/notice?token={token}")
|
||||
public Response sendHouseRentNotice(@Param("token")String token);
|
||||
|
||||
/**
|
||||
* 定时估价操作,并算出周涨跌幅通知
|
||||
* @param token
|
||||
* @return
|
||||
*/
|
||||
@RequestLine("GET /rest/houses/eval?token={token}")
|
||||
public Response evalAllHousePrice(@Param("token")String token);
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AdVisitLogService {
|
||||
|
||||
/**
|
||||
* 查询企业时间范围内的PV
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryPvCount(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询企业时间范围内的UV
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryUvCount(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询用户的广告点击次数
|
||||
* @param eid 企业ID
|
||||
* @param uid 用户ID
|
||||
* @param adPositions 广告位集合
|
||||
* @param start 开始时间
|
||||
* @param end 结束时间
|
||||
* @return
|
||||
*/
|
||||
long queryPvCount(Long eid, String uid, List<Integer> adPositions, String start, String end);
|
||||
|
||||
}
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.AdVisitLog;
|
||||
|
||||
@Service
|
||||
public class AdVisitLogServiceImpl extends EntityService<AdVisitLog> implements AdVisitLogService {
|
||||
|
||||
@Override
|
||||
public long queryPvCount(Long eid, String start, String end) {
|
||||
String sql = "select count(id) from ad_visit_log where eid = ? and visit_time between ? and ?";
|
||||
return super.count(sql, new Object[] { eid, start, end });
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryUvCount(Long eid, String start, String end) {
|
||||
String sql = "select count(distinct(uid)) from ad_visit_log where eid = ? and visit_time between ? and ?";
|
||||
return super.count(sql, new Object[] { eid, start, end });
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryPvCount(Long eid, String uid, List<Integer> adPositions, String start, String end) {
|
||||
List<Object> params = new ArrayList<Object>();
|
||||
StringBuilder sql = new StringBuilder("select count(id) from ad_visit_log where eid = ? and uid = ?");
|
||||
params.add(eid);
|
||||
params.add(uid);
|
||||
sql.append(" and ad_position in (");
|
||||
for (Integer poi : adPositions) {
|
||||
sql.append("?,");
|
||||
params.add(poi);
|
||||
}
|
||||
sql.delete(sql.length() - 1, sql.length());
|
||||
sql.append(")");
|
||||
if (StringUtils.isNotBlank(start) && StringUtils.isNotBlank(end)) {
|
||||
sql.append(" and visit_time between ? and ?");
|
||||
params.add(start);
|
||||
params.add(end);
|
||||
}
|
||||
return super.count(sql.toString(), params.toArray());
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fangjia.job.youfang.po.EnterpriseProductUser;
|
||||
import com.fangjia.job.youfang.po.FinancialCustomersConfig;
|
||||
import com.fangjia.job.youfang.po.LoanCustomersConfig;
|
||||
import com.fangjia.job.youfang.po.PotentialCustomersFilterConfig;
|
||||
|
||||
public interface CustomerStatService {
|
||||
|
||||
/**
|
||||
* 删除潜在客户统计信息
|
||||
* @param eid
|
||||
* @param uid
|
||||
*/
|
||||
void removeCustomerStat(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 理财和贷款潜客统计
|
||||
* @param user 用户信息
|
||||
* @param financiaFilterConfig 理财潜客过滤条件
|
||||
* @param loanFilterConfig 贷款潜客过滤条件
|
||||
* @param financialCustomersList 理财潜客分析条件
|
||||
* @param loanCustomersConfigList 贷款潜客分析条件
|
||||
*/
|
||||
void customerStat(EnterpriseProductUser user,
|
||||
PotentialCustomersFilterConfig financiaFilterConfig,
|
||||
PotentialCustomersFilterConfig loanFilterConfig,
|
||||
List<FinancialCustomersConfig> financialCustomersList,
|
||||
List<LoanCustomersConfig> loanCustomersConfigList);
|
||||
|
||||
}
|
||||
+446
@@ -0,0 +1,446 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.fangjia.job.common.util.DateUtilCustom;
|
||||
import com.fangjia.job.youfang.document.CustomerStat;
|
||||
import com.fangjia.job.youfang.po.EnterpriseProductUser;
|
||||
import com.fangjia.job.youfang.po.FinancialCustomersConfig;
|
||||
import com.fangjia.job.youfang.po.HouseInfo;
|
||||
import com.fangjia.job.youfang.po.LoanCustomersConfig;
|
||||
import com.fangjia.job.youfang.po.PotentialCustomersFilterConfig;
|
||||
|
||||
@Service
|
||||
public class CustomerStatServiceImpl implements CustomerStatService {
|
||||
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Autowired
|
||||
private VisitLogService visitLogService;
|
||||
|
||||
@Autowired
|
||||
private HouseInfoService houseInfoService;
|
||||
|
||||
@Autowired
|
||||
private AdVisitLogService adVisitLogService;
|
||||
|
||||
@Autowired
|
||||
private EnterpriseProductUserService enterpriseProductUserService;
|
||||
|
||||
@Autowired
|
||||
private LoanApplyService loanApplyService;
|
||||
|
||||
@Override
|
||||
public void removeCustomerStat(Long eid, String uid) {
|
||||
Query query = Query.query(Criteria.where("eid").is(eid).and("uid").is(uid));
|
||||
mongoTemplate.remove(query, CustomerStat.class);
|
||||
}
|
||||
|
||||
/*
|
||||
分析逻辑:
|
||||
先过滤
|
||||
|
||||
从5星开始分析,如果满足了5星就这个用户就跳过了,否则接着分析4星,以此类推
|
||||
|
||||
理财潜客设置:
|
||||
分析时间:下面条件的筛选时间
|
||||
理财广告点击率:多个广告位的点击次数/页面的pv +分析时间
|
||||
房产数量排名:所有的有效房产数量
|
||||
房产价值排名:所有的有效房产数量总价值 这个企业下的用户的总价值排名 自己的总价值的排名/总人数
|
||||
房产分析PV:房产分析结果页面的pv /fsh/result +分析时间
|
||||
出售分析PV: 出售分析结果页面pv saleAnalysis/analysisDetail +分析时间
|
||||
出租管理PV: 出租管理结果页面pv /rent/index +分析时间
|
||||
房产评级,就是用户房产等级最高的一个
|
||||
|
||||
过滤条件:
|
||||
(访问较频繁)所有页面浏览 改成次数 +分析时间
|
||||
房产数量(含删除) 套数
|
||||
|
||||
贷款潜客设置:
|
||||
|
||||
贷款广告点击率:多个广告位的点击次数/页面的pv +分析时间
|
||||
贷款评估次数
|
||||
贷款评估PV /myLoan/loanStep /myLoan/result +分析时间
|
||||
贷款申请PV /myLoan/info /myLoan/applyResult +分析时间
|
||||
我要贷款首页PV /myLoan/index +分析时间
|
||||
我要置换首页PV changeHouse/index +分析时间
|
||||
出租管理PV /rent/index +分析时间
|
||||
出售管理PV /saleAnalysis/analysisDetail +分析时间
|
||||
*/
|
||||
@Override
|
||||
public void customerStat(EnterpriseProductUser user, PotentialCustomersFilterConfig financiaFilterConfig,
|
||||
PotentialCustomersFilterConfig loanFilterConfig, List<FinancialCustomersConfig> financialCustomersList,
|
||||
List<LoanCustomersConfig> loanCustomersConfigList) {
|
||||
Long eid = user.getEid();
|
||||
String uid = user.getId()+"";
|
||||
// 删除之前这个用户的统计数据,每天都是最新的
|
||||
this.removeCustomerStat(eid, uid);
|
||||
|
||||
long hosueCount = 0;
|
||||
Double housePrice = 0.0;
|
||||
int level = this.getFinanciaCustomerLevel(eid, uid, financiaFilterConfig, financialCustomersList);
|
||||
if (level > 0) {
|
||||
CustomerStat stat = new CustomerStat();
|
||||
stat.setEid(eid);
|
||||
stat.setUid(uid);
|
||||
stat.setCity(user.getCity());
|
||||
stat.setRegion(user.getRegion());
|
||||
hosueCount = houseInfoService.queryCountByEidAndUid(eid, uid);
|
||||
stat.setHouseCount(hosueCount);
|
||||
housePrice = houseInfoService.querySumMoneyByEidAndUid(eid, uid);
|
||||
stat.setHousePrice(housePrice);
|
||||
stat.setCreateDate(new Date());
|
||||
stat.setType(1);
|
||||
stat.setLevel(level);
|
||||
mongoTemplate.save(stat);
|
||||
}
|
||||
|
||||
int levelLoan = getLoanCustomerLevel(eid, uid, loanFilterConfig, loanCustomersConfigList);
|
||||
if (levelLoan > 0) {
|
||||
CustomerStat stat = new CustomerStat();
|
||||
stat.setEid(eid);
|
||||
stat.setUid(uid);
|
||||
stat.setCity(user.getCity());
|
||||
stat.setRegion(user.getRegion());
|
||||
// 理财级别有的情况下就用上面已经查询好的数据,避免重复查询
|
||||
if (level > 0) {
|
||||
stat.setHouseCount(hosueCount);
|
||||
stat.setHousePrice(housePrice);
|
||||
} else {
|
||||
stat.setHouseCount(houseInfoService.queryCountByEidAndUid(eid, uid));
|
||||
stat.setHousePrice(houseInfoService.querySumMoneyByEidAndUid(eid, uid));
|
||||
}
|
||||
stat.setCreateDate(new Date());
|
||||
stat.setType(2);
|
||||
stat.setLevel(levelLoan);
|
||||
mongoTemplate.save(stat);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否要进行过滤
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @param financiaFilterConfig
|
||||
* @return 1 不需要 0 需要
|
||||
*/
|
||||
private int filter(Long eid, String uid, PotentialCustomersFilterConfig financiaFilterConfig) {
|
||||
// 有过滤条件才做过滤
|
||||
if (financiaFilterConfig != null) {
|
||||
// 配置了最近分析时间才需要根据时间去查询PV
|
||||
String start = "";
|
||||
String end = "";
|
||||
if (financiaFilterConfig.getAnalyTime() > 0) {
|
||||
Map<String, String> timeMap = DateUtilCustom.getLatelyDate(financiaFilterConfig.getAnalyTime());
|
||||
start = timeMap.get("start");
|
||||
end = timeMap.get("end");
|
||||
}
|
||||
|
||||
// 判断是否超过指定浏览次数,浏览次数是所有页面的PV
|
||||
if (financiaFilterConfig.getAllPageVisit() > 0) {
|
||||
long pv = visitLogService.queryPvCountByUser(eid, uid, start, end);
|
||||
if (pv > financiaFilterConfig.getAllPageVisit()) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断房产数量(含删除)的套数
|
||||
if (financiaFilterConfig.getHouseCount() > 0) {
|
||||
long houseCount = houseInfoService.queryAllCountByEidAndUid(eid, uid);
|
||||
if (houseCount > financiaFilterConfig.getHouseCount()) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 贷款潜在客户分析
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @param loanFilterConfig
|
||||
* @param financialCustomersList
|
||||
* @return
|
||||
*/
|
||||
private int getLoanCustomerLevel(Long eid, String uid, PotentialCustomersFilterConfig loanFilterConfig,
|
||||
List<LoanCustomersConfig> loanCustomersConfigList) {
|
||||
|
||||
if (filter(eid, uid, loanFilterConfig) == 0){
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 从5星开始分析,满足条件则继续下个用户的分析,不满足则继续4星的分析,以此类推
|
||||
for (int i = 5; i >= 1; i--) {
|
||||
LoanCustomersConfig config = getLoanCustomersConfig(i, loanCustomersConfigList);
|
||||
if (config == null) {
|
||||
continue;
|
||||
}
|
||||
// 配置了最近分析时间才需要根据时间去查询PV
|
||||
String start = "";
|
||||
String end = "";
|
||||
if (config.getAnalyTime() > 0) {
|
||||
Map<String, String> timeMap = DateUtilCustom.getLatelyDate(config.getAnalyTime());
|
||||
start = timeMap.get("start");
|
||||
end = timeMap.get("end");
|
||||
}
|
||||
|
||||
// 判断贷款评估PV
|
||||
if (config.getLoanEvalPv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/myLoan/loanStep", "/myLoan/result"), start, end);
|
||||
if (count <= config.getLoanEvalPv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断贷款申请PV
|
||||
if (config.getLoanApplyPv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/myLoan/info", "/myLoan/applyResult"), start, end);
|
||||
if (count <= config.getLoanApplyPv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断我要贷款首页PV
|
||||
if (config.getLoanIndexPagePv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/myLoan/index"), start, end);
|
||||
if (count <= config.getLoanIndexPagePv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断我要置换首页PV
|
||||
if (config.getSubIndexPagePv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/changeHouse/index"), start, end);
|
||||
if (count <= config.getSubIndexPagePv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断出租管理PV
|
||||
if (config.getRentManagerPv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/rent/index"), start, end);
|
||||
if (count <= config.getRentManagerPv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断出售分析PV
|
||||
if (config.getSaleAnalyPv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/saleAnalysis/analysisDetail"), start, end);
|
||||
if (count <= config.getSaleAnalyPv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断贷款评估次数
|
||||
if (config.getLoanEvalCount() > 0) {
|
||||
long count = loanApplyService.queryCountByType(eid, uid, 2, start, end);
|
||||
if (count <= config.getLoanEvalCount()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断用户贷款广告点击率
|
||||
if (config.getAdClickRate() > 0) {
|
||||
double adClickRate = getLoanAdClickRate(eid, uid, start, end);
|
||||
if (adClickRate <= config.getAdClickRate()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int getFinanciaCustomerLevel(Long eid, String uid, PotentialCustomersFilterConfig financiaFilterConfig,
|
||||
List<FinancialCustomersConfig> financialCustomersList) {
|
||||
|
||||
if (filter(eid, uid, financiaFilterConfig) == 0){
|
||||
return 0;
|
||||
}
|
||||
|
||||
// 从5星开始分析,满足条件则继续下个用户的分析,不满足则继续4星的分析,以此类推
|
||||
for (int i = 5; i >= 1; i--) {
|
||||
FinancialCustomersConfig config = getFinancialCustomersConfig(i, financialCustomersList);
|
||||
if (config == null) {
|
||||
continue;
|
||||
}
|
||||
// 配置了最近分析时间才需要根据时间去查询PV
|
||||
String start = "";
|
||||
String end = "";
|
||||
if (config.getAnalyTime() > 0) {
|
||||
Map<String, String> timeMap = DateUtilCustom.getLatelyDate(config.getAnalyTime());
|
||||
start = timeMap.get("start");
|
||||
end = timeMap.get("end");
|
||||
}
|
||||
|
||||
// 判断房产分析PV
|
||||
if (config.getHouseAnalyPv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/fsh/result"), start, end);
|
||||
if (count <= config.getHouseAnalyPv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断出售分析PV
|
||||
if (config.getSaleAnalyPv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/saleAnalysis/analysisDetail"), start, end);
|
||||
if (count <= config.getSaleAnalyPv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断出租管理PV
|
||||
if (config.getRentManagerPv() > 0) {
|
||||
long count = visitLogService.queryPvCountByUser(eid, uid, Arrays.asList("/rent/index"), start, end);
|
||||
if (count <= config.getRentManagerPv()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断房产数量
|
||||
if (config.getHouseCountRank() > 0) {
|
||||
long count = houseInfoService.queryCountByEidAndUid(eid, uid);
|
||||
if (count <= config.getHouseCountRank()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断房产评级
|
||||
if (config.getHouseLevel() > 0) {
|
||||
HouseInfo houseInfo = houseInfoService.findHighLevelHouseInfo(eid, uid);
|
||||
if (houseInfo == null) {
|
||||
continue;
|
||||
}
|
||||
if (houseInfo.getLevel() != config.getHouseLevel()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断房产价值排名
|
||||
if (config.getHousePriceRank() > 0) {
|
||||
if (this.getHousePriceLevel(eid, uid) <= config.getHousePriceRank()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断用户理财广告点击率
|
||||
if (config.getAdClickRate() > 0) {
|
||||
double adClickRate = getFinancialAdClickRate(eid, uid, start, end);
|
||||
if (adClickRate <= config.getAdClickRate()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户房产价值排名<br>
|
||||
* 所有的有效房产数量总价值 这个企业下的用户的总价值排名 = 自己的总价值的排名/总人数
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
private double getHousePriceLevel(Long eid, String uid) {
|
||||
// 企业下的用户数量
|
||||
long enterpriseUserCount = enterpriseProductUserService.queryUserCount(eid);
|
||||
long level = houseInfoService.queryHouseTotalPriceLevel(eid, uid);
|
||||
if (enterpriseUserCount == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
double rate = new BigDecimal((double)level/enterpriseUserCount).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() * 100;
|
||||
return rate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户理财广告点击率<br>
|
||||
* 点击率=广告点击次数/广告位页面PV
|
||||
* 广告位:
|
||||
* 1、房产分析/出租管理-租金回报率
|
||||
* 2、房产分析/出租管理-出租状态
|
||||
* 3、出售分析-增长率收益
|
||||
* 4、出售分析-挂牌建议
|
||||
*
|
||||
* 页面:
|
||||
* 1、房产分析 /fsh/result
|
||||
* 2、出租管理 /rent/index
|
||||
* 3、出售分析 /saleAnalysis/analysisDetail
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
private double getFinancialAdClickRate(Long eid, String uid, String start, String end) {
|
||||
long adClickCount = adVisitLogService.queryPvCount(eid, uid, Arrays.asList(0, 1, 2, 3), start, end);
|
||||
List<String> uriList = Arrays.asList("/fsh/result", "/saleAnalysis/analysisDetail", "/rent/index");
|
||||
long pvCount = visitLogService.queryPvCountByUser(eid, uid, uriList, start, end);
|
||||
if (pvCount == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
double rate = new BigDecimal((double)adClickCount/pvCount).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() * 100;
|
||||
return rate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 贷款广告点击率
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
private double getLoanAdClickRate(Long eid, String uid, String start, String end) {
|
||||
long adClickCount = adVisitLogService.queryPvCount(eid, uid, Arrays.asList(4), start, end);
|
||||
List<String> uriList = Arrays.asList("/changeHouse/details");
|
||||
long pvCount = visitLogService.queryPvCountByUser(eid, uid, uriList, start, end);
|
||||
if (pvCount == 0) {
|
||||
return 0.0;
|
||||
}
|
||||
double rate = new BigDecimal((double)adClickCount/pvCount).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue() * 100;
|
||||
return rate;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取星级对应的理财客户分析条件
|
||||
* @param level
|
||||
* @return
|
||||
*/
|
||||
private FinancialCustomersConfig getFinancialCustomersConfig(int level, List<FinancialCustomersConfig> financialCustomersList) {
|
||||
for (FinancialCustomersConfig config : financialCustomersList) {
|
||||
if (level == config.getStarLevel()) {
|
||||
return config;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取星级对应贷款客户分析条件
|
||||
* @param level
|
||||
* @return
|
||||
*/
|
||||
private LoanCustomersConfig getLoanCustomersConfig(int level, List<LoanCustomersConfig> loanCustomersConfigList) {
|
||||
for (LoanCustomersConfig config : loanCustomersConfigList) {
|
||||
if (level == config.getStarLevel()) {
|
||||
return config;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fangjia.job.youfang.po.EnterpriseProductUser;
|
||||
|
||||
public interface EnterpriseProductUserService {
|
||||
|
||||
/**
|
||||
* 查询总用户数量
|
||||
* @param eid
|
||||
* @return
|
||||
*/
|
||||
long queryUserCount(Long eid);
|
||||
|
||||
/**
|
||||
* 查询新增用户数量
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryAddUserCount(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询总用户数
|
||||
* @return
|
||||
*/
|
||||
long queryCount();
|
||||
|
||||
/**
|
||||
* 分页查询用户信息
|
||||
* @param page
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
List<EnterpriseProductUser> queryByPage(int page, int limit);
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.cxytiandi.jdbc.util.PageBean;
|
||||
import com.fangjia.job.youfang.po.EnterpriseProductUser;
|
||||
|
||||
@Service
|
||||
public class EnterpriseProductUserServiceImpl extends EntityService<EnterpriseProductUser> implements EnterpriseProductUserService {
|
||||
|
||||
@Override
|
||||
public long queryUserCount(Long eid) {
|
||||
return super.count("eid", eid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryAddUserCount(Long eid, String start, String end) {
|
||||
String sql = "select count(id) from enterprise_product_user where eid = ? and add_time between ? and ?";
|
||||
return super.count(sql, new Object[] { eid, start, end });
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryCount() {
|
||||
return super.count();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<EnterpriseProductUser> queryByPage(int page, int limit) {
|
||||
int start = PageBean.page2Start(page, limit);
|
||||
return super.listForPage(start, limit);
|
||||
}
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fangjia.job.youfang.po.Enterprise;
|
||||
|
||||
public interface EnterpriseService {
|
||||
|
||||
/**
|
||||
* 分页查询企业信息
|
||||
* @param page
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
List<Enterprise> queryByPage(int page, int limit);
|
||||
|
||||
/**
|
||||
* 查询企业数量
|
||||
* @return
|
||||
*/
|
||||
long queryCount();
|
||||
|
||||
}
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.cxytiandi.jdbc.util.PageBean;
|
||||
import com.fangjia.job.youfang.po.Enterprise;
|
||||
|
||||
@Service
|
||||
public class EnterpriseServiceImpl extends EntityService<Enterprise> implements EnterpriseService {
|
||||
|
||||
@Override
|
||||
public List<Enterprise> queryByPage(int page, int limit) {
|
||||
int start = PageBean.page2Start(page, limit);
|
||||
return super.listForPage("status", 1, start, limit);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryCount() {
|
||||
return super.count("status", 1);
|
||||
}
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import com.fangjia.job.youfang.document.EnterpriseStat;
|
||||
|
||||
public interface EnterpriseStatService {
|
||||
|
||||
/**
|
||||
* 保存企业统计信息
|
||||
* @param stat
|
||||
*/
|
||||
void save(EnterpriseStat stat);
|
||||
|
||||
/**
|
||||
* 删除企业统计信息
|
||||
* @param eid
|
||||
*/
|
||||
void remove(String eid);
|
||||
|
||||
/**
|
||||
* 查询企业的统计信息
|
||||
* @param eid
|
||||
* @return
|
||||
*/
|
||||
EnterpriseStat getByEid(Long eid);
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.fangjia.job.youfang.document.EnterpriseStat;
|
||||
|
||||
@Service
|
||||
public class EnterpriseStatServiceImpl implements EnterpriseStatService {
|
||||
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Override
|
||||
public void save(EnterpriseStat stat) {
|
||||
mongoTemplate.save(stat);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void remove(String eid) {
|
||||
mongoTemplate.remove(Query.query(Criteria.where("eid").is(eid)), EnterpriseStat.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnterpriseStat getByEid(Long eid) {
|
||||
return mongoTemplate.findOne(Query.query(Criteria.where("eid").is(eid)), EnterpriseStat.class);
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fangjia.job.youfang.po.FinancialCustomersConfig;
|
||||
|
||||
public interface FinancialCustomersConfigService {
|
||||
|
||||
List<FinancialCustomersConfig> queryAll();
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.FinancialCustomersConfig;
|
||||
|
||||
@Service
|
||||
public class FinancialCustomersConfigServiceImpl extends EntityService<FinancialCustomersConfig> implements FinancialCustomersConfigService {
|
||||
|
||||
@Override
|
||||
public List<FinancialCustomersConfig> queryAll() {
|
||||
return super.list();
|
||||
}
|
||||
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import com.fangjia.job.youfang.po.HouseInfo;
|
||||
|
||||
public interface HouseInfoService {
|
||||
|
||||
/**
|
||||
* 按时间查询房产数量
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryHouseCount(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 按时间查询房产总金额
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
Double queryHouseSumMoney(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询所有房产数量
|
||||
* @param eid
|
||||
* @return
|
||||
*/
|
||||
long queryHouseAllCount(Long eid);
|
||||
|
||||
/**
|
||||
* 查询所有房产总金额
|
||||
* @param eid
|
||||
* @return
|
||||
*/
|
||||
Double queryHouseAllSumMoney(Long eid);
|
||||
|
||||
/**
|
||||
* 根据居住状态查询房产数量
|
||||
* @param eid
|
||||
* @param liveStatus
|
||||
* @return
|
||||
*/
|
||||
long queryCountByLiveStatus(Long eid, String liveStatus);
|
||||
|
||||
/**
|
||||
* 查询企业下用户的房产数量
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
long queryCountByEidAndUid(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 查询企业下用户的房产数量(包含删除)
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
long queryAllCountByEidAndUid(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 查询企业下用户的房产总价值
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
Double querySumMoneyByEidAndUid(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 分组统计企业下的各城市对应的房产数量Top
|
||||
* @param eid
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
Map<String, Long> queryHouseCountGroupByCity(Long eid, int limit);
|
||||
|
||||
/**
|
||||
* 用户所有有效房产总价值排名
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
long queryHouseTotalPriceLevel(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 查询用户有效房产总价值
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
Long queryUserHouseTotalPrice(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 查找最高等级的房产信息
|
||||
*/
|
||||
HouseInfo findHighLevelHouseInfo(Long eid, String uid);
|
||||
|
||||
}
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.HouseInfo;
|
||||
|
||||
@Service
|
||||
public class HouseInfoServiceImpl extends EntityService<HouseInfo> implements HouseInfoService {
|
||||
|
||||
@Override
|
||||
public long queryHouseCount(Long eid, String start, String end) {
|
||||
String sql = "select count(id) from house_info where eid = ? and add_date between ? and ? and remove_status = 0";
|
||||
return super.count(sql, new Object[] { eid, start, end });
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double queryHouseSumMoney(Long eid, String start, String end) {
|
||||
String sql = "select sum(total_price) from house_info where eid = ? and add_date between ? and ? and remove_status = 0";
|
||||
Long sum = super.getJdbcTemplate().queryForObject(sql, Long.class, new Object[] { eid, start, end });
|
||||
if (sum == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return sum / 10000.0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryHouseAllCount(Long eid) {
|
||||
String sql = "select count(id) from house_info where eid = ? and remove_status = 0";
|
||||
return super.count(sql, new Object[] { eid });
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double queryHouseAllSumMoney(Long eid) {
|
||||
String sql = "select sum(total_price) from house_info where eid = ? and remove_status = 0";
|
||||
Long sum = super.getJdbcTemplate().queryForObject(sql, Long.class, new Object[] { eid });
|
||||
if (sum == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return sum / 10000.0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryCountByLiveStatus(Long eid, String liveStatus) {
|
||||
String sql = "select count(id) from house_info where eid = ? and live_status = ? and remove_status = 0";
|
||||
return super.count(sql, new Object[] { eid, liveStatus });
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryCountByEidAndUid(Long eid, String uid) {
|
||||
return super.count(new String[] { "eid", "uid", "remove_status" }, new Object[] { eid, uid, 0 });
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double querySumMoneyByEidAndUid(Long eid, String uid) {
|
||||
String sql = "select sum(total_price) from house_info where eid = ? and uid = ? and remove_status = 0";
|
||||
Long sum = super.getJdbcTemplate().queryForObject(sql, Long.class, new Object[] { eid, uid });
|
||||
if (sum == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return sum / 10000.0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Long> queryHouseCountGroupByCity(Long eid, int limit) {
|
||||
Map<String, Long> result = new TreeMap<String, Long>();
|
||||
String sql = "select city,count(id) as count from house_info where eid = ? GROUP BY city ORDER BY count desc LIMIT ?";
|
||||
List<Map<String, Object>> list = super.getJdbcTemplate().queryForList(sql, new Object[] { eid, limit });
|
||||
for (Map<String, Object> map : list) {
|
||||
result.put(map.get("city").toString(), Long.parseLong(map.get("count").toString()));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryAllCountByEidAndUid(Long eid, String uid) {
|
||||
return super.count(new String[] { "eid", "uid" }, new Object[] { eid, uid });
|
||||
}
|
||||
|
||||
/**
|
||||
* 按用户分组查询出总价值,降序排序,然后根据当前用户自己的总价值,查询在它之上的有多少位,来算出排名
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public long queryHouseTotalPriceLevel(Long eid, String uid) {
|
||||
Long totalPrice = this.queryUserHouseTotalPrice(eid, uid);
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("select count(*) from");
|
||||
sql.append(" (select uid,SUM(total_price) as total_price from house_info where eid = ? and remove_status = 0 GROUP BY uid ORDER BY total_price desc ) as t");
|
||||
sql.append(" where t.total_price >= ?");
|
||||
return super.count(sql.toString(), new Object[] { eid, totalPrice });
|
||||
}
|
||||
|
||||
@Override
|
||||
public Long queryUserHouseTotalPrice(Long eid, String uid) {
|
||||
String sql = "select sum(total_price) from house_info where eid = ? and uid = ? and remove_status = 0";
|
||||
Long sum = super.getJdbcTemplate().queryForObject(sql, Long.class, new Object[] { eid, uid });
|
||||
if (sum == null) {
|
||||
return 0L;
|
||||
}
|
||||
return sum;
|
||||
}
|
||||
|
||||
@Override
|
||||
public HouseInfo findHighLevelHouseInfo(Long eid, String uid) {
|
||||
return super.getByParams(new String[] { "level" }, new String[] { "eid", "uid" ,"remove_status"},
|
||||
new Object[] { eid, uid, 0 }, HouseInfo.level_orders);
|
||||
}
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
public interface HouseSubstitutionService {
|
||||
|
||||
/**
|
||||
* 查询置换次数
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
long queryCount(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 查询最大的买房预算金额
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
Double queryMaxBudget(Long eid, String uid);
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.HouseSubstitution;
|
||||
|
||||
@Service
|
||||
public class HouseSubstitutionServiceImpl extends EntityService<HouseSubstitution> implements HouseSubstitutionService {
|
||||
|
||||
@Override
|
||||
public long queryCount(Long eid, String uid) {
|
||||
return super.count(new String[] { "eid", "uid" }, new Object[] { eid, uid });
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double queryMaxBudget(Long eid, String uid) {
|
||||
String sql = "select max(budget) from house_substitution where eid = ? and uid = ?";
|
||||
Double price = super.getJdbcTemplate().queryForObject(sql, Double.class, new Object[] { eid, uid });
|
||||
if (price == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return price;
|
||||
}
|
||||
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
public interface LoanApplyService {
|
||||
|
||||
/**
|
||||
* 查询次数
|
||||
* @param eid
|
||||
* @param type 1:贷款申请 2:贷款评估
|
||||
* @return
|
||||
*/
|
||||
long queryCountByType(Long eid, int type);
|
||||
|
||||
/**
|
||||
* 查询次数
|
||||
* @param eid
|
||||
* @param type 1:贷款申请 2:贷款评估
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryCountByType(Long eid, int type, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询次数
|
||||
* @param eid
|
||||
* @param type 1:贷款申请 2:贷款评估
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryCountByType(Long eid, String uid, int type, String start, String end);
|
||||
|
||||
/**
|
||||
* 贷款申请金额
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
Double queryLoanMoney(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询用户贷款次数
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @param type 1:贷款申请 2:贷款评估
|
||||
* @return
|
||||
*/
|
||||
long queryUserCountByType(Long eid, String uid, int type);
|
||||
|
||||
/**
|
||||
* 查询贷款评估最高金额
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
Double queryMaxEvalMoney(Long eid, String uid);
|
||||
|
||||
}
|
||||
+67
@@ -0,0 +1,67 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.LoanApply;
|
||||
|
||||
@Service
|
||||
public class LoanApplyServiceImpl extends EntityService<LoanApply> implements LoanApplyService {
|
||||
|
||||
@Override
|
||||
public long queryCountByType(Long eid, int type) {
|
||||
return super.count(new String[] { "eid", "type" }, new Object[] { eid, type });
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryCountByType(Long eid, int type, String start, String end) {
|
||||
String sql = "select count(id) from loan_apply where eid = ? and type = ? and add_time between ? and ?";
|
||||
return super.count(sql, new Object[] { eid, type, start, end });
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double queryLoanMoney(Long eid, String start, String end) {
|
||||
String sql = "select sum(apply_money) from loan_apply where eid = ? and type = 1 and add_time between ? and ?";
|
||||
Double money = super.getJdbcTemplate().queryForObject(sql, new Object[] { eid, start, end}, Double.class);
|
||||
if (money == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return money;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryUserCountByType(Long eid, String uid, int type) {
|
||||
return super.count(new String[] { "eid", "uid", "type" }, new Object[] { eid, uid, type });
|
||||
}
|
||||
|
||||
@Override
|
||||
public Double queryMaxEvalMoney(Long eid, String uid) {
|
||||
String sql = "select max(eval_money) from loan_apply where eid = ? and uid = ?";
|
||||
Double money = super.getJdbcTemplate().queryForObject(sql, new Object[] { eid, uid }, Double.class);
|
||||
if (money == null) {
|
||||
return 0.0;
|
||||
}
|
||||
return money;
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryCountByType(Long eid, String uid, int type, String start, String end) {
|
||||
List<Object> params = new ArrayList<Object>();
|
||||
StringBuilder sql = new StringBuilder();
|
||||
sql.append("select count(id) from loan_apply where eid = ? and uid = ? and type = ?");
|
||||
params.add(eid);
|
||||
params.add(uid);
|
||||
params.add(type);
|
||||
if (StringUtils.isNotBlank(start) && StringUtils.isNotBlank(end)) {
|
||||
sql.append(" and add_time between ? and ?");
|
||||
params.add(start);
|
||||
params.add(end);
|
||||
}
|
||||
return super.count(sql.toString(), params.toArray());
|
||||
}
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fangjia.job.youfang.po.LoanCustomersConfig;
|
||||
|
||||
public interface LoanCustomersConfigService {
|
||||
|
||||
List<LoanCustomersConfig> queryAll();
|
||||
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.LoanCustomersConfig;
|
||||
|
||||
@Service
|
||||
public class LoanCustomersConfigServiceImpl extends EntityService<LoanCustomersConfig> implements LoanCustomersConfigService {
|
||||
|
||||
@Override
|
||||
public List<LoanCustomersConfig> queryAll() {
|
||||
return super.list();
|
||||
}
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.fangjia.job.youfang.document.PageStat;
|
||||
|
||||
public interface PageStatService {
|
||||
|
||||
/**
|
||||
* 保存页面统计信息
|
||||
* @param stat
|
||||
*/
|
||||
void saveAll(List<PageStat> pageStats);
|
||||
|
||||
/**
|
||||
* 删除某天的统计
|
||||
* @param formateDate
|
||||
*/
|
||||
void deleteByParams(String formateDate);
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.fangjia.job.youfang.document.PageStat;
|
||||
|
||||
@Service
|
||||
public class PageStatServiceImpl implements PageStatService{
|
||||
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Override
|
||||
public void saveAll(List<PageStat> pageStats) {
|
||||
mongoTemplate.insertAll(pageStats);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deleteByParams(String formateDate) {
|
||||
Query query = Query.query(Criteria.where("formatDate").is(formateDate));
|
||||
mongoTemplate.remove(query, PageStat.class);
|
||||
}
|
||||
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import com.fangjia.job.youfang.po.PotentialCustomersFilterConfig;
|
||||
|
||||
public interface PotentialCustomersFilterConfigService {
|
||||
|
||||
/**
|
||||
* 获取潜在客户分析过滤参数
|
||||
* @param type 类型(1:理财潜客设置 2:贷款潜客设置)
|
||||
* @return
|
||||
*/
|
||||
PotentialCustomersFilterConfig get(int type);
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.PotentialCustomersFilterConfig;
|
||||
|
||||
@Service
|
||||
public class PotentialCustomersFilterConfigServiceImpl extends EntityService<PotentialCustomersFilterConfig> implements PotentialCustomersFilterConfigService {
|
||||
|
||||
@Override
|
||||
public PotentialCustomersFilterConfig get(int type) {
|
||||
return super.getById("type", type);
|
||||
}
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import com.fangjia.job.youfang.document.UserStat;
|
||||
|
||||
public interface UserStatService {
|
||||
|
||||
/**
|
||||
* 根据用户ID查询统计信息
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
UserStat getByUid(Long eid, String uid);
|
||||
|
||||
/**
|
||||
* 保存数据
|
||||
* @param userStat
|
||||
*/
|
||||
void save(UserStat userStat);
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.mongodb.core.MongoTemplate;
|
||||
import org.springframework.data.mongodb.core.query.Criteria;
|
||||
import org.springframework.data.mongodb.core.query.Query;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.fangjia.job.youfang.document.UserStat;
|
||||
|
||||
@Service
|
||||
public class UserStatServiceImpl implements UserStatService {
|
||||
|
||||
@Autowired
|
||||
private MongoTemplate mongoTemplate;
|
||||
|
||||
@Override
|
||||
public UserStat getByUid(Long eid, String uid) {
|
||||
return mongoTemplate.findOne(Query.query(Criteria.where("uid").is(uid).and("eid").is(eid)), UserStat.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(UserStat userStat) {
|
||||
mongoTemplate.save(userStat);
|
||||
}
|
||||
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface VisitLogService {
|
||||
|
||||
/**
|
||||
* 查询企业具体页面的PV
|
||||
* @param eid
|
||||
* @param uri
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryPvCount(Long eid, String uri, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询企业具体页面的PV
|
||||
* @param eid
|
||||
* @param uri
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryPvCount(Long eid, String uri);
|
||||
|
||||
/**
|
||||
* 查询企业的PV
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryPvCount(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询企业的UV
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryUvCount(Long eid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询用户的所有页面的PV
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @return
|
||||
*/
|
||||
long queryPvCountByUser(Long eid, String uid, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询用户的指定页面的PV
|
||||
* @param eid
|
||||
* @param uid
|
||||
* @param uriList
|
||||
* @param start
|
||||
* @param end
|
||||
* @return
|
||||
*/
|
||||
long queryPvCountByUser(Long eid, String uid, List<String> uriList, String start, String end);
|
||||
|
||||
/**
|
||||
* 查询某企业访问页面城市的pv
|
||||
* @param eid
|
||||
* @param start
|
||||
* @param end
|
||||
*/
|
||||
List<Map<String, Object>> queryPvList(String start, String end);
|
||||
|
||||
}
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
package com.fangjia.job.youfang.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.cxytiandi.jdbc.EntityService;
|
||||
import com.fangjia.job.youfang.po.VisitLog;
|
||||
|
||||
@Service
|
||||
public class VisitLogServiceImpl extends EntityService<VisitLog> implements VisitLogService {
|
||||
|
||||
@Override
|
||||
public long queryPvCount(Long eid, String uri, String start, String end) {
|
||||
String sql = "select count(id) from visit_log where eid = ? and uri = ? and visit_time between ? and ?";
|
||||
return super.count(sql.toString(), new Object[] {eid, uri, start, end});
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryPvCount(Long eid, String uri) {
|
||||
String sql = "select count(id) from visit_log where eid = ? and uri = ?";
|
||||
return super.count(sql.toString(), new Object[] {eid, uri});
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryPvCount(Long eid, String start, String end) {
|
||||
String sql = "select count(id) from visit_log where eid = ? and visit_time between ? and ?";
|
||||
return super.count(sql.toString(), new Object[] {eid, start, end});
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryUvCount(Long eid, String start, String end) {
|
||||
String sql = "select count(distinct(uid)) from visit_log where eid = ? and visit_time between ? and ?";
|
||||
return super.count(sql.toString(), new Object[] {eid, start, end});
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryPvCountByUser(Long eid, String uid, String start, String end) {
|
||||
StringBuilder sql = new StringBuilder("select count(id) from visit_log where eid = ? and uid = ?");
|
||||
|
||||
List<Object> params = new ArrayList<Object>();
|
||||
params.add(eid);
|
||||
params.add(uid);
|
||||
|
||||
if (StringUtils.isNotBlank(start) && StringUtils.isNotBlank(end)) {
|
||||
sql.append(" and visit_time between ? and ?");
|
||||
params.add(start);
|
||||
params.add(end);
|
||||
}
|
||||
return super.count(sql.toString(), params.toArray());
|
||||
}
|
||||
|
||||
@Override
|
||||
public long queryPvCountByUser(Long eid, String uid, List<String> uriList, String start, String end) {
|
||||
List<Object> params = new ArrayList<Object>();
|
||||
StringBuilder sql = new StringBuilder("select count(id) from visit_log where eid = ? and uid = ?");
|
||||
params.add(eid);
|
||||
params.add(uid);
|
||||
sql.append(" and uri in (");
|
||||
for (String uri : uriList) {
|
||||
sql.append("?,");
|
||||
params.add(uri);
|
||||
}
|
||||
sql.delete(sql.length() - 1, sql.length());
|
||||
sql.append(")");
|
||||
if (StringUtils.isNotBlank(start) && StringUtils.isNotBlank(end)) {
|
||||
sql.append(" and visit_time between ? and ?");
|
||||
params.add(start);
|
||||
params.add(end);
|
||||
}
|
||||
return super.count(sql.toString(), params.toArray());
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> queryPvList(String start, String end) {
|
||||
String sql = "SELECT eid,city, uri,COUNT(uri) as pv,COUNT(DISTINCT(uid)) as uv FROM visit_log WHERE visit_time BETWEEN ? AND ? GROUP BY eid,city,uri";
|
||||
List<Map<String, Object>> list = super.getJdbcTemplate().queryForPage(0, Integer.MAX_VALUE, sql, new Object[] {start, end});
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
spring.data.mongodb.uri=mongodb://192.168.0.136/fangjia_youfang
|
||||
|
||||
spring.datasource.url=jdbc:mysql://192.168.0.132:4306/fangjia_youfang
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=G00jia
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
|
||||
spring.datasource.log.url=jdbc:mysql://192.168.0.132:4306/batch_log
|
||||
spring.datasource.log.username=sa
|
||||
spring.datasource.log.password=G00jia
|
||||
spring.datasource.log.driver-class-name=com.mysql.jdbc.Driver
|
||||
|
||||
fsh.url=http://192.168.0.251:8086
|
||||
|
||||
zk.server-lists=192.168.10.47:2181
|
||||
zk.namespace=fangjia-job-youfang-test
|
||||
@@ -0,0 +1,19 @@
|
||||
spring.data.mongodb.uri=mongodb://mongo.db.fangjia.com/fangjia_youfang
|
||||
|
||||
spring.datasource.url=jdbc:mysql://mysql.db.fangjia.com:4306/fangjia_youfang
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=G00jia
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
|
||||
#spring.datasource.log.url=jdbc:mysql://192.168.0.41:4306/batch_log
|
||||
#spring.datasource.log.username=root
|
||||
#spring.datasource.log.password=Ga041243
|
||||
#spring.datasource.log.driver-class-name=com.mysql.jdbc.Driver
|
||||
spring.datasource.log.url=jdbc:mysql://192.168.0.132:4306/batch_log
|
||||
spring.datasource.log.username=sa
|
||||
spring.datasource.log.password=G00jia
|
||||
spring.datasource.log.driver-class-name=com.mysql.jdbc.Driver
|
||||
fsh.url=http://youfang.fangjia.com
|
||||
|
||||
zk.server-lists=192.168.0.45:2181,192.168.0.46:2181,192.168.0.109:2181
|
||||
zk.namespace=fangjia-job-youfang
|
||||
@@ -0,0 +1,16 @@
|
||||
spring.data.mongodb.uri=mongodb://192.168.0.136/fangjia_youfang
|
||||
|
||||
spring.datasource.url=jdbc:mysql://192.168.0.132:4306/fangjia_youfang
|
||||
spring.datasource.username=sa
|
||||
spring.datasource.password=G00jia
|
||||
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
|
||||
|
||||
spring.datasource.log.url=jdbc:mysql://192.168.0.132:4306/batch_log
|
||||
spring.datasource.log.username=sa
|
||||
spring.datasource.log.password=G00jia
|
||||
spring.datasource.log.driver-class-name=com.mysql.jdbc.Driver
|
||||
|
||||
fsh.url=http://192.168.0.251:8086
|
||||
|
||||
zk.server-lists=192.168.10.47:2181
|
||||
zk.namespace=fangjia-job-youfang-test
|
||||
@@ -0,0 +1 @@
|
||||
spring.profiles.active=dev
|
||||
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:reg="http://www.dangdang.com/schema/ddframe/reg" xmlns:job="http://www.dangdang.com/schema/ddframe/job"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.dangdang.com/schema/ddframe/reg
|
||||
http://www.dangdang.com/schema/ddframe/reg/reg.xsd
|
||||
http://www.dangdang.com/schema/ddframe/job
|
||||
http://www.dangdang.com/schema/ddframe/job/job.xsd
|
||||
">
|
||||
<context:component-scan base-package="com.fangjia.job" />
|
||||
|
||||
<beans profile="dev">
|
||||
<context:property-placeholder location="classpath:application-dev.properties" />
|
||||
</beans>
|
||||
|
||||
<beans profile="test">
|
||||
<context:property-placeholder location="classpath:application-test.properties" />
|
||||
</beans>
|
||||
|
||||
<beans profile="prod">
|
||||
<context:property-placeholder location="classpath:application-prod.properties" />
|
||||
</beans>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,96 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<beans xmlns="http://www.springframework.org/schema/beans"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:reg="http://www.dangdang.com/schema/ddframe/reg"
|
||||
xmlns:job="http://www.dangdang.com/schema/ddframe/job"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context.xsd
|
||||
http://www.dangdang.com/schema/ddframe/reg
|
||||
http://www.dangdang.com/schema/ddframe/reg/reg.xsd
|
||||
http://www.dangdang.com/schema/ddframe/job
|
||||
http://www.dangdang.com/schema/ddframe/job/job.xsd
|
||||
">
|
||||
|
||||
<bean id="elasticJobLog" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="${spring.datasource.log.driver-class-name}"/>
|
||||
<property name="url" value="${spring.datasource.log.url}"/>
|
||||
<property name="username" value="${spring.datasource.log.username}"/>
|
||||
<property name="password" value="${spring.datasource.log.password}"/>
|
||||
<property name="validationQuery" value="SELECT 1" />
|
||||
<property name="testOnBorrow" value="true"/>
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" primary="true">
|
||||
<property name="driverClassName" value="${spring.datasource.driver-class-name}"/>
|
||||
<property name="url" value="${spring.datasource.url}"/>
|
||||
<property name="username" value="${spring.datasource.username}"/>
|
||||
<property name="password" value="${spring.datasource.password}"/>
|
||||
<property name="validationQuery" value="SELECT 1" />
|
||||
<property name="testOnBorrow" value="true"/>
|
||||
</bean>
|
||||
|
||||
<bean id="cxytiandiJdbcTemplate" class="com.cxytiandi.jdbc.CxytiandiJdbcTemplate">
|
||||
<constructor-arg>
|
||||
<value>com.fangjia.job.youfang.po</value>
|
||||
</constructor-arg>
|
||||
<property name="dataSource" ref="dataSource"></property>
|
||||
</bean>
|
||||
|
||||
<reg:zookeeper id="regCenter" server-lists="${zk.server-lists}" namespace="${zk.namespace}"
|
||||
base-sleep-time-milliseconds="1000" max-sleep-time-milliseconds="3000" max-retries="3" />
|
||||
|
||||
|
||||
<!-- 企业统计任务 每天0点1分执行 -->
|
||||
<job:simple id="enterpriseStatJob" class="com.fangjia.job.youfang.job.EnterpriseStatJob" registry-center-ref="regCenter"
|
||||
sharding-total-count="1" cron="0 1 0 * * ?" sharding-item-parameters=""
|
||||
failover="true" description="【房生活】企业统计任务,每天0点1分开始执行,主要统计企业相关的数据,统计内容参考 EnterpriseStat"
|
||||
overwrite="true" event-trace-rdb-data-source="elasticJobLog" job-exception-handler="com.fangjia.job.youfang.handler.CustomJobExceptionHandler">
|
||||
|
||||
<job:listener class="com.fangjia.job.youfang.listener.MessageElasticJobListener"></job:listener>
|
||||
|
||||
</job:simple>
|
||||
|
||||
<!-- 用户统计任务 每天1点10分执行 -->
|
||||
<job:simple id="userStatJob" class="com.fangjia.job.youfang.job.UserStatJob" registry-center-ref="regCenter"
|
||||
sharding-total-count="1" cron="0 10 1 * * ?" sharding-item-parameters=""
|
||||
failover="true" description="【房生活】用户维度统计任务,统计出用户的房产,置换,贷款等信息 UserStatJob"
|
||||
overwrite="true" event-trace-rdb-data-source="elasticJobLog" job-exception-handler="com.fangjia.job.youfang.handler.CustomJobExceptionHandler">
|
||||
|
||||
<job:listener class="com.fangjia.job.youfang.listener.MessageElasticJobListener"></job:listener>
|
||||
|
||||
</job:simple>
|
||||
|
||||
<!-- 房产月涨幅通知任务 每个月1号凌晨1点10分执行 -->
|
||||
<job:simple id="houseRoseMonthNoticeJob" class="com.fangjia.job.youfang.job.HouseRoseMonthNoticeJob" registry-center-ref="regCenter"
|
||||
sharding-total-count="1" cron="0 10 1 1 * ?" sharding-item-parameters=""
|
||||
failover="true" description="【房生活】房产月涨幅通知任务, 每个月1号触发,目前计算逻辑在服务端"
|
||||
overwrite="true" event-trace-rdb-data-source="elasticJobLog" job-exception-handler="com.fangjia.job.youfang.handler.CustomJobExceptionHandler">
|
||||
|
||||
<job:listener class="com.fangjia.job.youfang.listener.MessageElasticJobListener"></job:listener>
|
||||
|
||||
</job:simple>
|
||||
|
||||
<!-- 租金提醒通知任务 每天3点10分执行 -->
|
||||
<job:simple id="houseRentNoticeJob" class="com.fangjia.job.youfang.job.HouseRentNoticeJob" registry-center-ref="regCenter"
|
||||
sharding-total-count="1" cron="0 10 3 * * ?" sharding-item-parameters=""
|
||||
failover="true" description="【房生活】房产租金提醒任务,每天触发一次,逻辑在服务端"
|
||||
overwrite="true" event-trace-rdb-data-source="elasticJobLog" job-exception-handler="com.fangjia.job.youfang.handler.CustomJobExceptionHandler">
|
||||
|
||||
<job:listener class="com.fangjia.job.youfang.listener.MessageElasticJobListener"></job:listener>
|
||||
|
||||
</job:simple>
|
||||
|
||||
<!-- 房产每周一定时估价任务 每周一2点10分执行 -->
|
||||
<job:simple id="houseWeekEvalJob" class="com.fangjia.job.youfang.job.HouseWeekEvalJob" registry-center-ref="regCenter"
|
||||
sharding-total-count="1" cron="0 10 2 ? * 2" sharding-item-parameters=""
|
||||
failover="true" description="【房生活】房产每周一定时估价任务,逻辑在服务端,同时需要算出周涨幅通知"
|
||||
overwrite="true" event-trace-rdb-data-source="elasticJobLog" job-exception-handler="com.fangjia.job.youfang.handler.CustomJobExceptionHandler">
|
||||
|
||||
<job:listener class="com.fangjia.job.youfang.listener.MessageElasticJobListener"></job:listener>
|
||||
|
||||
</job:simple>
|
||||
|
||||
</beans>
|
||||
@@ -0,0 +1,39 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
|
||||
<!--定义日志文件的存储地址 勿在 LogBack 的配置中使用相对路径-->
|
||||
<property name="LOG_HOME" value="/home/goojia/logs" />
|
||||
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名-->
|
||||
<FileNamePattern>${LOG_HOME}/youfang-job.log.%d{yyyy-MM-dd}.log</FileNamePattern>
|
||||
<!--日志文件保留天数-->
|
||||
<MaxHistory>7</MaxHistory>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
|
||||
</encoder>
|
||||
<!--日志文件最大的大小-->
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>100MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
</appender>
|
||||
|
||||
<!-- 日志输出级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
||||
+1
-1
@@ -21,7 +21,7 @@
|
||||
<commons-dbcp.version>1.4</commons-dbcp.version>
|
||||
<mysql.version>5.1.30</mysql.version>
|
||||
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
|
||||
<jdbc.version>1.0.1</jdbc.version>
|
||||
<jdbc.version>1.0.2</jdbc.version>
|
||||
<feign.version>9.5.0</feign.version>
|
||||
</properties>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user