Commit 60c6cfb3 authored by 赵啸非's avatar 赵啸非

测试 事项查询

parent 82a8b7e9
......@@ -27,7 +27,6 @@ import java.util.List;
public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity, Long> implements MatterDao {
@Override
public Result<MatterEntity> getSubList(MatterEntity matterQuery, PageInfo pageInfo) {
Result<MatterEntity> result = new Result();
......@@ -51,6 +50,7 @@ public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity, Long> implem
public int getSubCount(ParamDto paramDto) {
return this.getSqlSession().selectOne(this.getSqlId(SQLID_SUB_COUNT), this.cpyQueryParamDto(paramDto));
}
@Override
public int getMatterListByAreaCodeCount(ParamDto paramDto) {
return this.getSqlSession().selectOne(this.getSqlId(SQLID_MATTERLIST_AREACODE_COUNT), this.cpyQueryParamDto(paramDto));
......@@ -61,7 +61,7 @@ public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity, Long> implem
ParamDto param = new ParamDto();
param.getCondition().put("areaCode", matterQuery.getAreaCode());
if(!ObjectUtils.isEmpty(matterQuery.getSource())){
if (!ObjectUtils.isEmpty(matterQuery.getSource())) {
param.getCondition().put("source", matterQuery.getSource());
}
return this.getSqlSession().selectList(this.getSqlId("getMatterListByAreaCode"), param);
......@@ -75,18 +75,15 @@ public class MatterDaoImpl extends BaseCRUDDaoMybatis<MatterEntity, Long> implem
@Override
public Result<MatterEntity> getMatterListByAreaCodePage(MatterEntity matterQuery, PageInfo pageInfo) {
Result<MatterEntity> result = new Result();
ParamDto paramDto = this.getQueryParam(matterQuery);
int count = this.getMatterListByAreaCodeCount(paramDto);
List list = null;
if (count == 0) {
list = new ArrayList();
} else if (pageInfo.getPrePageResult() == -1) {
list = this.getSqlSession().selectList(this.getSqlId(SQLID_MATTERLIST_AREACODE), paramDto);
} else {
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
list = this.getSqlSession().selectList(this.getSqlId(SQLID_MATTERLIST_AREACODE), this.cpyQueryParamDto(paramDto), rowBounds);
ParamDto param = new ParamDto();
param.getCondition().put("areaCode", matterQuery.getAreaCode());
if (!ObjectUtils.isEmpty(matterQuery.getSource())) {
param.getCondition().put("source", matterQuery.getSource());
}
pageInfo.setTotalResult(count);
RowBounds rowBounds = new RowBounds(pageInfo.getBeginIndex(), pageInfo.getPrePageResult());
List<MatterEntity> list = this.getSqlSession().selectList(this.getSqlId(SQLID_MATTERLIST_AREACODE), param, rowBounds);
// pageInfo.setTotalResult(count);
result.setPageInfo(pageInfo);
result.setList(list);
return result;
......
......@@ -122,6 +122,15 @@ Content-Type: application/json
}
###test testAllMatterCount
POST {{baseUrl}}/test/testAllMatterCount
Content-Type: application/json
{
"areaCode":"511500000000"
}
###testre
POST {{baseUrl}}/test/reDepts
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment