def create_all_push(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 program_id = str(self.lineEdit_ProgramID_2.text()) type = str(self.comboBox_EpisodeType.currentText()) episode_id = program.create_episode(type, program_id, 2) program.create_info(episode_id, type='图文-无横屏', name='1') program.create_info(episode_id, type='文章-有横屏', name='2') program.create_info(episode_id, type='投票', name='3') program.create_info(episode_id, type='商品', name='4') program.create_info(episode_id, push=0, type='竞猜') program.create_info(episode_id, push=10, type='竞猜') program.create_info(episode_id, push=20, type='竞猜') program.create_info(episode_id, push=30, type='图文-无横屏') program.create_info(episode_id, push=40, type='图文-无横屏') program.create_info(episode_id, push=50, type='图文-有横屏') program.create_info(episode_id, push=60, type='投票') program.create_info(episode_id, push=70, type='投票') program.create_info(episode_id, push=80, type='投票') program.create_info(episode_id, push=90, type='文章-无横屏') program.create_info(episode_id, push=100, type='文章-无横屏') program.create_info(episode_id, push=110, type='文章-有横屏') program.create_info(episode_id, push=120, type='商品') program.create_info(episode_id, push=130, type='商品') program.create_info(episode_id, push=140, type='商品') program.create_info(episode_id, push='及时', type='图文-无横屏') program.create_info(episode_id, push='及时', type='图文-有横屏')
def create_template(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 topic_id = str(self.lineEdit_TopicId.text()) deadline = str(self.lineEdit_deadline.text()) tempalte_name = str(self.lineEdit_TemplateName.text()) duel.create_template(topic_id, deadline, tempalte_name)
def create_all_guess1(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 program_id = str(self.lineEdit_ProgramID_2.text()) type = str(self.comboBox_EpisodeType.currentText()) episode_id = program.create_episode(type, program_id, 1) program.create_info(episode_id, push=0, type='竞猜', name='不参与', guess_endtime=60, announce_endtime=30) program.create_info(episode_id, push=0, type='竞猜', name='输', guess_endtime=60, announce_endtime=30) program.create_info(episode_id, push=0, type='竞猜', name='赢', guess_endtime=60, announce_endtime=30) program.create_info(episode_id, push=0, type='竞猜', name='赢0分', guess_endtime=60, announce_endtime=30)
def create_sku(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 merchant_id = str(self.lineEdit_MerchantId_2.text()) spu_id = str(self.lineEdit_SPUId.text()) sku_price = str(self.lineEdit_Price.text()) merchant.create_SKU(price=sku_price, MerchantId=merchant_id, SpuId=spu_id)
def create_episode_live(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 program_id = str(self.lineEdit_ProgramID.text()) # 获取用户写入的program id episode_name = str( self.lineEdit_EpisodeName.text()) # 获取用户写入的episode名字 episode_time = self.lineEdit_EpisodeTime.text() # 获取用户写入的episode过期分钟数 program.create_episode('直播', program_id, episode_time, episode_name) # 创建非直播episode
def info_only(self, type, product_id=None, article_id=None): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 episode_id = str(self.lineEdit_EpisodeID.text()) # 获取用户写入的episode id info_name = str(self.lineEdit_InfoName.text()) # 获取用户写入的info名字 push = str(self.lineEdit_PushType.text()) # 获取用户写入的推送类型 program.create_info(myid=episode_id, product_id=product_id, push=push, type=type, name=info_name, article_id=article_id) # 创建info
def create_all_base(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 program_id = str(self.lineEdit_ProgramID_2.text()) type = str(self.comboBox_EpisodeType.currentText()) episode_id = program.create_episode(type, program_id, 0.1) program.create_info(episode_id, type='图文-无横屏', name='null,标题少于1排') program.create_info( episode_id, type='图文-有横屏', name= 'null,标题很多字123!标题很多字123!标题很多字123!标题很多字123!标题很多字123!标题很多字123!标题很多字123!标题很多字123!' ) program.create_info(episode_id, push=0, type='竞猜', name='0s:问题描述都少于1排', description='description少于1排') program.create_info( episode_id, push=0, type='竞猜', name= '0s:问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字,问题描述都很多字', description= 'description有很多字123!description有很多字123!description有很多字123!description有很多字123!description有很多字123!description有很多字123!description有很多字123!description有很多字123!' ) program.create_info(episode_id, push=0, type='投票', name='0s:问题很少字,没有描述') program.create_info( episode_id, push=0, type='投票', name= '0s:问题很多字,没有描述(这里很多字!这里很多字!这里很多字!这里很多字!这里很多字!这里很多字!这里很多字!这里很多字!)') program.create_info(episode_id, push=10, type='图文-无横屏', name='图文10s'), program.create_info(episode_id, push=20, type='图文-有横屏', name='图文30s'), program.create_info(episode_id, push=30, type='文章-无横屏', name='文章10s'), program.create_info(episode_id, push=40, type='文章-有横屏', name='文章30s'), program.create_info(episode_id, push=50, type='商品', name='50s'), program.create_info(episode_id, push=60, type='竞猜', name='1分0s'), program.create_info(episode_id, push=3690, type='投票', name='61分30s')
def create_duel_all(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 id = str(self.lineEdit_TopicId_2.text()) if id: topic_id = id else: topic_id = duel.create_topic(u'很多template,随便选择哦') duel.create_template(topic_id, 2) duel.create_template(topic_id, 4) duel.create_template(topic_id, 6) duel.create_template(topic_id, 8) duel.create_template(topic_id, 10) duel.create_template(topic_id, 12) duel.create_template(topic_id, 14) duel.create_template(topic_id, 16) duel.create_template(topic_id, 18) duel.create_template(topic_id, 20)
def create_spu(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 merchant_id = str(self.lineEdit_MerchantId.text()) spu_name = str(self.lineEdit_SPUname.text()) merchant.create_SPU(merchant_id, spu_name)
def create_merchant(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 merchant_name = str(self.lineEdit_MerchantName.text()) merchant.create_merchant(merchant_name)
def create_topic(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 topic_name = str(self.lineEdit_TopicName.text()) duel.create_topic(topic_name)
def create_program(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 program_name = str( self.lineEdit_ProgramName.text()) # 获取用户写入的program名字 program.create_program(program_name) # 创建program
def create_all_guess2(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 program_id = str(self.lineEdit_ProgramID_2.text()) type = str(self.comboBox_EpisodeType.currentText()) episode_id = program.create_episode(type, program_id, 2) program.create_info(episode_id, push=0, type='竞猜', name='竞猜中-未参与', guess_endtime=36000, announce_endtime=20) program.create_info(episode_id, push=0, type='竞猜', name='竞猜中-已参与', guess_endtime=36000, announce_endtime=20) program.create_info(episode_id, push=0, type='竞猜', name='未参与-等待答案揭晓', guess_endtime=60, announce_endtime=36000) program.create_info(episode_id, push=0, type='竞猜', name='已参与-等待答案揭晓', guess_endtime=60, announce_endtime=36000) program.create_info(episode_id, push=0, type='竞猜', name='揭晓前参与-赢', guess_endtime=60, announce_endtime=20) program.create_info(episode_id, push=0, type='竞猜', name='揭晓前参与-输', guess_endtime=60, announce_endtime=20) program.create_info(episode_id, push=0, type='竞猜', name='未参与已揭晓', guess_endtime=60, announce_endtime=20) program.create_info(episode_id, push=0, type='竞猜', name='揭晓后参与-赢', guess_endtime=60, announce_endtime=20) program.create_info(episode_id, push=0, type='竞猜', name='揭晓后参与-输', guess_endtime=60, announce_endtime=20)
def create_all_push_heng(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 program_id = str(self.lineEdit_ProgramID_2.text()) type = str(self.comboBox_EpisodeType.currentText()) episode_id = program.create_episode('直播', program_id, 2) program.create_info( episode_id, push=10, type='图文-无横屏', name='图文-无横屏:推送10s,显示2s', landscape=2, ) program.create_info(episode_id, push=20, type='图文-无横屏', name='图文-无横屏:推送20s,显示5s', landscape=5) program.create_info(episode_id, push=30, type='图文-有横屏', name='图文-有横屏:推送30s,显示20s', landscape=20) program.create_info(episode_id, push=40, type='投票', name='投票1:推送40s,显示20s', landscape=20) program.create_info(episode_id, push=40, type='投票', name='投票2:推送40s,显示20s', landscape=20) program.create_info(episode_id, push=40, type='投票', name='投票3:推送40s,显示20s', landscape=20) program.create_info(episode_id, push=60, type='竞猜', name='竞猜1:推送60s,显示20s', landscape=20) program.create_info(episode_id, push=80, type='竞猜', name='竞猜2:推送80s,显示20s', landscape=20) program.create_info(episode_id, push=100, type='竞猜', name='竞猜3:推送100s,显示20s', landscape=60) program.create_info(episode_id, push=120, type='商品', name='商品1:推送120s,显示60s', landscape=60) program.create_info(episode_id, push=140, type='文章-无横屏', name='图文-无横屏:推送140s,显示60s', landscape=60) program.create_info(episode_id, push=140, type='文章-有横屏', name='图文-无横屏:推送140s,显示60s', landscape=60) program.create_info(episode_id, push='及时', type='图文-无横屏') program.create_info(episode_id, push='及时', type='图文-有横屏')
def clean_user(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 nick = str(self.nick.text()) # 获取用户填写的需要删除的用户昵称 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 database.clean_user(nick) # 删除对应用户
def clean_data(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 database.clean_all() # 清空所有数据
def clean_redis(self): region = str(self.region_box.currentText()) # 获取用户选择的环境 myyaml.set_region(region) # 将整个程序运行环境设置成用户选择的环境 myredis.clean_redis()