| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.*; |
| | |
| | | if (user.getStatus()!=1){ |
| | | return R.parse(CodeRes.USER_10002); |
| | | } |
| | | if (!Cools.md5(user.getPassword()).equals(password)){ |
| | | if (!user.getPassword().equals(password)){ |
| | | return R.parse(CodeRes.USER_10003); |
| | | } |
| | | String token = Cools.enToken(System.currentTimeMillis() + mobile, user.getPassword()); |
| | |
| | | return R.ok(resources); |
| | | } |
| | | |
| | | @PostMapping(value = "/system/secret/auth") |
| | | @ManagerAuth(memo = "更新秘钥") |
| | | public R systemSecret(@RequestParam(value = "secret") String secret) { |
| | | return R.ok(secret); |
| | | } |
| | | |
| | | } |