webci.py 文件源码

python
阅读 16 收藏 0 点赞 0 评论 0

项目:webapi 作者: IntPassion 项目源码 文件源码
def DELETE(self):
        input_data = web.data()
        data = urlparse.parse_qs(input_data)
        v_ct_fids = db.query('SELECT distinct c.name FROM t_ci c WHERE  c.family_id = $fid and c.endtime=$endtime',vars={'fid':data['fid'][0],'endtime':ENDTIME})
        json_en = demjson.encode(v_ct_fids)
        json_de = demjson.decode(json_en)
        v_ct_fid_num = len(json_de)
        if v_ct_fid_num == 0:
            return 2 #there are no records to delete in table t_ci
        elif v_ct_fid_num > 1:
            return 3 #there are more than one records to delete in table t_ci
        #Notice?besides t_ci?information in t_ci_attribute and t_ci_relation should be deleted too
        v_curtime = time.strftime("%Y%m%d%H%M%S", time.localtime())
        n = fn_delete_ci(data['fid'][0],v_curtime,data['change_log'][0])
        return n
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号