| | |
| | | package com.oying.modules.system.service.impl; |
| | | |
| | | import cn.hutool.core.util.IdUtil; |
| | | import com.oying.modules.system.domain.Merchant; |
| | | import com.oying.modules.system.domain.UserMerchant; |
| | | import com.oying.modules.system.mapper.MerchantMapper; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void create(Merchant resources) { |
| | | resources.setMerchantCode(IdUtil.getSnowflakeNextIdStr()); |
| | | merchantMapper.insert(resources); |
| | | UserMerchant userMerchant = new UserMerchant(); |
| | | userMerchant.setMerchantId(resources.getMerchantId()); |