| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.utlis.Snowflake; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | List<Long> serviceIds = convenientMerchantDTO.getServiceIds(); |
| | | serviceIds.forEach(serviceId -> { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId); |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(merchantId, serviceId, |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(),merchantId, serviceId, |
| | | convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy()); |
| | | }); |
| | | } |
| | |
| | | convenientServiceCategoryDAO.deleteMerchantServiceRelation(merchantId); |
| | | serviceIds.forEach(serviceId -> { |
| | | ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId); |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(merchantId, serviceId, |
| | | convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(),merchantId, serviceId, |
| | | convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy()); |
| | | }); |
| | | } |