|
|
@ -25,10 +25,7 @@ import org.springframework.util.StringUtils; |
|
|
|
import java.sql.Timestamp; |
|
|
|
import java.text.ParseException; |
|
|
|
import java.text.SimpleDateFormat; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Date; |
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.*; |
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@Service |
|
|
@ -62,15 +59,19 @@ public class AdminService { |
|
|
|
public PageResult<MatrixAdvRecordBo> advList(AdvRecordQuery param, int ownerId) { |
|
|
|
List<MatrixApp> appList = appMapper.selectList(null); |
|
|
|
LambdaQueryWrapper<MatrixAdvRecord> wrapper = Wrappers.lambdaQuery(); |
|
|
|
|
|
|
|
Optional<MatrixApp> app = appList.stream().filter(x -> x.getCode().equals(param.code)).findFirst(); |
|
|
|
if (app.isEmpty()) { |
|
|
|
throw new PaganiException(PaganiExceptionCode.ILLEGAL_REQUEST, "非法请求"); |
|
|
|
} |
|
|
|
wrapper.eq(MatrixAdvRecord::getAppId, app.get().getId()); |
|
|
|
|
|
|
|
if (param.advType != null) { |
|
|
|
wrapper.eq(MatrixAdvRecord::getAdvType, param.advType); |
|
|
|
} |
|
|
|
if (param.platform != null) { |
|
|
|
wrapper.eq(MatrixAdvRecord::getPlatform, param.platform); |
|
|
|
} |
|
|
|
if (param.appId != null) { |
|
|
|
wrapper.eq(MatrixAdvRecord::getAppId, param.appId); |
|
|
|
} |
|
|
|
if (StringUtils.hasText(param.deviceId)) { |
|
|
|
wrapper.eq(MatrixAdvRecord::getDeviceId, param.deviceId); |
|
|
|
} |
|
|
|