|
@@ -327,6 +327,15 @@ public class CustomerInfoServiceImpl implements CustomerInfoService {
|
|
|
if (customerInfo == null) {
|
|
|
Asserts.fail("登录失败");
|
|
|
}
|
|
|
+
|
|
|
+ CustomerInfoForm customerInfoBo = customerInfo.getCustomerInfo();
|
|
|
+ if(!org.springframework.util.StringUtils.isEmpty(customerInfoBo)){
|
|
|
+
|
|
|
+ Integer isEnable = customerInfoBo.getIsEnable();
|
|
|
+ if(isEnable.intValue()==0){
|
|
|
+ Asserts.fail("用户被禁用");
|
|
|
+ }
|
|
|
+ }
|
|
|
UsernamePasswordAuthenticationToken authentication = new UsernamePasswordAuthenticationToken(customerInfo, null, customerInfo.getAuthorities());
|
|
|
SecurityContextHolder.getContext().setAuthentication(authentication);
|
|
|
String token = jwtTokenUtil.generateToken(customerInfo);
|