From 982313135d1c239fe3b20e4c5664781f92d40aca Mon Sep 17 00:00:00 2001 From: xin <1099200748@qq.com> Date: Thu, 31 Jul 2025 17:17:39 +0800 Subject: [PATCH] Merge branch 'master' into xin --- oying-system/src/main/java/com/oying/modules/message/service/impl/MesCustomerCommentMsgServiceImpl.java | 89 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 89 insertions(+), 0 deletions(-) diff --git a/oying-system/src/main/java/com/oying/modules/message/service/impl/MesCustomerCommentMsgServiceImpl.java b/oying-system/src/main/java/com/oying/modules/message/service/impl/MesCustomerCommentMsgServiceImpl.java new file mode 100644 index 0000000..3683651 --- /dev/null +++ b/oying-system/src/main/java/com/oying/modules/message/service/impl/MesCustomerCommentMsgServiceImpl.java @@ -0,0 +1,89 @@ +package com.oying.modules.message.service.impl; + +import com.oying.modules.message.domain.MesCustomerCommentMsg; +import com.oying.modules.message.domain.myDto.MesCustomerCommentMsgDTO; +import com.oying.utils.FileUtil; +import lombok.RequiredArgsConstructor; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.oying.modules.message.service.MesCustomerCommentMsgService; +import com.oying.modules.message.domain.dto.MesCustomerCommentMsgQueryCriteria; +import com.oying.modules.message.mapper.MesCustomerCommentMsgMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import com.oying.utils.PageUtil; + +import java.util.*; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.oying.utils.PageResult; + +/** +* @description 服务实现 +* @author 李萌 +* @date 2025-07-25 +**/ +@Service +@RequiredArgsConstructor +public class MesCustomerCommentMsgServiceImpl extends ServiceImpl<MesCustomerCommentMsgMapper, MesCustomerCommentMsg> implements MesCustomerCommentMsgService { + + private final MesCustomerCommentMsgMapper mesCustomerCommentMsgMapper; + + @Override + public PageResult<MesCustomerCommentMsg> queryAll(MesCustomerCommentMsgQueryCriteria criteria, Page<Object> page){ + return PageUtil.toPage(mesCustomerCommentMsgMapper.findAll(criteria, page)); + } + + @Override + public List<MesCustomerCommentMsg> queryAll(MesCustomerCommentMsgQueryCriteria criteria){ + return mesCustomerCommentMsgMapper.findAll(criteria); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void create(MesCustomerCommentMsg resources) { + mesCustomerCommentMsgMapper.insert(resources); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(MesCustomerCommentMsg resources) { + MesCustomerCommentMsg mesCustomerCommentMsg = getById(resources.getId()); + mesCustomerCommentMsg.copy(resources); + mesCustomerCommentMsgMapper.updateById(mesCustomerCommentMsg); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteAll(List<Long> ids) { + mesCustomerCommentMsgMapper.deleteBatchIds(ids); + } + + @Override + public void download(List<MesCustomerCommentMsg> all, HttpServletResponse response) throws IOException { + List<Map<String, Object>> list = new ArrayList<>(); + for (MesCustomerCommentMsg mesCustomerCommentMsg : all) { + Map<String, Object> map = new LinkedHashMap<>(); + map.put("对应 mes_msg_record.id", mesCustomerCommentMsg.getMsgRecordId()); + map.put("店铺ID", mesCustomerCommentMsg.getShopId()); + map.put("订单ID", mesCustomerCommentMsg.getOrderId()); + map.put("订单编号 冗余", mesCustomerCommentMsg.getOrderNo()); + map.put("买家用户ID", mesCustomerCommentMsg.getBuyerId()); + map.put("买家昵称 冗余", mesCustomerCommentMsg.getBuyerName()); + map.put("评价ID 冗余", mesCustomerCommentMsg.getEvaluationId()); + map.put("商户是否已回复 0=未回复 1=已回复", mesCustomerCommentMsg.getReplied()); + map.put("创建人", mesCustomerCommentMsg.getCreateBy()); + map.put("创建时间", mesCustomerCommentMsg.getCreateTime()); + map.put("更新人", mesCustomerCommentMsg.getUpdateBy()); + map.put("更新时间", mesCustomerCommentMsg.getUpdateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public List<MesCustomerCommentMsgDTO> listCustomerComment(Long shopId) { + return mesCustomerCommentMsgMapper.listCustomerComment(shopId); + } +} -- Gitblit v1.9.3