mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 15:01:23 +08:00
Redesign the page of NoticeView.vue
This commit is contained in:
@@ -4,6 +4,8 @@ import com.cfive.pinnacle.entity.NoticeType;
|
||||
import com.cfive.pinnacle.entity.common.ResponseCode;
|
||||
import com.cfive.pinnacle.entity.common.ResponseResult;
|
||||
import com.cfive.pinnacle.service.INoticeTypeService;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -22,6 +24,8 @@ import java.util.List;
|
||||
@RequestMapping("/noticeType")
|
||||
@CrossOrigin
|
||||
public class NoticeTypeController {
|
||||
private final Logger LOGGER = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Autowired
|
||||
INoticeTypeService noticeTypeService;
|
||||
|
||||
@@ -41,11 +45,10 @@ public class NoticeTypeController {
|
||||
return ResponseResult.build(code, msg, selectTypeList);
|
||||
}
|
||||
|
||||
@PutMapping
|
||||
@GetMapping("/update")
|
||||
public ResponseResult updateTypeEnableById(String typeId,Boolean enable){
|
||||
System.out.println(typeId+'\t'+enable);
|
||||
Long tid=null;
|
||||
Integer isEnable=null;
|
||||
Integer isEnable = null;
|
||||
if (StringUtils.hasText(typeId)&&null!=enable){
|
||||
tid = Long.parseLong(typeId);
|
||||
isEnable = (enable == true ? 1 : 0);
|
||||
|
||||
@@ -99,11 +99,14 @@ public class NoticeServiceImpl extends ServiceImpl<NoticeMapper, Notice> impleme
|
||||
@Override
|
||||
public Boolean updateNotice(Notice notice) {
|
||||
noticeMapper.update(null, new UpdateWrapper<Notice>().eq("id", notice.getId()).set("old", 1)); //修改原始数据
|
||||
LambdaQueryWrapper<NoticeReceive> lqw = new LambdaQueryWrapper<>();
|
||||
lqw.eq(NoticeReceive::getNoticeId, notice.getId());
|
||||
noticeReceiveMapper.delete(lqw);
|
||||
notice.setOriginId(notice.getId());
|
||||
notice.setId(null); //清除id,使新插入的数据id重新生成
|
||||
notice.setModifyTime(null);
|
||||
notice.setOld(0);
|
||||
return noticeMapper.insert(notice) > 0;
|
||||
return this.addNotice(notice);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
and notice_receive.already_read=#{readStatus}
|
||||
</if>
|
||||
and notice_receive.user_id=#{userId}
|
||||
and notice_receive.deleted=0
|
||||
</where>
|
||||
order by n.send_time desc
|
||||
</select>
|
||||
<resultMap id="selectAllMap" type="notice" autoMapping="true">
|
||||
<id property="id" column="nid"/>
|
||||
|
||||
Reference in New Issue
Block a user