Authored by zhaoqing

Merge branch 'dev_cps_icard_190613' of http://git.yoho.cn/yoho30/yohobuy-union i…

…nto dev_cps_icard_190613
@@ -5,8 +5,6 @@ import com.yoho.service.model.union.request.BaseBO; @@ -5,8 +5,6 @@ import com.yoho.service.model.union.request.BaseBO;
5 public class UnionShareUserIdentityCard extends BaseBO{ 5 public class UnionShareUserIdentityCard extends BaseBO{
6 private Integer id; 6 private Integer id;
7 private Integer uid; 7 private Integer uid;
8 - private String idCardNo;  
9 - private String name;  
10 private String cardFrontUrl; 8 private String cardFrontUrl;
11 private String cardBackUrl; 9 private String cardBackUrl;
12 private Byte status; 10 private Byte status;
@@ -29,22 +27,6 @@ public class UnionShareUserIdentityCard extends BaseBO{ @@ -29,22 +27,6 @@ public class UnionShareUserIdentityCard extends BaseBO{
29 this.uid = uid; 27 this.uid = uid;
30 } 28 }
31 29
32 - public String getIdCardNo() {  
33 - return idCardNo;  
34 - }  
35 -  
36 - public void setIdCardNo(String idCardNo) {  
37 - this.idCardNo = idCardNo;  
38 - }  
39 -  
40 - public String getName() {  
41 - return name;  
42 - }  
43 -  
44 - public void setName(String name) {  
45 - this.name = name;  
46 - }  
47 -  
48 public String getCardFrontUrl() { 30 public String getCardFrontUrl() {
49 return cardFrontUrl; 31 return cardFrontUrl;
50 } 32 }
@@ -4,8 +4,6 @@ @@ -4,8 +4,6 @@
4 <resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.UnionShareUserIdentityCard" > 4 <resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.UnionShareUserIdentityCard" >
5 <id column="id" property="id" jdbcType="INTEGER" /> 5 <id column="id" property="id" jdbcType="INTEGER" />
6 <result column="uid" property="uid" jdbcType="INTEGER" /> 6 <result column="uid" property="uid" jdbcType="INTEGER" />
7 - <result column="id_card_no" property="idCardNo" jdbcType="VARCHAR" />  
8 - <result column="name" property="name" jdbcType="VARCHAR" />  
9 <result column="card_front_url" property="cardFrontUrl" jdbcType="VARCHAR" /> 7 <result column="card_front_url" property="cardFrontUrl" jdbcType="VARCHAR" />
10 <result column="card_back_url" property="cardBackUrl" jdbcType="VARCHAR" /> 8 <result column="card_back_url" property="cardBackUrl" jdbcType="VARCHAR" />
11 <result column="status" property="status" jdbcType="TINYINT" /> 9 <result column="status" property="status" jdbcType="TINYINT" />
@@ -13,7 +11,7 @@ @@ -13,7 +11,7 @@
13 <result column="update_time" property="updateTime" jdbcType="INTEGER" /> 11 <result column="update_time" property="updateTime" jdbcType="INTEGER" />
14 </resultMap> 12 </resultMap>
15 <sql id="Base_Column_List" > 13 <sql id="Base_Column_List" >
16 - id, uid, id_card_no, name, card_front_url, card_back_url, status, create_time, update_time 14 + id, uid, card_front_url, card_back_url, status, create_time, update_time
17 </sql> 15 </sql>
18 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" > 16 <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
19 select 17 select
@@ -37,9 +35,7 @@ @@ -37,9 +35,7 @@
37 </delete> 35 </delete>
38 36
39 <insert id="insert" parameterType="com.yoho.unions.dal.model.UnionShareUserIdentityCard" > 37 <insert id="insert" parameterType="com.yoho.unions.dal.model.UnionShareUserIdentityCard" >
40 - insert into union_share_user_identity_card (uid, id_card_no,  
41 - name, card_front_url, card_back_url, status, create_time, update_time  
42 - ) 38 + insert into union_share_user_identity_card (uid, card_front_url, card_back_url, status, create_time, update_time)
43 values (#{uid,jdbcType=INTEGER}, #{idCardNo,jdbcType=VARCHAR}, 39 values (#{uid,jdbcType=INTEGER}, #{idCardNo,jdbcType=VARCHAR},
44 #{name,jdbcType=VARCHAR}, #{cardFrontUrl,jdbcType=VARCHAR}, #{cardBackUrl,jdbcType=VARCHAR}, 40 #{name,jdbcType=VARCHAR}, #{cardFrontUrl,jdbcType=VARCHAR}, #{cardBackUrl,jdbcType=VARCHAR},
45 #{status,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER} 41 #{status,jdbcType=TINYINT}, #{createTime,jdbcType=INTEGER}, #{updateTime,jdbcType=INTEGER}
@@ -49,12 +45,6 @@ @@ -49,12 +45,6 @@
49 <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionShareUserIdentityCard" > 45 <update id="updateByPrimaryKeySelective" parameterType="com.yoho.unions.dal.model.UnionShareUserIdentityCard" >
50 update union_share_user_identity_card 46 update union_share_user_identity_card
51 <set > 47 <set >
52 - <if test="idCardNo != null" >  
53 - id_card_no = #{idCardNo,jdbcType=VARCHAR},  
54 - </if>  
55 - <if test="name != null" >  
56 - name = #{name,jdbcType=VARCHAR},  
57 - </if>  
58 <if test="cardFrontUrl != null" > 48 <if test="cardFrontUrl != null" >
59 card_front_url = #{cardFrontUrl,jdbcType=VARCHAR}, 49 card_front_url = #{cardFrontUrl,jdbcType=VARCHAR},
60 </if> 50 </if>
@@ -74,8 +64,6 @@ @@ -74,8 +64,6 @@
74 <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionShareUserIdentityCard" > 64 <update id="updateByPrimaryKey" parameterType="com.yoho.unions.dal.model.UnionShareUserIdentityCard" >
75 update union_share_user_identity_card 65 update union_share_user_identity_card
76 set uid = #{uid,jdbcType=INTEGER}, 66 set uid = #{uid,jdbcType=INTEGER},
77 - id_card_no = #{idCardNo,jdbcType=VARCHAR},  
78 - name = #{name,jdbcType=VARCHAR},  
79 card_front_url = #{cardFrontUrl,jdbcType=VARCHAR}, 67 card_front_url = #{cardFrontUrl,jdbcType=VARCHAR},
80 card_back_url = #{cardBackUrl,jdbcType=VARCHAR}, 68 card_back_url = #{cardBackUrl,jdbcType=VARCHAR},
81 status = #{status,jdbcType=TINYINT}, 69 status = #{status,jdbcType=TINYINT},
@@ -1319,14 +1319,6 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport @@ -1319,14 +1319,6 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
1319 } 1319 }
1320 1320
1321 public void checkUserIdentityCard(UnionShareUserIdentityCardBo bo) { 1321 public void checkUserIdentityCard(UnionShareUserIdentityCardBo bo) {
1322 - // 校验姓名  
1323 - if (!ChineseNameUtils.checkName(bo.getName())) {  
1324 - throw new ServiceException(ServiceError.UNION_CHINESE_NAME_ERROR);  
1325 - }  
1326 - // 校验身份证  
1327 - if (!checkIdCard(bo.getIdCardNo())) {  
1328 - throw new ServiceException(ServiceError.UNION_IDCARD_ERROR);  
1329 - }  
1330 // 校验身份证图片 1322 // 校验身份证图片
1331 if (!checkBankCard(bo.getCardFrontUrl())) { 1323 if (!checkBankCard(bo.getCardFrontUrl())) {
1332 throw new ServiceException(ServiceError.UNION_IDENTITYCARD_FRONT_IMAGE_ERROR); 1324 throw new ServiceException(ServiceError.UNION_IDENTITYCARD_FRONT_IMAGE_ERROR);
@@ -3745,7 +3737,9 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport @@ -3745,7 +3737,9 @@ public class UnionShareServiceImpl implements IUnionShareService,IBusinessExport
3745 return null; 3737 return null;
3746 } 3738 }
3747 UnionShareUserIdentityCardBo result = new UnionShareUserIdentityCardBo(); 3739 UnionShareUserIdentityCardBo result = new UnionShareUserIdentityCardBo();
3748 - BeanUtils.copyProperties(identityCard, result); 3740 + result.setId(identityCard.getId());
  3741 + result.setUid(identityCard.getUid());
  3742 + result.setCreateTime(identityCard.getCreateTime());
3749 addToRedis(ShareOrdersKeyEnum.USER_SETTLEMENT, uid, result, hashkey); 3743 addToRedis(ShareOrdersKeyEnum.USER_SETTLEMENT, uid, result, hashkey);
3750 logger.info("getBankCard end,set redis cache ,uid is {},hashkey is {},IdentityCard is {}",uid,hashkey,result); 3744 logger.info("getBankCard end,set redis cache ,uid is {},hashkey is {},IdentityCard is {}",uid,hashkey,result);
3751 return result; 3745 return result;