|
@@ -31,10 +31,7 @@ import org.hswebframework.web.entity.organizational.PersonEntity;
|
|
import org.hswebframework.web.logging.AccessLogger;
|
|
import org.hswebframework.web.logging.AccessLogger;
|
|
import org.hswebframework.web.service.organizational.OrganizationalService;
|
|
import org.hswebframework.web.service.organizational.OrganizationalService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
-import org.springframework.web.bind.annotation.PatchMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.List;
|
|
import java.util.List;
|
|
|
|
|
|
@@ -69,4 +66,20 @@ public class OrganizationalController implements SimpleGenericEntityController<O
|
|
organizationalService.updateBatch(batch);
|
|
organizationalService.updateBatch(batch);
|
|
return ResponseMessage.ok();
|
|
return ResponseMessage.ok();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PutMapping("/{id}/disable")
|
|
|
|
+ @Authorize(action = Permission.ACTION_DISABLE)
|
|
|
|
+ @AccessLogger("禁用机构")
|
|
|
|
+ public ResponseMessage<Boolean> disable(@PathVariable String id) {
|
|
|
|
+ organizationalService.disable(id);
|
|
|
|
+ return ResponseMessage.ok();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @PutMapping("/{id}/enable")
|
|
|
|
+ @Authorize(action = Permission.ACTION_ENABLE)
|
|
|
|
+ @AccessLogger("启用机构")
|
|
|
|
+ public ResponseMessage<Boolean> enable(@PathVariable String id) {
|
|
|
|
+ organizationalService.enable(id);
|
|
|
|
+ return ResponseMessage.ok();
|
|
|
|
+ }
|
|
}
|
|
}
|