问题反馈

This commit is contained in:
wuchunlei
2024-07-04 17:21:32 +08:00
parent e5839ca3e7
commit b266811b8a
5 changed files with 174 additions and 0 deletions

View File

@@ -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());
}
}