|
@@ -4,13 +4,18 @@ import com.keao.tianhu.core.entity.R;
|
|
import com.tianhu.common.core.web.controller.BaseController;
|
|
import com.tianhu.common.core.web.controller.BaseController;
|
|
import com.tianhu.common.core.web.domain.AjaxResult;
|
|
import com.tianhu.common.core.web.domain.AjaxResult;
|
|
import com.tianhu.common.core.web.page.TableDataInfo;
|
|
import com.tianhu.common.core.web.page.TableDataInfo;
|
|
|
|
+import com.tianhu.common.security.service.TokenService;
|
|
|
|
+import com.tianhu.system.api.domain.SysUser;
|
|
|
|
+import com.tianhu.system.api.model.LoginUser;
|
|
import com.tianhu.system.domain.SysNotice;
|
|
import com.tianhu.system.domain.SysNotice;
|
|
import com.tianhu.system.service.IOwnNoticeService;
|
|
import com.tianhu.system.service.IOwnNoticeService;
|
|
import com.tianhu.system.service.ISysNoticeService;
|
|
import com.tianhu.system.service.ISysNoticeService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
+import java.util.HashMap;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
+import java.util.Map;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通知Controller
|
|
* 通知Controller
|
|
@@ -28,14 +33,31 @@ public class OwnNoticeController extends BaseController
|
|
@Autowired
|
|
@Autowired
|
|
private IOwnNoticeService iOwnNoticeService;
|
|
private IOwnNoticeService iOwnNoticeService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private TokenService tokenService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询通知列表
|
|
* 查询通知列表
|
|
*/
|
|
*/
|
|
@GetMapping("/list")
|
|
@GetMapping("/list")
|
|
public TableDataInfo list(SysNotice sysNotice)
|
|
public TableDataInfo list(SysNotice sysNotice)
|
|
{
|
|
{
|
|
|
|
+ //获取当前企业的编号
|
|
|
|
+ LoginUser userInfo = tokenService.getLoginUser();
|
|
|
|
+ SysUser use = userInfo.getSysUser();
|
|
|
|
+ Map map = new HashMap();
|
|
|
|
+ //用户id
|
|
|
|
+ map.put("userId",use.getUserId());
|
|
|
|
+ //企业id
|
|
|
|
+ map.put("companyId",use.getCompanyId());
|
|
|
|
+ //类型 00:待办 01:消息
|
|
|
|
+ map.put("type",sysNotice.getType());
|
|
|
|
+ //消息类型
|
|
|
|
+ map.put("noticeType",sysNotice.getNoticeType());
|
|
|
|
+ //待办类型
|
|
|
|
+ map.put("workType",sysNotice.getWorkType());
|
|
startPage();
|
|
startPage();
|
|
- List<SysNotice> list = iSysNoticeService.selectNoticeList(sysNotice);
|
|
|
|
|
|
+ List<Map> list = iOwnNoticeService.selectOwnNoticeList(map);
|
|
return getDataTable(list);
|
|
return getDataTable(list);
|
|
}
|
|
}
|
|
|
|
|