|
|
@@ -35,11 +35,14 @@ public interface LifeDiscountCouponStoreFriendMapper extends BaseMapper<LifeDisc
|
|
|
"${ew.customSqlSegment}")
|
|
|
IPage<LifeDiscountCouponVo> selectPage(IPage<LifeDiscountCouponStoreFriendVo> iPage, @Param(Constants.WRAPPER) QueryWrapper<LifeDiscountCouponStoreFriendVo> friendLifeDiscountCouponQueryWrapper);
|
|
|
|
|
|
+ /** 好友赠我 - 优惠券 */
|
|
|
@Select("select ldcsf.created_time endDate,ldc.nominal_value nominalValue,ldc.minimum_spending_amount minimumSpendingAmount,img.img_url imgUrl,\n" +
|
|
|
"si.store_name storeName,\n" +
|
|
|
"ldc.name couponName,\n" +
|
|
|
"ldc.id couponId,\n" +
|
|
|
- "ldcsf.single_qty couponNum\n" +
|
|
|
+ "ldcsf.single_qty couponNum,\n" +
|
|
|
+ "1 as type,\n" +
|
|
|
+ "null as voucherId\n" +
|
|
|
"from life_discount_coupon_store_friend ldcsf\n" +
|
|
|
"left join life_discount_coupon ldc\n" +
|
|
|
"on ldc.id = ldcsf.coupon_id and ldc.delete_flag = 0\n" +
|
|
|
@@ -50,22 +53,53 @@ public interface LifeDiscountCouponStoreFriendMapper extends BaseMapper<LifeDisc
|
|
|
"${ew.customSqlSegment}")
|
|
|
List<LifeDiscountCouponFriendRuleVo> getReceivedSendFriendCouponList(@Param(Constants.WRAPPER) QueryWrapper<LifeDiscountCouponFriendRuleVo> lifeDiscountCouponFriendRuleVoQueryWrapper);
|
|
|
|
|
|
- //我赠好友
|
|
|
+ /** 好友赠我 - 代金券(type=4) */
|
|
|
+ @Select("select ldcsf.created_time endDate,CAST(lc.price AS DECIMAL(10,2)) nominalValue,null minimumSpendingAmount,img.img_url imgUrl,\n" +
|
|
|
+ "si.store_name storeName,\n" +
|
|
|
+ "lc.name couponName,\n" +
|
|
|
+ "null couponId,\n" +
|
|
|
+ "ldcsf.single_qty couponNum,\n" +
|
|
|
+ "4 as type,\n" +
|
|
|
+ "lc.id voucherId\n" +
|
|
|
+ "from life_discount_coupon_store_friend ldcsf\n" +
|
|
|
+ "left join life_coupon lc on lc.id = ldcsf.voucher_id and lc.delete_flag = 0\n" +
|
|
|
+ "left join store_info si on si.id = lc.store_id and si.delete_flag = 0\n" +
|
|
|
+ "left join store_user su on si.id = su.store_id\n" +
|
|
|
+ "left join store_img img on si.id = img.store_id and img.img_type = 1 and img.delete_flag = 0\n" +
|
|
|
+ "${ew.customSqlSegment}")
|
|
|
+ List<LifeDiscountCouponFriendRuleVo> getReceivedSendFriendCouponListVoucher(@Param(Constants.WRAPPER) QueryWrapper<LifeDiscountCouponFriendRuleVo> lifeDiscountCouponFriendRuleVoQueryWrapper);
|
|
|
+
|
|
|
+ /** 我赠好友 - 优惠券 */
|
|
|
@Select("select ldcsf.created_time endDate,ldc.nominal_value nominalValue,ldc.minimum_spending_amount minimumSpendingAmount,img.img_url imgUrl,\n" +
|
|
|
"si.store_name storeName,\n" +
|
|
|
"ldc.name couponName,\n" +
|
|
|
"ldc.id couponId,\n" +
|
|
|
- "ldcsf.single_qty couponNum\n" +
|
|
|
+ "ldcsf.single_qty couponNum,\n" +
|
|
|
+ "1 as type,\n" +
|
|
|
+ "null as voucherId\n" +
|
|
|
"from life_discount_coupon_store_friend ldcsf\n" +
|
|
|
"left join life_discount_coupon ldc\n" +
|
|
|
"on ldc.id = ldcsf.coupon_id and ldc.delete_flag = 0\n" +
|
|
|
-
|
|
|
"left join store_info si\n" +
|
|
|
"on si.id = ldcsf.store_user_id and si.delete_flag = 0\n" +
|
|
|
-
|
|
|
"left join store_user su on ldcsf.store_user_id = su.store_id\n" +
|
|
|
-
|
|
|
"left join store_img img on si.id = img.store_id and img.img_type = 1 and img.delete_flag = 0\n" +
|
|
|
"${ew.customSqlSegment}")
|
|
|
List<LifeDiscountCouponFriendRuleVo> getReceivedSendFriendCouponListwzhy(@Param(Constants.WRAPPER) QueryWrapper<LifeDiscountCouponFriendRuleVo> lifeDiscountCouponFriendRuleVoQueryWrapper);
|
|
|
+
|
|
|
+ /** 我赠好友 - 代金券(type=4) */
|
|
|
+ @Select("select ldcsf.created_time endDate,CAST(lc.price AS DECIMAL(10,2)) nominalValue,null minimumSpendingAmount,img.img_url imgUrl,\n" +
|
|
|
+ "si.store_name storeName,\n" +
|
|
|
+ "lc.name couponName,\n" +
|
|
|
+ "null couponId,\n" +
|
|
|
+ "ldcsf.single_qty couponNum,\n" +
|
|
|
+ "4 as type,\n" +
|
|
|
+ "lc.id voucherId\n" +
|
|
|
+ "from life_discount_coupon_store_friend ldcsf\n" +
|
|
|
+ "left join life_coupon lc on lc.id = ldcsf.voucher_id and lc.delete_flag = 0\n" +
|
|
|
+ "left join store_info si on si.id = lc.store_id and si.delete_flag = 0\n" +
|
|
|
+ "left join store_user su on ldcsf.store_user_id = su.store_id\n" +
|
|
|
+ "left join store_img img on si.id = img.store_id and img.img_type = 1 and img.delete_flag = 0\n" +
|
|
|
+ "${ew.customSqlSegment}")
|
|
|
+ List<LifeDiscountCouponFriendRuleVo> getReceivedSendFriendCouponListwzhyVoucher(@Param(Constants.WRAPPER) QueryWrapper<LifeDiscountCouponFriendRuleVo> lifeDiscountCouponFriendRuleVoQueryWrapper);
|
|
|
}
|