| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.yeshi.fanli.util.goods.douyin.vo.DYGoodsDetail; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.yeshi.fanli.dao.mybatis.goods.ScanHistoryV2Mapper; |
| | |
| | | addScanHistory(commonGoods, device, uid); |
| | | } |
| | | |
| | | @Override |
| | | public void addDYScanHistory(Long uid, String device, DYGoodsDetail dyGoods) throws CommonGoodsException, ScanHistoryException { |
| | | if (uid == null && StringUtil.isNullOrEmpty(device)) |
| | | throw new ScanHistoryException(1, "设备或用户信息缺失"); |
| | | CommonGoods commonGoods = CommonGoodsFactory.create(dyGoods); |
| | | addScanHistory(commonGoods, device, uid); |
| | | } |
| | | |
| | | private void addScanHistory(CommonGoods commonGoods, String device, Long uid) |
| | | throws CommonGoodsException, ScanHistoryException { |
| | | commonGoods = commonGoodsService.addOrUpdateCommonGoods(commonGoods); |