fix 变更DictAspect.java导致的问题
This commit is contained in:
+8
-8
@@ -106,13 +106,6 @@ public class DictAspect {
|
||||
items.add(item);
|
||||
}
|
||||
((IPage) ((Result) result).getResult()).setRecords(items);
|
||||
}else if (((Result) result).getResult() instanceof List){
|
||||
List<JSONObject> items = new ArrayList<>();
|
||||
for (Object record :(List) ((Result) result).getResult()) {
|
||||
JSONObject item = translate(record);
|
||||
items.add(item);
|
||||
}
|
||||
((Result) result).setResult(items);
|
||||
}else {
|
||||
Object record = (Object) ((Result) result).getResult();
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
@@ -161,7 +154,14 @@ public class DictAspect {
|
||||
* @param result
|
||||
*/
|
||||
private void parseMethodDictText(Object result) {
|
||||
if (result instanceof Result) {
|
||||
if (((Result) result).getResult() instanceof List){
|
||||
List<JSONObject> items = new ArrayList<>();
|
||||
for (Object record :(List) ((Result) result).getResult()) {
|
||||
JSONObject item = translate(record);
|
||||
items.add(item);
|
||||
}
|
||||
((Result) result).setResult(items);
|
||||
} else if (result instanceof Result) {
|
||||
Object result1 = ((Result<Object>) result).getResult();
|
||||
String jsonStr = JSONUtil.toJsonStr(result1);
|
||||
if (JSONUtil.isJsonObj(jsonStr)) {
|
||||
|
||||
+3
@@ -4,6 +4,8 @@ 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.jero.common.api.vo.Result;
|
||||
import com.jero.common.aspect.annotation.Dict;
|
||||
import com.jero.common.aspect.annotation.DictPoint;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.util.PasswordUtil;
|
||||
import com.jero.member.entity.TbMemberProjectSubitem;
|
||||
@@ -39,6 +41,7 @@ public class MemberStatisticsController {
|
||||
return Result.OK(lineChartVO);
|
||||
}
|
||||
|
||||
@DictPoint
|
||||
@ApiOperation(value = "饼图")
|
||||
@GetMapping(value = "/pieChart")
|
||||
public Result<List<MemberPieChartVO>> pieChart() {
|
||||
|
||||
Reference in New Issue
Block a user