|
@@ -49,7 +49,7 @@ end
|
|
|
|
|
|
--添加回传规则
|
|
|
function M.addHuiChuanRule(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","value","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","value"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -60,7 +60,7 @@ function M.addHuiChuanRule(msg_body)
|
|
|
obj = cjson.decode(res[1].huichuan)
|
|
|
end
|
|
|
local id = #obj+1
|
|
|
- table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value,mini_program_platform_id=msg_body.mini_program_platform_id})
|
|
|
+ table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value})
|
|
|
sql = string.format("UPDATE `tg_platform` SET huichuan = '%s' WHERE id = %d ",
|
|
|
cjson.encode(obj),msg_body.id)
|
|
|
mysqldbx.query(sql)
|
|
@@ -70,7 +70,7 @@ end
|
|
|
|
|
|
--修改回传规则
|
|
|
function M.modifyHuiChuanRule(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","value","table_id","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","value","table_id"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -84,7 +84,6 @@ function M.modifyHuiChuanRule(msg_body)
|
|
|
if obj[i].id == msg_body.table_id then
|
|
|
obj[i].name = msg_body.name
|
|
|
obj[i].value = msg_body.value
|
|
|
- obj[i].mini_program_platform_id = msg_body.mini_program_platform_id
|
|
|
break
|
|
|
end
|
|
|
end
|
|
@@ -97,7 +96,7 @@ end
|
|
|
|
|
|
--添加收费卡点
|
|
|
function M.addShouFeiKaDian(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","value","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","value"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -108,7 +107,7 @@ function M.addShouFeiKaDian(msg_body)
|
|
|
obj = cjson.decode(res[1].kadian)
|
|
|
end
|
|
|
local id = #obj+1
|
|
|
- table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value,mini_program_platform_id=msg_body.mini_program_platform_id})
|
|
|
+ table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value})
|
|
|
sql = string.format("UPDATE `tg_platform` SET kadian = '%s' WHERE id = %d ",
|
|
|
cjson.encode(obj),msg_body.id)
|
|
|
mysqldbx.query(sql)
|
|
@@ -117,7 +116,7 @@ end
|
|
|
|
|
|
--修改收费卡点
|
|
|
function M.modifyShouFeiKaDian(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","table_id","value","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","table_id","value"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -131,7 +130,6 @@ function M.modifyShouFeiKaDian(msg_body)
|
|
|
if obj[i].id == msg_body.table_id then
|
|
|
obj[i].name = msg_body.name
|
|
|
obj[i].value = msg_body.value
|
|
|
- obj[i].mini_program_platform_id = msg_body.mini_program_platform_id
|
|
|
break
|
|
|
end
|
|
|
end
|
|
@@ -143,7 +141,7 @@ end
|
|
|
|
|
|
--添加充值模板
|
|
|
function M.addChongZhiTemplate(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","value","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","value"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -154,7 +152,7 @@ function M.addChongZhiTemplate(msg_body)
|
|
|
obj = cjson.decode(res[1].chongzhi)
|
|
|
end
|
|
|
local id = #obj+1
|
|
|
- table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value,mini_program_platform_id=msg_body.mini_program_platform_id})
|
|
|
+ table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value})
|
|
|
sql = string.format("UPDATE `tg_platform` SET chongzhi = '%s' WHERE id = %d ",
|
|
|
cjson.encode(obj),msg_body.id)
|
|
|
mysqldbx.query(sql)
|
|
@@ -163,7 +161,7 @@ end
|
|
|
|
|
|
--修改充值模板
|
|
|
function M.modifyChongZhiTemplate(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","table_id","value","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","table_id","value"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -177,7 +175,6 @@ function M.modifyChongZhiTemplate(msg_body)
|
|
|
if obj[i].id == msg_body.table_id then
|
|
|
obj[i].name = msg_body.name
|
|
|
obj[i].value = msg_body.value
|
|
|
- obj[i].mini_program_platform_id = msg_body.mini_program_platform_id
|
|
|
break
|
|
|
end
|
|
|
end
|
|
@@ -191,7 +188,7 @@ end
|
|
|
|
|
|
--添加复充值模板
|
|
|
function M.addFChongZhiTemplate(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","value","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","value"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -202,7 +199,7 @@ function M.addFChongZhiTemplate(msg_body)
|
|
|
obj = cjson.decode(res[1].f_chongzhi)
|
|
|
end
|
|
|
local id = #obj+1
|
|
|
- table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value,mini_program_platform_id=msg_body.mini_program_platform_id})
|
|
|
+ table.insert(obj,id,{id=id,name=msg_body.name,value=msg_body.value})
|
|
|
sql = string.format("UPDATE `tg_platform` SET f_chongzhi = '%s' WHERE id = %d ",
|
|
|
cjson.encode(obj),msg_body.id)
|
|
|
mysqldbx.query(sql)
|
|
@@ -211,7 +208,7 @@ end
|
|
|
|
|
|
--修改复充值模板
|
|
|
function M.modifyFChongZhiTemplate(msg_body)
|
|
|
- local isok ,key = tools.checkData({"name","id","table_id","value","mini_program_platform_id"},msg_body)
|
|
|
+ local isok ,key = tools.checkData({"name","id","table_id","value"},msg_body)
|
|
|
if not isok then
|
|
|
return false,string.format("缺少字段: %s.", key)
|
|
|
end
|
|
@@ -225,7 +222,6 @@ function M.modifyFChongZhiTemplate(msg_body)
|
|
|
if obj[i].id == msg_body.table_id then
|
|
|
obj[i].name = msg_body.name
|
|
|
obj[i].value = msg_body.value
|
|
|
- obj[i].mini_program_platform_id = msg_body.mini_program_platform_id
|
|
|
break
|
|
|
end
|
|
|
end
|