Commit ac8cad91 by 墨竹

feat:新增tab_haoban_wx_enterprise是否代开发字段

parent 5f15dc82
...@@ -95,6 +95,10 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -95,6 +95,10 @@ public class WxEnterpriseDTO implements Serializable {
* 是否同意授权转换external_userid时间 * 是否同意授权转换external_userid时间
*/ */
private Date agreeExternalUseridTime; private Date agreeExternalUseridTime;
/**
* 是否使用代开发,1:是,0:否
*/
private Integer isCustomizedApp;
public String getMemberSecret() { public String getMemberSecret() {
return memberSecret; return memberSecret;
...@@ -423,4 +427,12 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -423,4 +427,12 @@ public class WxEnterpriseDTO implements Serializable {
public void setAgreeExternalUseridTime(Date agreeExternalUseridTime) { public void setAgreeExternalUseridTime(Date agreeExternalUseridTime) {
this.agreeExternalUseridTime = agreeExternalUseridTime; this.agreeExternalUseridTime = agreeExternalUseridTime;
} }
public Integer getIsCustomizedApp() {
return isCustomizedApp;
}
public void setIsCustomizedApp(Integer isCustomizedApp) {
this.isCustomizedApp = isCustomizedApp;
}
} }
...@@ -10,8 +10,6 @@ import java.util.Set; ...@@ -10,8 +10,6 @@ import java.util.Set;
public interface WxEnterpriseMapper { public interface WxEnterpriseMapper {
int deleteByPrimaryKey(String wxEnterpriseId); int deleteByPrimaryKey(String wxEnterpriseId);
int insert(TabHaobanWxEnterprise record);
int insertSelective(TabHaobanWxEnterprise record); int insertSelective(TabHaobanWxEnterprise record);
TabHaobanWxEnterprise selectByPrimaryKey(String wxEnterpriseId); TabHaobanWxEnterprise selectByPrimaryKey(String wxEnterpriseId);
......
...@@ -75,6 +75,10 @@ public class TabHaobanWxEnterprise implements Serializable { ...@@ -75,6 +75,10 @@ public class TabHaobanWxEnterprise implements Serializable {
private Date updateTime; private Date updateTime;
/** /**
* 是否使用代开发,1:是,0:否
*/
private Integer isCustomizedApp;
/**
* 是否同意授权转换external_userid,1:是 * 是否同意授权转换external_userid,1:是
*/ */
private Integer agreeExternalUseridFlag; private Integer agreeExternalUseridFlag;
...@@ -371,4 +375,12 @@ public class TabHaobanWxEnterprise implements Serializable { ...@@ -371,4 +375,12 @@ public class TabHaobanWxEnterprise implements Serializable {
public void setAgreeExternalUseridTime(Date agreeExternalUseridTime) { public void setAgreeExternalUseridTime(Date agreeExternalUseridTime) {
this.agreeExternalUseridTime = agreeExternalUseridTime; this.agreeExternalUseridTime = agreeExternalUseridTime;
} }
public Integer getIsCustomizedApp() {
return isCustomizedApp;
}
public void setIsCustomizedApp(Integer isCustomizedApp) {
this.isCustomizedApp = isCustomizedApp;
}
} }
\ No newline at end of file
...@@ -56,28 +56,30 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -56,28 +56,30 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
@Override @Override
public void callbackReviceEnterprise(QywxCorpInfoSimpleDTO dto) { public void callbackReviceEnterprise(QywxCorpInfoSimpleDTO dto) {
log.info("企业微信授权信息:{}", JSON.toJSONString(dto)); log.info("企业微信授权信息:{}", JSON.toJSONString(dto));
String corpid = dto.getCorpid();
String siteId = dto.getSuiteId();
String agentId = dto.getAgentid();
String agentName = dto.getAgentName();
String permanentCode = dto.getPermanentCode();
String applicationName = dto.getName();
String userId = dto.getUserid();
Integer isCustomizedApp = dto.getIsCustomizedApp();
WxEnterpriseDTO wxDTO = EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, dto); WxEnterpriseDTO wxDTO = EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, dto);
TabHaobanWxEnterprise enterprise = this.wxEnterpriseService.getEnterpriseBycorpIdNoStatus(dto.getCorpid()); TabHaobanWxEnterprise enterprise = this.wxEnterpriseService.getEnterpriseBycorpIdNoStatus(corpid);
String wxEnterpriseId = ""; String wxEnterpriseId = "";
if (enterprise != null) { if (enterprise != null) {
wxEnterpriseId = enterprise.getWxEnterpriseId(); wxEnterpriseId = enterprise.getWxEnterpriseId();
wxDTO.setWxEnterpriseId(enterprise.getWxEnterpriseId()); wxDTO.setWxEnterpriseId(enterprise.getWxEnterpriseId());
wxDTO.setStatusFlag(1); wxDTO.setStatusFlag(1);
wxDTO.setBindFlag(1); wxDTO.setBindFlag(1);
wxDTO.setIsCustomizedApp(isCustomizedApp);
wxEnterpriseService.update(wxDTO); wxEnterpriseService.update(wxDTO);
} else { } else {
wxEnterpriseId = wxEnterpriseService.add(wxDTO); wxEnterpriseId = wxEnterpriseService.add(wxDTO);
} }
String userId = dto.getUserid();
if (StringUtils.isNotBlank(userId)) { if (StringUtils.isNotBlank(userId)) {
staffApiService.wxGetAdd(userId, wxEnterpriseId); staffApiService.wxGetAdd(userId, wxEnterpriseId);
} }
String siteId = dto.getSuiteId();
String agentId = dto.getAgentid();
String agentName = dto.getAgentName();
String permanentCode = dto.getPermanentCode();
String applicationName = dto.getName();
Integer isCustomizedApp = dto.getIsCustomizedApp();
TabHaobanWxApplication tab = wxApplicationService.selectBySiteIdAndWxEnterpriseId(siteId, wxEnterpriseId); TabHaobanWxApplication tab = wxApplicationService.selectBySiteIdAndWxEnterpriseId(siteId, wxEnterpriseId);
if (tab == null) { if (tab == null) {
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/> <result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
<result column="agree_external_userid_flag" property="agreeExternalUseridFlag" jdbcType="INTEGER"/> <result column="agree_external_userid_flag" property="agreeExternalUseridFlag" jdbcType="INTEGER"/>
<result column="agree_external_userid_time" property="agreeExternalUseridTime" jdbcType="TIMESTAMP"/> <result column="agree_external_userid_time" property="agreeExternalUseridTime" jdbcType="TIMESTAMP"/>
<result column="is_customized_app" property="isCustomizedApp" jdbcType="INTEGER"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
...@@ -45,7 +46,7 @@ ...@@ -45,7 +46,7 @@
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,wx_secret_key,wx_secret_key_last_time,member_secret_last_time,contact_secret_last_time square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time,contact_flag,wx_secret_key,wx_secret_key_last_time,member_secret_last_time,contact_secret_last_time
,member_secret,contact_secret,agree_external_userid_flag,agree_external_userid_time ,member_secret,contact_secret,agree_external_userid_flag,agree_external_userid_time,is_customized_app
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
...@@ -58,29 +59,7 @@ ...@@ -58,29 +59,7 @@
from tab_haoban_wx_enterprise from tab_haoban_wx_enterprise
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise">
insert into tab_haoban_wx_enterprise (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_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, wx_secret_key,
contact_secret, agree_external_userid_flag, agree_external_userid_time)
values (#{wxEnterpriseId,jdbcType=VARCHAR}, #{corpid,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR},
#{corpName,jdbcType=VARCHAR}, #{corpType,jdbcType=VARCHAR}, #{corpSquareLogoUrl,jdbcType=VARCHAR},
#{corpUserMax,jdbcType=VARCHAR}, #{corpFullName,jdbcType=VARCHAR}, #{subjectType,jdbcType=VARCHAR},
#{verifiedEndTime,jdbcType=TIMESTAMP}, #{corpWxqrcode,jdbcType=VARCHAR}, #{corpScale,jdbcType=VARCHAR},
#{corpIndustry,jdbcType=VARCHAR}, #{corpSubIndustry,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR},
#{authInfo,jdbcType=VARCHAR}, #{agent,jdbcType=VARCHAR}, #{agentid,jdbcType=VARCHAR},
#{appid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{squareLogoUrl,jdbcType=VARCHAR},
#{roundLogoUrl,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{bindFlag,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{contactFlag}, #{wxSecretKey}, #{contactSecret}, #{agreeExternalUseridFlag},
#{agreeExternalUseridTime})
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise"> <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise">
insert into tab_haoban_wx_enterprise insert into tab_haoban_wx_enterprise
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
...@@ -180,6 +159,9 @@ ...@@ -180,6 +159,9 @@
<if test="agreeExternalUseridTime != null"> <if test="agreeExternalUseridTime != null">
agree_external_userid_time, agree_external_userid_time,
</if> </if>
<if test="isCustomizedApp != null">
is_customized_app,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="wxEnterpriseId != null"> <if test="wxEnterpriseId != null">
...@@ -278,6 +260,9 @@ ...@@ -278,6 +260,9 @@
<if test="agreeExternalUseridTime != null"> <if test="agreeExternalUseridTime != null">
#{agreeExternalUseridTime,jdbcType=TIMESTAMP}, #{agreeExternalUseridTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isCustomizedApp != null">
#{isCustomizedApp,jdbcType=INTEGER},
</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">
...@@ -388,6 +373,9 @@ ...@@ -388,6 +373,9 @@
<if test="agreeExternalUseridTime != null"> <if test="agreeExternalUseridTime != null">
agree_external_userid_time = #{agreeExternalUseridTime,jdbcType=TIMESTAMP}, agree_external_userid_time = #{agreeExternalUseridTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isCustomizedApp != null">
is_customized_app = #{isCustomizedApp,jdbcType=INTEGER},
</if>
</set> </set>
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