| | |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | @Override
|
| | | public void switchState(Long id) throws BanLiShopGoodsSetException {
|
| | | if (id == null) {
|
| | | throw new BanLiShopGoodsSetException(1, "请传递正确参数");
|
| | | }
|
| | | BanLiShopGoodsSets resultObj = banLiShopGoodsSetsMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new BanLiShopGoodsSetException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | BanLiShopGoodsSets updateObj = new BanLiShopGoodsSets();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | banLiShopGoodsSetsMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | | @Override
|
| | | public void updateSelectiveByPrimaryKey(BanLiShopGoodsSets set) {
|
| | | if (set.getId() == null)
|