在主键为bid的情况下,通过uid来删除具体数据
public int deleteById(Integer uid) {
// TODO Auto-generated method stub
Example example = new Example(Business.class);
Criteria criteria = example.createCriteria();
criteria.andEqualTo("uid", uid);
return bMapper.deleteByExample(example);
}
在主键为bid的情况下,通过uid来查找相关数据
public List<Business> findByuids(Integer uid) {
// TODO Auto-generated method stub
Example example = new Example(Business.class);
Criteria criteria = example.createCriteria();
criteria.andEqualTo("uid", uid);
return bMapper.selectByExample(example);
}
在主键为其他的情况下,通过uid来更新具体的数据
public int RefuseStates(Integer uid) {
// TODO Auto-generated method stub
Example example = new Example(Cont.class);
Example.Criteria c = example.createCriteria();
c.andEqualTo("uid",utid);
return cmapper.updateByExampleSelective(cont, example);
}