|
@@ -53,7 +53,6 @@ public class BytedancePlanDailyReportController {
|
|
|
* @param bytedancePlanDailyReport
|
|
|
* @param pageNo
|
|
|
* @param pageSize
|
|
|
- * @param req
|
|
|
* @return
|
|
|
*/
|
|
|
@AutoLog(value = "广告计划日报表信息-分页列表查询")
|
|
@@ -61,11 +60,17 @@ public class BytedancePlanDailyReportController {
|
|
|
@GetMapping(value = "/list")
|
|
|
public Result<IPage<BytedancePlanDailyReport>> queryPageList(BytedancePlanDailyReport bytedancePlanDailyReport,
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<IPage<BytedancePlanDailyReport>> result = new Result<IPage<BytedancePlanDailyReport>>();
|
|
|
- QueryWrapper<BytedancePlanDailyReport> queryWrapper = QueryGenerator.initQueryWrapper(bytedancePlanDailyReport, req.getParameterMap());
|
|
|
- Page<BytedancePlanDailyReport> page = new Page<BytedancePlanDailyReport>(pageNo, pageSize);
|
|
|
+ @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize) {
|
|
|
+ Result<IPage<BytedancePlanDailyReport>> result = new Result<>();
|
|
|
+ QueryWrapper<BytedancePlanDailyReport> queryWrapper = new QueryWrapper<>();
|
|
|
+ if (null != bytedancePlanDailyReport.getStatDatetime() && !"".equals(bytedancePlanDailyReport.getStatDatetime())) {
|
|
|
+ queryWrapper.eq("stat_datetime", bytedancePlanDailyReport.getStatDatetime().substring(1, 11) + " 00:00:00");
|
|
|
+ }
|
|
|
+ if (null != bytedancePlanDailyReport.getPlanCode() && !"".equals(bytedancePlanDailyReport.getPlanCode())) {
|
|
|
+ queryWrapper.eq("plan_code", bytedancePlanDailyReport.getPlanCode().replace("yk_xxl_jrtt_", ""));
|
|
|
+ }
|
|
|
+ queryWrapper.orderByDesc("stat_datetime", "order_num");
|
|
|
+ Page<BytedancePlanDailyReport> page = new Page<>(pageNo, pageSize);
|
|
|
IPage<BytedancePlanDailyReport> pageList = bytedancePlanDailyReportService.page(page, queryWrapper);
|
|
|
result.setSuccess(true);
|
|
|
result.setResult(pageList);
|
|
@@ -119,6 +124,32 @@ public class BytedancePlanDailyReportController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
+ * 编辑
|
|
|
+ *
|
|
|
+ * @param bytedancePlanDailyReport
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @AutoLog(value = "广告计划日报表信息-编辑")
|
|
|
+ @ApiOperation(value = "广告计划日报表信息-编辑", notes = "广告计划日报表信息-编辑")
|
|
|
+ @PutMapping(value = "/synZybData")
|
|
|
+ public Result<BytedancePlanDailyReport> synZybData(@RequestBody BytedancePlanDailyReport bytedancePlanDailyReport) {
|
|
|
+ Result<BytedancePlanDailyReport> result = new Result<BytedancePlanDailyReport>();
|
|
|
+ BytedancePlanDailyReport bytedancePlanDailyReportEntity = bytedancePlanDailyReportService.getById(bytedancePlanDailyReport.getId());
|
|
|
+ if (bytedancePlanDailyReportEntity == null) {
|
|
|
+ result.error500("未找到对应实体");
|
|
|
+ } else {
|
|
|
+ bytedancePlanDailyReportEntity.setRegistNum(bytedancePlanDailyReport.getRegistNum());
|
|
|
+ bytedancePlanDailyReportEntity.setOrderNum(bytedancePlanDailyReport.getOrderNum());
|
|
|
+ boolean ok = bytedancePlanDailyReportService.updateById(bytedancePlanDailyReportEntity);
|
|
|
+ if (ok) {
|
|
|
+ result.success("修改成功!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ return result;
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
* 通过id删除
|
|
|
*
|
|
|
* @param id
|