党员活动 活动风采增加模糊查询
This commit is contained in:
@ -41,13 +41,13 @@ public class PartyMemberEventController {
|
|||||||
@ApiOperation("活动风采轮播列表")
|
@ApiOperation("活动风采轮播列表")
|
||||||
@GetMapping("/eventStyle/banner")
|
@GetMapping("/eventStyle/banner")
|
||||||
public BaseResponse<List<EventStyle>> getEventStyleBanner() {
|
public BaseResponse<List<EventStyle>> getEventStyleBanner() {
|
||||||
return BaseResponse.success(eventStyleService.getEventStyle("banner"));
|
return BaseResponse.success(eventStyleService.getEventStyle("banner",""));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("活动风采列表")
|
@ApiOperation("活动风采列表")
|
||||||
@GetMapping("/eventStyle/list")
|
@GetMapping("/eventStyle/list")
|
||||||
public BaseResponse<List<EventStyle>> getEventStyleList() {
|
public BaseResponse<List<EventStyle>> getEventStyleList(@RequestParam(value = "param") String param) {
|
||||||
return BaseResponse.success(eventStyleService.getEventStyle("list"));
|
return BaseResponse.success(eventStyleService.getEventStyle("list", param));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("活动宣言")
|
@ApiOperation("活动宣言")
|
||||||
|
@ -13,5 +13,5 @@ import java.util.List;
|
|||||||
public interface EventStyleService extends IService<EventStyle>{
|
public interface EventStyleService extends IService<EventStyle>{
|
||||||
|
|
||||||
|
|
||||||
List<EventStyle> getEventStyle(String type);
|
List<EventStyle> getEventStyle(String type, String param);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl;
|
package com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
@ -22,8 +23,11 @@ public class EventStyleServiceImpl extends ServiceImpl<EventStyleMapper, EventSt
|
|||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<EventStyle> getEventStyle(String type) {
|
public List<EventStyle> getEventStyle(String type, String param) {
|
||||||
LambdaQueryWrapper<EventStyle> query = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<EventStyle> query = Wrappers.lambdaQuery();
|
||||||
|
if (StrUtil.isNotBlank(param)) {
|
||||||
|
query.like(EventStyle::getTitle, param);
|
||||||
|
}
|
||||||
if ("banner".equals(type)) {
|
if ("banner".equals(type)) {
|
||||||
query.eq(EventStyle::getBanner, "1").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
|
query.eq(EventStyle::getBanner, "1").eq(EventStyle::getStatus, "1").orderByAsc(EventStyle::getSort);
|
||||||
return this.list(query);
|
return this.list(query);
|
||||||
|
Reference in New Issue
Block a user