|
@@ -98,58 +98,6 @@ public class GoodsServiceImpl implements GoodsService {
|
|
|
return goodsDao.queryTotalCustom(brandId, isDelete , sidx, order ,offset,limit);
|
|
|
}
|
|
|
|
|
|
-// @Override
|
|
|
-// @Transactional
|
|
|
-// public int save(GoodsEntity goods) {
|
|
|
-// SysUserEntity user = ShiroUtils.getUserEntity();
|
|
|
-// Map<String, Object> map = new HashMap<>();
|
|
|
-// map.put("name", goods.getName());
|
|
|
-// List<GoodsEntity> list = queryList(map);
|
|
|
-// if (null != list && list.size() != 0) {
|
|
|
-// throw new RRException("商品名称已存在!");
|
|
|
-// }
|
|
|
-// Integer id = goodsDao.queryMaxId() + 1;
|
|
|
-// goods.setId(id);
|
|
|
-//
|
|
|
-// //保存产品信息
|
|
|
-// ProductEntity productEntity = new ProductEntity();
|
|
|
-// productEntity.setGoodsId(id);
|
|
|
-// productEntity.setGoodsSn(goods.getGoodsSn());
|
|
|
-// productEntity.setGoodsNumber(goods.getGoodsNumber());
|
|
|
-// productEntity.setRetailPrice(goods.getRetailPrice());
|
|
|
-// productEntity.setMarketPrice(goods.getMarketPrice());
|
|
|
-// productEntity.setGoodsSpecificationIds("");
|
|
|
-// productDao.save(productEntity);
|
|
|
-//
|
|
|
-// goods.setAddTime(new Date());
|
|
|
-// goods.setPrimaryProductId(productEntity.getId());
|
|
|
-//
|
|
|
-// //保存商品详情页面显示的属性
|
|
|
-// List<GoodsAttributeEntity> attributeEntityList = goods.getAttributeEntityList();
|
|
|
-// if (null != attributeEntityList && attributeEntityList.size() > 0) {
|
|
|
-// for (GoodsAttributeEntity item : attributeEntityList) {
|
|
|
-// item.setGoodsId(id);
|
|
|
-// goodsAttributeDao.save(item);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// //商品轮播图
|
|
|
-// List<GoodsGalleryEntity> galleryEntityList = goods.getGoodsImgList();
|
|
|
-// if (null != galleryEntityList && galleryEntityList.size() > 0) {
|
|
|
-// for (GoodsGalleryEntity galleryEntity : galleryEntityList) {
|
|
|
-// galleryEntity.setGoodsId(id);
|
|
|
-// goodsGalleryDao.save(galleryEntity);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//
|
|
|
-// goods.setIsDelete(0);
|
|
|
-// goods.setCreateUserDeptId(user.getDeptId());
|
|
|
-// goods.setCreateUserId(user.getUserId());
|
|
|
-// goods.setUpdateUserId(user.getUserId());
|
|
|
-// goods.setUpdateTime(new Date());
|
|
|
-// return goodsDao.save(goods);
|
|
|
-// }
|
|
|
-
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public int save(GoodsEntity goods) {
|