|
|
@@ -204,12 +204,12 @@ public class DictService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 是否启用
|
|
|
+ * 是否启用 key
|
|
|
*
|
|
|
* @param id
|
|
|
* @return
|
|
|
* */
|
|
|
- public ResponseDTO<String> updateStatus(long id){
|
|
|
+ public ResponseDTO<String> keyUpdateStatus(long id){
|
|
|
DictKeyEntity dictKeyEntity = dictKeyDao.selectById(id);
|
|
|
if (dictKeyEntity == null) {
|
|
|
return ResponseDTO.error(UserErrorCode.ALREADY_EXIST);
|
|
|
@@ -225,5 +225,27 @@ public class DictService {
|
|
|
return ResponseDTO.ok();
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 是否启用 value
|
|
|
+ *
|
|
|
+ * @param id
|
|
|
+ * @return
|
|
|
+ * */
|
|
|
+ public ResponseDTO<String> valueUpdateStatus(long id){
|
|
|
+ DictValueEntity dictValueEntity = dictValueDao.selectById(id);
|
|
|
+ if (dictValueEntity == null) {
|
|
|
+ return ResponseDTO.error(UserErrorCode.ALREADY_EXIST);
|
|
|
+ }
|
|
|
+
|
|
|
+ if(dictValueEntity.getStatus() == 0){
|
|
|
+ dictValueEntity.setStatus(1);
|
|
|
+ }else {
|
|
|
+ dictValueEntity.setStatus(0);
|
|
|
+ }
|
|
|
+
|
|
|
+ dictValueDao.updateById(dictValueEntity);
|
|
|
+ return ResponseDTO.ok();
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|