|
@@ -0,0 +1,54 @@
|
|
|
+package com.ruoyi.web.controller.platform;
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
+import com.ruoyi.common.core.controller.BaseController;
|
|
|
+import com.ruoyi.common.core.domain.R;
|
|
|
+import com.ruoyi.system.domain.BaseParam;
|
|
|
+import com.ruoyi.system.domain.UserAddress;
|
|
|
+import com.ruoyi.system.domain.UserInfo;
|
|
|
+import com.ruoyi.system.service.UserAddressService;
|
|
|
+import com.ruoyi.system.service.UserInfoService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 用户信息Controller
|
|
|
+ *
|
|
|
+ * @author liming
|
|
|
+ * @date 2023-08-01
|
|
|
+ */
|
|
|
+@RestController
|
|
|
+@RequestMapping("/platform/v1/userInfo")
|
|
|
+public class UserInfoController extends BaseController {
|
|
|
+ @Autowired
|
|
|
+ private UserInfoService userInfoService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private UserAddressService userAddressService;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询用户信息列表
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:info:list')")
|
|
|
+ @PostMapping("/list")
|
|
|
+ public R<IPage<UserInfo>> list(@RequestBody BaseParam param) {
|
|
|
+ IPage<UserInfo> userInfoIPage = userInfoService.page(new Page<UserInfo>().setCurrent(param.getCurrent()).setSize(param.getSize()),
|
|
|
+ new LambdaQueryWrapper<UserInfo>().eq(UserInfo::getDelFlag,0));
|
|
|
+ return R.ok(userInfoIPage);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取用户d地址详情信息
|
|
|
+ */
|
|
|
+// @PreAuthorize("@ss.hasPermi('system:info:query')")
|
|
|
+ @PostMapping(value = "/userAddress")
|
|
|
+ public R<UserAddress> getInfo(@RequestBody BaseParam param) {
|
|
|
+ UserAddress userAddress = userAddressService.getAddress(param.getId());
|
|
|
+ return R.ok(userAddress);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+}
|