7 Achegas 67f2a335c5 ... f7f00e4767

Autor SHA1 Mensaxe Data
  dujian f7f00e4767 Merge branch 'sit' into uat-20260202 hai 3 semanas
  lutong 5d93a2dbd3 Merge branch 'release_lutong_bug' into sit hai 3 semanas
  lutong 92baaa2520 修改BUG hai 3 semanas
  fcw fb9a9b0a6e refactor(store): 移除视频封面URL空值检查逻辑 hai 3 semanas
  fcw dc9fa90f3b feat(store): 添加视频封面URL列表支持 hai 3 semanas
  fcw 62fe4f4424 feat(coupon): 实现优惠券有效期自动计算功能 hai 3 semanas
  fcw 325d7fa0c5 fix(rating): 修复好评送券活动参与次数限制逻辑 hai 3 semanas

+ 6 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/StoreStaffConfigListQueryDto.java

@@ -1,9 +1,11 @@
 package shop.alien.entity.store.dto;
 
+import com.fasterxml.jackson.annotation.JsonFormat;
 import com.fasterxml.jackson.annotation.JsonInclude;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.util.Date;
 
@@ -37,9 +39,13 @@ public class StoreStaffConfigListQueryDto {
     private String staffName;
 
     @ApiModelProperty(value = "创建时间开始(yyyy-MM-dd HH:mm:ss)")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date startCreatedTime;
 
     @ApiModelProperty(value = "创建时间结束(yyyy-MM-dd HH:mm:ss)")
+    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private Date endCreatedTime;
 }
 

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/StoreVideoSaveDto.java

@@ -30,4 +30,7 @@ public class StoreVideoSaveDto implements Serializable {
     @ApiModelProperty(value = "视频ID列表")
     private List<Integer> videoIds;
 
+    @ApiModelProperty(value = "视频封面列表")
+    private List<String> coverUrls;
+
 }

+ 1 - 0
alien-lawyer/src/main/java/shop/alien/lawyer/controller/LawyerUserController.java

@@ -313,6 +313,7 @@ public class LawyerUserController {
             @ApiImplicitParam(name = "address", value = "联系地址", dataType = "String", paramType = "query"),
             @ApiImplicitParam(name = "introduction", value = "律师简介", dataType = "String", paramType = "query"),
             @ApiImplicitParam(name = "headImg", value = "律师头像", dataType = "String", paramType = "query"),
+            @ApiImplicitParam(name = "businessLicenseImage", value = "营业执照图片URL", dataType = "String", paramType = "query"),
             @ApiImplicitParam(name = "certificationTime", value = "认证时间(从业时间??待确认)", dataType = "Data", paramType = "query"),
     })
     @PostMapping("/updateLawyerUser")

+ 29 - 3
alien-lawyer/src/main/java/shop/alien/lawyer/service/impl/LawyerUserServiceImpl.java

@@ -695,11 +695,14 @@ public class LawyerUserServiceImpl extends ServiceImpl<LawyerUserMapper, LawyerU
                 log.warn("更新律所信息失败:更新数据库失败,律师ID={}", lawyerUserVo.getId());
                 return R.fail("修改律师信息失败");
             }
-            //根据律师表中的firm_id进行修改账号和地址
+            //根据律师表中的firm_id进行修改账号和地址(律所地址优先取 addressNew)
             UpdateWrapper<LawFirmPayment> updateWrapper = new UpdateWrapper<>();
             updateWrapper.eq("firm_id", lawyerUserVo.getFirmId())
-                    .set("payment_account", lawyerUserVo.getPaymentNum()) // 假设有账号字段
-                    .set("address", lawyerUserVo.getAddress()); // 假设有地址字段
+                    .set("payment_account", lawyerUserVo.getPaymentNum());
+            String firmPaymentAddress = StringUtils.hasText(lawyerUserVo.getAddressNew())
+                    ? lawyerUserVo.getAddressNew()
+                    : lawyerUserVo.getAddress();
+            updateWrapper.set("address", firmPaymentAddress);
             lawFirmPaymentmapper.update(null, updateWrapper);
 
         }
@@ -735,6 +738,29 @@ public class LawyerUserServiceImpl extends ServiceImpl<LawyerUserMapper, LawyerU
             lawyerUser.setCertificateImage(lawyerUserVo.getCertificateImage());
             hasUpdate = true;
         }
+        if (lawyerUserVo.getBusinessLicenseImage() != null) {
+            lawyerUser.setBusinessLicenseImage(lawyerUserVo.getBusinessLicenseImage());
+            hasUpdate = true;
+        }
+        if (lawyerUserVo.getProvince() != null) {
+            lawyerUser.setProvince(lawyerUserVo.getProvince());
+            hasUpdate = true;
+        }
+        if (lawyerUserVo.getCity() != null) {
+            lawyerUser.setCity(lawyerUserVo.getCity());
+            hasUpdate = true;
+        }
+        if (lawyerUserVo.getDistrict() != null) {
+            lawyerUser.setDistrict(lawyerUserVo.getDistrict());
+            hasUpdate = true;
+        }
+        String profileAddress = StringUtils.hasText(lawyerUserVo.getAddress())
+                ? lawyerUserVo.getAddress()
+                : lawyerUserVo.getAddressNew();
+        if (profileAddress != null) {
+            lawyerUser.setAddress(profileAddress);
+            hasUpdate = true;
+        }
 
         // 修改执业证、姓名或头像时,先走 AI 执业证核验(与库中数据合并后校验)
 //        if (lawyerUserVo.getCertificateImage() != null || lawyerUserVo.getName() != null || lawyerUserVo.getHeadImg() != null) {

+ 5 - 12
alien-store/src/main/java/shop/alien/store/controller/StoreStaffConfigController.java

@@ -2,27 +2,20 @@ package shop.alien.store.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import io.swagger.annotations.*;
-import springfox.documentation.annotations.ApiIgnore;
 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.StoreStaffConfig;
-import shop.alien.entity.store.StoreStaffTitle;
 import shop.alien.entity.store.UserLoginInfo;
-import shop.alien.util.common.TokenInfo;
 import shop.alien.entity.store.dto.StoreStaffConfigListQueryDto;
-import shop.alien.entity.store.vo.StaffTitleGroupVo;
-import shop.alien.entity.store.vo.StoreStaffDetailVo;
-import shop.alien.entity.store.vo.StoreStaffDetailWithPerformanceVo;
-import shop.alien.entity.store.vo.StoreStaffFitnessDetailVo;
-import shop.alien.entity.store.vo.StoreStaffPositionCountVo;
+import shop.alien.entity.store.vo.*;
 import shop.alien.mapper.StoreDictionaryMapper;
 import shop.alien.store.service.StoreStaffConfigService;
-import shop.alien.store.service.StoreStaffTitleService;
 import shop.alien.store.util.CommonConstant;
+import shop.alien.util.common.TokenInfo;
+import springfox.documentation.annotations.ApiIgnore;
 
 import java.io.IOException;
 import java.util.List;
@@ -54,8 +47,8 @@ public class StoreStaffConfigController {
             @ApiImplicitParam(name = "onlineStatus", value = "上线状态(0-上线 1-下线)", dataType = "Integer", paramType = "query", required = false),
             @ApiImplicitParam(name = "staffPosition", value = "职位", dataType = "String", paramType = "query", required = false),
             @ApiImplicitParam(name = "staffName", value = "员工姓名", dataType = "String", paramType = "query", required = false),
-            @ApiImplicitParam(name = "startCreatedTime", value = "创建时间开始(yyyy-MM-dd HH:mm:ss)", dataType = "String", paramType = "query", required = false),
-            @ApiImplicitParam(name = "endCreatedTime", value = "创建时间结束(yyyy-MM-dd HH:mm:ss)", dataType = "String", paramType = "query", required = false),
+            @ApiImplicitParam(name = "startCreatedTime", value = "创建时间开始(yyyy-MM-dd HH:mm:ss)", dataType = "Date", paramType = "query", required = false),
+            @ApiImplicitParam(name = "endCreatedTime", value = "创建时间结束(yyyy-MM-dd HH:mm:ss)", dataType = "Date", paramType = "query", required = false),
     })
     @GetMapping("/getStaffConfigList")
     public R<IPage<StoreStaffConfig>> getStaffConfigList(StoreStaffConfigListQueryDto query) {

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

@@ -494,11 +494,12 @@ public class CommonRatingServiceImpl extends ServiceImpl<CommonRatingMapper, Com
                         
                         // 检查参与次数限制(每个活动单独计算)
                         Integer limit = activity.getParticipationLimit();
-                        if (limit != null && limit > 0) {
+                        Integer couponQuantity = activity.getCouponQuantity();
+                        if (limit != null && limit > 0 && couponQuantity != null && couponQuantity > 0) {
                             // 审核成功之前的评论不计算在参与次数中(只统计审核成功时间在活动审核时间之后的评论)
                             int passedCount = commonRatingMapper.countPassedGoodRatingsByUserAndStore(
                                     commonRating.getUserId(), businessId, activity.getAuditTime());
-                            if (passedCount > limit) {
+                            if (passedCount > limit && passedCount > couponQuantity) {
                                 log.info("CommonRatingService 好评送券跳过:超过运营活动参与次数 activityId={}, participation_limit={}, count={}, userId={}, storeId={}, activityStartTime={}",
                                         activity.getId(), limit, passedCount, commonRating.getUserId(), businessId, activity.getStartTime());
                                 continue; // 跳过该活动,继续处理下一个

+ 27 - 0
alien-store/src/main/java/shop/alien/store/service/impl/LifeDiscountCouponStoreFriendServiceImpl.java

@@ -970,6 +970,33 @@ public class LifeDiscountCouponStoreFriendServiceImpl extends ServiceImpl<LifeDi
                     lifeDiscountCouponUser.setIssueSource(3); // 3-好评送券
                     lifeDiscountCouponUserMapper.insert(lifeDiscountCouponUser);
                     coupon.setSingleQty(coupon.getSingleQty() - 1);
+// 1. 获取开始日期
+                    LocalDate beginDate = coupon.getBeginGetDate();
+// 2. 获取字符串类型的天数
+                    String specifiedDayStr = coupon.getSpecifiedDay();
+
+// 3. 基础校验
+                    if (beginDate == null) {
+                        throw new IllegalArgumentException("优惠券开始日期不能为空");
+                    }
+                    if (specifiedDayStr == null || specifiedDayStr.isEmpty()) {
+                        throw new IllegalArgumentException("有效天数不能为空");
+                    }
+
+// 4. 字符串转整数 + 合法性校验
+                    int days;
+                    try {
+                        days = Integer.parseInt(specifiedDayStr);
+                    } catch (NumberFormatException e) {
+                        throw new IllegalArgumentException("有效天数必须是纯数字:" + specifiedDayStr);
+                    }
+                    if (days <= 0) {
+                        throw new IllegalArgumentException("有效天数必须大于0");
+                    }
+
+// 5. 计算结束日期并赋值
+                    LocalDate endDate = beginDate.plusDays(days);
+                    coupon.setEndGetDate(endDate);
                     lifeDiscountCouponMapper.updateById(coupon);
                     grantedCoupon = 1;
                     couponName = coupon.getName();  // 保存优惠券名称

+ 25 - 23
alien-store/src/main/java/shop/alien/store/service/impl/StoreVideoServiceImpl.java

@@ -83,7 +83,8 @@ public class StoreVideoServiceImpl extends ServiceImpl<StoreVideoMapper, StoreVi
         List<StoreVideo> videoList = new java.util.ArrayList<>();
         List<String> videoUrls = dto.getVideoUrls();
         List<Integer> videoIds = dto.getVideoIds(); // 可选的视频ID列表,用于编辑
-        
+        List<String> coverUrls = dto.getCoverUrls();
+
         // 遍历URL列表,每个URL都是视频URL
         int videoIndex = 0;
         for (int i = 0; i < videoUrls.size(); i++) {
@@ -139,33 +140,34 @@ public class StoreVideoServiceImpl extends ServiceImpl<StoreVideoMapper, StoreVi
             
             // 尝试根据视频URL自动匹配封面URL(从/file/uploadMore接口获取的封面URL格式)
             // 封面URL格式:视频URL的扩展名从.mp4等替换为.jpg
-            String coverUrl = tryMatchCoverUrl(videoUrl);
-            
-            // 如果匹配不到封面URL,尝试处理视频生成封面
-            if (StringUtils.isBlank(coverUrl)) {
-                log.info("未找到匹配的封面URL,视频URL:{},将尝试处理生成封面", videoUrl);
-                try {
-                    // 调用processVideoAndCover处理,生成封面
-                    String processedImgUrl = processVideoAndCover(videoUrl);
-                    if (StringUtils.isNotBlank(processedImgUrl)) {
-                        // 如果处理成功,processedImgUrl已经是JSON格式,直接使用
-                        storeVideo.setImgUrl(processedImgUrl);
-                        videoList.add(storeVideo);
-                        videoIndex++;
-                        continue;
-                    }
-                } catch (Exception e) {
-                    log.error("处理视频封面失败,视频URL:{},错误:{},将保存视频但不包含封面", videoUrl, e.getMessage(), e);
-                    // 处理失败时,继续执行下面的逻辑,保存视频但不包含封面
-                }
-            }
+//            String coverUrl = tryMatchCoverUrl(videoUrl);
+//
+//            // 如果匹配不到封面URL,尝试处理视频生成封面
+//            if (StringUtils.isBlank(coverUrl)) {
+//                log.info("未找到匹配的封面URL,视频URL:{},将尝试处理生成封面", videoUrl);
+//                try {
+//                    // 调用processVideoAndCover处理,生成封面
+//                    String processedImgUrl = processVideoAndCover(videoUrl);
+//                    if (StringUtils.isNotBlank(processedImgUrl)) {
+//                        // 如果处理成功,processedImgUrl已经是JSON格式,直接使用
+//                        storeVideo.setImgUrl(processedImgUrl);
+//                        videoList.add(storeVideo);
+//                        videoIndex++;
+//                        continue;
+//                    }
+//                } catch (Exception e) {
+//                    log.error("处理视频封面失败,视频URL:{},错误:{},将保存视频但不包含封面", videoUrl, e.getMessage(), e);
+//                    // 处理失败时,继续执行下面的逻辑,保存视频但不包含封面
+//                }
+//            }
             
             // 组合成JSON对象格式(即使没有封面也保存)
             JSONObject videoJson = new JSONObject();
             videoJson.put("video", videoUrl);
-            if (StringUtils.isNotBlank(coverUrl)) {
+            String coverUrl = coverUrls.get(i);
+//            if (StringUtils.isBlank(coverUrl)) {
                 videoJson.put("cover", coverUrl);
-            }
+//            }
             
             storeVideo.setImgUrl(JSON.toJSONString(videoJson));