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>