Commit 58f7c168 by fudahua

刷新绑定门店

parent 3f0de3ad
......@@ -54,4 +54,10 @@ public interface TabHaobanExternalClerkRelatedMapper {
* @return
*/
List<TabHaobanExternalClerkRelated> listExternalByUnionId(@Param("enterpriseId") String enterpriseId, @Param("unionId") String unionId);
/**
* @param relationKey
* @return
*/
TabHaobanExternalClerkRelated getByRelationKey(@Param("relationKey") String relationKey);
}
\ No newline at end of file
......@@ -29,6 +29,10 @@ public class TabHaobanExternalClerkRelated implements Serializable {
private String staffId;
private String wxUserId;
/**
* 校验的key,clerkid+externalUserId的md5
*/
private String relationKey;
private Integer statusFlag;
......@@ -38,6 +42,14 @@ public class TabHaobanExternalClerkRelated implements Serializable {
private static final long serialVersionUID = 1L;
public String getRelationKey() {
return relationKey;
}
public void setRelationKey(String relationKey) {
this.relationKey = relationKey;
}
public String getExternalClerkRelatedId() {
return externalClerkRelatedId;
}
......
......@@ -27,7 +27,7 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ
TabHaobanExternalClerkRelated tab = mapper.selectByClerkIdAndExternalUserId(clerkId,externalUserId);
if(tab == null){
String uuId = StringUtil.randomUUID();
related.setStatusFlag(1);
related.setStatusFlag(related.getStatusFlag() != null ? related.getStatusFlag() : 1);
related.setExternalClerkRelatedId(uuId);
related.setCreateTime(new Date());
related.setUpdateTime(new Date());
......
......@@ -90,6 +90,9 @@
<if test="wxUserId != null" >
wx_user_id,
</if>
<if test="relationKey != null">
relation_key,,
</if>
<if test="statusFlag != null" >
status_flag,
</if>
......@@ -140,6 +143,9 @@
<if test="wxUserId != null" >
#{wxUserId,jdbcType=VARCHAR},
</if>
<if test="relationKey != null">
#{relationKey,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null" >
#{statusFlag,jdbcType=INTEGER},
</if>
......@@ -190,6 +196,9 @@
<if test="wxUserId != null" >
wx_user_id = #{wxUserId,jdbcType=VARCHAR},
</if>
<if test="relationKey != null">
relation_key = #{relationKey,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null" >
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
......@@ -368,4 +377,13 @@
and unionid = #{unionId}
and status_flag = 1
</select>
<select id="getByRelationKey" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_external_clerk_related
where
and relation_key = #{relationKey}
and status_flag = 3
</select>
</mapper>
\ No newline at end of file
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