fix: #341
This commit is contained in:
@@ -39,10 +39,8 @@ public class LitemallAddressService {
|
||||
return addressMapper.updateByPrimaryKeySelective(address);
|
||||
}
|
||||
|
||||
public void delete(Integer userId, Integer id) {
|
||||
LitemallAddressExample example = new LitemallAddressExample();
|
||||
example.or().andUserIdEqualTo(userId).andIdEqualTo(id).andDeletedEqualTo(false);
|
||||
addressMapper.logicalDeleteByExample(example);
|
||||
public void delete(Integer id) {
|
||||
addressMapper.logicalDeleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public LitemallAddress findDefault(Integer userId) {
|
||||
|
||||
@@ -23,6 +23,12 @@ public class LitemallAftersaleService {
|
||||
return aftersaleMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public LitemallAftersale findById(Integer userId, Integer id) {
|
||||
LitemallAftersaleExample example = new LitemallAftersaleExample();
|
||||
example.or().andIdEqualTo(id).andUserIdEqualTo(userId).andDeletedEqualTo(false);
|
||||
return aftersaleMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
public List<LitemallAftersale> queryList(Integer userId, Short status, Integer page, Integer limit, String sort, String order) {
|
||||
LitemallAftersaleExample example = new LitemallAftersaleExample();
|
||||
LitemallAftersaleExample.Criteria criteria = example.or();
|
||||
|
||||
@@ -57,6 +57,12 @@ public class LitemallCartService {
|
||||
return cartMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public LitemallCart findById(Integer userId, Integer id) {
|
||||
LitemallCartExample example = new LitemallCartExample();
|
||||
example.or().andUserIdEqualTo(userId).andIdEqualTo(id).andDeletedEqualTo(false);
|
||||
return cartMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
public int updateCheck(Integer userId, List<Integer> idsList, Boolean checked) {
|
||||
LitemallCartExample example = new LitemallCartExample();
|
||||
example.or().andUserIdEqualTo(userId).andProductIdIn(idsList).andDeletedEqualTo(false);
|
||||
|
||||
@@ -28,6 +28,12 @@ public class LitemallFootprintService {
|
||||
return footprintMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public LitemallFootprint findById(Integer userId, Integer id) {
|
||||
LitemallFootprintExample example = new LitemallFootprintExample();
|
||||
example.or().andIdEqualTo(id).andUserIdEqualTo(userId).andDeletedEqualTo(false);
|
||||
return footprintMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
public void deleteById(Integer id) {
|
||||
footprintMapper.logicalDeleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@@ -80,6 +80,19 @@ public class LitemallGrouponService {
|
||||
return mapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据ID查询记录
|
||||
*
|
||||
* @param userId
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
public LitemallGroupon queryById(Integer userId, Integer id) {
|
||||
LitemallGrouponExample example = new LitemallGrouponExample();
|
||||
example.or().andIdEqualTo(id).andUserIdEqualTo(id).andDeletedEqualTo(false);
|
||||
return mapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回某个发起的团购参与人数
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user