|
@@ -5,8 +5,6 @@ import cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouBatchCampaignTemplate;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCampaignTemplateService;
|
|
import cn.com.ctop.kuaishou.modules.batch.service.IKuaiShouBatchCampaignTemplateService;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
-import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.Api;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -48,28 +46,18 @@ public class KuaiShouBatchCampaignTemplateController {
|
|
@Autowired
|
|
@Autowired
|
|
private IKuaiShouBatchCampaignTemplateService kuaiShouBatchCampaignTemplateService;
|
|
private IKuaiShouBatchCampaignTemplateService kuaiShouBatchCampaignTemplateService;
|
|
|
|
|
|
- /**
|
|
|
|
- * 分页列表查询
|
|
|
|
- *
|
|
|
|
- * @param kuaiShouBatchCampaignTemplate
|
|
|
|
- * @param pageNo
|
|
|
|
- * @param pageSize
|
|
|
|
- * @param req
|
|
|
|
- * @return
|
|
|
|
- */
|
|
|
|
@AutoLog(value = "计划模板-分页列表查询")
|
|
@AutoLog(value = "计划模板-分页列表查询")
|
|
@ApiOperation(value = "计划模板-分页列表查询", notes = "计划模板-分页列表查询")
|
|
@ApiOperation(value = "计划模板-分页列表查询", notes = "计划模板-分页列表查询")
|
|
- @GetMapping(value = "/list")
|
|
|
|
- public Result<IPage<KuaiShouBatchCampaignTemplate>> queryPageList(KuaiShouBatchCampaignTemplate kuaiShouBatchCampaignTemplate,
|
|
|
|
- @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
|
- HttpServletRequest req) {
|
|
|
|
- Result<IPage<KuaiShouBatchCampaignTemplate>> result = new Result<>();
|
|
|
|
- QueryWrapper<KuaiShouBatchCampaignTemplate> queryWrapper = QueryGenerator.initQueryWrapper(kuaiShouBatchCampaignTemplate, req.getParameterMap());
|
|
|
|
- Page<KuaiShouBatchCampaignTemplate> page = new Page<KuaiShouBatchCampaignTemplate>(pageNo, pageSize);
|
|
|
|
- IPage<KuaiShouBatchCampaignTemplate> pageList = kuaiShouBatchCampaignTemplateService.page(page, queryWrapper);
|
|
|
|
|
|
+ @GetMapping(value = "/getCampaignTemplate")
|
|
|
|
+ public Result<KuaiShouBatchCampaignTemplate> queryPageList(Long accountId) {
|
|
|
|
+ Result<KuaiShouBatchCampaignTemplate> result = new Result<>();
|
|
|
|
+ QueryWrapper<KuaiShouBatchCampaignTemplate> queryWrapper = new QueryWrapper<>();
|
|
|
|
+ queryWrapper.eq("account_id", accountId);
|
|
|
|
+ queryWrapper.orderByDesc("create_time");
|
|
|
|
+ queryWrapper.last("limit 1");
|
|
|
|
+ KuaiShouBatchCampaignTemplate one = kuaiShouBatchCampaignTemplateService.getOne(queryWrapper);
|
|
result.setSuccess(true);
|
|
result.setSuccess(true);
|
|
- result.setResult(pageList);
|
|
|
|
|
|
+ result.setResult(one);
|
|
return result;
|
|
return result;
|
|
}
|
|
}
|
|
|
|
|