|
@ -15,15 +15,19 @@ import awesome.group.game.service.common.exception.PaganiExceptionCode; |
|
|
import awesome.group.game.service.util.EncryptUtil; |
|
|
import awesome.group.game.service.util.EncryptUtil; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
|
|
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.BeanUtils; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
import org.springframework.stereotype.Service; |
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
import org.springframework.util.StringUtils; |
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.sql.Timestamp; |
|
|
|
|
|
import java.text.ParseException; |
|
|
|
|
|
import java.text.SimpleDateFormat; |
|
|
import java.util.ArrayList; |
|
|
import java.util.ArrayList; |
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
@ -68,6 +72,16 @@ public class AdminService { |
|
|
if (StringUtils.hasText(param.deviceId)) { |
|
|
if (StringUtils.hasText(param.deviceId)) { |
|
|
wrapper.eq(MatrixAdvRecord::getDeviceId, param.deviceId); |
|
|
wrapper.eq(MatrixAdvRecord::getDeviceId, param.deviceId); |
|
|
} |
|
|
} |
|
|
|
|
|
if (!CollectionUtils.isEmpty(param.createdAt)) { |
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
|
|
|
try { |
|
|
|
|
|
Date begin = format.parse(param.createdAt.get(0)), end = format.parse(param.createdAt.get(1)); |
|
|
|
|
|
wrapper.between(MatrixAdvRecord::getCreatedAt, new Timestamp(begin.getTime()), new Timestamp(end.getTime())); |
|
|
|
|
|
} catch (ParseException e) { |
|
|
|
|
|
throw new PaganiException(PaganiExceptionCode.ILLEGAL_REQUEST, "时间范围有误"); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
wrapper.orderByDesc(MatrixAdvRecord::getId); |
|
|
wrapper.orderByDesc(MatrixAdvRecord::getId); |
|
|
if (ownerId != 1) { |
|
|
if (ownerId != 1) { |
|
|
List<Integer> appIds = appList.stream().filter(x -> x.getOwnerId() != null && x.getOwnerId() == ownerId).map(MatrixApp::getId).toList(); |
|
|
List<Integer> appIds = appList.stream().filter(x -> x.getOwnerId() != null && x.getOwnerId() == ownerId).map(MatrixApp::getId).toList(); |
|
|