|
|
@@ -9,6 +9,8 @@ import org.apache.ibatis.annotations.Select;
|
|
|
import shop.alien.entity.store.StorePlatformBenefits;
|
|
|
import shop.alien.entity.store.vo.StorePlatformBenefitsVo;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* 福利表 Mapper 接口
|
|
|
*
|
|
|
@@ -37,17 +39,55 @@ public interface StorePlatformBenefitsMapper extends BaseMapper<StorePlatformBen
|
|
|
"from\n" +
|
|
|
"\tstore_platform_benefits spb\n" +
|
|
|
"inner join life_discount_coupon ldc on\n" +
|
|
|
- "\tspb.business_id = ldc.id and spb.delete_flag = 0 " +
|
|
|
+ "\tspb.business_id = ldc.id and spb.delete_flag = 0 and spb.type = 1 " +
|
|
|
" union all " +
|
|
|
" select spb.id, spb.type, spb.business_id, spb.usage_conditions, svc.name, spb.created_time,svc.quantity " +
|
|
|
" from store_platform_benefits spb " +
|
|
|
- " inner join store_virtual_currency svc on spb.business_id = svc.id and spb.delete_flag = 0 ) a " +
|
|
|
+ " inner join store_virtual_currency svc on spb.business_id = svc.id and spb.delete_flag = 0 and spb.type = 2 " +
|
|
|
+ " ) a " +
|
|
|
" ${ew.customSqlSegment}" +
|
|
|
"</script>")
|
|
|
IPage<StorePlatformBenefitsVo> getPlatformBenefitsPage(
|
|
|
IPage<StorePlatformBenefitsVo> page,
|
|
|
@Param(Constants.WRAPPER) QueryWrapper<StorePlatformBenefitsVo> queryWrapper
|
|
|
);
|
|
|
-
|
|
|
+ /**
|
|
|
+ * 查询所有福利信息,包含优惠券信息和U币信息
|
|
|
+ *
|
|
|
+ * @return 福利信息列表
|
|
|
+ */
|
|
|
+ @Select("select * from ( " +
|
|
|
+ " select " +
|
|
|
+ " spb.id, " +
|
|
|
+ " spb.type, " +
|
|
|
+ " spb.business_id, " +
|
|
|
+ " spb.usage_conditions, " +
|
|
|
+ " spb.status, " +
|
|
|
+ " spb.delete_flag, " +
|
|
|
+ " spb.created_time, " +
|
|
|
+ " spb.created_user_id, " +
|
|
|
+ " spb.updated_time, " +
|
|
|
+ " spb.updated_user_id, " +
|
|
|
+ " ldc.name couponName" +
|
|
|
+ " from store_platform_benefits spb " +
|
|
|
+ " inner join life_discount_coupon ldc on spb.business_id = ldc.id and spb.delete_flag = 0 and spb.type = 1 " +
|
|
|
+ " union all " +
|
|
|
+ " select " +
|
|
|
+ " spb.id, " +
|
|
|
+ " spb.type, " +
|
|
|
+ " spb.business_id, " +
|
|
|
+ " spb.usage_conditions, " +
|
|
|
+ " spb.status, " +
|
|
|
+ " spb.delete_flag, " +
|
|
|
+ " spb.created_time, " +
|
|
|
+ " spb.created_user_id, " +
|
|
|
+ " spb.updated_time, " +
|
|
|
+ " spb.updated_user_id, " +
|
|
|
+ " svc.name couponName" +
|
|
|
+ " from store_platform_benefits spb " +
|
|
|
+ " inner join store_virtual_currency svc on spb.business_id = svc.id and spb.delete_flag = 0 and spb.type = 2 " +
|
|
|
+ " ) a " +
|
|
|
+ " order by created_time desc")
|
|
|
+ List<StorePlatformBenefitsVo> selectListAndCoupon();
|
|
|
}
|
|
|
|