修改话费定时任务问题

dev-discount
袁野 2 years ago
parent eecae1957e
commit e68774f4e2
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  2. 40
      hai-cweb/src/main/java/com/cweb/controller/WechatController.java

File diff suppressed because one or more lines are too long

@ -290,6 +290,46 @@ public class WechatController {
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/loginBySilence", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "根据手机号码登陆")
public ResponseData loginByTel(@RequestParam(value = "phone", required = true) String phone,
HttpServletRequest request, HttpServletResponse response) {
try {
// 根据手机号查询用户
HighUser user = highUserService.findByPhone(phone);
if (user == null) {
user = new HighUser();
user.setName("用户" + IDGenerator.nextId(5));
user.setPhone(phone);
user.setRegTime(new Date());
user.setGold(0);
user.setStatus(1);
// 用户信息完整状态
// 0:完整
// 1:需要填写用户信息
// 2:需要填写手机号
user.setInfoCompleteStatus(1);
highUserService.insertUser(user , null , null);
}
// 定义个人所有数据
HighUserModel highUserModel = new HighUserModel();
HighUser detailData = highUserService.getDetailDataByUser(user.getId());
detailData.setPassword(null);
highUserModel.setHighUser(detailData);
SessionObject so = new SessionObject(user.getPhone(), 1, highUserModel);
userCenter.save(request, response, so);
return ResponseMsgUtil.success(so);
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}

Loading…
Cancel
Save