|
发表于 2018-1-10 09:46:34
|
显示全部楼层
====表关联的列表翻译:
sql层--不需要做关联映射到model
list方法加代码--
// 加载下拉框
List<TestGoodsTypeEntity> list = this.testGoodsService.getList(TestGoodsTypeEntity.class);
String typeReplace = "";
for (int i = 0; i < list.size(); i++) {
TestGoodsTypeEntity item = list.get(i);
typeReplace += (item.getName() + "_" + item.getId());
if (i < list.size() - 1) {
typeReplace += ",";
}
}
request.setAttribute("typeReplace", typeReplace);
jsp页面代码--<t:dgCol title="类型" field="type" query="true" queryMode="single" width="120" replace="${typeReplace}"></t:dgCol> |
|