Commit edb8fa8d by 墨竹

fix:增加是否为代开发字段

parent 859eaf08
...@@ -60,14 +60,19 @@ public class QywxCorpInfoSimpleDTO implements Serializable{ ...@@ -60,14 +60,19 @@ public class QywxCorpInfoSimpleDTO implements Serializable{
/** /**
* 权限等级。 * 权限等级。
1:通讯录基本信息只读 * 1:通讯录基本信息只读
2:通讯录全部信息只读(已废弃) * 2:通讯录全部信息只读(已废弃)
3:通讯录全部信息读写 * 3:通讯录全部信息读写
4:单个基本信息只读 * 4:单个基本信息只读
5:通讯录全部信息只写(已废弃) * 5:通讯录全部信息只写(已废弃)
* **/ **/
private Integer level; private Integer level;
/**
* 是否使用代开发,1:是,0:否
*/
private Integer isCustomizedApp;
public Integer getErrcode() { public Integer getErrcode() {
return errcode; return errcode;
} }
...@@ -219,4 +224,12 @@ public class QywxCorpInfoSimpleDTO implements Serializable{ ...@@ -219,4 +224,12 @@ public class QywxCorpInfoSimpleDTO implements Serializable{
public void setLevel(Integer level) { public void setLevel(Integer level) {
this.level = level; this.level = level;
} }
public Integer getIsCustomizedApp() {
return isCustomizedApp;
}
public void setIsCustomizedApp(Integer isCustomizedApp) {
this.isCustomizedApp = isCustomizedApp;
}
} }
...@@ -4,6 +4,9 @@ import java.io.Serializable; ...@@ -4,6 +4,9 @@ import java.io.Serializable;
import java.util.Date; import java.util.Date;
public class TabHaobanWxApplication implements Serializable { public class TabHaobanWxApplication implements Serializable {
private static final long serialVersionUID = 1L;
private String wxApplicationId; private String wxApplicationId;
private String siteId; private String siteId;
...@@ -26,7 +29,10 @@ public class TabHaobanWxApplication implements Serializable { ...@@ -26,7 +29,10 @@ public class TabHaobanWxApplication implements Serializable {
private Date updateTime; private Date updateTime;
private static final long serialVersionUID = 1L; /**
* 是否使用代开发,1:是,0:否
*/
private Integer isCustomizedApp;
public String getWxApplicationId() { public String getWxApplicationId() {
return wxApplicationId; return wxApplicationId;
...@@ -115,4 +121,12 @@ public class TabHaobanWxApplication implements Serializable { ...@@ -115,4 +121,12 @@ public class TabHaobanWxApplication implements Serializable {
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getIsCustomizedApp() {
return isCustomizedApp;
}
public void setIsCustomizedApp(Integer isCustomizedApp) {
this.isCustomizedApp = isCustomizedApp;
}
} }
\ No newline at end of file
...@@ -23,23 +23,23 @@ import java.util.List; ...@@ -23,23 +23,23 @@ import java.util.List;
@Service @Service
public class SecretSettingServiceImpl implements SecretSettingService { public class SecretSettingServiceImpl implements SecretSettingService {
private static final Logger logger= LoggerFactory.getLogger(SecretSettingServiceImpl.class); private static final Logger logger = LoggerFactory.getLogger(SecretSettingServiceImpl.class);
@Autowired @Autowired
private SecretSettingMapper secretSettingMapper; private SecretSettingMapper secretSettingMapper;
@Override @Override
public boolean saveSecretSetting(SecretSettingDTO secretSetting) { public boolean saveSecretSetting(SecretSettingDTO secretSetting) {
if (secretSetting.getSecretId()!=null) { if (secretSetting.getSecretId() != null) {
secretSetting.setUpdateTime(new Date()); secretSetting.setUpdateTime(new Date());
secretSettingMapper.updateByPrimaryKeySelective(EntityUtil.changeEntityByJSON(TabSecretSetting.class,secretSetting)); secretSettingMapper.updateByPrimaryKeySelective(EntityUtil.changeEntityByJSON(TabSecretSetting.class, secretSetting));
return true; return true;
}else{ } else {
secretSetting.setSecretId(ToolUtil.randomUUID()); secretSetting.setSecretId(ToolUtil.randomUUID());
secretSetting.setCreateTime(new Date()); secretSetting.setCreateTime(new Date());
secretSetting.setUpdateTime(new Date()); secretSetting.setUpdateTime(new Date());
secretSetting.setStatusFlag(1); secretSetting.setStatusFlag(1);
secretSettingMapper.insert(EntityUtil.changeEntityByJSON(TabSecretSetting.class,secretSetting)); secretSettingMapper.insert(EntityUtil.changeEntityByJSON(TabSecretSetting.class, secretSetting));
return true; return true;
} }
} }
...@@ -51,13 +51,13 @@ public class SecretSettingServiceImpl implements SecretSettingService { ...@@ -51,13 +51,13 @@ public class SecretSettingServiceImpl implements SecretSettingService {
tabSecretSetting.setStatusFlag(0); tabSecretSetting.setStatusFlag(0);
tabSecretSetting.setUpdateTime(new Date()); tabSecretSetting.setUpdateTime(new Date());
int i = secretSettingMapper.updateByPrimaryKeySelective(tabSecretSetting); int i = secretSettingMapper.updateByPrimaryKeySelective(tabSecretSetting);
return i>0; return i > 0;
} }
@Override @Override
public List<SecretSettingDTO> listSecretSetting(String wxEnterpriseId) { public List<SecretSettingDTO> listSecretSetting(String wxEnterpriseId) {
List<TabSecretSetting> list = secretSettingMapper.listSecretSetting(wxEnterpriseId); List<TabSecretSetting> list = secretSettingMapper.listSecretSetting(wxEnterpriseId);
return EntityUtil.changeEntityListByJSON(SecretSettingDTO.class,list); return EntityUtil.changeEntityListByJSON(SecretSettingDTO.class, list);
} }
@Override @Override
...@@ -67,12 +67,12 @@ public class SecretSettingServiceImpl implements SecretSettingService { ...@@ -67,12 +67,12 @@ public class SecretSettingServiceImpl implements SecretSettingService {
return null; return null;
} }
TabSecretSetting secretSetting = secretSettingMapper.getSecretSetting(wxEnterpriseId, secretType, null); TabSecretSetting secretSetting = secretSettingMapper.getSecretSetting(wxEnterpriseId, secretType, null);
return EntityUtil.changeEntityByJSON(SecretSettingDTO.class,secretSetting); return EntityUtil.changeEntityByJSON(SecretSettingDTO.class, secretSetting);
} }
@Override @Override
public SecretSettingDTO getMemberSecretSetting(String wxEnterpriseId, String enterpriseId) { public SecretSettingDTO getMemberSecretSetting(String wxEnterpriseId, String enterpriseId) {
TabSecretSetting secretSetting = secretSettingMapper.getSecretSetting(wxEnterpriseId, SecretTypeEnum.MEMBER_WAPP.getVal(), enterpriseId); TabSecretSetting secretSetting = secretSettingMapper.getSecretSetting(wxEnterpriseId, SecretTypeEnum.MEMBER_WAPP.getVal(), enterpriseId);
return EntityUtil.changeEntityByJSON(SecretSettingDTO.class,secretSetting); return EntityUtil.changeEntityByJSON(SecretSettingDTO.class, secretSetting);
} }
} }
...@@ -81,6 +81,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -81,6 +81,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
String agentName = dto.getAgentName(); String agentName = dto.getAgentName();
String permanentCode = dto.getPermanentCode(); String permanentCode = dto.getPermanentCode();
String applicationName = dto.getName(); 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) {
...@@ -91,6 +92,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -91,6 +92,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
tab.setName(applicationName); tab.setName(applicationName);
//permanentCode = secret //permanentCode = secret
tab.setPermanentCode(permanentCode); tab.setPermanentCode(permanentCode);
tab.setIsCustomizedApp(isCustomizedApp);
tab.setWxEnterpriseId(wxEnterpriseId); tab.setWxEnterpriseId(wxEnterpriseId);
wxApplicationService.insert(tab); wxApplicationService.insert(tab);
} else { } else {
......
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.gic.haoban.manage.service.dao.mapper.WxApplicationMapper" > <mapper namespace="com.gic.haoban.manage.service.dao.mapper.WxApplicationMapper">
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanWxApplication" > <resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.TabHaobanWxApplication">
<id column="wx_application_id" property="wxApplicationId" jdbcType="VARCHAR" /> <id column="wx_application_id" property="wxApplicationId" jdbcType="VARCHAR"/>
<result column="site_id" property="siteId" jdbcType="VARCHAR" /> <result column="site_id" property="siteId" jdbcType="VARCHAR"/>
<result column="name" property="name" jdbcType="VARCHAR" /> <result column="name" property="name" jdbcType="VARCHAR"/>
<result column="permanent_code" property="permanentCode" jdbcType="VARCHAR" /> <result column="permanent_code" property="permanentCode" jdbcType="VARCHAR"/>
<result column="agent_name" property="agentName" jdbcType="VARCHAR" /> <result column="agent_name" property="agentName" jdbcType="VARCHAR"/>
<result column="agent_id" property="agentId" jdbcType="VARCHAR" /> <result column="agent_id" property="agentId" jdbcType="VARCHAR"/>
<result column="application_type" property="applicationType" jdbcType="INTEGER" /> <result column="application_type" property="applicationType" jdbcType="INTEGER"/>
<result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR" /> <result column="is_customized_app" property="isCustomizedApp" jdbcType="INTEGER"/>
<result column="status_flag" property="statusFlag" jdbcType="INTEGER" /> <result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR"/>
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="status_flag" property="statusFlag" jdbcType="INTEGER"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP"/>
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP"/>
</resultMap> </resultMap>
<sql id="Base_Column_List" > <sql id="Base_Column_List">
wx_application_id, site_id, name, permanent_code, agent_name, agent_id, application_type, wx_application_id, site_id, name, permanent_code, agent_name, agent_id, application_type,
wx_enterprise_id, status_flag, create_time, update_time wx_enterprise_id, status_flag, create_time, update_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
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from tab_haoban_wx_application from tab_haoban_wx_application
where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR} where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR}
</select> </select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" > <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tab_haoban_wx_application delete
from tab_haoban_wx_application
where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR} where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR}
</delete> </delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxApplication" > <insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxApplication">
insert into tab_haoban_wx_application (wx_application_id, site_id, name, insert into tab_haoban_wx_application (wx_application_id, site_id, name,
permanent_code, agent_name, agent_id, permanent_code, agent_name, agent_id,
application_type, wx_enterprise_id, status_flag, application_type, wx_enterprise_id, status_flag,
create_time, update_time) create_time, update_time, is_customized_app)
values (#{wxApplicationId,jdbcType=VARCHAR}, #{siteId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, values (#{wxApplicationId,jdbcType=VARCHAR}, #{siteId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{permanentCode,jdbcType=VARCHAR}, #{agentName,jdbcType=VARCHAR}, #{agentId,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR}, #{agentName,jdbcType=VARCHAR}, #{agentId,jdbcType=VARCHAR},
#{applicationType,jdbcType=INTEGER}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER}, #{applicationType,jdbcType=INTEGER}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}) #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{isCustomizedApp,jdbcType=INTEGER})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxApplication" > <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxApplication">
insert into tab_haoban_wx_application insert into tab_haoban_wx_application
<trim prefix="(" suffix=")" suffixOverrides="," > <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="wxApplicationId != null" > <if test="wxApplicationId != null">
wx_application_id, wx_application_id,
</if> </if>
<if test="siteId != null" > <if test="siteId != null">
site_id, site_id,
</if> </if>
<if test="name != null" > <if test="name != null">
name, name,
</if> </if>
<if test="permanentCode != null" > <if test="permanentCode != null">
permanent_code, permanent_code,
</if> </if>
<if test="agentName != null" > <if test="agentName != null">
agent_name, agent_name,
</if> </if>
<if test="agentId != null" > <if test="agentId != null">
agent_id, agent_id,
</if> </if>
<if test="applicationType != null" > <if test="applicationType != null">
application_type, application_type,
</if> </if>
<if test="wxEnterpriseId != null" > <if test="wxEnterpriseId != null">
wx_enterprise_id, wx_enterprise_id,
</if> </if>
<if test="statusFlag != null" > <if test="statusFlag != null">
status_flag, status_flag,
</if> </if>
<if test="createTime != null" > <if test="createTime != null">
create_time, create_time,
</if> </if>
<if test="updateTime != null" > <if test="updateTime != null">
update_time, update_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="wxApplicationId != null" > <if test="wxApplicationId != null">
#{wxApplicationId,jdbcType=VARCHAR}, #{wxApplicationId,jdbcType=VARCHAR},
</if> </if>
<if test="siteId != null" > <if test="siteId != null">
#{siteId,jdbcType=VARCHAR}, #{siteId,jdbcType=VARCHAR},
</if> </if>
<if test="name != null" > <if test="name != null">
#{name,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
</if> </if>
<if test="permanentCode != null" > <if test="permanentCode != null">
#{permanentCode,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR},
</if> </if>
<if test="agentName != null" > <if test="agentName != null">
#{agentName,jdbcType=VARCHAR}, #{agentName,jdbcType=VARCHAR},
</if> </if>
<if test="agentId != null" > <if test="agentId != null">
#{agentId,jdbcType=VARCHAR}, #{agentId,jdbcType=VARCHAR},
</if> </if>
<if test="applicationType != null" > <if test="applicationType != null">
#{applicationType,jdbcType=INTEGER}, #{applicationType,jdbcType=INTEGER},
</if> </if>
<if test="wxEnterpriseId != null" > <if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null" > <if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null" > <if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null" > <if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP}, #{updateTime,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.TabHaobanWxApplication" > <update id="updateByPrimaryKeySelective"
parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxApplication">
update tab_haoban_wx_application update tab_haoban_wx_application
<set > <set>
<if test="siteId != null" > <if test="siteId != null">
site_id = #{siteId,jdbcType=VARCHAR}, site_id = #{siteId,jdbcType=VARCHAR},
</if> </if>
<if test="name != null" > <if test="name != null">
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
</if> </if>
<if test="permanentCode != null" > <if test="permanentCode != null">
permanent_code = #{permanentCode,jdbcType=VARCHAR}, permanent_code = #{permanentCode,jdbcType=VARCHAR},
</if> </if>
<if test="agentName != null" > <if test="agentName != null">
agent_name = #{agentName,jdbcType=VARCHAR}, agent_name = #{agentName,jdbcType=VARCHAR},
</if> </if>
<if test="agentId != null" > <if test="agentId != null">
agent_id = #{agentId,jdbcType=VARCHAR}, agent_id = #{agentId,jdbcType=VARCHAR},
</if> </if>
<if test="applicationType != null" > <if test="applicationType != null">
application_type = #{applicationType,jdbcType=INTEGER}, application_type = #{applicationType,jdbcType=INTEGER},
</if> </if>
<if test="wxEnterpriseId != null" > <if test="wxEnterpriseId != null">
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if> </if>
<if test="statusFlag != null" > <if test="statusFlag != null">
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="createTime != null" > <if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="updateTime != null" > <if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
</if> </if>
<if test="isCustomizedApp != null">
is_customized_app = #{isCustomizedApp,jdbcType=INTEGER},
</if>
</set> </set>
where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR} where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR}
</update> </update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxApplication" > <update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxApplication">
update tab_haoban_wx_application update tab_haoban_wx_application
set site_id = #{siteId,jdbcType=VARCHAR}, set site_id = #{siteId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR}, name = #{name,jdbcType=VARCHAR},
...@@ -158,22 +170,23 @@ ...@@ -158,22 +170,23 @@
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}, wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP},
is_customized_app = #{isCustomizedApp,jdbcType=INTEGER}
where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR} where wx_application_id = #{wxApplicationId,jdbcType=VARCHAR}
</update> </update>
<select id="selectBySiteIdAndWxEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="selectBySiteIdAndWxEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from tab_haoban_wx_application from tab_haoban_wx_application
where site_id = #{siteId,jdbcType=VARCHAR} where site_id = #{siteId,jdbcType=VARCHAR}
and status_flag = 1 and status_flag = 1
and wx_enterprise_id = #{wxEnterpriseId} and wx_enterprise_id = #{wxEnterpriseId}
</select> </select>
<select id="selectByWxEnterpriseIdAndApplicationType" resultMap="BaseResultMap" > <select id="selectByWxEnterpriseIdAndApplicationType" resultMap="BaseResultMap">
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List"/>
from tab_haoban_wx_application from tab_haoban_wx_application
where application_type = #{applicationType} where application_type = #{applicationType}
and status_flag = 1 and status_flag = 1
...@@ -183,6 +196,8 @@ ...@@ -183,6 +196,8 @@
<update id="cancelWxApplication"> <update id="cancelWxApplication">
update tab_haoban_wx_application update tab_haoban_wx_application
set status_flag = 0 set status_flag = 0
where wx_enterprise_id = #{wxEnterpriseId} and site_id = #{suiteId} and status_flag = 1 where wx_enterprise_id = #{wxEnterpriseId}
and site_id = #{suiteId}
and status_flag = 1
</update> </update>
</mapper> </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