fix: stat traffic
This commit is contained in:
@@ -8,7 +8,6 @@ import org.wfc.user.domain.vo.UCdrClientVo;
|
||||
import org.wfc.user.domain.vo.UCdrHistoryUserVo;
|
||||
import org.wfc.user.domain.vo.UCdrUserVo;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -21,7 +20,7 @@ import java.util.List;
|
||||
*/
|
||||
public interface UCdrMapper extends BaseMapper<UCdr> {
|
||||
|
||||
List<UCdrUserVo> getByUser(@Param("userId") Long userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
List<UCdrUserVo> getByUser(@Param("userId") Long userId, @Param("startTime") Long startTime, @Param("endTime") Long endTime);
|
||||
|
||||
List<UCdrClientVo> getByClient(@Param("client") UCdrClientBo client);
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class UAccountServiceImpl extends ServiceImpl<UAccountMapper, UAccount> i
|
||||
DateTime endTime = DateUtil.offsetSecond(current, -30);
|
||||
List<UAccount> accounts = this.list(Wrappers.<UAccount>lambdaQuery().gt(UAccount::getEndTime, endTime));
|
||||
// 更新账户已使用流量,已使用时长
|
||||
List<UCdrUserVo> statCdr = ucdrMapper.getByUser(null, current, endTime);
|
||||
List<UCdrUserVo> statCdr = ucdrMapper.getByUser(null, current.getTime(), endTime.getTime());
|
||||
for (UAccount account : accounts) {
|
||||
for (UCdrUserVo stat : statCdr) {
|
||||
if (Objects.equals(account.getUserId(), stat.getId())) {
|
||||
|
||||
Reference in New Issue
Block a user