コード例 #1
0
 @Transactional
 public void attachGoods(DmGoodsPackage goodPackage) {
   Set<DmGoods> goodsets = goodPackage.getDmGoods();
   if (!goodsets.isEmpty()) {
     dmGoodsPackageMapper.attachGoods(goodPackage);
   }
 }
コード例 #2
0
 @Transactional
 public void unattachGood(Integer packageId, Integer goodsId) {
   dmGoodsPackageMapper.unattachGood(packageId, goodsId);
 }
コード例 #3
0
 @Transactional
 public int delete(DmGoodsPackage goodPackage) {
   Integer packageId = goodPackage.getPackageId();
   dmGoodsPackageMapper.unattachGoodsByPackageId(packageId);
   return dmGoodsPackageMapper.deleteByPrimaryKey(packageId);
 }
コード例 #4
0
 @Transactional
 public int update(DmGoodsPackage goodPackage) {
   return dmGoodsPackageMapper.updateByPrimaryKeySelective(goodPackage);
 }
コード例 #5
0
 @Transactional
 public int save(DmGoodsPackage goodPackage) {
   int rows = dmGoodsPackageMapper.insert(goodPackage);
   return rows;
 }
コード例 #6
0
 public DmGoodsPackage getGoodsPackageById(DmGoodsPackage goodPackage) {
   DmGoodsPackage ret = dmGoodsPackageMapper.selectByPrimaryKey(goodPackage.getPackageId());
   return ret;
 }
コード例 #7
0
 public Page<DmGoodsPackage> queryPage(Page<DmGoodsPackage> page) {
   List<DmGoodsPackage> rows = dmGoodsPackageMapper.findAllGoodPackages(page);
   page.setRows(rows);
   return page;
 }