|
@@ -0,0 +1,98 @@
|
|
|
+package com.miaxis.pc;
|
|
|
+
|
|
|
+import com.miaxis.common.core.controller.BaseController;
|
|
|
+import com.miaxis.common.core.domain.Response;
|
|
|
+import com.miaxis.common.core.page.ResponsePageInfo;
|
|
|
+import com.miaxis.userInfo.domain.UserVip;
|
|
|
+import com.miaxis.userInfo.service.IUserVipService;
|
|
|
+import io.swagger.annotations.*;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 【会员信息】Controller
|
|
|
+ *
|
|
|
+ * @author miaxis
|
|
|
+ * @date 2024-08-15
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/user/vip")
|
|
|
+@Api(tags={"【PC-会员信息】"})
|
|
|
+public class PcUserVipController extends BaseController{
|
|
|
+ @Autowired
|
|
|
+ private IUserVipService userVipService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询会员信息列表
|
|
|
+ */
|
|
|
+ @GetMapping("/list")
|
|
|
+ @ApiOperation("查询会员信息列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
|
|
|
+ @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
|
|
|
+ })
|
|
|
+ public ResponsePageInfo<UserVip> list(@ModelAttribute UserVip userVip){
|
|
|
+ startPage();
|
|
|
+ List<UserVip> list = userVipService.selectUserVipList(userVip);
|
|
|
+ return toResponsePageInfo(list);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 导出会员信息列表
|
|
|
+
|
|
|
+ @GetMapping("/export")
|
|
|
+ @ApiOperation("导出会员信息列表Excel")
|
|
|
+ public Response<String> export(@ModelAttribute UserVip userVip){
|
|
|
+ List<UserVip> list = userVipService.selectUserVipList(userVip);
|
|
|
+ ExcelUtil<UserVip> util = new ExcelUtil<UserVip>(UserVip.class);
|
|
|
+ return util.exportExcel(list, "vip");
|
|
|
+ }
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取会员信息详细信息
|
|
|
+ */
|
|
|
+ @GetMapping(value = "/{id}")
|
|
|
+ @ApiOperation("获取会员信息详细信息")
|
|
|
+ public Response<UserVip> getInfo(
|
|
|
+ @ApiParam(name = "id", value = "会员信息参数", required = true)
|
|
|
+ @PathVariable("id") Integer id
|
|
|
+ ){
|
|
|
+ return Response.success(userVipService.getById(id));
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 新增会员信息
|
|
|
+
|
|
|
+ @PostMapping
|
|
|
+ @ApiOperation("新增会员信息")
|
|
|
+ public Response<Integer> add(@RequestBody UserVip userVip){
|
|
|
+ return toResponse(userVipService.save(userVip) ? 1 : 0);
|
|
|
+ }
|
|
|
+ */
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改会员信息
|
|
|
+ */
|
|
|
+ @PutMapping
|
|
|
+ @ApiOperation("修改会员信息")
|
|
|
+ public Response<Integer> edit(@RequestBody UserVip userVip){
|
|
|
+ return toResponse(userVipService.updateById(userVip) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 删除会员信息
|
|
|
+ */
|
|
|
+ @DeleteMapping("/{ids}")
|
|
|
+ @ApiOperation("删除会员信息")
|
|
|
+ public Response<Integer> remove(
|
|
|
+ @ApiParam(name = "ids", value = "会员信息ids参数", required = true)
|
|
|
+ @PathVariable Integer[] ids
|
|
|
+ ){
|
|
|
+ return toResponse(userVipService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|