Commit 701ba9ff by 唐功亮

增加打印 语句

parent 91d2fae2
......@@ -68,6 +68,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
@Override
public void userRegistered(Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
log.info("注册IP为:"+IPUtils.getIpAddr(request));
String userName = params.get("userName") == null ? "" : String.valueOf(params.get("userName"));
String emiail = params.get("e-miail") == null ? "" : String.valueOf(params.get("e-miail"));
String phone = params.get("phone") == null ? "" : String.valueOf(params.get("phone"));
......@@ -94,6 +95,11 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
if (!matchPhoneNumber(phone)) {
throw new RRException("手机格式不正确,请重新填写");
}
//判断用户名是否存在
MemberEntity memberEntityName = memberDao.selectByName(userName);
if (memberEntityName!=null){
throw new RRException("用户名已存在");
}
//利用获取验证码时保存的session,判断手机验证码非空,和发送的短信内容是否一致,提交时的手机号与接收验证码的手机号是否相同,验证码是否已失效
ValueOperations forValue = redisTemplate.opsForValue();
......@@ -117,7 +123,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
memberEntity.setOicq("");
memberEntity.setPassword(passWord);
memberEntity.setRegisterip(IPUtils.getIpAddr(request));
log.info("注册IP为:"+IPUtils.getIpAddr(request));
memberEntity.setApplystate("未申请");
memberEntity.setSource("www");
memberEntity.setRegisterdate(new Date());
memberEntity.setUpdatedate(new Date());
memberEntity.setLevels(1);
......@@ -454,6 +461,8 @@ public class MemberServiceImpl extends ServiceImpl<MemberDao, MemberEntity> impl
Document document = DocumentHelper.parseText(post);
// 获取returnstatus节点对象
String returnstatus = document.selectSingleNode("//returnstatus").getText();
log.info("发送验证码返回信息"+post);
System.out.println(post);
if (returnstatus.equals("Success")) {
//保存验证码信息log_message表
state = "发送成功";
......
......@@ -10,6 +10,7 @@ import io.office.modules.manage.entity.LogMessageEntity;
import io.office.modules.manage.entity.TimescodeRegiIpEntity;
import io.office.modules.manage.service.LogMessageService;
import io.office.modules.manage.utils.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.httpclient.NameValuePair;
import org.apache.commons.httpclient.methods.PostMethod;
import org.dom4j.Document;
......@@ -41,6 +42,7 @@ import javax.servlet.http.HttpSession;
@Service("timescodeRegiService")
@Slf4j
public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, TimescodeRegiEntity> implements TimescodeRegiService {
@Autowired
......@@ -204,9 +206,11 @@ public class TimescodeRegiServiceImpl extends ServiceImpl<TimescodeRegiDao, Time
};
String post = sendPost("http://39.106.204.178:8888/sms.aspx", data);
log.info("login验证码发送信息:"+post);
Document document = DocumentHelper.parseText(post);
// 获取returnstatus节点对象
String returnstatus = document.selectSingleNode("//returnstatus").getText();
log.info("login验证码发送信息:"+returnstatus);
if (returnstatus.equals("Success")){
//保存验证码信息log_message表
state="发送成功";
......
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