Pu Zhibing
7 天以前 f2530067b6cd16a87b76190cf524d2ed75bf9592
management/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/general/TNoticesController.java
@@ -2,6 +2,7 @@
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;
@@ -38,6 +39,9 @@
    @Autowired
    private ITNoticesService tNoticesService;
    @Autowired
    private ShiroExtUtil shiroExtUtil;
    /**
     * 跳转到滚动消息设置首页
@@ -107,7 +111,7 @@
            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(tNoticesService.getRollingNoticeList(page,beginTime,endTime,1,content));
@@ -129,7 +133,7 @@
            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(tNoticesService.getRollingNoticeList(page,beginTime,endTime,2,content));
@@ -145,7 +149,7 @@
    public Object add(TNotices tNotices) {
        tNotices.setIsDelete(1);
        tNotices.setInsertTime(new Date());
        tNotices.setInsertUser(ShiroKit.getUser().getId());
        tNotices.setInsertUser(shiroExtUtil.getUser().getId());
        tNotices.setType(1);
        tNoticesService.insert(tNotices);
        return SUCCESS_TIP;
@@ -159,7 +163,7 @@
    public Object addSystem(TNotices tNotices) {
        tNotices.setIsDelete(1);
        tNotices.setInsertTime(new Date());
        tNotices.setInsertUser(ShiroKit.getUser().getId());
        tNotices.setInsertUser(shiroExtUtil.getUser().getId());
        tNotices.setType(2);
        tNoticesService.insert(tNotices);
@@ -187,7 +191,7 @@
        }
        tNotices.setIsShow(1);
        tNotices.setUpdateTime(new Date());
        tNotices.setUpdateUser(ShiroKit.getUser().getId());
        tNotices.setUpdateUser(shiroExtUtil.getUser().getId());
        tNoticesService.updateById(tNotices);
        return SUCCESS_TIP;
    }
@@ -202,7 +206,7 @@
        tNotices.setIsDelete(2);
        tNotices.setFlag("3");
        tNotices.setUpdateTime(new Date());
        tNotices.setUpdateUser(ShiroKit.getUser().getId());
        tNotices.setUpdateUser(shiroExtUtil.getUser().getId());
        tNoticesService.updateById(tNotices);
        return SUCCESS_TIP;
    }
@@ -213,7 +217,7 @@
    @RequestMapping(value = "/update")
    @ResponseBody
    public Object update(TNotices tNotices) {
        tNotices.setUpdateUser(ShiroKit.getUser().getId());
        tNotices.setUpdateUser(shiroExtUtil.getUser().getId());
        tNotices.setUpdateTime(new Date());
        tNoticesService.updateById(tNotices);
        return SUCCESS_TIP;
@@ -225,7 +229,7 @@
    @RequestMapping(value = "/updateSystem")
    @ResponseBody
    public Object updateSystem(TNotices tNotices) {
        tNotices.setUpdateUser(ShiroKit.getUser().getId());
        tNotices.setUpdateUser(shiroExtUtil.getUser().getId());
        tNotices.setUpdateTime(new Date());
        tNoticesService.updateById(tNotices);