Commit b2e707a4 by guojuxing

联合商户授权,日志信息冗余

parent 62270fb7
...@@ -102,6 +102,11 @@ public class UnionEnterpriseAuthDTO implements Serializable{ ...@@ -102,6 +102,11 @@ public class UnionEnterpriseAuthDTO implements Serializable{
*/ */
private Integer deleteFlag; private Integer deleteFlag;
/**
* 冗余字段。解除联合操作日志信息.TransmitDataDTO transmitDataDTO = TransmitDataHolder.get();
*/
private String logParams;
public Integer getUnionEnterpriseAuthId() { public Integer getUnionEnterpriseAuthId() {
return unionEnterpriseAuthId; return unionEnterpriseAuthId;
} }
...@@ -264,6 +269,15 @@ public class UnionEnterpriseAuthDTO implements Serializable{ ...@@ -264,6 +269,15 @@ public class UnionEnterpriseAuthDTO implements Serializable{
return this; return this;
} }
public String getLogParams() {
return logParams;
}
public UnionEnterpriseAuthDTO setLogParams(String logParams) {
this.logParams = logParams;
return this;
}
@Override @Override
public String toString() { public String toString() {
return "UnionEnterpriseAuthDTO{" + return "UnionEnterpriseAuthDTO{" +
...@@ -285,6 +299,7 @@ public class UnionEnterpriseAuthDTO implements Serializable{ ...@@ -285,6 +299,7 @@ public class UnionEnterpriseAuthDTO implements Serializable{
", createTime=" + createTime + ", createTime=" + createTime +
", updateTime=" + updateTime + ", updateTime=" + updateTime +
", deleteFlag=" + deleteFlag + ", deleteFlag=" + deleteFlag +
", logParams=" + logParams +
'}'; '}';
} }
} }
\ No newline at end of file
...@@ -100,6 +100,11 @@ public class TabSysUnionEnterpriseAuth { ...@@ -100,6 +100,11 @@ public class TabSysUnionEnterpriseAuth {
*/ */
private Integer deleteFlag; private Integer deleteFlag;
/**
* 冗余字段。解除联合操作日志信息.TransmitDataDTO transmitDataDTO = TransmitDataHolder.get();
*/
private String logParams;
public Integer getUnionEnterpriseAuthId() { public Integer getUnionEnterpriseAuthId() {
return unionEnterpriseAuthId; return unionEnterpriseAuthId;
} }
...@@ -261,4 +266,13 @@ public class TabSysUnionEnterpriseAuth { ...@@ -261,4 +266,13 @@ public class TabSysUnionEnterpriseAuth {
this.deleteFlag = deleteFlag; this.deleteFlag = deleteFlag;
return this; return this;
} }
public String getLogParams() {
return logParams;
}
public TabSysUnionEnterpriseAuth setLogParams(String logParams) {
this.logParams = logParams;
return this;
}
} }
\ No newline at end of file
...@@ -176,7 +176,8 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi ...@@ -176,7 +176,8 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
unionEnterpriseAuthResDetailService.initUnionEnterpriseAuthResDetail(old.getUnionEnterpriseAuthId()); unionEnterpriseAuthResDetailService.initUnionEnterpriseAuthResDetail(old.getUnionEnterpriseAuthId());
//授权通知(用户域) //授权通知(用户域)
resourceGroupApiService.syncResourceAuthChangeMQ(dto.getOwnEnterpriseId(), dto.getUnionEnterpriseId(), resourceGroupDTO, oldResourceGroupDTO, resourceGroupChangeType); TransmitDataDTO transmitDataDTO = TransmitDataHolder.get();
resourceGroupApiService.syncResourceAuthChangeMQ(dto.getOwnEnterpriseId(), dto.getUnionEnterpriseId(), resourceGroupDTO, oldResourceGroupDTO, resourceGroupChangeType, JSON.toJSONString(transmitDataDTO));
//门店通知 //门店通知
if (resourceGroupDTO.getStoreResource() != null) { if (resourceGroupDTO.getStoreResource() != null) {
ExecutorPoolSingleton.getInstance().executeTask(new Runnable() { ExecutorPoolSingleton.getInstance().executeTask(new Runnable() {
...@@ -219,9 +220,10 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi ...@@ -219,9 +220,10 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
} }
//todo 重新授权 //todo 重新授权
//门店资源 //门店资源
String authKey = detail.getAuthKey(); if (UnionEnterpriseAuthResTypeEnum.STORE.getCode() == resourceType) {
storeAuthorizationApiService.reAuthStore(authKey); String authKey = detail.getAuthKey();
storeAuthorizationApiService.reAuthStore(authKey);
}
//日志 //日志
unionEnterpriseAuthResLogService.saveUnionEnterpriseAuthResLog(old.getUnionEnterpriseAuthId(), unionEnterpriseAuthResLogService.saveUnionEnterpriseAuthResLog(old.getUnionEnterpriseAuthId(),
resourceType, UnionEnterpriseAuthResOperateEnum.RE_AUTH.getMessage()); resourceType, UnionEnterpriseAuthResOperateEnum.RE_AUTH.getMessage());
...@@ -251,6 +253,10 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi ...@@ -251,6 +253,10 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
dto.setRelieveRemark(relieveReason); dto.setRelieveRemark(relieveReason);
dto.setUnionEnterpriseAuthId(old.getUnionEnterpriseAuthId()); dto.setUnionEnterpriseAuthId(old.getUnionEnterpriseAuthId());
dto.setStatusFlag(UnionEnterpriseAuthStatusEnum.TO_DO_RELIEVE.getCode()); dto.setStatusFlag(UnionEnterpriseAuthStatusEnum.TO_DO_RELIEVE.getCode());
TransmitDataDTO transmitDataDTO = TransmitDataHolder.get();
dto.setLogParams(JSON.toJSONString(transmitDataDTO));
unionEnterpriseAuthService.update(dto); unionEnterpriseAuthService.update(dto);
//资源状态 //资源状态
unionEnterpriseAuthResDetailService.relieveUnion(old.getUnionEnterpriseAuthId()); unionEnterpriseAuthResDetailService.relieveUnion(old.getUnionEnterpriseAuthId());
...@@ -466,7 +472,7 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi ...@@ -466,7 +472,7 @@ public class UnionEnterpriseAuthApiServiceImpl implements UnionEnterpriseAuthApi
storeAuthorizationApiService.cancelStoreAll(temp.getUnionEnterpriseId(), temp.getOwnEnterpriseId()); storeAuthorizationApiService.cancelStoreAll(temp.getUnionEnterpriseId(), temp.getOwnEnterpriseId());
TransmitDataDTO transmitDataDTO = TransmitDataHolder.get(); TransmitDataDTO transmitDataDTO = (TransmitDataDTO) JSON.parse(temp.getLogParams());
authorizationEnterConfApiService.delAuthorizationEnterpriseConf(temp.getUnionEnterpriseId(), temp.getOwnEnterpriseId(), transmitDataDTO); authorizationEnterConfApiService.delAuthorizationEnterpriseConf(temp.getUnionEnterpriseId(), temp.getOwnEnterpriseId(), transmitDataDTO);
userGroupPermissionApiService.relieveUnionEnterprise(temp.getUnionEnterpriseId(), temp.getOwnEnterpriseId()); userGroupPermissionApiService.relieveUnionEnterprise(temp.getUnionEnterpriseId(), temp.getOwnEnterpriseId());
......
...@@ -20,12 +20,13 @@ ...@@ -20,12 +20,13 @@
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" /> <result column="delete_flag" jdbcType="INTEGER" property="deleteFlag" />
<result column="log_params" jdbcType="VARCHAR" property="logParams" />
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
union_enterprise_auth_id, own_enterprise_id, union_enterprise_id, status_flag, last_union_time, union_enterprise_auth_id, own_enterprise_id, union_enterprise_id, status_flag, last_union_time,
last_relieve_time, relieve_time, relieve_effect_date, relieve_remark, resource_group_id, last_relieve_time, relieve_time, relieve_effect_date, relieve_remark, resource_group_id,
auditee_group, account_group, data_encry_field, user_edit_auth, white_list_auth, auditee_group, account_group, data_encry_field, user_edit_auth, white_list_auth,
create_time, update_time, delete_flag create_time, update_time, delete_flag, log_params
</sql> </sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap"> <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select select
...@@ -40,14 +41,14 @@ ...@@ -40,14 +41,14 @@
relieve_remark, resource_group_id, auditee_group, relieve_remark, resource_group_id, auditee_group,
account_group, data_encry_field, user_edit_auth, account_group, data_encry_field, user_edit_auth,
white_list_auth, create_time, update_time, white_list_auth, create_time, update_time,
delete_flag) delete_flag, log_params)
values (#{unionEnterpriseAuthId,jdbcType=INTEGER}, #{ownEnterpriseId,jdbcType=INTEGER}, values (#{unionEnterpriseAuthId,jdbcType=INTEGER}, #{ownEnterpriseId,jdbcType=INTEGER},
#{unionEnterpriseId,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{lastUnionTime,jdbcType=TIMESTAMP}, #{unionEnterpriseId,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER}, #{lastUnionTime,jdbcType=TIMESTAMP},
#{lastRelieveTime,jdbcType=TIMESTAMP}, #{relieveTime,jdbcType=TIMESTAMP}, #{relieveEffectDate,jdbcType=INTEGER}, #{lastRelieveTime,jdbcType=TIMESTAMP}, #{relieveTime,jdbcType=TIMESTAMP}, #{relieveEffectDate,jdbcType=INTEGER},
#{relieveRemark,jdbcType=VARCHAR}, #{resourceGroupId,jdbcType=INTEGER}, #{auditeeGroup,jdbcType=VARCHAR}, #{relieveRemark,jdbcType=VARCHAR}, #{resourceGroupId,jdbcType=INTEGER}, #{auditeeGroup,jdbcType=VARCHAR},
#{accountGroup,jdbcType=VARCHAR}, #{dataEncryField,jdbcType=VARCHAR}, #{userEditAuth,jdbcType=VARCHAR}, #{accountGroup,jdbcType=VARCHAR}, #{dataEncryField,jdbcType=VARCHAR}, #{userEditAuth,jdbcType=VARCHAR},
#{whiteListAuth,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{whiteListAuth,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{deleteFlag,jdbcType=INTEGER}) #{deleteFlag,jdbcType=INTEGER}, #{logParams,jdbcType=VARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabSysUnionEnterpriseAuth"> <insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabSysUnionEnterpriseAuth">
insert into tab_sys_union_enterprise_auth insert into tab_sys_union_enterprise_auth
...@@ -106,6 +107,9 @@ ...@@ -106,6 +107,9 @@
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag, delete_flag,
</if> </if>
<if test="logParams != null">
log_params,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="unionEnterpriseAuthId != null"> <if test="unionEnterpriseAuthId != null">
...@@ -162,6 +166,9 @@ ...@@ -162,6 +166,9 @@
<if test="deleteFlag != null"> <if test="deleteFlag != null">
#{deleteFlag,jdbcType=INTEGER}, #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="logParams != null">
#{logParams,jdbcType=VARCHAR},
</if>
</trim> </trim>
</insert> </insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabSysUnionEnterpriseAuth"> <update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabSysUnionEnterpriseAuth">
...@@ -218,6 +225,9 @@ ...@@ -218,6 +225,9 @@
<if test="deleteFlag != null"> <if test="deleteFlag != null">
delete_flag = #{deleteFlag,jdbcType=INTEGER}, delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if> </if>
<if test="logParams != null">
log_params = #{logParams,jdbcType=VARCHAR},
</if>
</set> </set>
where union_enterprise_auth_id = #{unionEnterpriseAuthId,jdbcType=INTEGER} where union_enterprise_auth_id = #{unionEnterpriseAuthId,jdbcType=INTEGER}
</update> </update>
...@@ -239,7 +249,8 @@ ...@@ -239,7 +249,8 @@
white_list_auth = #{whiteListAuth,jdbcType=INTEGER}, white_list_auth = #{whiteListAuth,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
delete_flag = #{deleteFlag,jdbcType=INTEGER} delete_flag = #{deleteFlag,jdbcType=INTEGER},
log_params = #{logParams,jdbcType=VARCHAR}
where union_enterprise_auth_id = #{unionEnterpriseAuthId,jdbcType=INTEGER} where union_enterprise_auth_id = #{unionEnterpriseAuthId,jdbcType=INTEGER}
</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