| | |
| | | |
| | | 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.SinataUtil; |
| | |
| | | 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(tIntegralGoodsService.getIntegralGoodsList(page,beginTime,endTime,name,state)); |
| | | } else { |
| | | page.setRecords(tIntegralGoodsService.getIntegralGoodsList(page, beginTime, endTime, name, state)); |
| | | } |
| | | return super.packForBT(page); |
| | | } |
| | |
| | | @ResponseBody |
| | | public Object add(TIntegralGoods tIntegralGoods) { |
| | | tIntegralGoods.setInsertTime(new Date()); |
| | | tIntegralGoods.setInsertUserId(ShiroKit.getUser().getId()); |
| | | tIntegralGoods.setInsertUserRole(ShiroKit.getUser().getRoleType()); |
| | | tIntegralGoods.setInsertUserId(ShiroExtUtil.getUser().getId()); |
| | | tIntegralGoods.setInsertUserRole(ShiroExtUtil.getUser().getRoleType()); |
| | | tIntegralGoods.setState(1); |
| | | tIntegralGoodsService.insert(tIntegralGoods); |
| | | return SUCCESS_TIP; |