Commit 5c63c045 authored by Quxl's avatar Quxl

x

parent 190b51f6
......@@ -16,6 +16,7 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.dao.DuplicateKeyException;
import org.springframework.dao.EmptyResultDataAccessException;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.jdbc.core.PreparedStatementCreator;
......@@ -32,6 +33,7 @@ import com.egolm.common.jdbc.JdbcTemplate;
import com.egolm.common.jdbc.dialect.Dialect;
import com.egolm.common.jdbc.dialect.SqlServerDialect;
import com.egolm.common.jdbc.dialect.bean.Sql;
import com.egolm.shop.config.XException;
import com.egolm.shop.encrypt.EgoPasswordEncoder;
import com.egolm.shop.pojo.TCommon;
import com.egolm.shop.pojo.TCustomer;
......@@ -631,7 +633,11 @@ public class UserServiceImpl implements UserService {
map.put("dCreateDate", new Date());
map.put("dLastUpdateTime", new Date());
map.put("nStep", 1);
jdbcTemplate.save("tCustomer", map);
try {
jdbcTemplate.save("tCustomer", map);
} catch (DuplicateKeyException e) {
throw new XException("手机号码已存在", e);
}
return map;
}
......
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