|
@@ -1,13 +1,27 @@
|
|
package org.jeecg.ctop.finance.policy.controller;
|
|
package org.jeecg.ctop.finance.policy.controller;
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
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;
|
|
|
|
+import org.jeecg.common.api.vo.Result;
|
|
|
|
+import org.jeecg.common.system.query.QueryGenerator;
|
|
|
|
+import org.jeecg.ctop.finance.settlement.entity.pojo.ctopCwjsSettlementInfo;
|
|
|
|
+import org.jeecg.ctop.finance.settlement.service.ISettlementInfoService;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
*
|
|
*
|
|
* @description: demo
|
|
* @description: demo
|
|
@@ -21,6 +35,11 @@ import org.springframework.web.bind.annotation.RestController;
|
|
@Slf4j
|
|
@Slf4j
|
|
public class DemoController {
|
|
public class DemoController {
|
|
|
|
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private ISettlementInfoService settlementInfoService;
|
|
|
|
+
|
|
|
|
+
|
|
@ApiOperation(value="demo", notes="demo")
|
|
@ApiOperation(value="demo", notes="demo")
|
|
@GetMapping(value = "/demo")
|
|
@GetMapping(value = "/demo")
|
|
public String queryPageList() {
|
|
public String queryPageList() {
|
|
@@ -29,4 +48,48 @@ public class DemoController {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * @description:测试 注解 @Dict 返回类型 为 IPage
|
|
|
|
+ *
|
|
|
|
+ * @return: org.jeecg.common.api.vo.Result<com.baomidou.mybatisplus.core.metadata.IPage<org.jeecg.ctop.finance.settlement.entity.pojo.ctopCwjsSettlementInfo>>
|
|
|
|
+ * @author: zianY
|
|
|
|
+ * @time: 2021/7/28 18:36
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value="test", notes="test")
|
|
|
|
+ @GetMapping(value = "/test")
|
|
|
|
+ public Result<IPage<ctopCwjsSettlementInfo>> test(ctopCwjsSettlementInfo SettlementInfoPojo,
|
|
|
|
+ @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
|
|
|
+ HttpServletRequest req) {
|
|
|
|
+ QueryWrapper<ctopCwjsSettlementInfo> queryWrapper = QueryGenerator.initQueryWrapper(SettlementInfoPojo, req.getParameterMap());
|
|
|
|
+ Page<ctopCwjsSettlementInfo> page = new Page<>(pageNo, pageSize);
|
|
|
|
+ IPage<ctopCwjsSettlementInfo> list = settlementInfoService.page(page, queryWrapper);
|
|
|
|
+ return Result.successMsg("chenggong.",list);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ *
|
|
|
|
+ * @description: 注解 @Dict 返回类型 为 PageInfo
|
|
|
|
+
|
|
|
|
+ * @return: org.jeecg.common.api.vo.Result<com.github.pagehelper.PageInfo<org.jeecg.ctop.finance.settlement.entity.pojo.ctopCwjsSettlementInfo>>
|
|
|
|
+ * @author: zianY
|
|
|
|
+ * @time: 2021/7/28 20:35
|
|
|
|
+ */
|
|
|
|
+ @ApiOperation(value="test2", notes="test2")
|
|
|
|
+ @GetMapping(value = "/test2")
|
|
|
|
+ public Result<PageInfo<ctopCwjsSettlementInfo>> test2(@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
|
|
|
+ @RequestParam(name="pageSize", defaultValue="10") Integer pageSize) {
|
|
|
|
+ PageHelper.startPage(pageNo,pageSize);
|
|
|
|
+ List<ctopCwjsSettlementInfo> list = settlementInfoService.getList();
|
|
|
|
+ PageInfo<ctopCwjsSettlementInfo> pageInfo = new PageInfo<>(list);
|
|
|
|
+ return Result.successMsg("chenggong.",pageInfo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}
|
|
}
|