Commit edb8fa8d by 墨竹

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

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