com.macro.mall.model.UmsMemberReceiveAddressExample Java Examples

The following examples show how to use com.macro.mall.model.UmsMemberReceiveAddressExample. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall with Apache License 2.0 6 votes vote down vote up
@Override
public int update(Long id, UmsMemberReceiveAddress address) {
    address.setId(null);
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    if(address.getDefaultStatus()==1){
        //先将原来的默认地址去除
        UmsMemberReceiveAddress record= new UmsMemberReceiveAddress();
        record.setDefaultStatus(0);
        UmsMemberReceiveAddressExample updateExample = new UmsMemberReceiveAddressExample();
        updateExample.createCriteria()
                .andMemberIdEqualTo(currentMember.getId())
                .andDefaultStatusEqualTo(1);
        addressMapper.updateByExampleSelective(record,updateExample);
    }
    return addressMapper.updateByExampleSelective(address,example);
}
 
Example #2
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public UmsMemberReceiveAddress getItem(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    List<UmsMemberReceiveAddress> addressList = addressMapper.selectByExample(example);
    if(!CollectionUtils.isEmpty(addressList)){
        return addressList.get(0);
    }
    return null;
}
 
Example #3
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public int delete(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    return addressMapper.deleteByExample(example);
}
 
Example #4
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public List<UmsMemberReceiveAddress> list() {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId());
    return addressMapper.selectByExample(example);
}
 
Example #5
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall with Apache License 2.0 5 votes vote down vote up
@Override
public UmsMemberReceiveAddress getItem(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    List<UmsMemberReceiveAddress> addressList = addressMapper.selectByExample(example);
    if(!CollectionUtils.isEmpty(addressList)){
        return addressList.get(0);
    }
    return null;
}
 
Example #6
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public UmsMemberReceiveAddress getItem(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    List<UmsMemberReceiveAddress> addressList = addressMapper.selectByExample(example);
    if(!CollectionUtils.isEmpty(addressList)){
        return addressList.get(0);
    }
    return null;
}
 
Example #7
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public List<UmsMemberReceiveAddress> list() {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId());
    return addressMapper.selectByExample(example);
}
 
Example #8
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public int update(Long id, UmsMemberReceiveAddress address) {
    address.setId(null);
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    return addressMapper.updateByExampleSelective(address,example);
}
 
Example #9
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng with Apache License 2.0 5 votes vote down vote up
@Override
public int delete(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    return addressMapper.deleteByExample(example);
}
 
Example #10
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public UmsMemberReceiveAddress getItem(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    List<UmsMemberReceiveAddress> addressList = addressMapper.selectByExample(example);
    if(!CollectionUtils.isEmpty(addressList)){
        return addressList.get(0);
    }
    return null;
}
 
Example #11
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public List<UmsMemberReceiveAddress> list() {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId());
    return addressMapper.selectByExample(example);
}
 
Example #12
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public int update(Long id, UmsMemberReceiveAddress address) {
    address.setId(null);
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    return addressMapper.updateByExampleSelective(address,example);
}
 
Example #13
Source File: UmsMemberReceiveAddressServiceImpl.java    From mall-swarm with Apache License 2.0 5 votes vote down vote up
@Override
public int delete(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    return addressMapper.deleteByExample(example);
}
 
Example #14
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public int delete(Long id) {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    return addressMapper.deleteByExample(example);
}
 
Example #15
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public int update(Long id, UmsMemberReceiveAddress address) {
    address.setId(null);
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId()).andIdEqualTo(id);
    return addressMapper.updateByExampleSelective(address,example);
}
 
Example #16
Source File: UmsMemberReceiveAddressServiceImpl.java    From macrozheng-mall with MIT License 5 votes vote down vote up
@Override
public List<UmsMemberReceiveAddress> list() {
    UmsMember currentMember = memberService.getCurrentMember();
    UmsMemberReceiveAddressExample example = new UmsMemberReceiveAddressExample();
    example.createCriteria().andMemberIdEqualTo(currentMember.getId());
    return addressMapper.selectByExample(example);
}
 
Example #17
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int updateByExample(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); 
Example #18
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int updateByExampleSelective(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); 
Example #19
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng-mall with MIT License votes vote down vote up
List<UmsMemberReceiveAddress> selectByExample(UmsMemberReceiveAddressExample example); 
Example #20
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int deleteByExample(UmsMemberReceiveAddressExample example); 
Example #21
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng-mall with MIT License votes vote down vote up
int countByExample(UmsMemberReceiveAddressExample example); 
Example #22
Source File: UmsMemberReceiveAddressMapper.java    From mall with Apache License 2.0 votes vote down vote up
long countByExample(UmsMemberReceiveAddressExample example); 
Example #23
Source File: UmsMemberReceiveAddressMapper.java    From mall with Apache License 2.0 votes vote down vote up
int updateByExample(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); 
Example #24
Source File: UmsMemberReceiveAddressMapper.java    From mall with Apache License 2.0 votes vote down vote up
int updateByExampleSelective(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); 
Example #25
Source File: UmsMemberReceiveAddressMapper.java    From mall with Apache License 2.0 votes vote down vote up
List<UmsMemberReceiveAddress> selectByExample(UmsMemberReceiveAddressExample example); 
Example #26
Source File: UmsMemberReceiveAddressMapper.java    From mall with Apache License 2.0 votes vote down vote up
int deleteByExample(UmsMemberReceiveAddressExample example); 
Example #27
Source File: UmsMemberReceiveAddressMapper.java    From mall-swarm with Apache License 2.0 votes vote down vote up
long countByExample(UmsMemberReceiveAddressExample example); 
Example #28
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng with Apache License 2.0 votes vote down vote up
int updateByExample(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); 
Example #29
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng with Apache License 2.0 votes vote down vote up
int updateByExampleSelective(@Param("record") UmsMemberReceiveAddress record, @Param("example") UmsMemberReceiveAddressExample example); 
Example #30
Source File: UmsMemberReceiveAddressMapper.java    From macrozheng with Apache License 2.0 votes vote down vote up
List<UmsMemberReceiveAddress> selectByExample(UmsMemberReceiveAddressExample example);