def deleteactivity(self): with db.auto_commit(): """ 活动类别删除 """ alist = ActivityType.query.filter_by(id="").all() for a in alist: a.active = 1 return "1111", 200
def deletehall(self): """ 删除展厅管理 :return: """ with db.auto_commit(): halllist = Hall.query.filter_by(id=data[id]).all() for hall in halllist: hall.active = 1 return "1111", 200
def addguest(self): with db.auto_commit(): guest = Guest() guest.id = 20 guest.title = "嘉宾管理标题" guest.activityType = "活动类" guest.publisher = "张三" guest.releaseTime = '%2018-%5-%23' guest.mkdirTime = '%2018-%5-%21' guest.modifer = "李四" guest.modifyTime = "%2018-%5-%24" guest.sort = 20 guest.top = "已置顶" guest.releaseNote = "已标识" db.session.add(guest) return "1111", 200
def AddMedia(self): """ 媒体管理,新增媒体请求处理并响应 author:wpc :return: """ with db.auto_commit(): #ms = Mediamanage('10', '样例测试', '医药', '音频', '10', 'www.baidu.com', '已置顶') ma = Mediamanage() ma.id = 10 ma.meidaName = "样例测试" ma.bussionessType = "医药" ma.mediaType = "音频" ma.sort = "10" ma.href = "www.baidu.com" ma.top = "已置顶" db.session.add(ma) return "1111", 200
def addmascot(self): """ 新增吉祥物 :return: """ with db.auto_commit(): mascot = Mascot() mascot.id = 8 mascot.title = "吉祥物" mascot.intro = "奥运福娃" mascot.releasePeople = "发布人,张三" mascot.releaseTime = '%2018-%4-%23' mascot.mkdirTime = '%2018-%4-%21' mascot.modifer = "李四" mascot.modifyTime = '%2018-%5-%22' mascot.sort = 8 mascot.top = "已置顶" mascot.releaseNote = "已标识" db.session.add(mascot) return "1111", 200
def addactivitytype(self): """ 活动类别管理 author:wpc :return: """ with db.auto_commit(): atype = ActivityType() atype.id = 24 atype.activityTitle = "活动类别管理标题" atype.activityType = "活动类别类型" atype.activityIntro = "活动简介" atype.releasePeople = "张三" atype.releaseTime = "%2018-%5-%21" atype.modifier = "李四" atype.updateTime = "%2018-%5-%21" atype.status = "已启用" atype.pageView = 300 atype.href = "www.baidu.com" db.session.add(atype) return "1111", 200
def addhall(self): """ 添加展厅管理 author:wpc :return: """ with db.auto_commit(): hall = Hall() hall.id = 23 hall.title = "添加展厅" hall.intro = "添加展厅活动相关信息" hall.releasePeople = "张三" hall.releaseTime = "%2018-%5-%21" hall.mkdirTime = "%2018-%5-%21" hall.modifier = "李四" hall.modifyTime = "%2018-%5-%21" hall.sort = 23 hall.top = "已置顶" hall.releaseNote = "已标识" db.session.add(hall) return "1111", 200
def addmanage(self): """ 添加活动管理 author:wpc :return: """ with db.auto_commit(): amanage = ActivityManage() amanage.id = 9 amanage.activityTitle = "事业培训" amanage.activityType = "教育" amanage.area = "北京" amanage.activity = "关于加强事业单位人员工作能力" amanage.releaseUnit = "教育局" amanage.releasePeople = "张三" amanage.releaseTime = "2018年5月21日" amanage.source = "教育局" amanage.mkdirTime = "2018年5月12日" amanage.modifer = "张三" amanage.modifyTime = "2018年5月13日" db.session.add(amanage) return "1111", 200
def post(self): with db.auto_commit(): user = User() user.set_attrs(request.form) db.session.add(user) return "1111", 200