Commit d2d812cb authored by Java—KA—李 青's avatar Java—KA—李 青

删除不用接口

parent 735b38d8
...@@ -14,8 +14,6 @@ public interface IUserService { ...@@ -14,8 +14,6 @@ public interface IUserService {
User findByUuidWithCache(String uuid); User findByUuidWithCache(String uuid);
boolean register(String phoneNo, String password, Long registerFrom, String userIp, Long channelId);
User registerAndReturn(String phoneNo, String password, Long registerFrom); User registerAndReturn(String phoneNo, String password, Long registerFrom);
boolean exist(String phoneNo); boolean exist(String phoneNo);
......
...@@ -5,9 +5,6 @@ import cn.quantgroup.xyqb.Constants; ...@@ -5,9 +5,6 @@ import cn.quantgroup.xyqb.Constants;
import cn.quantgroup.xyqb.entity.*; import cn.quantgroup.xyqb.entity.*;
import cn.quantgroup.xyqb.model.IdCardInfo; import cn.quantgroup.xyqb.model.IdCardInfo;
import cn.quantgroup.xyqb.model.IdType; import cn.quantgroup.xyqb.model.IdType;
import cn.quantgroup.xyqb.model.JsonResult;
import cn.quantgroup.xyqb.model.UserRegisterMqMessage;
import cn.quantgroup.xyqb.model.UserStatistics;
import cn.quantgroup.xyqb.repository.IAddressRepository; import cn.quantgroup.xyqb.repository.IAddressRepository;
import cn.quantgroup.xyqb.repository.IContactRepository; import cn.quantgroup.xyqb.repository.IContactRepository;
import cn.quantgroup.xyqb.repository.IUserBtRegisterRepository; import cn.quantgroup.xyqb.repository.IUserBtRegisterRepository;
...@@ -22,11 +19,9 @@ import cn.quantgroup.xyqb.util.MqUtils; ...@@ -22,11 +19,9 @@ import cn.quantgroup.xyqb.util.MqUtils;
import cn.quantgroup.xyqb.util.PasswordUtil; import cn.quantgroup.xyqb.util.PasswordUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable; import org.springframework.cache.annotation.Cacheable;
...@@ -34,7 +29,6 @@ import org.springframework.data.redis.core.RedisTemplate; ...@@ -34,7 +29,6 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.persistence.criteria.Predicate;
import javax.transaction.Transactional; import javax.transaction.Transactional;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.util.List; import java.util.List;
...@@ -228,35 +222,6 @@ public class UserServiceImpl implements IUserService { ...@@ -228,35 +222,6 @@ public class UserServiceImpl implements IUserService {
return userRepository.findByUuid(uuid); return userRepository.findByUuid(uuid);
} }
@Override
@Transactional(value = Transactional.TxType.REQUIRED,rollbackOn = Exception.class)
public boolean register(String phoneNo, String password, Long registerFrom, String userIp, Long channelId) {
String uuid = lkbUserService.registerApp(phoneNo, password);
Timestamp currentTime = new Timestamp(System.currentTimeMillis());
User user = new User();
user.setEnable(true);
user.setPhoneNo(phoneNo);
user.setUpdatedAt(currentTime);
user.setCreatedAt(currentTime);
user.setUuid(uuid);
user.setPassword(PasswordUtil.MD5(password.toLowerCase() + Constants.PASSWORD_SALT));
//解决线上白条registerFrom为1的问题
if (channelId == 222L) {
user.setRegisteredFrom(channelId);
} else {
user.setRegisteredFrom(registerFrom);
}
//user.setRegisteredFrom(registerFrom);
user = userRepository.save(user);
if(registerFrom!=158412){//网易KA引入注册时不发送短信提醒
smsService.sendAfterRegister(phoneNo);
}
return user != null;
}
@Override @Override
public boolean exist(String phoneNo) { public boolean exist(String phoneNo) {
return userRepository.findByPhoneNo(phoneNo) != null; return userRepository.findByPhoneNo(phoneNo) != null;
......
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