问题反馈
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package com.peanut.modules.common.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.peanut.modules.common.entity.SysFeedback;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface SysFeedbackService extends IService<SysFeedback> {
|
||||
|
||||
int addSysFeedback(SysFeedback sysFeedback);
|
||||
|
||||
List<SysFeedback> getList(Map<String,Object> params);
|
||||
|
||||
SysFeedback getById(Map<String,Object> params);
|
||||
|
||||
int delById(Map<String,Object> params);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package com.peanut.modules.common.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.peanut.modules.common.dao.SysFeedbackDao;
|
||||
import com.peanut.modules.common.entity.SysFeedback;
|
||||
import com.peanut.modules.common.service.SysFeedbackService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@Service("commonSysFeedbackService")
|
||||
public class SysFeedbackServiceImpl extends ServiceImpl<SysFeedbackDao, SysFeedback> implements SysFeedbackService {
|
||||
|
||||
@Override
|
||||
public int addSysFeedback(SysFeedback sysFeedback) {
|
||||
return this.baseMapper.insert(sysFeedback);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysFeedback> getList(Map<String, Object> params) {
|
||||
LambdaQueryWrapper<SysFeedback> queryWrapper = new LambdaQueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(params.get("account").toString())){
|
||||
queryWrapper.like(SysFeedback::getAccount,params.get("account"));
|
||||
}
|
||||
if (StringUtils.isNotBlank(params.get("type").toString())){
|
||||
queryWrapper.eq(SysFeedback::getType,params.get("type"));
|
||||
}
|
||||
if (StringUtils.isNotBlank(params.get("status").toString())){
|
||||
queryWrapper.eq(SysFeedback::getStatus,params.get("status"));
|
||||
}
|
||||
return this.baseMapper.selectList(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public SysFeedback getById(Map<String, Object> params) {
|
||||
return this.baseMapper.selectById(params.get("sysFeedbackId").toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int delById(Map<String, Object> params) {
|
||||
return this.baseMapper.deleteById(params.get("sysFeedbackId").toString());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user