| | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | |
| | | endTime = timeArray[1]; |
| | | } |
| | | Page<Map<String, Object>> page = new PageFactory<Map<String, Object>>().defaultPage(); |
| | | if (ShiroKit.getUser().getRoleType() != 1){ |
| | | if (ShiroExtUtil.getUser().getRoleType() != 1) { |
| | | page.setRecords(null); |
| | | }else{ |
| | | page.setRecords(tSiteService.getSiteList(page,beginTime,endTime,name,insertUser,city,state)); |
| | | } else { |
| | | page.setRecords(tSiteService.getSiteList(page, beginTime, endTime, name, insertUser, city, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object add(TSite tSite,@RequestParam String subArr) { |
| | | tSite.setInsertTime(new Date()); |
| | | tSite.setInsertUserId(ShiroKit.getUser().getId()); |
| | | tSite.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | tSite.setState(1); |
| | | tSiteService.insert(tSite); |
| | | |