|
@@ -5,11 +5,17 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.qunzhixinxi.hnqz.admin.oe.entity.dto.OeUserRequest;
|
|
import com.qunzhixinxi.hnqz.admin.oe.entity.dto.OeUserRequest;
|
|
import com.qunzhixinxi.hnqz.admin.oe.entity.vo.OeUserVO;
|
|
import com.qunzhixinxi.hnqz.admin.oe.entity.vo.OeUserVO;
|
|
import com.qunzhixinxi.hnqz.common.core.util.R;
|
|
import com.qunzhixinxi.hnqz.common.core.util.R;
|
|
|
|
+import com.qunzhixinxi.hnqz.common.log.annotation.SysLog;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import java.time.LocalDateTime;
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -24,6 +30,44 @@ import java.util.List;
|
|
@RequestMapping("/oe/user")
|
|
@RequestMapping("/oe/user")
|
|
public class OeUserController {
|
|
public class OeUserController {
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 保存用户
|
|
|
|
+ *
|
|
|
|
+ * @param toSave 保存参数
|
|
|
|
+ * @return {@link R}<{@link Boolean}>
|
|
|
|
+ */
|
|
|
|
+ @SysLog("OE保存用户")
|
|
|
|
+ @PostMapping("/save")
|
|
|
|
+ public R<Boolean> saveUser(@RequestBody @Validated OeUserRequest.ToSave toSave) {
|
|
|
|
+ log.info("OE保存用户参数:{}", toSave);
|
|
|
|
+ return R.ok(Boolean.TRUE);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 更新用户
|
|
|
|
+ *
|
|
|
|
+ * @param toUpdate 保存参数
|
|
|
|
+ * @return {@link R}<{@link Boolean}>
|
|
|
|
+ */
|
|
|
|
+ @SysLog("OE更新用户")
|
|
|
|
+ @PostMapping("/update")
|
|
|
|
+ public R<Boolean> updateUser(@RequestBody @Validated OeUserRequest.ToUpdate toUpdate) {
|
|
|
|
+ log.info("OE更新用户参数:{}", toUpdate);
|
|
|
|
+ return R.ok(Boolean.TRUE);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 删除用户
|
|
|
|
+ *
|
|
|
|
+ * @param userId 用户id
|
|
|
|
+ * @return {@link R}<{@link Boolean}>
|
|
|
|
+ */
|
|
|
|
+ @SysLog("OE删除用户")
|
|
|
|
+ @PostMapping("/delete/{userId}")
|
|
|
|
+ public R<Boolean> deleteUser(@PathVariable("userId") Long userId) {
|
|
|
|
+ return R.ok(Boolean.TRUE);
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 分页查询
|
|
* 分页查询
|
|
*
|
|
*
|
|
@@ -40,7 +84,19 @@ public class OeUserController {
|
|
vo.setUserId((long) i);
|
|
vo.setUserId((long) i);
|
|
vo.setUsername("user"+i);
|
|
vo.setUsername("user"+i);
|
|
vo.setNickname("昵称"+i);
|
|
vo.setNickname("昵称"+i);
|
|
- // TODO
|
|
|
|
|
|
+ vo.setRealName("姓名"+i);
|
|
|
|
+ vo.setPhone("13800138000");
|
|
|
|
+ vo.setAvatar("https://pre.yaoyi.net/images/logo.jpg");
|
|
|
|
+ vo.setDeptId(1L);
|
|
|
|
+ vo.setTenantId(1L);
|
|
|
|
+ vo.setEmail("123456@qq.com");
|
|
|
|
+ vo.setDelFlag("OK");
|
|
|
|
+ vo.setLockFlag("OK");
|
|
|
|
+ vo.setCreatedBy("admin");
|
|
|
|
+ vo.setModifiedBy("admin");
|
|
|
|
+ vo.setCreatedTime(LocalDateTime.now());
|
|
|
|
+ vo.setModifiedTime(LocalDateTime.now());
|
|
|
|
+
|
|
list.add(vo);
|
|
list.add(vo);
|
|
}
|
|
}
|
|
|
|
|