充值送积分

This commit is contained in:
wuchunlei
2024-11-08 16:51:29 +08:00
parent d16264103b
commit 0810035f58
6 changed files with 51 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Date;
import java.util.List;
import java.util.Map;
@@ -32,6 +33,8 @@ public class BookBuyConfigController {
@RequestMapping("/getBookBuyConfigList")
public R getBookBuyConfigList(@RequestBody Map params){
LambdaQueryWrapper<BookBuyConfigEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.and(t->t.eq(BookBuyConfigEntity::getEffective,0)
.or(q->q.le(BookBuyConfigEntity::getStartTime,new Date()).ge(BookBuyConfigEntity::getEndTime,new Date())));
if (params.containsKey("type")&&StringUtils.isNotEmpty(params.get("type").toString())){
wrapper.eq(BookBuyConfigEntity::getType,params.get("type"));
}

View File

@@ -40,6 +40,10 @@ public class BookBuyConfigEntity implements Serializable {
* 金额
*/
private String money;
/**
* 赠送积分
*/
private String givejf;
/**
* vip开通月份
*/
@@ -48,5 +52,11 @@ public class BookBuyConfigEntity implements Serializable {
* 充值名称
*/
private String description;
/**
* 生效类型 0长期有效 1有时间限制
*/
private int effective;
private Date startTime;
private Date endTime;
}