| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void switchState(Long id) throws SpecialLabelException {
|
| | | if (id == null) {
|
| | | throw new SpecialLabelException(1, "请传递正确参数");
|
| | | }
|
| | | |
| | | SpecialLabel resultObj = specialLabelMapper.selectByPrimaryKey(id);
|
| | | if (resultObj == null) {
|
| | | throw new SpecialLabelException(1, "此内容已不存在");
|
| | | }
|
| | | |
| | | Integer state = resultObj.getState();
|
| | | if (state == null || state == 0) {
|
| | | state = 1;
|
| | | } else {
|
| | | state = 0;
|
| | | }
|
| | | |
| | | SpecialLabel updateObj = new SpecialLabel();
|
| | | updateObj.setId(id);
|
| | | updateObj.setState(state);
|
| | | specialLabelMapper.updateByPrimaryKeySelective(updateObj);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | public int deleteByPrimaryKeyBatch(List<Long> list){
|