This commit is contained in:
尹吉欢
2017-10-25 12:05:42 +08:00
parent 66c595fb84
commit 3a66ee0c06
4 changed files with 24 additions and 11 deletions
+13
View File
@@ -73,4 +73,17 @@
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<executable>true</executable>
<mainClass>com.fangjia.job.fsh.FshJobApp</mainClass>
</configuration>
</plugin>
</plugins>
</build>
</project>
@@ -96,8 +96,8 @@ public class EnterpriseStatJob implements SimpleJob {
stat.setModifyDate(new Date());
stat.setTerdayAddUserCount(enterpriseProductUserService.queryAddUserCount(eid, start, end));
stat.setTotalUserCount(enterpriseProductUserService.queryUserCount(eid));
stat.setTerdayLoginCount(visitLogService.queryPvCount(eid, "/index", start, end));
stat.setTotalLoginCount(visitLogService.queryPvCount(eid, "/index"));
stat.setTerdayLoginCount(visitLogService.queryPvCount(eid, "/myHouse/index", start, end));
stat.setTotalLoginCount(visitLogService.queryPvCount(eid, "/myHouse/index"));
stat.setTerdayLoanEvalCount(loanApplyService.queryCountByType(eid, 2, start, end));
stat.setTotalLoanEvalCount(loanApplyService.queryCountByType(eid, 2));
stat.setTerdayIntentionCount(loanApplyService.queryCountByType(eid, 1, start, end));
@@ -9,13 +9,13 @@ public class HouseInfoServiceImpl extends EntityService<HouseInfo> implements Ho
@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 ?";
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 ?";
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;
@@ -25,13 +25,13 @@ public class HouseInfoServiceImpl extends EntityService<HouseInfo> implements Ho
@Override
public long queryHouseAllCount(Long eid) {
String sql = "select count(id) from house_info where 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 = ?";
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;
@@ -41,18 +41,18 @@ public class HouseInfoServiceImpl extends EntityService<HouseInfo> implements Ho
@Override
public long queryCountByLiveStatus(Long eid, String liveStatus) {
String sql = "select count(id) from house_info where eid = ? and live_status = ?";
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" }, new Object[] { eid, 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 = ?";
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;
@@ -20,8 +20,8 @@ public class LoanApplyServiceImpl extends EntityService<LoanApply> implements Lo
@Override
public Double queryLoanMoney(Long eid, String start, String end) {
String sql = "select sum(apply_money) from loan_apply where eid = ? and type = 1";
Double money = super.getJdbcTemplate().queryForObject(sql, new Object[] { eid }, Double.class);
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;
}