@Override @Transactional( readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) public String saveWorship(Criteria example) { Worship worship = (Worship) example.get("worship"); int result = 0; if (worship.getId() == null) { result = worshipsMapper.insert(worship); } else { result = worshipsMapper.updateByPrimaryKey(worship); } return result > 0 ? "01" : "00"; }
@Override @Transactional( readOnly = false, propagation = Propagation.REQUIRED, rollbackFor = {Exception.class}) public String delete(Criteria example) { Integer id = example.getAsInteger("id"); int result = worshipsMapper.deleteByPrimaryKey(id); return result > 0 ? "01" : "00"; }
@Override public List<Worship> selectByExample(Criteria example) { return worshipsMapper.selectByExample(example); }
@Override public int countByExample(Criteria example) { return worshipsMapper.countByExample(example); }