CRM--permission权限管理

在CRM项目中,实现了一套完整的权限管理模块。包括复制配置文件,创建多个包如cn.wolfcode.config, cn.wolfcode.controller等,并在main路径下设置web.xml和views包。同时,定义了MyFreemarkerConfig类,PermissionMapper接口,IPermissionService接口及其实现类PermissionServiceImpl,还有PermissionMapper.xml文件和对应的PermissionController,以及视图文件permission/list.ftl。" 119948576,9512050,双线性插值法在图像缩放中的应用解析,"['图像处理', '线性代数', '双线性插值']
摘要由CSDN通过智能技术生成

(CRM项目)

复制配置文件
创建包cn.wolfcode.config
cn.wolfcode.controller
cn.wolfcode.service
cn.wolfcode.service.impl
cn.wolfcode.qo
cn.wolfcode.util
在main路径下创建webapp/WEB-INF/web.xml和views包

cn.wolfcode.config里写MyFreemarkerConfig
MyFreemarkerConfig类

public class MyFreemarkerConfig extends FreeMarkerConfigurer {
    @Override
    public void afterPropertiesSet() throws IOException, TemplateException {
        super.afterPropertiesSet();
        Configuration configuration = this.getConfiguration();
        configuration.setSharedVariable("shiro",new ShiroTags());
    }
}

PermissionMapper接口

public interface PermissionMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    List<Permission> selectAll();

    int updateByPrimaryKey(Permission record);

    int count();

    List<Permission> list(QueryObject qo);

    List<String> selectExpressionByCurrentuserId(Long id);

    List<String> selectAllExpression();
}

IPermissionService类

public interface IPermissionService {
    int deleteByPrimaryKey(Long id);

    int insert(Permission record);

    Permission selectByPrimaryKey(Long id);

    List<Permission> selectAll();

    int updateByPrimaryKey(Permission record);

    PageInfo<Permission> list(QueryObject qo);


    List<String> selectExpressionByCurrentuserId(Long id);

    List<String> selectAllExpression();
}

PermissionServiceImpl类

@Service
public class PermissionServiceImpl implements IPermissionService {

    @Autowired
    private PermissionMapper mapper;

    @Override
    public int deleteByPrimaryKey(Long id) {
        return mapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Permission record) {
        return 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值