Commit 96450e6f authored by 黎博's avatar 黎博

interface实体新增非数据库字段moduleName

parent de5a9cae
......@@ -11,6 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
......@@ -49,8 +50,12 @@ public class InterfaceController {
interfaceIPageEntity = interfaceService.page(interfaceIPage);
}
Map<String, Object> map = new HashMap<>();
List<Interface> interfaceList = interfaceIPageEntity.getRecords();
for (Interface anInterface: interfaceList) {
anInterface.setModuleName(autoModuleService.getById(anInterface.getModuleId()).getName());
}
map.put("total", interfaceIPageEntity.getTotal());
map.put("list", interfaceIPageEntity.getRecords());
map.put("list", interfaceList);
return JsonResult.buildSuccessResult(map);
}
......
package cn.qg.holmes.entity.auto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
......@@ -27,4 +28,6 @@ public class Interface {
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date updateTime;
@TableField(exist = false)
private String moduleName;
}
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