Преглед изворни кода

Merge branch 'huangyuan-user' of lift-manager/lift-server into develop

huangyuan пре 5 година
родитељ
комит
cedf24c455

+ 22 - 0
lift-common/src/main/java/cn.com.ty.lift.common/Constants/ApiConstants.java

@@ -0,0 +1,22 @@
+package cn.com.ty.lift.common.Constants;
+
+/**
+ * @author huangy
+ * @date 2019-11-29
+ * @description api常量
+ */
+public class ApiConstants {
+    /**
+     * 处理结果 1:成功
+     */
+    public static final String RESULT_SUCCESS = "1";
+    /**
+     * 处理结果 0:失败
+     */
+    public static final String RESULT_ERROR = "0";
+
+    /**
+     * 没有数据 9:更新0件、没数据
+     */
+    public static final String RESULT_NO_DATA = "9";
+}

+ 7 - 0
lift-system-service/pom.xml

@@ -23,6 +23,13 @@
             <artifactId>xwy-cloud-dependencies</artifactId>
         </dependency>
 
+        <!-- 添加公共模块依赖 -->
+        <dependency>
+            <groupId>cn.com.ty</groupId>
+            <artifactId>lift-common</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+
     </dependencies>
 
 </project>

+ 23 - 0
lift-system-service/src/main/java/cn/com/ty/lift/system/user/controller/LoginController.java

@@ -0,0 +1,23 @@
+package cn.com.ty.lift.system.user.controller;
+
+import cn.com.ty.lift.common.Constants.ApiConstants;
+import cn.com.xwy.boot.web.dto.RestResponse;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author huangy
+ * @date 2019-11-29
+ * @description 用户登录
+ */
+@RestController
+@RequestMapping("/login")
+public class LoginController {
+
+    @RequestMapping("/register")
+    public RestResponse register(){
+        return RestResponse.ok(null, ApiConstants.RESULT_SUCCESS, "注册成功");
+    }
+
+
+}