Pārlūkot izejas kodu

feat(mapper): 新增团购主表和商户证照历史记录Mapper接口

- 添加 LifeGroupBuyMainPlantformMapper 接口用于查询团购菜品成本价
- 添加 StoreLicenseHistoryMapper 接口用于根据商户ID和证照类型查询历史记录
- 添加 StoreOperationalActivityMapper 接口用于运营活动数据操作
- 所有新增Mapper均继承BaseMapper并标注@Mapper注解
- 添加相关实体类引用和MyBatis注解支持
yindp 1 nedēļu atpakaļ
vecāks
revīzija
35426144eb

+ 33 - 0
alien-entity/src/main/java/shop/alien/mapper/storePlantform/LifeGroupBuyMainPlantformMapper.java

@@ -0,0 +1,33 @@
+package shop.alien.mapper.storePlantform;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+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 org.apache.ibatis.annotations.Update;
+import shop.alien.entity.store.LifeGroupBuyMain;
+import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
+
+import java.math.BigDecimal;
+
+/**
+* @author youch
+* @description 针对表【life_group_buy_main(团购主表)】的数据库操作Mapper
+* @createDate 2025-07-28 14:31:30
+* @Entity shop.alien.entity.store.LifeGroupBuyMain
+*/
+@Mapper
+public interface LifeGroupBuyMainPlantformMapper extends BaseMapper<LifeGroupBuyMain> {
+
+    @Select("select SUM(cost_price) from life_group_buy_thali lgbt inner join store_menu sm on lgbt.detail_id = sm.id where parent_id = #{id} and lgbt.delete_flag = 0 and sm.delete_flag = 0 ")
+    BigDecimal selectSumCostPrice(@Param("id") Integer id);
+
+
+}
+
+
+
+

+ 33 - 0
alien-entity/src/main/java/shop/alien/mapper/storePlantform/StoreLicenseHistoryMapper.java

@@ -0,0 +1,33 @@
+package shop.alien.mapper.storePlantform;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.storePlatform.StoreLicenseHistory;
+
+import java.util.List;
+
+/**
+ * 商户证照历史记录 Mapper 接口
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+public interface StoreLicenseHistoryMapper extends BaseMapper<StoreLicenseHistory> {
+
+    /**
+     * 根据商户ID、证照类型和删除标记查询证照历史记录列表
+     *
+     * @param storeId 商户ID
+     * @param licenseStatus 证照类型(1-合同管理,2-食品经营许可证)
+     * @param deleteFlag 删除标记(0-未删除,1-已删除)
+     * @return 证照历史记录列表
+     */
+    @Select("SELECT * FROM store_license_history WHERE store_id = #{storeId} AND license_status = #{licenseStatus} AND (delete_flag = #{deleteFlag} or license_execute_status = 2) ORDER BY created_time DESC")
+    List<StoreLicenseHistory> queryLicenceByStatusList(@Param("storeId") Integer storeId, 
+                                                        @Param("licenseStatus") Integer licenseStatus, 
+                                                        @Param("deleteFlag") Integer deleteFlag);
+
+}
+

+ 17 - 0
alien-entity/src/main/java/shop/alien/mapper/storePlantform/StoreOperationalActivityMapper.java

@@ -0,0 +1,17 @@
+package shop.alien.mapper.storePlantform;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import shop.alien.entity.storePlatform.StoreOperationalActivity;
+
+/**
+ * 运营活动 Mapper 接口
+ *
+ * @author system
+ * @since 2025-11-26
+ */
+@Mapper
+public interface StoreOperationalActivityMapper extends BaseMapper<StoreOperationalActivity> {
+
+}
+