ky 5 years ago
parent 01e251e3c9
commit fecf1a7c4e

@ -1,6 +1,7 @@
package com.gszc.controller;
import com.alibaba.fastjson.JSONObject;
import com.gszc.build.Result;
import com.gszc.build.ResultBuilder;
import com.gszc.entity.Industry;
@ -81,5 +82,16 @@ public class PcParkController {
return ResultBuilder.withPayload(invoiceCategories).build();
}
@PostMapping("/queryPark")
@ApiOperation(value = "查看park", notes = "查看park")
@ApiImplicitParams({
@ApiImplicitParam(name = "token", value = "token", required = true, dataType = "String", paramType = "header"),
})
@ResponseBody
public Result queryPark(Integer pageNum,Integer pageSize) {
JSONObject result = parkService.queryPark(pageNum, pageSize);
return ResultBuilder.withPayload(result).build();
}
}

@ -43,6 +43,7 @@ public class Park extends Model<Park> {
*
*/
@TableField("company_category")
@ApiModelProperty(value = "逗号分隔 proprietorship-个人独资 limit-有限责任公司 partner-合伙人企业 individual-个体工商户")
private String companyCategory;
/**
*

@ -1,11 +1,10 @@
package com.gszc.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.gszc.entity.Industry;
import com.gszc.entity.InvoiceCategory;
import com.gszc.entity.Park;
import com.gszc.entity.*;
import com.gszc.entity.Park;
import com.gszc.mapper.IndustryMapper;
import com.gszc.mapper.InvoiceCategoryMapper;
@ -97,5 +96,15 @@ public class ParkServiceImpl extends ServiceImpl<ParkMapper, Park> implements IP
return list;
}
public JSONObject queryPark(Integer pageNum, Integer pageSize){
Integer count = parkMapper.selectCount(new EntityWrapper<Park>());
List<Park> result = parkMapper.selectPage(new Page<>((pageNum - 1) * pageSize, pageSize), new EntityWrapper<Park>().eq("1", "1").orderBy("create_date", false));
JSONObject jsonObject = new JSONObject();
jsonObject.put("count",count);
jsonObject.put("data",result);
return jsonObject;
}
}

Loading…
Cancel
Save