TienChin 活动管理-搜索活动

2023-10-12 14:52:49 浏览数 (1)

ActivityController

代码语言:javascript复制
@PreAuthorize("hasPermission('tienchin:activity:list')")
@GetMapping("/list")
TableDataInfo list(ActivityVO activityVO) {
    startPage();
    return getDataTable(iActivityService.selectActivityList(activityVO));
}

IActivityService.java

代码语言:javascript复制
/**
 * 查询活动列表
 *
 * @param activityVO 活动信息
 * @return {@code List<ActivityVO>}
 */
List<ActivityVO> selectActivityList(ActivityVO activityVO);

ActivityServiceImpl.java

代码语言:javascript复制
@Override
public List<ActivityVO> selectActivityList(ActivityVO activityVO) {
    // 将超过当前时间的活动状态设置为禁用
    expireActivity();

    return activityMapper.selectActivityList(activityVO);
}

ActivityMapper.java

代码语言:javascript复制
/**
 * 查询活动列表
 *
 * @param activityVO 活动信息
 * @return {@code List<ActivityVO>}
 */
List<ActivityVO> selectActivityList(ActivityVO activityVO);

ActivityMapper.xml

代码语言:javascript复制
<if test="activityName != null and activityName != ''">
    AND ta.activity_name LIKE CONCAT('%', #{activityName}, '%')
</if>
<if test="channelId != null">
    AND tc.channel_id = #{channelId}
</if>
<if test="activityStatus != null">
    AND ta.activity_status = #{activityStatus}
</if>
<if test="activityType != null">
    AND ta.activity_type = #{activityType}
</if>

0 人点赞