def DELETE(self):
input_data = web.data()
data = urlparse.parse_qs(input_data)
v_ct_fids = db.query("select distinct a.value from t_ci_attribute a where a.endtime = $endtime and a.family_id = $fid ",vars={'endtime':ENDTIME,'fid':data['fid'][0]})
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_ATTRIBUTE
elif v_ct_fid_num > 1:
return 3 #there are more than one records to delete in table T_CI_ATTRIBUTE
v_curtime = time.strftime("%Y%m%d%H%M%S", time.localtime())
#delete t_ci_attribute
n = fn_delete_ciattr(data['fid'][0],v_curtime,data['change_log'][0])
return n
评论列表
文章目录