master
wangning 6 years ago
parent 2b3671a8af
commit ac472773f6

@ -9,8 +9,10 @@ import au.com.royalpay.payment.manage.mappers.system.PermissionPartnerFunctionMa
import au.com.royalpay.payment.manage.mappers.system.PermissionPartnerModuleMapper;
import au.com.royalpay.payment.manage.permission.manager.scanner.PermissionNode;
import au.com.royalpay.payment.manage.permission.manager.scanner.PermissionPartnerReader;
import au.com.royalpay.payment.manage.system.core.PermissionClientModulesService;
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
import au.com.royalpay.payment.tools.utils.id.IdUtil;
import com.alibaba.fastjson.JSONObject;
@ -40,6 +42,8 @@ public class PartnerPermissionManagerImpl implements PartnerPermissionManager {
@Resource
private PermissionClientModuleMapper permissionClientModuleMapper;
@Resource
private PermissionClientModulesService permissionClientModulesService;
@Resource
private ClientMapper clientMapper;
@ -129,7 +133,8 @@ public class PartnerPermissionManagerImpl implements PartnerPermissionManager {
clientMod.put("client_moniker", clientMod.getString("client_moniker"));
clientMod.put("module_id", nModuleId.getString("id"));
clientMod.put("is_valid", 1);
permissionClientModuleMapper.save(clientMod);
clientMod.put("id", IdUtil.getId());
permissionClientModulesService.save(clientMod);
}
}
if (!module.getInitialize()) {
@ -138,6 +143,7 @@ public class PartnerPermissionManagerImpl implements PartnerPermissionManager {
clientMod.put("client_moniker", clientMod.getString("client_moniker"));
clientMod.put("module_id", nModuleId.getString("id"));
clientMod.put("is_valid", 0);
clientMod.put("is_valid", IdUtil.getId());
permissionClientModuleMapper.save(clientMod);
}
}

@ -14,7 +14,7 @@ import java.util.List;
/**
* Created by yixian on 2017-02-28.
*/
@AutoMapper(tablename = "sys_permission_partner_modules_clients", pkName = "client_moniker")
@AutoMapper(tablename = "sys_permission_partner_modules_clients", pkName = "id")
public interface PermissionClientModuleMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject clientmodules);

@ -13,7 +13,7 @@ import cn.yixblog.support.mybatis.autosql.annotations.SqlType;
/**
* Created by yixian on 2017-02-28.
*/
@AutoMapper(tablename = "sys_permission_partner_modules", pkName = "module_name")
@AutoMapper(tablename = "sys_permission_partner_modules", pkName = "id",pkAutoIncrement = true)
public interface PermissionPartnerModuleMapper {
@AutoSql(type = SqlType.INSERT)
void save(JSONObject module);

Loading…
Cancel
Save