@Transactional public void attachGoods(DmGoodsPackage goodPackage) { Set<DmGoods> goodsets = goodPackage.getDmGoods(); if (!goodsets.isEmpty()) { dmGoodsPackageMapper.attachGoods(goodPackage); } }
@Transactional public void unattachGood(Integer packageId, Integer goodsId) { dmGoodsPackageMapper.unattachGood(packageId, goodsId); }
@Transactional public int delete(DmGoodsPackage goodPackage) { Integer packageId = goodPackage.getPackageId(); dmGoodsPackageMapper.unattachGoodsByPackageId(packageId); return dmGoodsPackageMapper.deleteByPrimaryKey(packageId); }
@Transactional public int update(DmGoodsPackage goodPackage) { return dmGoodsPackageMapper.updateByPrimaryKeySelective(goodPackage); }
@Transactional public int save(DmGoodsPackage goodPackage) { int rows = dmGoodsPackageMapper.insert(goodPackage); return rows; }
public DmGoodsPackage getGoodsPackageById(DmGoodsPackage goodPackage) { DmGoodsPackage ret = dmGoodsPackageMapper.selectByPrimaryKey(goodPackage.getPackageId()); return ret; }
public Page<DmGoodsPackage> queryPage(Page<DmGoodsPackage> page) { List<DmGoodsPackage> rows = dmGoodsPackageMapper.findAllGoodPackages(page); page.setRows(rows); return page; }