Exemplo n.º 1
0
  @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";
  }
Exemplo n.º 2
0
  @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";
  }
Exemplo n.º 3
0
 @Override
 public List<Worship> selectByExample(Criteria example) {
   return worshipsMapper.selectByExample(example);
 }
Exemplo n.º 4
0
 @Override
 public int countByExample(Criteria example) {
   return worshipsMapper.countByExample(example);
 }