Commit 01951ef6 by jianan

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

parent 605cb8c7
......@@ -119,7 +119,17 @@ public class LifeCommissionServiceImpl implements LifeCommissionService {
QuerycheckBatchListResponseVO resp = new QuerycheckBatchListResponseVO();
try {
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")));
} catch (Exception e) {
e.printStackTrace();
......
......@@ -4,9 +4,10 @@ import com.yd.api.result.CommonResult;
import lombok.Data;
import java.util.List;
import java.util.Map;
@Data
public class QuerycheckBatchListResponseVO {
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