|
|
|
@ -1,7 +1,9 @@ |
|
|
|
package com.bnyer.img.service.impl; |
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
|
|
|
import com.bnyer.common.core.utils.StringUtils; |
|
|
|
import com.bnyer.img.domain.Feedback; |
|
|
|
import com.bnyer.img.domain.Type; |
|
|
|
import com.bnyer.img.mapper.TypeMapper; |
|
|
|
import com.bnyer.img.service.TypeService; |
|
|
|
@ -39,9 +41,10 @@ public class TypeServiceImpl implements TypeService { |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Type> queryPage(String typeName) { |
|
|
|
public List<Type> queryPage(String typeName,String isShow) { |
|
|
|
LambdaQueryWrapper<Type> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.like(StringUtils.isNotNull(typeName), Type::getTypeName, typeName); |
|
|
|
wrapper.like(StringUtils.isNotBlank(typeName), Type::getTypeName, typeName); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(isShow),Type::getIsShow, isShow); |
|
|
|
wrapper.orderByDesc(Type::getSort); |
|
|
|
return typeMapper.selectList(wrapper); |
|
|
|
} |
|
|
|
@ -55,4 +58,13 @@ public class TypeServiceImpl implements TypeService { |
|
|
|
public Type queryDetails(Long id) { |
|
|
|
return typeMapper.selectById(id); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public int changeStatus(Long id, String status) { |
|
|
|
LambdaUpdateWrapper<Type> wrapper = new LambdaUpdateWrapper<>(); |
|
|
|
wrapper.eq(Type::getId, id); |
|
|
|
Type type = new Type(); |
|
|
|
type.setIsShow(status); |
|
|
|
return typeMapper.update(type,wrapper); |
|
|
|
} |
|
|
|
} |
|
|
|
|