Java Code Examples for com.macro.mall.model.UmsMemberReceiveAddress#setId()
The following examples show how to use
com.macro.mall.model.UmsMemberReceiveAddress#setId() .
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 |
@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 mall-swarm with Apache License 2.0 | 5 votes |
@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 3
Source File: UmsMemberReceiveAddressServiceImpl.java From macrozheng with Apache License 2.0 | 5 votes |
@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 4
Source File: UmsMemberReceiveAddressServiceImpl.java From macrozheng-mall with MIT License | 5 votes |
@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); }