新增subgrid子表数据展示实例;图标优化;
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
*/
|
||||
package com.jeesite.modules.test.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -67,6 +69,16 @@ public class TestDataService extends CrudService<TestDataDao, TestData> {
|
||||
return super.findPage(testData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子表分页数据
|
||||
* @param page 分页对象
|
||||
* @param testData
|
||||
* @return
|
||||
*/
|
||||
public List<TestDataChild> findSubList(TestDataChild testData) {
|
||||
return testDataChildDao.findList(testData);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存数据(插入或更新)
|
||||
* @param testData
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
*/
|
||||
package com.jeesite.modules.test.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
@@ -20,6 +22,7 @@ import com.jeesite.common.config.Global;
|
||||
import com.jeesite.common.entity.Page;
|
||||
import com.jeesite.common.web.BaseController;
|
||||
import com.jeesite.modules.test.entity.TestData;
|
||||
import com.jeesite.modules.test.entity.TestDataChild;
|
||||
import com.jeesite.modules.test.service.TestDataService;
|
||||
|
||||
/**
|
||||
@@ -63,6 +66,16 @@ public class TestDataController extends BaseController {
|
||||
Page<TestData> page = testDataService.findPage(testData);
|
||||
return page;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询子表列表数据
|
||||
*/
|
||||
@RequiresPermissions("test:testData:view")
|
||||
@RequestMapping(value = "subListData")
|
||||
@ResponseBody
|
||||
public List<TestDataChild> subListData(TestDataChild testDataChild) {
|
||||
return testDataService.findSubList(testDataChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看编辑表单
|
||||
|
||||
Reference in New Issue
Block a user