###mybatis 事务注解 必须加在 service层Impl方法上才有效。加在controller方法上无效。已测试。

mybatis 事务注解(spring包的,不是javax包的) 必须加在 service层Impl方法上才有效。加在controller方法上无效。已测试。

  

    @Override
    @Transactional //#####事务加在Slot  Controller不生效。已测试。【必须加在service层。】
    public int updateByPrimaryKeySelective(AdslotDO record) {
        //==========》add service方法。修改广告位同时,把广告位新的dealID同步到 流量配置 表。
        ruleService.updateAdSlotIdsBySlot(record);//service层业务逻辑。
        return ccAdslotMapper.updateByPrimaryKeySelective(record);
    }







猜你喜欢

转载自blog.csdn.net/qq_20597149/article/details/80984246
今日推荐