master
huanghai 5 years ago
parent b2bcdacc12
commit 5591565d5e

@ -73,8 +73,10 @@ type logStruct struct {
//系统token
var SystemToken = ""
//是否成功
var success = false
/**
*/
@ -308,6 +310,9 @@ func PostToServer(t tableStruct, list []map[string]interface{}) bool {
break
}
ds.DelFlag = list[k]["del_flag"].(int64)
//在内层中需要手动删除掉del_flag
delete(list[k], "del_flag")
ds.OrgId = list[k]["bureau_id"].(string)
dsMap = append(dsMap, ds)
}

@ -21,7 +21,7 @@ SELECT
DATE_FORMAT(t1.`last_updated_time`,'%Y/%m/%d %H:%i:%s') AS `last_updated_time`,
`t_dm_stage`.`stage_name` AS `stage_name`,
`t_base_organization`.`org_name` AS `org_name` ,
case t1.`b_use` when -1 then 1 else 0 end AS `del_flag`
case t1.`b_use` when -2 then 1 else 0 end AS `del_flag`
FROM
((t_base_class as t1 JOIN `t_dm_stage` ON ( t1.`stage_id` = `t_dm_stage`.`stage_id` ))
JOIN `t_base_organization` ON ( t1.`bureau_id` = `t_base_organization`.`org_id` ))

@ -31,7 +31,7 @@ SELECT
t1.`area_code` AS `area_code`,
DATE_FORMAT(t1.`last_updated_time`,'%Y/%m/%d %H:%i:%s') AS `last_updated_time`,
DATE_FORMAT(t1.`create_time`,'%Y/%m/%d %H:%i:%s') AS `create_time`,
case t1.`b_use` when -1 then 1 else 0 end AS `del_flag`
case t1.`b_use` when -2 then 1 else 0 end AS `del_flag`
FROM
`t_base_organization` as t1 where t1.b_use in (1,-2)
) as t1

@ -32,7 +32,7 @@ SELECT
`t_base_organization`.`szdcxlxm` AS `szdcxlxm`,
`t_base_class`.`stage_id` AS `stage_id`,
`t_base_class`.`rxnf` AS `rxnf`,
case t1.`b_use` when -1 then 1 else 0 end AS `del_flag`
case t1.`b_use` when -2 then 1 else 0 end AS `del_flag`
FROM
((
`t_base_student` as t1

@ -25,7 +25,7 @@ t1.`state_id` AS `state_id`,
DATE_FORMAT(t1.`last_updated_time`,'%Y/%m/%d %H:%i:%s') AS `last_updated_time`,
DATE_FORMAT(t1.`cjny`,'%Y/%m/%d %H:%i:%s') AS `cjny`,
DATE_FORMAT(t1.`create_time`,'%Y/%m/%d %H:%i:%s') AS `create_time`,
case t1.`b_use` when -1 then 1 else 0 end AS `del_flag`,
case t1.`b_use` when -2 then 1 else 0 end AS `del_flag`,
`t_base_organization`.`main_school_type` AS `main_school_type`,
`t_base_organization`.`xxbbm` AS `xxbbm`,
`t_base_organization`.`xxbxlxm` AS `xxbxlxm`,

@ -8,6 +8,6 @@ SELECT
t1.`sort_id` AS `sort_id`,
cast( t1.`b_use` AS signed ) AS `b_use`,
'-1' as bureau_id,
case t1.`b_use` when -1 then 1 else 0 end AS `del_flag`
case t1.`b_use` when -2 then 1 else 0 end AS `del_flag`
FROM
`t_sys_dict` as t1

@ -1,6 +1,7 @@
package main
import (
"dsBaseRpc/DataExchange"
"dsBaseRpc/RpcService/BaseClass/BaseClassProto"
"dsBaseRpc/RpcService/BaseClass/BaseClassService"
"dsBaseRpc/RpcService/BaseGlobal/BaseGlobalProto"
@ -110,9 +111,9 @@ func main() {
BaseRolePersonProto.RegisterBaseRolePersonManageServer(s, &BaseRolePersonService.Rpc{})
//五、开启一个数据上报的协程
//go func() {
// DataExchange.DataExchange()
//}()
go func() {
DataExchange.DataExchange()
}()
//六、 注册反射服务 这个服务是CLI使用的 跟服务本身没有关系
reflection.Register(s)
//七、启动

Loading…
Cancel
Save