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);
}