Commit 01951ef6 by jianan

历史比对年月列表查询-修改响应结果集格式

parent 605cb8c7
...@@ -119,7 +119,17 @@ public class LifeCommissionServiceImpl implements LifeCommissionService { ...@@ -119,7 +119,17 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
QuerycheckBatchListResponseVO resp = new QuerycheckBatchListResponseVO(); QuerycheckBatchListResponseVO resp = new QuerycheckBatchListResponseVO();
try { try {
List<String> checkBatchList = lifeCommissionMapper.querycheckBatchList(); List<String> checkBatchList = lifeCommissionMapper.querycheckBatchList();
resp.setCheckBatchList(checkBatchList);
// 将["2020-12","2020-11"]转为[{“key”:"2020-12","value":null}]
List<Map<String, String>> dataList = new ArrayList<>();
for (int i = 0; i < checkBatchList.size(); i++) {
Map<String, String> map = new HashMap<>();
map.put("key", checkBatchList.get(i));
map.put("value", null);
dataList.add(map);
}
resp.setCheckBatchList(dataList);
resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000"))); resp.setCommonResult(new CommonResult(true, ZHBErrorConfig.getErrorInfo("800000")));
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -4,9 +4,10 @@ import com.yd.api.result.CommonResult; ...@@ -4,9 +4,10 @@ import com.yd.api.result.CommonResult;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
import java.util.Map;
@Data @Data
public class QuerycheckBatchListResponseVO { public class QuerycheckBatchListResponseVO {
private CommonResult commonResult; private CommonResult commonResult;
private List<String> checkBatchList; private List<Map<String, String>> checkBatchList;
} }
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