Commit ea8d17b4 authored by geqilin's avatar geqilin

'lic'

parent c705dc51
......@@ -23,15 +23,12 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
*
* @author Administrator
*/
@SpringBootApplication
@SpringBootApplication(scanBasePackages={"com.devplatform"})
@EnableSwagger2
@Slf4j
@MapperScan(basePackages = "com.devplatform.**.dao")
@EnableEurekaClient
@EnableFeignClients
@EnableScheduling
@EnableTransactionManagement
@ComponentScan(basePackages = {"com.devplatform"})
public class AdminApplication {
public static void main(String[] args) {
......
......@@ -14,6 +14,7 @@ import com.devplatform.common.base.exception.RRException;
import com.devplatform.common.util.Constant;
import com.devplatform.common.util.R;
import com.devplatform.common.util.StringUtil;
import com.devplatform.common.util.license.LicenseAuth;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import io.jsonwebtoken.Jwts;
......@@ -98,14 +99,16 @@ public class SysLoginController extends AbstractController {
@ApiImplicitParam(name = "form", value = "用户实体类", required = true, paramType = "query", dataType = "SysLoginForm")
@PostMapping("/sys/login")
public Map<String, Object> login(@RequestBody SysLoginForm form) {
Long startTime = System.currentTimeMillis();
boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
if (Constants.CAPTCHA.equals(form.getCaptcha())) {
captcha = true;
String str = LicenseAuth.authLicense(environment);
if(!str.equals("YES")) {
return R.error(str);
}
if (!captcha) {
boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}
Long startTime = System.currentTimeMillis();
SysSystem sysSystem = sysSystemService.getById(Constants.CODE);
String u = Aes.decrypt(form.getUsername());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment