use of com.ganster.cms.admin.dto.AjaxData in project Ganster-CMS by Gangster-trio.
the class PermissionController method findSite.
/**
* 添加权限时,查找所有站点
*
* @return AjaxData 查找到的所有站点
*/
@GetMapping("/findsite")
public AjaxData findSite() {
AjaxData ajaxData = new AjaxData();
SiteExample siteExample = new SiteExample();
List<Site> siteList = siteService.selectByExample(siteExample);
ajaxData.setCode(siteList.size());
ajaxData.setData((ArrayList) siteList);
return ajaxData;
}
use of com.ganster.cms.admin.dto.AjaxData in project Ganster-CMS by Gangster-trio.
the class UserController method findAllGroup.
/**
* 查找所有的用户组
* @return AjaxData 查找到的信息
*/
@GetMapping("/findgroup")
@ResponseBody
public AjaxData findAllGroup() {
int number = 0;
AjaxData ajaxData = new AjaxData();
GroupExample groupExample = new GroupExample();
groupService.selectByExample(groupExample);
List<Group> groupList = groupService.selectByExample(groupExample);
if (groupList != null && !groupList.isEmpty()) {
ajaxData.setData((ArrayList) groupList);
for (Group i : groupList) {
number++;
}
ajaxData.setCode(number);
return ajaxData;
}
ajaxData.setMsg("查找失败");
return ajaxData;
}
use of com.ganster.cms.admin.dto.AjaxData in project Ganster-CMS by Gangster-trio.
the class BaseController method buildAjaxData.
AjaxData buildAjaxData(int code, String msg, long count, List data) {
AjaxData ajaxData = new AjaxData();
ajaxData.setCode(code);
ajaxData.setMsg(msg);
ajaxData.setCount(count);
ajaxData.setData(data);
return ajaxData;
}
use of com.ganster.cms.admin.dto.AjaxData in project Ganster-CMS by Gangster-trio.
the class PermissionController method findModel.
/**
* 添加权限时,查找所有模块
* @return AjaxData 查找到的所有模块
*/
@GetMapping("/findmodel")
public AjaxData findModel() {
AjaxData ajaxData = new AjaxData();
ModuleExample moduleExample = new ModuleExample();
List<Module> moduleList = moduleService.selectByExample(moduleExample);
ajaxData.setCode(moduleList.size());
ajaxData.setData((ArrayList) moduleList);
return ajaxData;
}
use of com.ganster.cms.admin.dto.AjaxData in project Ganster-CMS by Gangster-trio.
the class PermissionController method findCategory.
/**
* 添加权限时,查找所有栏目
*
* @param siteId
* @return AjaxData 查找到的所有栏目
*/
@GetMapping("/findcategory/{SiteId}")
public AjaxData findCategory(@PathVariable("SiteId") Integer siteId) {
AjaxData ajaxData = new AjaxData();
Site site = siteService.selectByPrimaryKey(siteId);
CategoryExample categoryExample = new CategoryExample();
categoryExample.createCriteria().andCategorySiteIdEqualTo(site.getSiteId());
List<Category> categoryList = categoryService.selectByExample(categoryExample);
ajaxData.setCode(categoryList.size());
ajaxData.setData((ArrayList) categoryList);
return ajaxData;
}
Aggregations