2 changed files with 34 additions and 0 deletions
@ -0,0 +1,32 @@ |
|||
package cn.chjyj.szwh.controller.admin; |
|||
|
|||
import cn.chjyj.szwh.controller.BaseController; |
|||
import cn.chjyj.szwh.exception.ChException; |
|||
import com.alibaba.fastjson.JSONObject; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 管理人员登录 |
|||
* xy |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("/admin/Login") |
|||
public class AdminLoginController extends BaseController { |
|||
/** |
|||
* 登录 |
|||
* @return |
|||
*/ |
|||
@RequestMapping("/login") |
|||
public JSONObject login(String username,String password){ |
|||
if(StringUtils.isEmpty(username)){ |
|||
jsonObject.put("msg","用户名必须填写"); |
|||
} |
|||
if(StringUtils.isEmpty(password)){ |
|||
jsonObject.put("msg","密码必须填写"); |
|||
} |
|||
//todo 远程登陆??
|
|||
return jsonObject; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue