|
|
@@ -5,19 +5,20 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|
|
import com.fs.his.domain.FsCourseCouponUser;
|
|
|
import com.fs.his.vo.CourseCouponUserListUVO;
|
|
|
import com.fs.his.vo.FsCourseCouponUserRecordVO;
|
|
|
+import com.fs.his.vo.FsCourseCouponUserVO;
|
|
|
import org.apache.ibatis.annotations.Param;
|
|
|
import org.apache.ibatis.annotations.Select;
|
|
|
|
|
|
/**
|
|
|
* 用户看课优惠券Mapper接口
|
|
|
- *
|
|
|
+ *
|
|
|
* @author fs
|
|
|
* @date 2026-05-13
|
|
|
*/
|
|
|
public interface FsCourseCouponUserMapper extends BaseMapper<FsCourseCouponUser>{
|
|
|
/**
|
|
|
* 查询用户看课优惠券
|
|
|
- *
|
|
|
+ *
|
|
|
* @param id 用户看课优惠券主键
|
|
|
* @return 用户看课优惠券
|
|
|
*/
|
|
|
@@ -25,15 +26,34 @@ public interface FsCourseCouponUserMapper extends BaseMapper<FsCourseCouponUser>
|
|
|
|
|
|
/**
|
|
|
* 查询用户看课优惠券列表
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsCourseCouponUser 用户看课优惠券
|
|
|
* @return 用户看课优惠券集合
|
|
|
*/
|
|
|
List<FsCourseCouponUser> selectFsCourseCouponUserList(FsCourseCouponUser fsCourseCouponUser);
|
|
|
|
|
|
+ @Select("<script>" +
|
|
|
+ "select cu.id,cu.coupon_id,cu.user_id,cu.limit_time,cu.start_time," +
|
|
|
+ "cu.create_time,cu.update_time,cu.status,fu.nick_name,cc.title as couponTitle " +
|
|
|
+ "from fs_course_coupon_user cu " +
|
|
|
+ "LEFT JOIN fs_course_coupon cc on cu.coupon_id = cc.id " +
|
|
|
+ "LEFT JOIN fs_user fu on cu.user_id = fu.user_id " +
|
|
|
+ "<where>" +
|
|
|
+ " <if test='data != null'>" +
|
|
|
+ " <if test='data.couponId != null'> and cu.coupon_id = #{data.couponId}</if>" +
|
|
|
+ " <if test='data.userId != null'> and cu.user_id = #{data.userId}</if>" +
|
|
|
+ " <if test='data.status != null'> and cu.status = #{data.status}</if>" +
|
|
|
+ " <if test='data.sendType != null'> and cu.send_type = #{data.sendType}</if>" +
|
|
|
+ " <if test='data.liveId != null'> and cu.live_id = #{data.liveId}</if>" +
|
|
|
+ " </if>" +
|
|
|
+ "</where>" +
|
|
|
+ "order by cu.create_time desc" +
|
|
|
+ "</script>")
|
|
|
+ List<FsCourseCouponUserVO> selectFsCourseCouponUserListVO(@Param("data") FsCourseCouponUser fsCourseCouponUser);
|
|
|
+
|
|
|
/**
|
|
|
* 新增用户看课优惠券
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsCourseCouponUser 用户看课优惠券
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@@ -41,7 +61,7 @@ public interface FsCourseCouponUserMapper extends BaseMapper<FsCourseCouponUser>
|
|
|
|
|
|
/**
|
|
|
* 修改用户看课优惠券
|
|
|
- *
|
|
|
+ *
|
|
|
* @param fsCourseCouponUser 用户看课优惠券
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@@ -49,7 +69,7 @@ public interface FsCourseCouponUserMapper extends BaseMapper<FsCourseCouponUser>
|
|
|
|
|
|
/**
|
|
|
* 删除用户看课优惠券
|
|
|
- *
|
|
|
+ *
|
|
|
* @param id 用户看课优惠券主键
|
|
|
* @return 结果
|
|
|
*/
|
|
|
@@ -57,7 +77,7 @@ public interface FsCourseCouponUserMapper extends BaseMapper<FsCourseCouponUser>
|
|
|
|
|
|
/**
|
|
|
* 批量删除用户看课优惠券
|
|
|
- *
|
|
|
+ *
|
|
|
* @param ids 需要删除的数据主键集合
|
|
|
* @return 结果
|
|
|
*/
|