| | |
| | | import org.jsoup.Jsoup; |
| | | import org.jsoup.nodes.Document; |
| | | import org.jsoup.nodes.Element; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @RestController |
| | | @RequestMapping("") |
| | | public class UserInfoController { |
| | | |
| | | Logger log = LoggerFactory.getLogger(UserInfoController.class); |
| | | |
| | | @Autowired |
| | | private IUserInfoService userInfoService; |
| | |
| | | return ResultUtil.paranErr(); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 短信回调通知 |
| | | * @param request |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping("/base/sendCellulantMessageCallback") |
| | | public void sendCellulantMessageCallback(HttpServletRequest request){ |
| | | try { |
| | | StringBuilder sb = new StringBuilder(); |
| | | InputStream inputStream = request.getInputStream(); |
| | | String s; |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, "UTF-8")); |
| | | while ((s = in.readLine()) != null) { |
| | | sb.append(s); |
| | | } |
| | | in.close(); |
| | | inputStream.close(); |
| | | log.info("短信通知回调:" + sb.toString()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/sedEmail") |
| | |
| | | Map<String, Object> map = userInfoService.queryUser(language, phone); |
| | | if(null != map){ |
| | | return ResultUtil.success(UserInfoWarpper.getUserInfoWarpper(map)); |
| | | }else{ |
| | | return ResultUtil.error(language == 1 ? "此账号不存在" : language == 2 ? "The account does not exist" : "Ce compte n’existe pas"); |
| | | } |
| | | return ResultUtil.success(new JSONObject()); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | return ResultUtil.runErr(); |