|
|
@@ -0,0 +1,33 @@
|
|
|
+package shop.alien.store.service.impl;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import shop.alien.entity.store.vo.LifeFansVo;
|
|
|
+import shop.alien.entity.store.vo.LifeMessageVo;
|
|
|
+import shop.alien.mapper.LifeMessageMapper;
|
|
|
+import shop.alien.store.service.PlatformLifeMessageService;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Slf4j
|
|
|
+@Service
|
|
|
+@RequiredArgsConstructor
|
|
|
+public class PlatformLifeMessageServiceImpl implements PlatformLifeMessageService {
|
|
|
+
|
|
|
+ private final LifeMessageMapper lifeMessageMapper;
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<LifeMessageVo> getMessageList(String receiverId) throws Exception {
|
|
|
+ try {
|
|
|
+ QueryWrapper<LifeFansVo> wrapper = new QueryWrapper<>();
|
|
|
+ wrapper.eq("message.num", 1);
|
|
|
+ wrapper.orderByDesc("message.created_time");
|
|
|
+ return lifeMessageMapper.getLifeMessagePageByPhoneId(receiverId, wrapper);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("LifeMessageServiceImpl.getMessageList Error Msg={}", e.getMessage());
|
|
|
+ throw new Exception("获取消息列表失败");
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|