| | |
| | | package com.whyc.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import com.whyc.dto.Response; |
| | |
| | | PageInfo pageInfo = new PageInfo(list); |
| | | return new Response().setII(1,list.size()>0,pageInfo,"接收者反馈"); |
| | | } |
| | | //接收者确认反馈 |
| | | public Response setconfirmFk(int id) { |
| | | String msg="接收者确认反馈"; |
| | | boolean bl=true; |
| | | //1.确认前先判断反馈是否被确认 |
| | | QueryWrapper qwrapper=new QueryWrapper(); |
| | | qwrapper.eq("id",id); |
| | | qwrapper.eq("confirm_status",1); |
| | | List list=mapper.selectList(qwrapper); |
| | | if(list!=null&&list.size()>0){ |
| | | msg="该反馈已被确认"; |
| | | bl=false; |
| | | }else{ |
| | | //2.确认反馈 |
| | | UpdateWrapper wrapper=new UpdateWrapper(); |
| | | wrapper.set("confirm_status",1); |
| | | wrapper.set("confirm_user_name",ActionUtil.getUser().getName()); |
| | | wrapper.eq("id",id); |
| | | int count=mapper.update(null,wrapper); |
| | | bl=count>0; |
| | | } |
| | | return new Response().set(1,bl,msg); |
| | | } |
| | | } |