Browse Source

Merge remote-tracking branch 'origin/sit' into sit

qrs 4 weeks ago
parent
commit
e8db6a1cba

+ 9 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeUserOrderCommentVo.java

@@ -4,6 +4,9 @@ import com.fasterxml.jackson.annotation.JsonInclude;
 import lombok.Data;
 import shop.alien.entity.store.LifeUserOrder;
 
+import java.util.Date;
+import java.util.List;
+
 @Data
 @JsonInclude
 public class LifeUserOrderCommentVo extends LifeUserOrder {
@@ -21,4 +24,10 @@ public class LifeUserOrderCommentVo extends LifeUserOrder {
     private String businessTypesName;
 
     private String storeName;
+
+    private String score;
+
+    private Date commentDate;
+
+    private List<String> imgUrls;
 }

+ 81 - 21
alien-entity/src/main/java/shop/alien/mapper/LifeFansMapper.java

@@ -72,12 +72,12 @@ public interface LifeFansMapper extends BaseMapper<LifeFans> {
             "        from life_fans " +
             "        where delete_flag = 0 and followed_id = #{fansId} " +
             "    ) " +
-            "    select info.id, info.store_name name, user.head_img image, concat('store_', user.phone) phoneId, info.store_blurb blurb, 1 blockedType,user.id blockedId" +
+            "    select user.id, user.nick_name name, user.head_img image, concat('store_', user.phone) phoneId, user.account_blurb blurb, 1 blockedType,user.id blockedId" +
             "    from follow foll " +
             "    join store_user user on foll.phone = user.phone " +
-            "    join store_info info on info.id = user.store_id " +
-            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
-            "    where foll.flag = 'store' and user.delete_flag = 0 and info.delete_flag = 0 " +
+//            "    join store_info info on info.id = user.store_id " +
+//            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
+            "    where foll.flag = 'store' and user.delete_flag = 0" +
             "    union " +
             "    select user.id, user.user_name name, user.user_image image, concat('user_', user.user_phone) phoneId, user.jianjie blurb, 2 blockedType,user.id blockedId" +
             "    from follow foll " +
@@ -89,24 +89,84 @@ public interface LifeFansMapper extends BaseMapper<LifeFans> {
             "${ew.customSqlSegment} ")
     IPage<LifeFansVo> getMyFans(IPage<LifeFansVo> iPage, @Param("fansId") String fansId, @Param("blockerType") String blockerType, @Param("blockerId") String blockerId, @Param(Constants.WRAPPER) QueryWrapper<LifeFansVo> wrapper);
 
-    @Select("select foll.*, if(isnull(fans.id), 0, 1) isFollowThis, 1 as isFollowMe, count(fans2.id) fansNum, count(fans3.id) followNum from ( " +
-            "    with follow as ( " +
-            "    select substring_index(fans_id, '_', 1) as flag, substring_index(fans_id, '_', -1) as phone " +
-            "    from life_fans " +
-            "    where delete_flag = 0 and followed_id = #{fansId} " +
-            "    ) " +
-            "    select info.id, info.store_name name, user.head_img image, concat('store_', user.phone) phoneId, info.store_blurb blurb ,IFNULL(user.nick_name, user.name) username, user.account_blurb accountBlurb  " +
-            "    from follow foll " +
-            "    join store_user user on foll.phone = user.phone " +
-            "    LEFT JOIN store_info info ON user.store_id IS NOT NULL AND info.id = user.store_id " +
-            "    and info.delete_flag = 0" +
-            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
-            "    where foll.flag = 'store' and user.delete_flag = 0 " +
+//    @Select("select foll.*, if(isnull(fans.id), 0, 1) isFollowThis, 1 as isFollowMe, count(fans2.id) fansNum, count(fans3.id) followNum from ( " +
+//            "    with follow as ( " +
+//            "    select substring_index(fans_id, '_', 1) as flag, substring_index(fans_id, '_', -1) as phone " +
+//            "    from life_fans " +
+//            "    where delete_flag = 0 and followed_id = #{fansId} " +
+//            "    ) " +
+//            "    select info.id," +
+//            "    \"CASE \" +\n" +
+//            "        \"WHEN user.store_id IS NULL OR info.store_application_status = 0 THEN user.nick_name \" +\n" +
+//            "        \"ELSE info.store_name \" +\n" +
+//            "        \"END AS name, \" +\n" +
+//            "        \"CASE \" +\n" +
+//            "        \"WHEN user.store_id IS NULL OR info.store_application_status IN (0, 2) THEN user.account_blurb \" +\n" +
+//            "        \"ELSE info.store_blurb \" +\n" +
+//            "        \"END AS store_blurb, \" + " +
+//            "    user.head_img image, concat('store_', user.phone) phoneId" +
+//            "    from follow foll " +
+//            "    join store_user user on foll.phone = user.phone " +
+//            "    LEFT JOIN store_info info ON user.store_id IS NOT NULL AND info.id = user.store_id " +
+//            "    and info.delete_flag = 0" +
+//            "    left join store_img img on img.store_id = user.store_id and img.img_type = '10' and img.delete_flag = 0 " +
+//            "    where foll.flag = 'store' and user.delete_flag = 0 " +
+//            ") foll " +
+//            "left join life_fans fans on fans.followed_id = foll.phoneId and fans.fans_id = #{fansId} and fans.delete_flag = 0 " +
+//            "left join life_fans fans2 on fans2.followed_id = foll.phoneId and fans2.delete_flag = 0 " +
+//            "left join life_fans fans3 on fans3.fans_id = foll.phoneId and fans3.delete_flag = 0 " +
+//            "${ew.customSqlSegment} ")
+    @Select("SELECT " +
+            "foll.*, " +
+            "IF(isnull(fans.id), 0, 1) isFollowThis, " +
+            "1 AS isFollowMe, " +
+            "count(fans2.id) fansNum, " +
+            "count(fans3.id) followNum " +
+            "FROM " +
+            "( " +
+            "WITH follow AS ( " +
+            "SELECT " +
+            "substring_index(fans_id, '_', 1) AS flag, " +
+            "substring_index(fans_id, '_', -1) AS phone " +
+            "FROM " +
+            "life_fans " +
+            "WHERE " +
+            "delete_flag = 0 " +
+            "AND followed_id = #{fansId} " +
+            ") " +
+            "SELECT " +
+            "info.id, " +
+            "CASE " +
+            "WHEN user.store_id IS NULL OR info.store_application_status = 0 THEN user.nick_name " +
+            "ELSE info.store_name " +
+            "END AS name, " +
+            "CASE " +
+            "WHEN user.store_id IS NULL OR info.store_application_status IN (0, 2) THEN user.account_blurb " +
+            "ELSE info.store_blurb " +
+            "END AS blurb, " +
+            "user.head_img AS image, " +
+            "concat('store_', user.phone) AS phoneId " +
+            "FROM " +
+            "follow foll " +
+            "JOIN store_user user ON foll.phone = user.phone " +
+            "LEFT JOIN store_info info ON user.store_id IS NOT NULL " +
+            "AND info.id = user.store_id " +
+            "AND info.delete_flag = 0 " +
+            "LEFT JOIN store_img img ON img.store_id = user.store_id " +
+            "AND img.img_type = '10' " +
+            "AND img.delete_flag = 0 " +
+            "WHERE " +
+            "foll.flag = 'store' " +
+            "AND user.delete_flag = 0 " +
             ") foll " +
-            "left join life_fans fans on fans.followed_id = foll.phoneId and fans.fans_id = #{fansId} and fans.delete_flag = 0 " +
-            "left join life_fans fans2 on fans2.followed_id = foll.phoneId and fans2.delete_flag = 0 " +
-            "left join life_fans fans3 on fans3.fans_id = foll.phoneId and fans3.delete_flag = 0 " +
-            "${ew.customSqlSegment} ")
+            "LEFT JOIN life_fans fans ON fans.followed_id = foll.phoneId " +
+            "AND fans.fans_id = #{fansId} " +
+            "AND fans.delete_flag = 0 " +
+            "LEFT JOIN life_fans fans2 ON fans2.followed_id = foll.phoneId " +
+            "AND fans2.delete_flag = 0 " +
+            "LEFT JOIN life_fans fans3 ON fans3.fans_id = foll.phoneId " +
+            "AND fans3.delete_flag = 0 " +
+            "${ew.customSqlSegment}")
     IPage<LifeFansVo> getMyStoreFans(IPage<LifeFansVo> iPage, @Param("fansId") String fansId, @Param(Constants.WRAPPER) QueryWrapper<LifeFansVo> wrapper);
 
     @Select("select foll.*, if(isnull(fans.id), 0, 1) isFollowThis, 1 as isFollowMe, " +

+ 1 - 0
alien-entity/src/main/java/shop/alien/mapper/LifeGroupBuyMainMapper.java

@@ -101,6 +101,7 @@ public interface LifeGroupBuyMainMapper extends BaseMapper<LifeGroupBuyMain> {
             "LEFT JOIN store_info s \n" +
             "    ON g.store_id = s.id \n" +
             "    AND s.delete_flag = 0 \n" +
+            "    AND g.status = 5 \n" +
             "LEFT JOIN store_img img \n" +
             "    ON FIND_IN_SET(img.id, g.image_id) > 0 \n" +
             "    AND img.delete_flag = 0\t\t \n" +

+ 13 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreCashOutRecordMapper.java

@@ -1,14 +1,27 @@
 package shop.alien.mapper;
 
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import shop.alien.entity.store.StoreCashOutRecord;
 
+import java.util.List;
+
 /**
  * 商户提现记录表 Mapper 接口
  *
  * @author ssk
  * @since 2025-02-25
  */
+@Mapper
 public interface StoreCashOutRecordMapper extends BaseMapper<StoreCashOutRecord> {
 
+    @Select("select scor.*, If(su.alipay_account is not null,su.alipay_account,su.phone) settlementAccount\n" +
+            "from store_cash_out_record scor\n" +
+            "left join store_user su on su.store_id = scor.store_id and su.delete_flag = 0\n" +
+            "${ew.customSqlSegment}")
+    List<StoreCashOutRecord> selectCashoutRecordList(@Param(Constants.WRAPPER) QueryWrapper<StoreCashOutRecord> wrapper);
 }

+ 1 - 1
alien-entity/src/main/java/shop/alien/mapper/StoreInfoMapper.java

@@ -126,7 +126,7 @@ public interface StoreInfoMapper extends BaseMapper<StoreInfo> {
 
     @Select(
             "select " +
-            "            ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(store_position, ',', ' '), ')' ))) / 1000, 2) dist " +
+            "            ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(store_position, ',', ' '), ')' ))) / 1000, 1) dist " +
             "from store_info where id = #{storeId}"
             )
     Double getStoreDistance(@Param("position") String position,@Param("storeId") Integer storeId);

+ 10 - 3
alien-store/src/main/java/shop/alien/store/controller/StoreUserController.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.StoreImg;
@@ -62,7 +63,13 @@ public class StoreUserController {
 
     @ApiOperation("修改密码/忘记密码/更换绑定手机号")
     @ApiOperationSupport(order = 2)
-    @ApiImplicitParams({@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "newPhone", value = "新手机号", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "oldPassword", value = "旧密码", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "newPassword", value = "新密码", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "confirmNewPassword", value = "新密码确认", dataType = "String", paramType = "query"), @ApiImplicitParam(name = "verificationCode", value = "验证码", dataType = "String", paramType = "query", required = true), @ApiImplicitParam(name = "type", value = "类型:0:忘记密码,1:修改密码,2:更换绑定手机号", dataType = "Integer", paramType = "query", required = true)})
+    @ApiImplicitParams({@ApiImplicitParam(name = "phone", value = "手机号", dataType = "String", paramType = "query", required = true),
+            @ApiImplicitParam(name = "newPhone", value = "新手机号", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "oldPassword", value = "旧密码", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "newPassword", value = "新密码", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "confirmNewPassword", value = "新密码确认", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "verificationCode", value = "验证码", dataType = "String", paramType = "query", required = true),
+            @ApiImplicitParam(name = "type", value = "类型:0:忘记密码,1:修改密码,2:更换绑定手机号", dataType = "Integer", paramType = "query", required = true)})
     @GetMapping("/updatePassword")
     public R<String> updatePassword(String phone, String newPhone, String oldPassword, String newPassword, String confirmNewPassword, String verificationCode, Integer type) {
         log.info("StoreUserController.updatePassword?phone={}&newPhone={}&oldPassword={}&newPassword={}&confirmNewPassword={}&verificationCode={}&type={}", phone, newPhone, oldPassword, newPassword, confirmNewPassword, verificationCode, type);
@@ -80,10 +87,10 @@ public class StoreUserController {
                 break;
         }
         String cacheCode = baseRedisService.getString("verification_store_" + businessType + "_" + phone);
-        if (null == cacheCode) {
+        if (StringUtils.isBlank(oldPassword) && null == cacheCode) {
             return R.fail("当验证码过期或未发送");
         }
-        if (!cacheCode.trim().equals(verificationCode.trim())) {
+        if (StringUtils.isBlank(oldPassword) && !cacheCode.trim().equals(verificationCode.trim())) {
             return R.fail("验证码错误");
         }
         return storeUserService.forgetOrModifyPassword(phone, newPhone, oldPassword, newPassword, confirmNewPassword, verificationCode, type);

+ 30 - 17
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponStoreFriendServiceImpl.java

@@ -4,6 +4,7 @@ import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
@@ -13,11 +14,9 @@ import org.springframework.beans.BeansException;
 import org.springframework.stereotype.Service;
 import shop.alien.entity.store.*;
 import shop.alien.entity.store.dto.LifeDiscountCouponStoreFriendDto;
-import shop.alien.entity.store.vo.LifeDiscountCouponFriendRuleDetailVo;
-import shop.alien.entity.store.vo.LifeDiscountCouponFriendRuleVo;
-import shop.alien.entity.store.vo.LifeDiscountCouponStoreFriendVo;
-import shop.alien.entity.store.vo.LifeDiscountCouponVo;
+import shop.alien.entity.store.vo.*;
 import shop.alien.mapper.*;
+import shop.alien.store.config.WebSocketProcess;
 import shop.alien.store.service.LifeDiscountCouponStoreFriendService;
 import shop.alien.util.common.constant.DiscountCouponEnum;
 
@@ -67,6 +66,8 @@ public class LifeDiscountCouponStoreFriendServiceImpl extends ServiceImpl<LifeDi
 
     private final LifeDiscountCouponFriendRuleDetailMapper lifeDiscountCouponFriendRuleDetailMapper;
 
+    private final WebSocketProcess webSocketProcess;
+
     @Override
     public List<LifeDiscountCouponStoreFriendVo> getFriendCouponList(UserLoginInfo userLoginInfo, String friendUserId) {
         List<LifeDiscountCouponStoreFriendVo> result = new ArrayList<>();
@@ -192,19 +193,31 @@ public class LifeDiscountCouponStoreFriendServiceImpl extends ServiceImpl<LifeDi
                 lifeDiscountCoupon.setSingleQty(lifeDiscountCoupon.getSingleQty() - couponDto.getSingleQty());
                 // 更新数据库中的优惠券库存信息
                 lifeDiscountCouponMapper.updateById(lifeDiscountCoupon);
-                // 发送好友优惠券通知
-                LifeNotice lifeMessage = new LifeNotice();
-                String text = "您的好友"+userLoginInfo.getUserName()+"送了您"+couponDto.getSingleQty()+"张店铺优惠券,快去使用吧!";
-                JSONObject jsonObject = new JSONObject();
-                jsonObject.put("message", text);
-                lifeMessage.setReceiverId("store_"+storeUser.getPhone());
-                lifeMessage.setTitle("赠券通知");
-                lifeMessage.setContext(jsonObject.toJSONString());
-                lifeMessage.setNoticeType(1);
-                lifeMessage.setIsRead(0);
-                lifeMessage.setDeleteFlag(0);
-                lifeMessage.setSenderId("system");
-                lifeNoticeMapper.insert(lifeMessage);
+
+                int friendStoreId =  lifeDiscountCouponStoreFriendDto.getFriendStoreUserId();
+                LambdaQueryWrapper<StoreUser> storeUserLambdaQueryWrapper = new LambdaQueryWrapper<>();
+                storeUserLambdaQueryWrapper.eq(StoreUser::getStoreId, friendStoreId);
+                List<StoreUser> storeUserList = storeUserMapper.selectList(storeUserLambdaQueryWrapper);
+
+                if(CollectionUtils.isNotEmpty(storeUserList)){
+                    StoreUser friendStoreUser = storeUserList.get(0);
+                    String friendPhone = friendStoreUser.getPhone();
+                    if(StringUtils.isNotEmpty(friendPhone)){
+                        // 发送好友优惠券通知
+                        LifeNotice lifeMessage = new LifeNotice();
+                        String text = "您的好友"+userLoginInfo.getUserName()+"送了您"+couponDto.getSingleQty()+"张店铺优惠券,快去使用吧!";
+                        JSONObject jsonObject = new JSONObject();
+                        jsonObject.put("message", text);
+                        lifeMessage.setReceiverId("store_"+friendPhone);
+                        lifeMessage.setTitle("赠券通知");
+                        lifeMessage.setContext(jsonObject.toJSONString());
+                        lifeMessage.setNoticeType(1);
+                        lifeMessage.setIsRead(0);
+                        lifeMessage.setDeleteFlag(0);
+                        lifeMessage.setSenderId("system");
+                        lifeNoticeMapper.insert(lifeMessage);
+                    }
+                }
             }
             // 如果所有优惠券都成功处理,返回 true
             return true;

+ 9 - 7
alien-store/src/main/java/shop/alien/store/service/impl/StoreCashOutRecordServiceImpl.java

@@ -3,6 +3,7 @@ package shop.alien.store.service.impl;
 import com.alibaba.fastjson2.JSONArray;
 import com.alibaba.fastjson2.JSONObject;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
@@ -44,13 +45,14 @@ public class StoreCashOutRecordServiceImpl extends ServiceImpl<StoreCashOutRecor
 
     @Override
     public StoreCashOutRecordVo getCashOutRecordList(Integer storeId, String cashOutStartTime, String cashOutEndTime, Integer page, Integer size, String paymentStatus) {
-        LambdaQueryWrapper<StoreCashOutRecord> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(StoreCashOutRecord::getStoreId, storeId);
-        wrapper.eq(StringUtils.isNotBlank(paymentStatus), StoreCashOutRecord::getPaymentStatus, paymentStatus);
-        wrapper.le(StringUtils.isNotBlank(cashOutEndTime) , StoreCashOutRecord::getCreatedTime, cashOutEndTime + " 23:59:59");
-        wrapper.ge(StringUtils.isNotBlank(cashOutStartTime), StoreCashOutRecord::getCreatedTime, cashOutStartTime + " 00:00:00" );
-        wrapper.orderByDesc(StoreCashOutRecord::getCreatedTime);
-        List<StoreCashOutRecord> recordList = storeCashOutRecordMapper.selectList(wrapper);
+        QueryWrapper<StoreCashOutRecord> wrapper = new QueryWrapper<>();
+        wrapper.eq("scor.store_id", storeId);
+        wrapper.eq(StringUtils.isNotBlank(paymentStatus), "scor.payment_status", paymentStatus);
+        wrapper.le(StringUtils.isNotBlank(cashOutEndTime) , "scor.created_time", cashOutEndTime + " 23:59:59");
+        wrapper.ge(StringUtils.isNotBlank(cashOutStartTime), "scor.created_time", cashOutStartTime + " 00:00:00" );
+        wrapper.eq("scor.delete_flag", 0);
+        wrapper.orderByDesc("scor.created_time");
+        List<StoreCashOutRecord> recordList = storeCashOutRecordMapper.selectCashoutRecordList(wrapper);
         IPage<StoreCashOutRecord> storeCashOutRecordIPage = ListToPage.setPage(recordList, page, size);
         StoreCashOutRecordVo vo = new StoreCashOutRecordVo();
         vo.setCashOutRecordList( storeCashOutRecordIPage.getRecords());

+ 46 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreCommentServiceImpl.java

@@ -809,6 +809,52 @@ public class StoreCommentServiceImpl extends ServiceImpl<StoreCommentMapper, Sto
                 record.setGroupBuyImgUrl(imgUrlBuilder.toString());
             }
         }
+
+
+        List<LifeUserOrderCommentVo> lifeUserOrderCommentVos =  commentOrderPage.getRecords();
+        if(CollectionUtils.isEmpty(lifeUserOrderCommentVos)){
+            return commentOrderPage;
+        }
+        List<String> orderIds = lifeUserOrderCommentVos.stream().map(LifeUserOrderCommentVo::getId).collect(Collectors.toList());
+        List<StoreComment> storeCommentList = storeCommentMapper.selectList(new QueryWrapper<StoreComment>().inSql("business_id", String.join(",", orderIds)).eq("business_type", 5));
+        if(CollectionUtils.isEmpty(storeCommentList)){
+            return commentOrderPage;
+        }
+        Map<Integer, StoreComment> commentIdToMap = storeCommentList.stream()
+                .collect(Collectors.toMap(
+                        StoreComment::getBusinessId,
+                        Function.identity(),
+                        (existing, replacement) -> existing  // 若有重复id(理论上不会),保留第一个
+                ));
+        if(CollectionUtils.isEmpty(commentIdToMap)){
+            return commentOrderPage;
+        }
+        for(LifeUserOrderCommentVo lifeUserOrderCommentVo : commentOrderPage.getRecords()){
+            Integer orderId = Integer.parseInt(lifeUserOrderCommentVo.getId());
+
+            if(commentIdToMap.containsKey(orderId)){
+                StoreComment storeComment = commentIdToMap.get(orderId);
+                lifeUserOrderCommentVo.setScore(storeComment.getScore().toString());
+                lifeUserOrderCommentVo.setCommentDate(storeComment.getCreatedTime());
+                String imgIds = storeComment.getImgId();
+
+                if(StringUtils.isNotEmpty(imgIds)){
+                    LambdaQueryWrapper<StoreImg> storeImgLambdaQueryWrapper = new LambdaQueryWrapper<>();
+                    List<String> imgIdList = Arrays.stream(imgIds.split(","))
+                            .map(String::trim)
+                            .collect(Collectors.toList());
+                    storeImgLambdaQueryWrapper.in(StoreImg::getId, imgIdList);
+                    List<StoreImg> storeImgList = storeImgMapper.selectList(storeImgLambdaQueryWrapper);
+                    if(CollectionUtils.isNotEmpty(storeImgList)){
+                        List<String> imgUrlList = storeImgList.stream()    // 转换为 Stream
+                                .map(StoreImg::getImgUrl)                  // 映射,提取 name 字段
+                                .collect(Collectors.toList());
+                        lifeUserOrderCommentVo.setImgUrls(imgUrlList);
+                    }
+                }
+            }
+        }
+
         return commentOrderPage;
     }
 }

+ 2 - 3
alien-store/src/main/java/shop/alien/store/service/impl/StoreMenuServiceImpl.java

@@ -45,7 +45,6 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
 
     private final LifeGroupBuyThaliMapper lifeGroupBuyThaliMapper;
 
-
     /**
      * 获取门店菜单
      *
@@ -188,7 +187,6 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
         return R.success("新增菜品成功");
     }
 
-
     /**
      * 菜品排序信息
      *
@@ -229,7 +227,7 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
         if (dishType == 0) {
             List<LifeGroupBuyThali> lifeGroupBuyThaliList = lifeGroupBuyThaliMapper.selectList(new LambdaQueryWrapper<LifeGroupBuyThali>().in(LifeGroupBuyThali::getDetailId, ids));
             if (CollectionUtil.isNotEmpty(lifeGroupBuyThaliList)) {
-                return R.fail("该菜品已被团购套餐引用,不能删除");
+                return R.fail("当前菜品存在于团购中,不可删除");
             }
             flag = this.removeByIds(ids);
         } else {
@@ -246,6 +244,7 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
         }
         return R.success("删除成功");
     }
+
     @Override
     public StoreMenuVo getMenuCountByStoreId(int storeId) {
         StoreMenuVo storeMenuVo = new StoreMenuVo();