Class ModelBizImpl

java.lang.Object
com.baomidou.mybatisplus.extension.repository.AbstractRepository<M,T>
com.baomidou.mybatisplus.extension.repository.CrudRepository<M,T>
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl<M,T>
net.mingsoft.base.biz.impl.BaseBizImpl<IModelDao,ModelEntity>
net.mingsoft.basic.biz.impl.ModelBizImpl
All Implemented Interfaces:
com.baomidou.mybatisplus.extension.repository.IRepository<ModelEntity>, com.baomidou.mybatisplus.extension.service.IService<ModelEntity>, net.mingsoft.base.biz.IBaseBiz<ModelEntity>, IModelBiz

@Service("modelBiz") @Transactional public class ModelBizImpl extends net.mingsoft.base.biz.impl.BaseBizImpl<IModelDao,ModelEntity> implements IModelBiz
模块业务接口实现类
Version:
版本号:100-000-000
创建日期:2012-03-15
历史修订:
Author:
张敏
  • Field Summary

    Fields inherited from class net.mingsoft.base.biz.impl.BaseBizImpl

    LOG

    Fields inherited from class com.baomidou.mybatisplus.extension.repository.CrudRepository

    baseMapper

    Fields inherited from class com.baomidou.mybatisplus.extension.repository.AbstractRepository

    log

    Fields inherited from interface com.baomidou.mybatisplus.extension.repository.IRepository

    DEFAULT_BATCH_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    delete(int[] ids)
    根据菜单编号删除菜单
    protected net.mingsoft.base.dao.IBaseDao
     
    根据模块编号查询模块实体
    getEntityByModelCode(net.mingsoft.base.constant.e.BaseEnum modelCode)
    根据模块编号查询模块实体
    getModel(String modelType, int modelId)
    根据模块id获取当前项目中的分类模块id,规则根据modelcode定。
    获取模块持久化层
    void
    importModel(ModelEntity modelEntity, int mangerRoleId, String parentIds, Integer modelId)
    导入菜单
    void
    jsonToModel(String menuStr, int mangerRoleId, int modelId)
    Deprecated.
    查询当前菜单所有的子集菜单和权限集合
    此方法不动,怕影响其他地方使用 查询当前菜单下的一级菜单
    queryModelByRoleId(int roleId)
    根据角色ID查询模块集合
    void
    reModel(ModelEntity modelParent, String parentIds, int mangerRoleId, List<RoleModelEntity> roleModels, Integer parentId)
    Deprecated.
    void
    保存
    void
    保存菜单,并且为角色添加该新增菜单的权限(super不会给绑定的角色添加新增菜单的权限)
    void
     
    void
    修改

    Methods inherited from class net.mingsoft.base.biz.impl.BaseBizImpl

    alterTable, createTable, delete, delete, deleteBySQL, deleteEntity, deleteEntity, dropTable, excuteSql, execute, getEntity, getEntity, getEntity, getOne, insert, insertBySQL, query, queryAll, queryCount, queryForList, queryForList, queryForListPage, saveBatch, saveEntity, update, update, updateBySQL, updateCache, updateEntity

    Methods inherited from class com.baomidou.mybatisplus.extension.repository.CrudRepository

    getBaseMapper, getSqlStatement, saveBatch, saveOrUpdateBatch, updateBatchById

    Methods inherited from class com.baomidou.mybatisplus.extension.repository.AbstractRepository

    executeBatch, executeBatch, getEntityClass, getMap, getMapperClass, getObj, getOneOpt, getSqlSessionFactory, removeById, saveOrUpdate

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.mingsoft.base.biz.IBaseBiz

    alterTable, createTable, delete, delete, deleteBySQL, deleteEntity, deleteEntity, dropTable, excuteSql, execute, getEntity, getEntity, getEntity, insert, insertBySQL, query, queryAll, queryCount, queryForList, queryForList, queryForListPage, saveBatch, saveEntity, update, update, updateBySQL, updateCache, updateEntity

    Methods inherited from interface com.baomidou.mybatisplus.extension.repository.IRepository

    count, count, exists, getBaseMapper, getById, getEntityClass, getMap, getObj, getOne, getOne, getOneOpt, getOneOpt, getOptById, ktQuery, ktUpdate, lambdaQuery, lambdaQuery, lambdaUpdate, list, list, list, list, listByIds, listByMap, listMaps, listMaps, listMaps, listMaps, listObjs, listObjs, listObjs, listObjs, page, page, pageMaps, pageMaps, query, remove, removeById, removeById, removeById, removeByIds, removeByIds, removeByMap, save, saveBatch, saveOrUpdate, saveOrUpdateBatch, update, update, update, updateBatchById, updateById

    Methods inherited from interface com.baomidou.mybatisplus.extension.service.IService

    removeBatchByIds, saveBatch, saveOrUpdateBatch, updateBatchById
  • Constructor Details

    • ModelBizImpl

      public ModelBizImpl()
  • Method Details

    • getEntityByModelCode

      public ModelEntity getEntityByModelCode(net.mingsoft.base.constant.e.BaseEnum modelCode)
      Description copied from interface: IModelBiz
      根据模块编号查询模块实体
      Specified by:
      getEntityByModelCode in interface IModelBiz
      Parameters:
      modelCode - 模块编号
      Returns:
      返回模块实体
    • getEntityByModelCode

      public ModelEntity getEntityByModelCode(String modelCode)
      Description copied from interface: IModelBiz
      根据模块编号查询模块实体
      Specified by:
      getEntityByModelCode in interface IModelBiz
      Parameters:
      modelCode - 模块编号
      Returns:
      返回模块实体
    • getModelDao

      public IModelDao getModelDao()
      获取模块持久化层
      Returns:
      modelDao 返回模块持久化层
    • setModelDao

      @Autowired public void setModelDao(IModelDao modelDao)
    • getDao

      protected net.mingsoft.base.dao.IBaseDao getDao()
      Specified by:
      getDao in class net.mingsoft.base.biz.impl.BaseBizImpl<IModelDao,ModelEntity>
    • getModel

      public ModelEntity getModel(String modelType, int modelId)
      Description copied from interface: IModelBiz
      根据模块id获取当前项目中的分类模块id,规则根据modelcode定。**99******,只用是第3位与第4位99
      Specified by:
      getModel in interface IModelBiz
      Parameters:
      modelType - 模块类型 
      modelId - 模块ID
      Returns:
      返回模块实体
    • queryModelByRoleId

      public List<ModelEntity> queryModelByRoleId(int roleId)
      Description copied from interface: IModelBiz
      根据角色ID查询模块集合
      Specified by:
      queryModelByRoleId in interface IModelBiz
      Parameters:
      roleId - 角色ID
      Returns:
      返回模块集合
    • reModel

      @Deprecated @Transactional(rollbackFor={java.lang.Exception.class,java.lang.Error.class}) public void reModel(ModelEntity modelParent, String parentIds, int mangerRoleId, List<RoleModelEntity> roleModels, Integer parentId)
      Deprecated.
      Description copied from interface: IModelBiz
      菜单新增递归方法
      Specified by:
      reModel in interface IModelBiz
      Parameters:
      modelParent - 菜单实体
      parentIds - 父级ids
      mangerRoleId - 管理员id
      roleModels - 角色mode数组
      parentId - 父级id
    • jsonToModel

      @Deprecated @Transactional(rollbackFor=java.lang.Exception.class) public void jsonToModel(String menuStr, int mangerRoleId, int modelId)
      Deprecated.
      Description copied from interface: IModelBiz
      字符串转菜单
      Specified by:
      jsonToModel in interface IModelBiz
      Parameters:
      menuStr - 菜单json
      mangerRoleId - 当前管理员的角色id
      modelId - 父级菜单编号,用于导入子菜单设置父级菜单编号
    • importModel

      @Transactional(rollbackFor={java.lang.Exception.class,java.lang.Error.class}) public void importModel(ModelEntity modelEntity, int mangerRoleId, String parentIds, Integer modelId)
      Description copied from interface: IModelBiz
      导入菜单
      Specified by:
      importModel in interface IModelBiz
      Parameters:
      modelEntity - 菜单实体
      mangerRoleId - 当前管理员的角色id
      parentIds - 父级菜单编号集
      modelId - 父级菜单编号,用于导入子菜单设置父级菜单编号
    • updateEntity

      public void updateEntity(ModelEntity model)
      Description copied from interface: IModelBiz
      修改
      Specified by:
      updateEntity in interface IModelBiz
    • saveEntity

      public void saveEntity(ModelEntity model)
      Description copied from interface: IModelBiz
      保存
      Specified by:
      saveEntity in interface IModelBiz
    • queryChildList

      public List<ModelEntity> queryChildList(ModelEntity modelEntity)
      Description copied from interface: IModelBiz
      此方法不动,怕影响其他地方使用 查询当前菜单下的一级菜单
      Specified by:
      queryChildList in interface IModelBiz
      Returns:
    • queryAllChildList

      public List<ModelEntity> queryAllChildList(ModelEntity modelEntity)
      Description copied from interface: IModelBiz
      查询当前菜单所有的子集菜单和权限集合
      Specified by:
      queryAllChildList in interface IModelBiz
      Returns:
      菜单集合
    • saveModel

      @Transactional(rollbackFor={java.lang.Exception.class,java.lang.Error.class}) public void saveModel(ModelEntity model)
      Description copied from interface: IModelBiz
      保存菜单,并且为角色添加该新增菜单的权限(super不会给绑定的角色添加新增菜单的权限)
      Specified by:
      saveModel in interface IModelBiz
    • delete

      public void delete(int[] ids)
      Description copied from interface: IModelBiz
      根据菜单编号删除菜单
      Specified by:
      delete in interface net.mingsoft.base.biz.IBaseBiz<ModelEntity>
      Specified by:
      delete in interface IModelBiz
      Overrides:
      delete in class net.mingsoft.base.biz.impl.BaseBizImpl<IModelDao,ModelEntity>
      Parameters:
      ids - 菜单编号集合