|
@@ -64,6 +64,7 @@ func AccountIncome(ctx context.Context, talentId string) (*http_model.TalentInfo
|
|
|
err = db1.Debug().Model(gorm_model.YoungeeTalentDeliveryAddress{}).
|
|
|
Where("talent_id = ? AND default_tag = ?", talentId, 1).
|
|
|
First(&deliveryInfo).Error
|
|
|
+ fmt.Printf("deliveryInfo%+v\n", deliveryInfo)
|
|
|
if err != nil {
|
|
|
if err == gorm.ErrRecordNotFound {
|
|
|
return nil, nil
|
|
@@ -94,20 +95,25 @@ func AccountIncome(ctx context.Context, talentId string) (*http_model.TalentInfo
|
|
|
db3 := GetReadDB(ctx)
|
|
|
var infoBank *gorm_model.InfoBank
|
|
|
db3.Debug().Model(gorm_model.InfoBank{}).Where("id = ?", talentBankInfo.BankID).First(&infoBank)
|
|
|
- db4 := GetReadDB(ctx)
|
|
|
- var infoRegion *gorm_model.InfoRegion
|
|
|
- db4.Debug().Model(gorm_model.InfoRegion{}).Where("self_code = ?", talentBankInfo.BankOpenAddress).First(&infoRegion)
|
|
|
-
|
|
|
- provinceCode := conv.MustString(talentBankInfo.BankOpenAddress, "")[0:2] + "0000"
|
|
|
- var province *gorm_model.InfoRegion
|
|
|
- db4.Debug().Model(gorm_model.InfoRegion{}).Where("self_code = ?", conv.MustInt(provinceCode, 0)).First(&province)
|
|
|
-
|
|
|
- cityCode := conv.MustString(talentBankInfo.BankOpenAddress, "")[0:4] + "00"
|
|
|
- var city *gorm_model.InfoRegion
|
|
|
- db4.Debug().Model(gorm_model.InfoRegion{}).Where("self_code = ?", conv.MustInt(cityCode, 0)).First(&city)
|
|
|
+ region := ""
|
|
|
+ if talentBankInfo.BankOpenAddress != 0 {
|
|
|
+ region = GetRegion(ctx, talentBankInfo.BankOpenAddress)
|
|
|
+ }
|
|
|
+ //db4 := GetReadDB(ctx)
|
|
|
+ //var infoRegion *gorm_model.InfoRegion
|
|
|
+ //db4.Debug().Model(gorm_model.InfoRegion{}).Where("self_code = ?", talentBankInfo.BankOpenAddress).First(&infoRegion)
|
|
|
+ //
|
|
|
+ //provinceCode := conv.MustString(talentBankInfo.BankOpenAddress, "")[0:2] + "0000"
|
|
|
+ //var province *gorm_model.InfoRegion
|
|
|
+ //db4.Debug().Model(gorm_model.InfoRegion{}).Where("self_code = ?", conv.MustInt(provinceCode, 0)).First(&province)
|
|
|
+ //
|
|
|
+ //cityCode := conv.MustString(talentBankInfo.BankOpenAddress, "")[0:4] + "00"
|
|
|
+ //var city *gorm_model.InfoRegion
|
|
|
+ //db4.Debug().Model(gorm_model.InfoRegion{}).Where("self_code = ?", conv.MustInt(cityCode, 0)).First(&city)
|
|
|
|
|
|
data.Bank = infoBank.Name
|
|
|
- data.BankOpenAddress = province.RegionName + city.RegionName + infoRegion.RegionName
|
|
|
+ //data.BankOpenAddress = province.RegionName + city.RegionName + infoRegion.RegionName
|
|
|
+ data.BankOpenAddress = region
|
|
|
data.BankCardNumber = talentBankInfo.BankCardNumber
|
|
|
data.Name = talentBankInfo.Name
|
|
|
data.AliPayNumber = talentBankInfo.AlipayNumber
|