|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkk.sxz.webApi.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.StrUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -65,6 +66,17 @@ public class LoginController extends BaseController {
|
|
|
@AroundLog(name = "登陆")
|
|
|
@ResponseBody
|
|
|
public JSONObject login(@RequestBody RequestUser user) {
|
|
|
+ JSONObject resData = new JSONObject();
|
|
|
+ if (StrUtil.isEmpty(user.getPhoneNum())) {
|
|
|
+ resData.put("code", -1);
|
|
|
+ resData.put("msg", "账户不能为空");
|
|
|
+ return resData;
|
|
|
+ }
|
|
|
+ if (StrUtil.isEmpty(user.getPassword())) {
|
|
|
+ resData.put("code", -1);
|
|
|
+ resData.put("msg", "密码不能为空");
|
|
|
+ return resData;
|
|
|
+ }
|
|
|
JSONObject data = new JSONObject();
|
|
|
data.put("phoneNum", user.getPhoneNum());
|
|
|
// data.put("password", Base64Converter.addText(Base64Converter.encode(user.getPassword())));
|