ios内购

This commit is contained in:
wuchunlei
2024-07-09 16:48:28 +08:00
parent ec17636fe6
commit 472021ca9b
7 changed files with 93 additions and 99 deletions

View File

@@ -38,6 +38,7 @@ public class BookBuyConfigController {
if (params.containsKey("qudao")&&StringUtils.isNotEmpty(params.get("qudao").toString())){
wrapper.eq(BookBuyConfigEntity::getQudao,params.get("qudao"));
}
wrapper.orderByAsc(BookBuyConfigEntity::getRealMoney);
List<BookBuyConfigEntity> list = service.list(wrapper);
return R.ok().put("bookBuyConfigList",list);
}

View File

@@ -43,6 +43,15 @@ public class SysFeedbackController {
return R.ok().put("sysFeedback",sysFeedbackService.getById(params));
}
@RequestMapping("/editStatusById")
public R editStatusById(@RequestBody Map<String,Object> params){
if (sysFeedbackService.editStatusById(params)>0){
return R.ok();
}else {
return R.error("修改失败");
}
}
@RequestMapping("/delById")
public R delById(@RequestBody Map<String,Object> params){
if (sysFeedbackService.delById(params)>0){

View File

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.util.Date;
@Data
@TableName("sys_feedback")
@@ -26,6 +27,10 @@ public class SysFeedback {
private String status;
private Date createTime;
private Date updateTime;
@TableLogic
private Integer delFlag;

View File

@@ -13,6 +13,8 @@ public interface SysFeedbackService extends IService<SysFeedback> {
SysFeedback getById(Map<String,Object> params);
int editStatusById(Map<String,Object> params);
int delById(Map<String,Object> params);
}

View File

@@ -8,6 +8,8 @@ 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.Date;
import java.util.List;
import java.util.Map;
@@ -23,6 +25,9 @@ public class SysFeedbackServiceImpl extends ServiceImpl<SysFeedbackDao, SysFeedb
@Override
public List<SysFeedback> getList(Map<String, Object> params) {
LambdaQueryWrapper<SysFeedback> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.orderByAsc(SysFeedback::getStatus);
queryWrapper.orderByDesc(SysFeedback::getCreateTime);
queryWrapper.orderByDesc(SysFeedback::getUpdateTime);
if (StringUtils.isNotBlank(params.get("account").toString())){
queryWrapper.like(SysFeedback::getAccount,params.get("account"));
}
@@ -40,6 +45,17 @@ public class SysFeedbackServiceImpl extends ServiceImpl<SysFeedbackDao, SysFeedb
return this.baseMapper.selectById(params.get("sysFeedbackId").toString());
}
@Override
public int editStatusById(Map<String, Object> params) {
SysFeedback entity = this.baseMapper.selectById(params.get("sysFeedbackId").toString());
if (entity != null) {
entity.setStatus("1");
entity.setUpdateTime(new Date());
return this.baseMapper.updateById(entity);
}
return 0;
}
@Override
public int delById(Map<String, Object> params) {
return this.baseMapper.deleteById(params.get("sysFeedbackId").toString());