Procházet zdrojové kódy

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

# Conflicts:
#	alien-entity/src/main/java/shop/alien/entity/store/BarPerformance.java
#	alien-entity/src/main/java/shop/alien/entity/store/StoreStaffConfig.java
#	alien-entity/src/main/java/shop/alien/entity/store/vo/StoreProductItemGymVo.java
#	alien-entity/src/main/java/shop/alien/mapper/BarPerformanceMapper.java
#	alien-entity/src/main/java/shop/alien/mapper/StoreProductItemMapper.java
#	alien-entity/src/main/resources/mapper/StoreProductItemMapper.xml
#	alien-store/src/main/java/shop/alien/store/controller/BarPerformanceController.java
#	alien-store/src/main/java/shop/alien/store/controller/StoreProductBarController.java
#	alien-store/src/main/java/shop/alien/store/controller/StoreProductItemController.java
#	alien-store/src/main/java/shop/alien/store/controller/StoreStaffConfigController.java
#	alien-store/src/main/java/shop/alien/store/service/StoreProductItemService.java
#	alien-store/src/main/java/shop/alien/store/service/StoreStaffConfigService.java
#	alien-store/src/main/java/shop/alien/store/service/impl/BarPerformanceServiceImpl.java
#	alien-store/src/main/java/shop/alien/store/service/impl/StoreProductItemServiceImpl.java
#	alien-store/src/main/java/shop/alien/store/service/impl/StoreStaffConfigServiceImpl.java
penghao před 1 dnem
rodič
revize
16fc6dac4b

+ 5 - 2
alien-entity/src/main/java/shop/alien/entity/store/BarPerformance.java

@@ -7,6 +7,7 @@ import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 
+import java.io.Serializable;
 import java.util.Date;
 
 /**
@@ -19,8 +20,10 @@ import java.util.Date;
 @Data
 @JsonInclude
 @TableName("bar_performance")
-@ApiModel(value = "BarPerformance对象", description = "演出信息")
-public class BarPerformance {
+@ApiModel(value = "BarPerformance对象", description = "酒吧演出表")
+public class BarPerformance implements Serializable {
+
+    private static final long serialVersionUID = 1L;
 
     @ApiModelProperty(value = "演出ID(主键)")
     @TableId(value = "id", type = IdType.AUTO)

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

@@ -1,15 +1,19 @@
 package shop.alien.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
 import shop.alien.entity.store.BarPerformance;
 
 /**
+ *
  * BarPerformanceMapper接口
  * 对应数据库表:bar_performance
  * 用于操作演出信息表
- * 
+ *
  * @author AI Assistant
  * @since 2025-12-17
  */
+@Mapper
 public interface BarPerformanceMapper extends BaseMapper<BarPerformance> {
+
 }

+ 8 - 9
alien-entity/src/main/java/shop/alien/mapper/LifeSysDeptMapper.java

@@ -1,16 +1,15 @@
 package shop.alien.mapper;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
-import org.apache.ibatis.annotations.Mapper;
-import shop.alien.entity.store.LifeSysDept;
+import shop.alien.entity.store.BarPerformance;
 
 /**
- * 部门表 Mapper 接口
+ * BarPerformanceMapper接口
+ * 对应数据库表:bar_performance
+ * 用于操作演出信息表
  *
- * @author system
- * @since 2025-01-XX
+ * @author AI Assistant
+ * @since 2025-12-17
  */
-@Mapper
-public interface LifeSysDeptMapper extends BaseMapper<LifeSysDept> {
-}
-
+public interface BarPerformanceMapper extends BaseMapper<BarPerformance> {
+}

+ 6 - 5
alien-store/src/main/java/shop/alien/store/controller/BarPerformanceController.java

@@ -1,16 +1,17 @@
 package shop.alien.store.controller;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiImplicitParam;
-import io.swagger.annotations.ApiImplicitParams;
-import io.swagger.annotations.ApiOperation;
+
+import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.BarPerformance;
 import shop.alien.store.service.BarPerformanceService;
+import shop.alien.util.myBaticsPlus.QueryBuilder;
+
+import java.util.List;
 
 /**
  * 酒吧演出Controller
@@ -187,7 +188,7 @@ public class BarPerformanceController {
             @RequestParam(required = false) Integer statusReview,
             @RequestParam(required = false) String category,
             @RequestParam(required = false) String performanceName) {
-        log.info("BarPerformanceController.queryPerformanceListByStoreId?page={}, size={}, storeId={}, statusReview={}, category={}, performanceName={}", 
+        log.info("BarPerformanceController.queryPerformanceListByStoreId?page={}, size={}, storeId={}, statusReview={}, category={}, performanceName={}",
                 page, size, storeId, statusReview, category, performanceName);
         try {
             IPage<BarPerformance> performanceList = barPerformanceService.queryPerformanceListByStoreIdAndCategory(

+ 0 - 1
alien-store/src/main/java/shop/alien/store/controller/StoreProductBarController.java

@@ -40,7 +40,6 @@ public class StoreProductBarController {
             return R.fail("价格不能为空");
         }
 
-
         R<StoreProductBar> result = storeProductBarService.addStoreProductBar(bar);
         if (result.getCode() == 200) {
             return R.success("新增成功");

+ 24 - 24
alien-store/src/main/java/shop/alien/store/service/impl/BarPerformanceServiceImpl.java

@@ -54,7 +54,7 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         if (barPerformance.getPerformanceName().length() > 20) {
             throw new IllegalArgumentException("演出名称长度不能超过20个字符");
         }
-        
+
         // 2. 演出海报验证:必填且限1张
         if (StringUtils.isEmpty(barPerformance.getPerformancePoster())) {
             throw new IllegalArgumentException("演出海报不能为空");
@@ -64,7 +64,7 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         if (posterImages.length > 1) {
             throw new IllegalArgumentException("演出海报最多只能上传1张");
         }
-        
+
         // 3. 演出类型和频次的关联验证:特邀演出(0)只能选单次(0)
         if (barPerformance.getPerformanceType() != null && barPerformance.getPerformanceType() == 0) {
             // 特邀演出
@@ -72,13 +72,13 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
                 throw new IllegalArgumentException("特邀演出只能选择单次演出");
             }
         }
-        
+
         // 4. 演出频次相关验证
         String performanceFrequency = barPerformance.getPerformanceFrequency();
         if (StringUtils.isEmpty(performanceFrequency)) {
             throw new IllegalArgumentException("演出频次不能为空");
         }
-        
+
         // 获取今天的开始时间(用于时间验证)
         java.util.Calendar cal = java.util.Calendar.getInstance();
         cal.set(java.util.Calendar.HOUR_OF_DAY, 0);
@@ -86,7 +86,7 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         cal.set(java.util.Calendar.SECOND, 0);
         cal.set(java.util.Calendar.MILLISECOND, 0);
         Date todayStart = cal.getTime();
-        
+
         switch (performanceFrequency) {
             case "0": // 单次演出
                 if (barPerformance.getSingleStartDatetime() == null) {
@@ -188,7 +188,7 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         if (StringUtils.isNotEmpty(barPerformance.getPerformanceNotice()) && barPerformance.getPerformanceNotice().length() > 300) {
             throw new IllegalArgumentException("演出须知不能超过300个字符");
         }
-        
+
         // 7. 图文详情文字验证:限300字(如果有performanceContent字段)
         if (StringUtils.isNotEmpty(barPerformance.getPerformanceContent()) && barPerformance.getPerformanceContent().length() > 300) {
             throw new IllegalArgumentException("图文详情文字不能超过300个字符");
@@ -221,9 +221,9 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
             throw new IllegalArgumentException("内容审核未通过:" + failureReason);
         }
         log.info("酒吧演出内容审核通过");
-        
+
         Integer id = barPerformance.getId();
-        
+
         if (id == null || id == 0) {
             // 新增操作
             Date nowDate = new Date(System.currentTimeMillis());
@@ -296,11 +296,11 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         if (id == null || id <= 0) {
             return null;
         }
-        
+
         QueryWrapper<BarPerformance> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("id", id);
         queryWrapper.eq("delete_flag", 0);
-        
+
         return barPerformanceMapper.selectOne(queryWrapper);
     }
 
@@ -318,11 +318,11 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         if (id == null || onlineStatus == null) {
             return 0;
         }
-        
+
         LambdaUpdateWrapper<BarPerformance> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
         lambdaUpdateWrapper.eq(BarPerformance::getId, id);
         lambdaUpdateWrapper.set(BarPerformance::getOnlineStatus, onlineStatus);
-        
+
         return barPerformanceMapper.update(null, lambdaUpdateWrapper);
     }
 
@@ -346,16 +346,16 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         if (page == null || size == null || storeId == null || storeId <= 0) {
             return new Page<>();
         }
-        
+
         IPage<BarPerformance> performancePage = new Page<>(page, size);
         QueryWrapper<BarPerformance> queryWrapper = new QueryWrapper<>();
         queryWrapper.eq("store_id", storeId);
-        
+
         // 按演出名称搜索(支持模糊搜索)
         if (StringUtils.isNotEmpty(performanceName)) {
             queryWrapper.like("performance_name", performanceName);
         }
-        
+
         // 按审核状态筛选(数据库字段 review_status)
         if (reviewStatus != null) {
             queryWrapper.eq("review_status", reviewStatus);
@@ -363,7 +363,7 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
             // 不查询草稿(review_status为null的记录)
             queryWrapper.isNotNull("review_status");
         }
-        
+
         // 按演出分类筛选
         if (StringUtils.isNotEmpty(category) && !"all".equals(category)) {
             Date now = new Date();
@@ -375,7 +375,7 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
             cal.set(java.util.Calendar.SECOND, 0);
             cal.set(java.util.Calendar.MILLISECOND, 0);
             Date todayStart = cal.getTime();
-            
+
             switch (category) {
                 case "not_started": // 未开始
                     queryWrapper.and(wrapper -> {
@@ -414,18 +414,18 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
                     break;
             }
         }
-        
+
         queryWrapper.eq("delete_flag", 0);
         // 按提交时间(创建时间)倒序排序
         queryWrapper.orderByDesc("created_time");
-        
+
         return barPerformanceMapper.selectPage(performancePage, queryWrapper);
     }
 
     /**
      * 比较两个时间(只比较时间部分,忽略日期部分)
      * 用于每天定时和每周定时演出的时间验证
-     * 
+     *
      * @param time1 开始时间
      * @param time2 结束时间
      * @return true表示time1早于time2,false表示time1晚于或等于time2
@@ -439,27 +439,27 @@ public class BarPerformanceServiceImpl implements BarPerformanceService {
         int hour1 = cal1.get(java.util.Calendar.HOUR_OF_DAY);
         int minute1 = cal1.get(java.util.Calendar.MINUTE);
         int second1 = cal1.get(java.util.Calendar.SECOND);
-        
+
         java.util.Calendar cal2 = java.util.Calendar.getInstance();
         cal2.setTime(time2);
         int hour2 = cal2.get(java.util.Calendar.HOUR_OF_DAY);
         int minute2 = cal2.get(java.util.Calendar.MINUTE);
         int second2 = cal2.get(java.util.Calendar.SECOND);
-        
+
         // 比较小时
         if (hour1 < hour2) {
             return true;
         } else if (hour1 > hour2) {
             return false;
         }
-        
+
         // 小时相同,比较分钟
         if (minute1 < minute2) {
             return true;
         } else if (minute1 > minute2) {
             return false;
         }
-        
+
         // 分钟相同,比较秒
         return second1 < second2;
     }