美文网首页
TTMS接口文档

TTMS接口文档

作者: ZhongQw | 来源:发表于2018-07-15 13:44 被阅读10次

    用户

    1)用户注册:

    url : 'http://localhost:8080/users/reg',
    methods : post,
    params : {
        username : '',
        password : '',
        type : 0\1       //0 售票员  1 管理员  2 普通用户
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '返回的结果 注册成功或失败原因'
    }
    

    2)用户登录:

    url : 'http://localhost:8080/users/log',
    methods : post,
    params : {
        username : '',
        password : ''
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '登录成功返回的数据,登录失败的原因'
    }
    

    3)修改密码:

    url:'http://localhost:8080/plays/chpass',
    methods :post,
    params : {
        id : '',        //用户Id
        oldVal : '',    //旧密码
        newVal : ''     //新密码
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '修改成功或者修改失败的原因'
    }
    

    剧目管理:

    1)添加剧目:

    url:'http://localhost:8080/plays/add',
    methods : get,
    params : {
        playinfo : {
            type : int,             //剧目类型 
            lang : int,             //语言
            name : string,          //剧目名称
            intoduction : string,   //公司
            image : string,          //图片路径
            time : int,             //时间
            price : decimal,        //价钱
            status : int            //状态 
            
        }
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '添加成功或者添加失败的原因'
    }
    

    type : { 0 : 动作片, 1 : 喜剧片 , 2 : 恐怖片, 3 : 家庭片}

    lang : { 0 : 国语 , 1 : 粤语, 2 : 英语, 3 : 韩语, 4 : 日语}

    status : { 0:待安排演出 , 1:已安排演出, 2:下线}

    2)删除剧目:

    url:'http://localhost:8080/plays/del',
    methods : get,
    params : {
        id : '剧目id'       
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '删除成功或者删除失败的原因'
    }
    

    3)修改剧目:

    url:'http://localhost:8080/plays/upd',
    methods : get,
    params : {
        //未定
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '修改成功或者修改失败的原因'
    }
    

    4)按照id或者名称剧目:

    url:'http://localhost:8080/plays/search',
    methods : get,
    params : {
        id : '剧目id' ,        //用于准确查询
        name : '剧目名称'       //用于按名称查询
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者查询失败的原因'
    }
    
    1. 获取上线、下线、待上线剧目:
    url:'http://localhost:8080/plays/get',
    methods : get,
    params : {
        status : 0||1||2
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者失败的原因'
    }
    

    status : { 0:待安排演出 , 1:已安排演出, -1:下线}

    演出厅:

    1. 添加演出厅
    url:'http://localhost:8080/studio/add',
    methods : get,
    params : {
        
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者失败的原因'
    }
    

    2)获取全部演出厅信息

    url:'http://localhost:8080/studio/all',
    methods : get,
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者失败的原因'
    }
    

    演出计划

    1)添加演出计划

    url:'http://localhost:8080/shedule/add',
    methods : get,
    data : {
      studio_id : '演出厅ID',
      play_id :'剧目ID',
      sched_time :'计划开始时间',
      sched_ticket_price :'价钱',
      length : '剧目时长'
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功:返回‘演出计划添加成功’;失败:返回‘时间冲突,建议调整时间至20XX-XX-XX XX:XX:XX’'
    }
    

    2)查询所有演出计划

    url:'http://localhost:8080/schedule/all',
    methods : get,
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功返回数据,失败返回失败原因'
        'count' : ''  //成功返回演出厅个数,失败不返回
        'studios' : '' 成功返回演出厅id数组,失败不返回
    }
    

    result 详:

    sched_id【演出计划id】, 
    studio_id【演出厅id】,
    studio_name【演出厅名称】, 
    play_id【剧目id】,
    play_name【剧目名称】,
    sched_time【计划开始时间】,
    sched_ticket_price【计划票价】,
    play_length【剧目时长】
    

    用户

    1)用户注册:

    url : 'http://localhost:8080/users/reg',
    methods : post,
    params : {
        username : '',
        password : '',
        type : 0\1       //0 售票员  1 管理员  2 经理
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '返回的结果 注册成功或失败原因'
    }
    

    2)用户登录:

    url : 'http://localhost:8080/users/log',
    methods : post,
    params : {
        username : '',
        password : ''
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '登录成功返回的数据,登录失败的原因'
    }
    

    3)修改密码:

    url:'http://localhost:8080/plays/chpass',
    methods :post,
    params : {
        id : '',        //用户Id
        oldVal : '',    //旧密码
        newVal : ''     //新密码
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '修改成功或者修改失败的原因'
    }
    

    剧目管理:

    1)添加剧目:

    url:'http://localhost:8080/plays/add',
    methods : get,
    params : {
        playinfo : {
            type : int,             //剧目类型 
            lang : int,             //语言
            name : string,          //剧目名称
            intoduction : string,   //公司
            image : string,          //图片路径
            time : int,             //时间
            price : decimal,        //价钱
            status : int            //状态 
            
        }
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '添加成功或者添加失败的原因'
    }
    

    type : { 0 : 动作片, 1 : 喜剧片 , 2 : 恐怖片, 3 : 家庭片}

    lang : { 0 : 国语 , 1 : 粤语, 2 : 英语, 3 : 韩语, 4 : 日语}

    status : { 0:待安排演出 , 1:已安排演出, 2:下线}

    2)删除剧目:

    url:'http://localhost:8080/plays/del',
    methods : get,
    params : {
        id : '剧目id'       
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '删除成功或者删除失败的原因'
    }
    

    3)修改剧目:

    url:'http://localhost:8080/plays/upd',
    methods : get,
    params : {
        info : {
            play_id : 剧目id,
            play_type_id : 剧目类型id,
            play_lang_id : 剧目语言id,
            play_name : 剧目名称,
            play_introduction : 剧目描述,
            play_image : 图片路径,
            play_length : 时长,
            play_ticket_price : 剧目票价
        }
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '修改成功或者修改失败的原因'
    }
    

    4)按照id或者名称查找剧目:

    url:'http://localhost:8080/plays/search',
    methods : get,
    params : {
        id : '剧目id' ,        //用于准确查询
        name : '剧目名称'       //用于按名称查询
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者查询失败的原因'
    }
    
    1. 获取所有剧目:
    url:'http://localhost:8080/plays/get',
    methods : get,
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者失败的原因'
    }
    

    status : { 0:待安排演出 , 1:已安排演出, 2:下线}

    6)获取状态剧目

    url:'http://localhost:8080/plays/type',
    methods : get,
    data:{
        type:0||1 
    }
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者失败的原因'
    }
    

    演出厅:

    1. 添加演出厅
    url:'http://localhost:8080/studio/add',
    methods : get,
    params : {
        
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者失败的原因'
    }
    

    2)获取全部演出厅信息

    url:'http://localhost:8080/studio/all',
    methods : get,
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功,返回相应数据或者失败的原因'
    }
    

    演出计划

    1)添加演出计划

    url:'http://localhost:8080/shedule/add',
    methods : get,
    data : {
      studio_id : '演出厅ID',
      play_id :'剧目ID',
      sched_time :'计划开始时间',
      sched_ticket_price :'价钱'
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功:返回‘演出计划添加成功’;失败:返回‘时间冲突,建议调整时间至20XX-XX-XX XX:XX:XX’'
    }
    

    2)查询所有演出计划

    url:'http://localhost:8080/schedule/all',
    methods : get,
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功返回数据,失败返回失败原因'
        'count' : ''  //成功返回演出厅个数,失败不返回
        'studios' : '' 成功返回演出厅数组,失败不返回
    }
    

    result 详:

    sched_id【演出计划id】,

    studio_id【演出厅id】,

    studio_name【演出厅名称】,

    play_id【剧目id】,

    play_name【剧目名称】,

    sched_time【计划开始时间】,

    sched_ticket_price【计划票价】,

    play_length【剧目时长】,

    play_image【剧目图片】

    3)修改演出计划

    url:'http://localhost:8080/schedule/upd',
    methods : get,
    params : {
        sched_id : 演出计划id,
        info : {
            studio_id : 修改后演出厅id,
            play_id : 修改后剧目的id,
            sched_time :修改后演出的时间(格式:xxxx-xx-xx xx:xx:xx),
            sched_ticket_price : 修改票的价格
        }
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功或者失败'
    }
    

    4)删除演出计划

    url:'http://localhost:8080/schedule/del',
    methods : get,
    params : {
        sched_id : 演出计划id
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功或者失败'
    }
    

    1)获取票(座位)信息

    url:'http://localhost:8080/tickets/sched',
    methods : get,
    data:{
        sched_id: 计划id
    },
    response : {
        'error' : true||false,      //是否出错
        'result' : '成功返回数据,失败返回失败原因'
    }
    

    相关文章

      网友评论

          本文标题:TTMS接口文档

          本文链接:https://www.haomeiwen.com/subject/ngcajftx.html