@Transactional
 public void attachGoods(DmGoodsPackage goodPackage) {
   Set<DmGoods> goodsets = goodPackage.getDmGoods();
   if (!goodsets.isEmpty()) {
     dmGoodsPackageMapper.attachGoods(goodPackage);
   }
 }
 @Transactional
 public int delete(DmGoodsPackage goodPackage) {
   Integer packageId = goodPackage.getPackageId();
   dmGoodsPackageMapper.unattachGoodsByPackageId(packageId);
   return dmGoodsPackageMapper.deleteByPrimaryKey(packageId);
 }
 public DmGoodsPackage getGoodsPackageById(DmGoodsPackage goodPackage) {
   DmGoodsPackage ret = dmGoodsPackageMapper.selectByPrimaryKey(goodPackage.getPackageId());
   return ret;
 }