init client permission

master
kira 6 years ago
parent 2eeb320dc3
commit 3482de66c7

@ -115,7 +115,9 @@ public class PermissionPartnerManagerImpl implements PermissionPartnerManager {
}
@Override
@Transactional
public void permissionClientModuleSave(int clientId, String clientMoniker) {
permissionClientModulesService.removeByClientMoniker(clientMoniker);
List<JSONObject> moduleId = permissionPartnerModuleMapper.list();
for (JSONObject moduleClientAdd : moduleId) {
moduleClientAdd.put("client_id", clientId);

@ -24,6 +24,8 @@ public interface SysPermissionClientModulesMapper {
void delete(@Param("module_name") String moduleName);
void deleteByClientMoniker(@Param("client_moniker") String client_moniker);
@AutoSql(type = SqlType.SELECT)
List<JSONObject> listByClientId(@Param("client_id") int client_id);

@ -19,4 +19,5 @@ public interface PermissionClientModulesService {
void switchValid(Long id,boolean isValid,JSONObject account);
void removeByClientMoniker(String clientMoniker);
}

@ -72,6 +72,11 @@ public class PermissionClientModulesServiceImpl implements PermissionClientModul
}
@Override
public void removeByClientMoniker(String clientMoniker) {
permissionClientModulesMapper.deleteByClientMoniker(clientMoniker);
}
private void saveMongoLog(JSONObject account, JSONObject oldRecord, JSONObject modifyData, String business) {
try {
modifyData.remove("id");

@ -28,4 +28,9 @@
delete from sys_permission_partner_modules_clients
where module_id = (SELECT id from sys_permission_partner_modules where module_name=#{module_name})
</delete>
<delete id="deleteByClientMoniker">
delete from sys_permission_partner_modules_clients
where client_moniker= #{client_moniker}
</delete>
</mapper>
Loading…
Cancel
Save