Commit 370d9127 by huluobin

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

parent a5f89a2b
......@@ -73,7 +73,7 @@ public class StoreTechnicianServiceImpl extends ServiceImpl<StoreTechnicianMappe
StoreTechnician storeTechnician = this.getOne(new LambdaQueryWrapper<StoreTechnician>().eq(StoreTechnician::getOpenid, openid));
if (storeTechnician == null) {
throw new RRException(2005, "请绑定手机号");
throw new RRException(2006, "请绑定手机号");
}
//美甲师token
......@@ -85,13 +85,10 @@ public class StoreTechnicianServiceImpl extends ServiceImpl<StoreTechnicianMappe
gogirlToken.setUpdateTime(new Date());
gogirlToken.setToken(token);
if (storeTechnician != null) {
gogirlToken.setTechnicianId(storeTechnician.getId());
gogirlToken.setTechnicianId(storeTechnician.getId());
}
//只写入token不写入美甲师因为美甲师是后台创建的 后台创建是美甲师唯一来源
gogirlTokenMapper.insert(gogirlToken);
return token;
}
......
......@@ -61,7 +61,7 @@ public class MvcInterceptorConfig extends WebMvcConfigurationSupport {
.excludePathPatterns("/technician/phone/bindPhone_t")
.excludePathPatterns("/technician/phone/getBindCode")
.excludePathPatterns("/technician/xcx/upload")
.excludePathPatterns("/technician/xcx/getUserInfo_t")
// .excludePathPatterns("/technician/xcx/getUserInfo_t")
.excludePathPatterns("/technician/xcx/choseStore");
;
......@@ -92,13 +92,6 @@ public class MvcInterceptorConfig extends WebMvcConfigurationSupport {
return converter;
}
// /*添加转换器*/
// @Override
// public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
// //将我们定义的时间格式转换器添加到转换器列表中,
// //这样jackson格式化时候但凡遇到Date类型就会转换成我们定义的格式
// converters.add(jackson2HttpMessageConverter());
// }
}
......
......@@ -132,10 +132,11 @@ public class PhoneLoginController {
private final StoreManageMapper storeManageMapper;
@ApiOperation(value = "美甲师根据验证码绑定手机号码")
@RequestMapping(method = {RequestMethod.POST}, value = "/technician/bindPhone_t")
@PostMapping("/technician/bindPhone_t")
public JsonResult<Void> bindPhone_t(@RequestHeader String token,
@RequestParam String phone,
@RequestParam String code) {
@RequestParam String code,
@RequestParam String messageCode) {
Code2SessionResult responseResult = wechatService.getTechnicianOpenidByCode(code);
if (responseResult.getErrcode() != null) {
......
......@@ -137,7 +137,7 @@ public class XcxController {
@ApiOperation(value = "美甲师根据code获取token")
@GetMapping(value = "/technician/xcx/login_t")
public JsonResult<String> login_t(@RequestParam String code) {
public JsonResult<String> technicianLogin(@RequestParam String code) {
log.info("调用login,授权用户信息到程序 code:{} 获取用户信息 ", code);
String token = storeTechnicianService.login(code);
return JsonResult.success(token);
......@@ -145,9 +145,8 @@ public class XcxController {
@ApiOperation(value = "美甲师根据token获取美甲师信息")
@GetMapping("/technician/xcx/getUserInfo_t")
public JsonResult<StoreTechnician> getUserInfo_t(String token) {
public JsonResult<StoreTechnician> getTechnician(String token) {
log.info("根据token:" + token + ",查询用户信息.");
List<StoreTechnician> list = storeTechnicianService.getTechnicianInfo(token);
return JsonResult.success(SessionUtils.getStoreTechnician());
}
......@@ -172,15 +171,6 @@ public class XcxController {
return JsonResult.success();
}
@ApiOperation(value = "美甲师选择多门店的账号-根据订单id")
@PostMapping("/technician/xcx/choseStoreByOrderId")
public JsonResult<StoreTechnician> choseStoreByOrderId(@RequestParam(name = "token") String token,
@RequestParam(name = "orderId") Integer orderId) {
log.info("美甲师选择多门店的账号");
StoreTechnician storeTechnician = storeTechnicianService.choseStoreByOrderId(token, orderId);
return JsonResult.success(storeTechnician);
}
@ApiOperation(value = "图片上传")
@PostMapping("/technician/xcx/upload")
public JsonResult<String> techUpload(MultipartFile file) throws Exception {
......
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