|
|
|
@@ -22,6 +22,7 @@ import org.springframework.web.bind.annotation.GetMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
|
import java.text.NumberFormat; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.*; |
|
|
|
@@ -158,7 +159,23 @@ public class WxUserStructureController extends BaseController { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//昨日同比 |
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
//昨日同比 |
|
|
|
c.clear(); |
|
|
|
c.setTime(today); |
|
|
|
c.add(Calendar.DAY_OF_YEAR, -1); |
|
|
|
dto.setStartTime(c.getTime()); |
|
|
|
c.add(Calendar.DAY_OF_YEAR, 1); |
|
|
|
dto.setEndTime(c.getTime()); |
|
|
|
long yesterdayCount = wxCUserService.findCount(dto); |
|
|
|
if(yesterdayCount>0){ |
|
|
|
double yesterday=(double) (wxtodayCount-yesterdayCount)/yesterdayCount*100; |
|
|
|
double zrhb = new BigDecimal(yesterday).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
map.put("wxhb",zrhb+"%"); |
|
|
|
}else{ |
|
|
|
map.put("wxhb","--%"); |
|
|
|
} |
|
|
|
map.put("wxallCount", wxallCount);//累计会员总数 |
|
|
|
map.put("wxtodayCount", wxtodayCount);//今日新增会员数 |
|
|
|
map.put("wxallCountVos", wxallCountVos);//累计会员列表( 日期和数量list) |
|
|
|
@@ -215,7 +232,25 @@ public class WxUserStructureController extends BaseController { |
|
|
|
i++; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> map = new HashMap<>(); |
|
|
|
//昨日同比 |
|
|
|
c.clear(); |
|
|
|
c.setTime(today); |
|
|
|
c.add(Calendar.DAY_OF_YEAR, -1); |
|
|
|
dto.setStartTime(c.getTime()); |
|
|
|
c.add(Calendar.DAY_OF_YEAR, 1); |
|
|
|
dto.setEndTime(c.getTime()); |
|
|
|
long yesterdayCount = wxCUserService.findCount(dto); |
|
|
|
if(yesterdayCount>0){ |
|
|
|
double yesterday=(double) (todayCount-yesterdayCount)/yesterdayCount*100; |
|
|
|
double zrhb = new BigDecimal(yesterday).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); |
|
|
|
map.put("hb",zrhb+"%"); |
|
|
|
}else{ |
|
|
|
map.put("hb","--%"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
map.put("allCount", allCount);//累计会员总数 |
|
|
|
map.put("todayCount", todayCount);//今日新增会员数 |
|
|
|
map.put("allCountVos", allCountVos);//累计会员列表( 日期和数量list) |
|
|
|
|