Commit 7cfe5f2a by zhangjie

1. 通联用户ID的前缀修改到配置文件,以分离生产和测试环境用户

parent 985a229e
......@@ -4,26 +4,16 @@
<option name="autoReloadType" value="ALL" />
</component>
<component name="ChangeListManager">
<list default="true" id="d8ed78cd-bda7-467e-9bd3-d1cee57e3c79" name="变更" comment="">
<change afterPath="$PROJECT_DIR$/util/TimeConver.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/inspectionProfiles/Project_Default.xml" beforeDir="false" />
<list default="true" id="d8ed78cd-bda7-467e-9bd3-d1cee57e3c79" name="变更" comment="1. 支付修改为通联支付">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/config.ini" beforeDir="false" afterPath="$PROJECT_DIR$/config.ini" afterDir="false" />
<change beforePath="$PROJECT_DIR$/customerServer.new" beforeDir="false" afterPath="$PROJECT_DIR$/customerServer.new" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data_db_cache/dbcurd/d_update_record.go" beforeDir="false" afterPath="$PROJECT_DIR$/data_db_cache/dbcurd/d_update_record.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/docs.go" beforeDir="false" afterPath="$PROJECT_DIR$/docs/docs.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/swagger.json" beforeDir="false" afterPath="$PROJECT_DIR$/docs/swagger.json" afterDir="false" />
<change beforePath="$PROJECT_DIR$/docs/swagger.yaml" beforeDir="false" afterPath="$PROJECT_DIR$/docs/swagger.yaml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/go.mod" beforeDir="false" afterPath="$PROJECT_DIR$/go.mod" afterDir="false" />
<change beforePath="$PROJECT_DIR$/go.sum" beforeDir="false" afterPath="$PROJECT_DIR$/go.sum" afterDir="false" />
<change beforePath="$PROJECT_DIR$/log/cDebug.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/log/cInfo.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/log/gErr.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/log/gInfo.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/log/gWarn.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/log/sErr.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/log/sInfo.log" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/main.go" beforeDir="false" afterPath="$PROJECT_DIR$/main.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data_db_cache/cache/cmap_areaServicePhonePayListSplit.go" beforeDir="false" afterPath="$PROJECT_DIR$/data_db_cache/cache/cmap_areaServicePhonePayListSplit.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/data_db_cache/cache/cmap_areaservice.go" beforeDir="false" afterPath="$PROJECT_DIR$/data_db_cache/cache/cmap_areaservice.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/log/gInfo.log" beforeDir="false" afterPath="$PROJECT_DIR$/log/gInfo.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/log/sInfo.log" beforeDir="false" afterPath="$PROJECT_DIR$/log/sInfo.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/thirdapi/allinpay/allinpay.go" beforeDir="false" afterPath="$PROJECT_DIR$/thirdapi/allinpay/allinpay.go" afterDir="false" />
<change beforePath="$PROJECT_DIR$/util/setting/setting.go" beforeDir="false" afterPath="$PROJECT_DIR$/util/setting/setting.go" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
......@@ -50,7 +40,7 @@
<property name="go.import.settings.migrated" value="true" />
<property name="go.modules.go.list.on.any.changes.was.set" value="true" />
<property name="go.sdk.automatically.set" value="true" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/../dc_golang_server1_admin" />
<property name="last_opened_file_path" value="$PROJECT_DIR$" />
</component>
<component name="RecentsManager">
<key name="MoveFile.RECENT_KEYS">
......@@ -84,6 +74,10 @@
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="VcsManagerConfiguration">
<MESSAGE value="1. 支付修改为通联支付" />
<option name="LAST_COMMIT_MESSAGE" value="1. 支付修改为通联支付" />
</component>
<component name="VgoProject">
<integration-enabled>true</integration-enabled>
</component>
......
[allin_pay]
#测试 K12B 正式 K12B-
AdminHead = K12B
#测试 K12U 正式 K12U-
CustomerHead = K12U
[sys_para]
#每个用户允许添加的亲情号数量
MaxFamilyNum = 2
......
No preview for this file type
......@@ -10,27 +10,27 @@ import (
"time"
)
func areaServicePhonePayListMapAddSplit(){ // 区域服务收款项列表添加分账列表
func areaServicePhonePayListMapAddSplit() { // 区域服务收款项列表添加分账列表
// 遍历 areaServicePhonePayListMap 中的 每一个areaServiceID的每一个[]model.CacheAreaServicePhonePayListStruct,去查询分账信息
fmt.Println(time.Now(),"cache: init areaServicePhonePayListMap SplitAmount begin")
fmt.Println(time.Now(), "cache: init areaServicePhonePayListMap SplitAmount begin")
areaServicePhonePayListMap.Range(func(key, value interface{}) bool {
if list, ok := value.([]model.CacheAreaServicePhonePayListStruct);ok{
for _,v := range list{
if list, ok := value.([]model.CacheAreaServicePhonePayListStruct); ok {
for _, v := range list {
v.SplitAmount = areaServicePhonePayListMapAddSplitByPayListID(v.ID) // todoN 可考虑校验分账之和是否等于amount,因设置时做了校验,现暂时不判断
}
} else {
areaServicePhonePayListMap.Delete(key)
fmt.Println("---------------error-error-error: value.([]model.CacheAreaServicePhonePayListStruct) != ok",key,value)
fmt.Println("---------------error-error-error: value.([]model.CacheAreaServicePhonePayListStruct) != ok", key, value)
}
return true
})
fmt.Println(time.Now(),"init areaServicePhonePayListMap SplitAmount end")
fmt.Println(time.Now(), "init areaServicePhonePayListMap SplitAmount end")
}
func areaServicePhonePayListMapAddSplitByPayListID(payListID uint32) (res []model.PhonePaySplitMoneyStruct) {
rows,err := dbcurd.PgDb.Query("SELECT admin_id,amount FROM b_phone_pay_split_money WHERE pay_list_id=$1",payListID) //
rows, err := dbcurd.PgDb.Query("SELECT admin_id,amount FROM b_pay_split_money WHERE pay_list_id=$1", payListID) //
if err != nil {
log.Panicln("areaServicePhonePayListMapAddSplit rows", err)
}
......@@ -42,15 +42,15 @@ func areaServicePhonePayListMapAddSplitByPayListID(payListID uint32) (res []mode
if err != nil {
log.Panicln("initAreaServicePhonePayListMap rows.Scan", err)
}
res = append(res,temp)
res = append(res, temp)
}
// 处理完毕后,需要判断一次遍历过程中是否有错误产生
if err = rows.Err(); err != nil {
logger.Log.Error("rows.Err()",
zap.Error(err),
zap.String("src", "initAreaServicePhonePayListMap"))
fmt.Println(time.Now(), "areaServicePhonePayListMapAddSplitByPayListID rows.Err()", err,payListID)
fmt.Println(time.Now(), "areaServicePhonePayListMapAddSplitByPayListID rows.Err()", err, payListID)
}
return
}
\ No newline at end of file
}
......@@ -17,7 +17,7 @@ func initAreaServiceMap() {
fmt.Println(time.Now(), "cache: initAreaServiceMap begin")
//rows, err := dbcurd.PgDb.Query("SELECT id,service_type,name,area_id,operator_id,status,pay_admin_id,service_phone FROM b_area_service WHERE status!=0 ORDER BY create_at DESC") //
rows, err := dbcurd.PgDb.Query("SELECT id,service_type,name,area_id,operator_id,status,pay_admin_id,service_phone,activate_fee,replace_fee FROM b_area_service" +
" LEFT JOIN b_phone_card_fee ON area_service_id=id WHERE status!=0 ORDER BY b_area_service.create_at") // 220208 增加开卡费和补卡费
" LEFT JOIN b_card_fee ON area_service_id=id WHERE status!=0 ORDER BY b_area_service.create_at") // 220208 增加开卡费和补卡费
if err != nil {
log.Panicln("initAreaServiceMap rows", err)
}
......
{"ts":"2022-02-17 17:59:35.710","msg":"read error","Src":"TCP-SERVER-connectionHandle","DevID":0,"Conn":"127.0.0.1:52696","error":"read tcp4 127.0.0.1:8010->127.0.0.1:52696: i/o timeout"}
{"ts":"2022-02-17 18:07:50.197","msg":"read error","Src":"TCP-SERVER-connectionHandle","DevID":0,"Conn":"127.0.0.1:52770","error":"EOF"}
{"ts":"2022-02-18 20:30:22.544","msg":"read error","Src":"TCP-SERVER-connectionHandle","DevID":0,"Conn":"127.0.0.1:57132","error":"EOF"}
{"ts":"2022-02-18 20:30:38.775","msg":"read error","Src":"TCP-SERVER-connectionHandle","DevID":0,"Conn":"127.0.0.1:50860","error":"EOF"}
{"ts":"2022-02-18 20:30:56.130","msg":"read error","Src":"TCP-SERVER-connectionHandle","DevID":0,"Conn":"127.0.0.1:54929","error":"EOF"}
......@@ -7,6 +7,9 @@ import (
)
var (
AllinPayAdminHead string
AllinPayCustomerHead string
MaxFamilyNum int
DbDSN string
......@@ -56,6 +59,9 @@ func Init() {
panic("配置文件读取错误")
}
AllinPayAdminHead = file.Section("allin_pay").Key("AdminHead").MustString("K12B")
AllinPayCustomerHead = file.Section("allin_pay").Key("CustomerHead").MustString("K12U")
MaxFamilyNum = file.Section("sys_para").Key("MaxFamilyNum").MustInt(2)
DbDSN = file.Section("database").Key("dbDSN").MustString("user=higher password=hj^&bhjb789j$^* dbname=jeff_study host=pgm-2ze3yp0bss39cxvh1o.pg.rds.aliyuncs.com port=1921 sslmode=disable")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment