|
|
@@ -14,6 +14,8 @@ import com.hotent.base.manager.impl.BaseManagerImpl;
|
|
|
import com.hotent.project.model.CostProjectApproval;
|
|
|
import com.hotent.project.model.CostProjectMaterial;
|
|
|
import com.hotent.project.req.CostProjectNoticePageReq;
|
|
|
+import com.hotent.uc.model.User;
|
|
|
+import com.hotent.uc.util.ContextUtil;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
@@ -93,8 +95,10 @@ public class CostNoticeManagerImpl extends BaseManagerImpl<CostNoticeDao, CostNo
|
|
|
if(ObjectUtil.isNotEmpty(req.getEnterpriseId())){
|
|
|
qw.eq(CostNotice::getEnterpriseId, req.getEnterpriseId());
|
|
|
}
|
|
|
- if(ObjectUtil.isNotEmpty(req.getSendTarget())){
|
|
|
- qw.eq(CostNotice::getSendTarget, req.getSendTarget());
|
|
|
+ if(ContextUtil.getCurrentUser().isAdmin() == false){
|
|
|
+ if(ObjectUtil.isNotEmpty(req.getSendTarget())){
|
|
|
+ qw.eq(CostNotice::getSendTarget, req.getSendTarget());
|
|
|
+ }
|
|
|
}
|
|
|
qw.orderByDesc(CostNotice::getCreateTime);
|
|
|
IPage<CostNotice> page=new Page<>(req.getPageNum(), req.getPageSize());
|
|
|
@@ -130,6 +134,10 @@ public class CostNoticeManagerImpl extends BaseManagerImpl<CostNoticeDao, CostNo
|
|
|
@Override
|
|
|
public String read(String id) {
|
|
|
CostNotice costNotice = this.getById(id);
|
|
|
+ User currentUser = ContextUtil.getCurrentUser();
|
|
|
+ if(!currentUser.getId().equals(costNotice.getSendTarget())){
|
|
|
+ return "";
|
|
|
+ }
|
|
|
costNotice.setStatus("1");
|
|
|
this.update(costNotice);
|
|
|
return "阅读成功";
|