| | |
| | | banLiShopGoodsSetPayService.deleteByPrimaryKey(pay.getId());
|
| | | }
|
| | | }
|
| | | |
| | | |
| | |
|
| | | @Override
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key) {
|
| | | return banLiShopGoodsSetsMapper.listQuery((page - 1) * pageSize, pageSize, key);
|
| | | public List<BanLiShopGoodsSets> listQuery(int page, int pageSize, String key, Long goodsId) {
|
| | | return banLiShopGoodsSetsMapper.listQuery((page - 1) * pageSize, pageSize, key, goodsId);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public long countQuery(String key) {
|
| | | return banLiShopGoodsSetsMapper.countQuery(key);
|
| | | public long countQuery(String key, Long goodsId) {
|
| | | return banLiShopGoodsSetsMapper.countQuery(key, goodsId);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void addSalesCount(Long id, int count) {
|
| | | BanLiShopGoodsSets set = banLiShopGoodsSetsMapper.selectByPrimaryKey(id);
|
| | | BanLiShopGoodsSets update = new BanLiShopGoodsSets();
|
| | | update.setId(set.getId());
|
| | | update.setSalesCount(set.getSalesCount() + count);
|
| | | update.setStock(set.getStock() - count);
|
| | | banLiShopGoodsSetsMapper.updateByPrimaryKeySelective(update); |
| | | }
|
| | |
|
| | | }
|