Commit 74d70562 by fudahua

Merge remote-tracking branch 'origin/developer' into developer

parents 46a7bb79 fca5e143
...@@ -56,6 +56,8 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -56,6 +56,8 @@ public class WxEnterpriseDTO implements Serializable {
private Integer statusFlag; private Integer statusFlag;
private Integer contactFlag; private Integer contactFlag;
private String wxSecreKey;
private Date createTime; private Date createTime;
...@@ -287,5 +289,13 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -287,5 +289,13 @@ public class WxEnterpriseDTO implements Serializable {
this.contactFlag = contactFlag; this.contactFlag = contactFlag;
} }
public String getWxSecreKey() {
return wxSecreKey;
}
public void setWxSecreKey(String wxSecreKey) {
this.wxSecreKey = wxSecreKey;
}
} }
...@@ -55,6 +55,8 @@ public class TabHaobanWxEnterprise implements Serializable { ...@@ -55,6 +55,8 @@ public class TabHaobanWxEnterprise implements Serializable {
private Integer statusFlag; private Integer statusFlag;
private Integer contactFlag; private Integer contactFlag;
private String wxSecreKey;
private Date createTime; private Date createTime;
...@@ -285,6 +287,14 @@ public class TabHaobanWxEnterprise implements Serializable { ...@@ -285,6 +287,14 @@ public class TabHaobanWxEnterprise implements Serializable {
public void setContactFlag(Integer contactFlag) { public void setContactFlag(Integer contactFlag) {
this.contactFlag = contactFlag; this.contactFlag = contactFlag;
} }
public String getWxSecreKey() {
return wxSecreKey;
}
public void setWxSecreKey(String wxSecreKey) {
this.wxSecreKey = wxSecreKey;
}
} }
\ No newline at end of file
...@@ -64,7 +64,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -64,7 +64,8 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
} }
List<TabHaobanWxEnterpriseRelated> list = wxEnterpriseRelatedService.getByWxEnterpriseId(wxEnterprise.getWxEnterpriseId()); List<TabHaobanWxEnterpriseRelated> list = wxEnterpriseRelatedService.getByWxEnterpriseId(wxEnterprise.getWxEnterpriseId());
String unionIdJson = qywxUserApiService.getExternalUseridInfo(dto.getCorpid(), dto.getSuiteid(), dto.getExternalUserid()); String unionIdJson = qywxUserApiService.getCorpSelfExternalUseridInfo(dto.getCorpid(), wxEnterprise.getWxSecreKey(), dto.getExternalUserid());
//getExternalUseridInfo(dto.getCorpid(), dto.getSuiteid(), dto.getExternalUserid());
log.info("【新增外部联系人回调】unionIdJson={}",JSON.toJSONString(unionIdJson)); log.info("【新增外部联系人回调】unionIdJson={}",JSON.toJSONString(unionIdJson));
String unionId = ""; String unionId = "";
if(StringUtils.isNotBlank(unionIdJson)){ if(StringUtils.isNotBlank(unionIdJson)){
...@@ -88,6 +89,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -88,6 +89,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
} }
dto.setWxEnterpriseId(wxEnterprise.getWxEnterpriseId()); dto.setWxEnterpriseId(wxEnterprise.getWxEnterpriseId());
dto.setUnionid(unionId); dto.setUnionid(unionId);
dto.setSuiteid(wxEnterprise.getWxSecreKey());
//this.getExternalUserUnionid(dto); //this.getExternalUserUnionid(dto);
return memberUnionRelatedService.addMemberUnionidRelated(dto); return memberUnionRelatedService.addMemberUnionidRelated(dto);
} }
...@@ -99,7 +101,11 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA ...@@ -99,7 +101,11 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
} }
private void getExternalUserUnionid(MemberUnionidRelatedDTO dto){ private void getExternalUserUnionid(MemberUnionidRelatedDTO dto){
String externalUseridInfo = this.qywxUserApiService.getExternalUseridInfo(dto.getCorpid(), dto.getSuiteid(), dto.getExternalUserid()); TabHaobanWxEnterprise wxEnterprise = wxEnterpriseService.getEnterpriseBycorpId(dto.getCorpid());
if(wxEnterprise == null){
return ;
}
String externalUseridInfo = this.qywxUserApiService.getCorpSelfExternalUseridInfo(dto.getCorpid(), wxEnterprise.getWxSecreKey(), dto.getExternalUserid());
if(StringUtils.isNotBlank(externalUseridInfo)){ if(StringUtils.isNotBlank(externalUseridInfo)){
JSONObject jsonObject = JSON.parseObject(externalUseridInfo); JSONObject jsonObject = JSON.parseObject(externalUseridInfo);
dto.setUnionid(jsonObject.getString("unionid")); dto.setUnionid(jsonObject.getString("unionid"));
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<result column="name" property="name" jdbcType="VARCHAR" /> <result column="name" property="name" jdbcType="VARCHAR" />
<result column="square_logo_url" property="squareLogoUrl" jdbcType="VARCHAR" /> <result column="square_logo_url" property="squareLogoUrl" jdbcType="VARCHAR" />
<result column="round_logo_url" property="roundLogoUrl" jdbcType="VARCHAR" /> <result column="round_logo_url" property="roundLogoUrl" jdbcType="VARCHAR" />
<result column="wx_secret_key" property="wxSecretKey" jdbcType="VARCHAR" />
<result column="level" property="level" jdbcType="INTEGER" /> <result column="level" property="level" jdbcType="INTEGER" />
<result column="contact_flag" property="contactFlag" jdbcType="INTEGER" /> <result column="contact_flag" property="contactFlag" jdbcType="INTEGER" />
<result column="bind_flag" property="bindFlag" jdbcType="INTEGER" /> <result column="bind_flag" property="bindFlag" jdbcType="INTEGER" />
...@@ -35,7 +36,7 @@ ...@@ -35,7 +36,7 @@
wx_enterprise_id, corpid, permanent_code, corp_name, corp_type, corp_square_logo_url, wx_enterprise_id, corpid, permanent_code, corp_name, corp_type, corp_square_logo_url,
corp_user_max, corp_full_name, subject_type, verified_end_time, corp_wxqrcode, corp_scale, corp_user_max, corp_full_name, subject_type, verified_end_time, corp_wxqrcode, corp_scale,
corp_industry, corp_sub_industry, location, auth_info, agent, agentid, appid, name, corp_industry, corp_sub_industry, location, auth_info, agent, agentid, appid, name,
square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time,contact_flag square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time,contact_flag,wx_secret_key
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
...@@ -56,7 +57,7 @@ ...@@ -56,7 +57,7 @@
auth_info, agent, agentid, auth_info, agent, agentid,
appid, name, square_logo_url, appid, name, square_logo_url,
round_logo_url, level, bind_flag, round_logo_url, level, bind_flag,
status_flag, create_time, update_time,contact_flag status_flag, create_time, update_time,contact_flag,wx_secret_key
) )
values (#{wxEnterpriseId,jdbcType=VARCHAR}, #{corpid,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR}, values (#{wxEnterpriseId,jdbcType=VARCHAR}, #{corpid,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR},
#{corpName,jdbcType=VARCHAR}, #{corpType,jdbcType=VARCHAR}, #{corpSquareLogoUrl,jdbcType=VARCHAR}, #{corpName,jdbcType=VARCHAR}, #{corpType,jdbcType=VARCHAR}, #{corpSquareLogoUrl,jdbcType=VARCHAR},
...@@ -66,7 +67,7 @@ ...@@ -66,7 +67,7 @@
#{authInfo,jdbcType=VARCHAR}, #{agent,jdbcType=VARCHAR}, #{agentid,jdbcType=VARCHAR}, #{authInfo,jdbcType=VARCHAR}, #{agent,jdbcType=VARCHAR}, #{agentid,jdbcType=VARCHAR},
#{appid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{squareLogoUrl,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{squareLogoUrl,jdbcType=VARCHAR},
#{roundLogoUrl,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{bindFlag,jdbcType=INTEGER}, #{roundLogoUrl,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{bindFlag,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{contactFlag} #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{contactFlag},#{wxSecretKey}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise" > <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise" >
...@@ -156,6 +157,9 @@ ...@@ -156,6 +157,9 @@
<if test="updateTime != null" > <if test="updateTime != null" >
update_time, update_time,
</if> </if>
<if test="wxSecretKey != null" >
wx_secret_key,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="wxEnterpriseId != null" > <if test="wxEnterpriseId != null" >
...@@ -242,6 +246,9 @@ ...@@ -242,6 +246,9 @@
<if test="updateTime != null" > <if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="wxSecretKey != null" >
#{wxSecretKey,jdbcType=TIMESTAMP},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise" > <update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise" >
...@@ -328,6 +335,9 @@ ...@@ -328,6 +335,9 @@
<if test="updateTime != null" > <if test="updateTime != null" >
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="wxSecretKey != null" >
wx_secret_key = #{wxSecretKey,jdbcType=VARCHAR},
</if>
</set> </set>
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</update> </update>
...@@ -359,6 +369,7 @@ ...@@ -359,6 +369,7 @@
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
contact_flag = #{contactFlag,jdbcType=INTEGER}, contact_flag = #{contactFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
wx_secret_key = #{wxSecretKey,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</update> </update>
......
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