|
@@ -9,8 +9,6 @@ import cn.com.ctop.kuaishou.modules.ai.service.IAiKuaiShouAppInfoService;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
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.ApiOperation;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
@@ -153,28 +151,37 @@ public class AiKuaiShouAppInfoController {
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 分页列表查询
|
|
|
+ * 查询 app列表
|
|
|
*
|
|
|
- * @param aiKuaiShouAppInfo
|
|
|
- * @param pageNo
|
|
|
- * @param pageSize
|
|
|
- * @param req
|
|
|
+ * @param requestJson
|
|
|
* @return
|
|
|
*/
|
|
|
- @AutoLog(value = "ai批量上传应用-分页列表查询")
|
|
|
- @ApiOperation(value = "ai批量上传应用-分页列表查询", notes = "ai批量上传应用-分页列表查询")
|
|
|
- @GetMapping(value = "/list")
|
|
|
- public Result<IPage<AiKuaiShouAppInfo>> queryPageList(AiKuaiShouAppInfo aiKuaiShouAppInfo,
|
|
|
- @RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo,
|
|
|
- @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
|
|
|
- HttpServletRequest req) {
|
|
|
- Result<IPage<AiKuaiShouAppInfo>> result = new Result<>();
|
|
|
- QueryWrapper<AiKuaiShouAppInfo> queryWrapper = QueryGenerator.initQueryWrapper(aiKuaiShouAppInfo, req.getParameterMap());
|
|
|
- Page<AiKuaiShouAppInfo> page = new Page<AiKuaiShouAppInfo>(pageNo, pageSize);
|
|
|
- IPage<AiKuaiShouAppInfo> pageList = aiKuaiShouAppInfoService.page(page, queryWrapper);
|
|
|
- result.setSuccess(true);
|
|
|
- result.setResult(pageList);
|
|
|
- return result;
|
|
|
+
|
|
|
+ @PostMapping(value = "/list")
|
|
|
+ public JSONObject queryPageList(@RequestBody JSONObject requestJson) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ Long account_id = requestJson.getLong("account_id");
|
|
|
+ if (Check.isNull(account_id)) {
|
|
|
+ throw new Exception("账户id不能为空");
|
|
|
+ }
|
|
|
+ QueryWrapper<AiKuaiShouAppInfo> queryWrapper = new QueryWrapper<>();
|
|
|
+ queryWrapper.eq("account_id", account_id);
|
|
|
+ queryWrapper.eq("status", 2);
|
|
|
+ List<AiKuaiShouAppInfo> list = aiKuaiShouAppInfoService.list(queryWrapper);
|
|
|
+ if (Check.isNull(list)) {
|
|
|
+ throw new Exception("未获取到对应的app集合");
|
|
|
+ }
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "success");
|
|
|
+ returnJson.put("data", list);
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", -1);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ return returnJson;
|
|
|
}
|
|
|
|
|
|
/**
|