|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import com.dy.common.webUtil.QueryResultVo; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoOp.OpeFeedbackMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.daoOp.OpeFeedbackReplyMapper; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoOp.OpeFeedback; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.pojoOp.OpeFeedbackReply; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voOp.Vofeedback; | 
|---|
|  |  |  | import com.dy.pipIrrGlobal.voOp.VofeedbackReply; | 
|---|
|  |  |  | import lombok.RequiredArgsConstructor; | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.dubbo.common.utils.PojoUtils; | 
|---|
|  |  |  | 
|---|
|  |  |  | public class FeedbackSv { | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OpeFeedbackMapper opeFeedbackMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private OpeFeedbackReplyMapper opeFeedbackReplyMapper; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加问题反馈 | 
|---|
|  |  |  | 
|---|
|  |  |  | rsVo.obj = opeFeedbackMapper.getFeedbacks(params); | 
|---|
|  |  |  | return rsVo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 添加问题反馈回复 | 
|---|
|  |  |  | * @param reply | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Integer addReply(OpeFeedbackReply reply) { | 
|---|
|  |  |  | reply.setReplyTime(new Date()); | 
|---|
|  |  |  | return opeFeedbackReplyMapper.insertSelective(reply); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 修改问题反馈回复 | 
|---|
|  |  |  | * @param reply | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public int updateReply(OpeFeedbackReply reply) { | 
|---|
|  |  |  | reply.setReplyTime(new Date()); | 
|---|
|  |  |  | return opeFeedbackReplyMapper.updateByPrimaryKeySelective(reply); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 删除问题反馈回复 | 
|---|
|  |  |  | * @param id | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public Integer deleteReply(Long id) { | 
|---|
|  |  |  | return opeFeedbackReplyMapper.deleteByPrimaryKey(id); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取反馈回复 | 
|---|
|  |  |  | * @param qo | 
|---|
|  |  |  | * @return | 
|---|
|  |  |  | */ | 
|---|
|  |  |  | public QueryResultVo<List<VofeedbackReply>> getFeedbackReply(ReplyQueryVo qo) { | 
|---|
|  |  |  | Map<String, Object> params = (Map<String, Object>) PojoUtils.generalize(qo); | 
|---|
|  |  |  | Long itemTotal = opeFeedbackReplyMapper.getRecordCount(params); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | QueryResultVo<List<VofeedbackReply>> rsVo = new QueryResultVo<>(); | 
|---|
|  |  |  | rsVo.pageSize = qo.pageSize; | 
|---|
|  |  |  | rsVo.pageCurr = qo.pageCurr; | 
|---|
|  |  |  | rsVo.calculateAndSet(itemTotal, params); | 
|---|
|  |  |  | rsVo.obj = opeFeedbackReplyMapper.getFeedbackReply(params); | 
|---|
|  |  |  | return rsVo; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|