|
@@ -2,6 +2,8 @@ package com.huijy.management.service.impl;
|
|
|
|
|
|
import java.util.List;
|
|
|
import com.huijy.common.utils.DateUtils;
|
|
|
+import com.huijy.management.domain.ShopGuestRecord;
|
|
|
+import com.huijy.management.service.IShopGuestRecordService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import com.huijy.management.mapper.ShopSalesRecordMapper;
|
|
@@ -20,6 +22,8 @@ public class ShopSalesRecordServiceImpl implements IShopSalesRecordService
|
|
|
@Autowired
|
|
|
private ShopSalesRecordMapper shopSalesRecordMapper;
|
|
|
|
|
|
+ private IShopGuestRecordService shopGuestRecordService;
|
|
|
+
|
|
|
/**
|
|
|
* 查询店铺销售记录
|
|
|
*
|
|
@@ -54,7 +58,15 @@ public class ShopSalesRecordServiceImpl implements IShopSalesRecordService
|
|
|
public int insertShopSalesRecord(ShopSalesRecord shopSalesRecord)
|
|
|
{
|
|
|
shopSalesRecord.setCreateTime(DateUtils.getNowDate());
|
|
|
- return shopSalesRecordMapper.insertShopSalesRecord(shopSalesRecord);
|
|
|
+ Integer row = shopSalesRecordMapper.insertShopSalesRecord(shopSalesRecord);
|
|
|
+ if (shopSalesRecord.getShopGuestRecordList()!=null && shopSalesRecord.getShopGuestRecordList().size()>0){
|
|
|
+ for (ShopGuestRecord item:shopSalesRecord.getShopGuestRecordList()){
|
|
|
+ item.setShopId(shopSalesRecord.getShopId());
|
|
|
+ item.setCreateTime(shopSalesRecord.getCreateTime());
|
|
|
+ shopGuestRecordService.insertShopGuestRecord(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return row;
|
|
|
}
|
|
|
|
|
|
/**
|