超v管理
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.peanut.modules.common.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.peanut.common.utils.R;
|
||||
import com.peanut.modules.common.entity.UserVip;
|
||||
import com.peanut.modules.common.service.UserVipService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 超V管理
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController("commonUserVip")
|
||||
@RequestMapping("common/userVip")
|
||||
public class UserVipController {
|
||||
|
||||
@Autowired
|
||||
private UserVipService vipService;
|
||||
|
||||
@RequestMapping("/getMyVipHistory")
|
||||
public R getMyVipHistory(String userId) {
|
||||
LambdaQueryWrapper<UserVip> wrapper = new LambdaQueryWrapper();
|
||||
wrapper.eq(UserVip::getUserId,userId);
|
||||
wrapper.orderByAsc(UserVip::getState);
|
||||
wrapper.orderByAsc(UserVip::getEndTime);
|
||||
List<UserVip> userVips = vipService.list(wrapper);
|
||||
return R.ok().put("result", userVips);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user