Commit 91ea3517 by huluobin

美甲师登陆流程修改 线程变量保存登陆Seesion

parent 605aaf0b
......@@ -11,7 +11,6 @@ import com.gogirl.infrastructure.common.exception.RRException;
import com.gogirl.infrastructure.common.util.ListUtil;
import com.gogirl.infrastructure.mapper.store.StoreManageMapper;
import com.gogirl.infrastructure.mapper.store.StoreTechnicianMapper;
import com.gogirl.infrastructure.util.SessionUtils;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
......@@ -53,8 +52,6 @@ public class LoginHandlerInterceptor implements HandlerInterceptor {
Customer customer = customerService.getById(gogirlToken.getCustomerId());
if (customer == null) {
throw new RRException(2000, "token失效,请重新登陆");
} else {
SessionUtils.putCustomer(customer);
}
}
}
......@@ -77,18 +74,8 @@ public class LoginHandlerInterceptor implements HandlerInterceptor {
throw new RRException(2005, "请选择店铺");
}
}
storeTechnician.setTechnicianId(storeTechnician.getId());
storeTechnician.setDepartmentId(gogirlToken.getDepartmentId());
SessionUtils.putStoreTechnician(storeTechnician);
}
}
return true;
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
SessionUtils.removeCustomer();
SessionUtils.removeStoreTechnician();
}
}
......@@ -147,6 +147,7 @@ public class XcxController {
@GetMapping("/technician/xcx/getUserInfo_t")
public JsonResult<StoreTechnician> getTechnician(String token) {
log.info("根据token:" + token + ",查询用户信息.");
return JsonResult.success(SessionUtils.getStoreTechnician());
}
......
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