def get_authors(self, proj_id, model_id): q = ( db.session.query(GroupModel). filter( # GroupModel.proj_id == proj_id, TODO@hcz:暂时没有 GroupModel.model_id == model_id).order_by(GroupModel.gid)) from app.ctrl.ctrl_group import CtrlGroup group = CtrlGroup() group_members = [] for group_model in q: group_members += group.get_group_members(group_model.group_id) return group_members
def get(self, group_id=None): """ 获取组成员信息 :param group_id: :return: """ result = {"result": "NG"} ctrl_obj = CtrlGroup() content = ctrl_obj.get_group_members(group_id) if content: result["result"] = "OK" result["content"] = content return result