111
k94314517
2024-02-01 13ff112e45a64378cdc91aa2f05916721945f08a
server/company/src/main/java/com/doumee/api/business/NoticesController.java
@@ -4,12 +4,15 @@
import com.doumee.core.annotation.excel.ExcelExporter;
import com.doumee.core.annotation.pr.PreventRepeat;
import com.doumee.core.model.ApiResponse;
import com.doumee.core.model.LoginUserInfo;
import com.doumee.core.model.PageWrap;
import com.doumee.core.model.PageData;
import com.doumee.core.utils.Constants;
import com.doumee.dao.business.model.Notices;
import com.doumee.service.business.NoticesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;    
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -71,6 +74,9 @@
    @PostMapping("/page")
    @RequiresPermissions("business:notices:query")
    public ApiResponse<PageData<Notices>> findPage (@RequestBody PageWrap<Notices> pageWrap) {
        LoginUserInfo loginUserInfo = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        pageWrap.getModel().setCompanyId(loginUserInfo.getCompanyId());
        pageWrap.getModel().setPalt(Constants.ONE);
        return ApiResponse.success(noticesService.findPage(pageWrap));
    }