|
|
|
@@ -84,9 +84,10 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
@Override |
|
|
|
public void saveOrUpdate(WxMerchant wxMerchant) { |
|
|
|
|
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
long merchantid = idWorker.nextId(); |
|
|
|
if (wxMerchant.getId() == null) { |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
long merchantid = idWorker.nextId(); |
|
|
|
|
|
|
|
wxMerchant.setId(merchantid); |
|
|
|
Date date = new Date(); |
|
|
|
wxMerchant.setStatus(1); |
|
|
|
@@ -138,7 +139,6 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
WxShopMapper.updateByPrimaryKeySelective(wxShop); |
|
|
|
} |
|
|
|
|
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
//保存商户商铺的关联 |
|
|
|
List<Long> shopidlist = wxMerchant.getShopids(); |
|
|
|
for(Long shopid:shopidlist){ |
|
|
|
@@ -171,11 +171,11 @@ public class WxMerchantServiceImpl implements WxMerchantService { |
|
|
|
} |
|
|
|
|
|
|
|
//保存商户关联用户 |
|
|
|
final IdWorker idWorker = IdWorker.get(); |
|
|
|
for(WxMerchantBUser user:bUsers){ |
|
|
|
long id = idWorker.nextId(); |
|
|
|
user.setId(id); |
|
|
|
user.setBUserId(id); |
|
|
|
user.setMerchantId(merchantid); |
|
|
|
Date date = new Date(); |
|
|
|
user.setCreateDate(date); |
|
|
|
user.setUpdateDate(date); |
|
|
|
|