作者 yangfu

分红预算列表

@@ -9,6 +9,7 @@ import ( @@ -9,6 +9,7 @@ import (
9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain" 9 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/domain"
10 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao" 10 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/dao"
11 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/repository" 11 "gitlab.fjmaimaimai.com/allied-creation/allied-creation-cooperation/pkg/infrastructure/repository"
  12 + "strconv"
12 "time" 13 "time"
13 ) 14 )
14 15
@@ -202,9 +203,10 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s @@ -202,9 +203,10 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s
202 var dividends = make([]interface{}, 0) 203 var dividends = make([]interface{}, 0)
203 for i := range creditAccounts { 204 for i := range creditAccounts {
204 a := creditAccounts[i] 205 a := creditAccounts[i]
  206 + participateType, _ := strconv.Atoi(a.ParticipateType)
205 dividends = append(dividends, map[string]interface{}{ 207 dividends = append(dividends, map[string]interface{}{
206 "creditAccountId": a.CreditAccountId, 208 "creditAccountId": a.CreditAccountId,
207 - "goodName": "", 209 + "orderGoodName": "",
208 "dividendsType": a.AccountDetail.DividendsType, 210 "dividendsType": a.AccountDetail.DividendsType,
209 "dividendsRatio": 0, 211 "dividendsRatio": 0,
210 "dividendsAmount": a.AccountDetail.DividendsAmount, 212 "dividendsAmount": a.AccountDetail.DividendsAmount,
@@ -212,8 +214,8 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s @@ -212,8 +214,8 @@ func (ptr *CooperationStatisticsService) GetContractDividends(queryOptions map[s
212 "userInfo": a.Participator.UserInfo, 214 "userInfo": a.Participator.UserInfo,
213 "userId": a.Participator.UserId, 215 "userId": a.Participator.UserId,
214 }, 216 },
215 - "dividendsParticipateType": a.ParticipateType,  
216 - "paymentStatus": a.PaymentStatus, 217 + "dividendsParticipateType": participateType,
  218 + "dividendsAccountStatus": a.PaymentStatus,
217 "dividendsEstimateTime": a.CreatedAt.Unix() * 1000, 219 "dividendsEstimateTime": a.CreatedAt.Unix() * 1000,
218 "orderOrReturnedOrderNum": a.CreditAccountOrderNum, 220 "orderOrReturnedOrderNum": a.CreditAccountOrderNum,
219 }) 221 })
@@ -201,7 +201,7 @@ func (repository *CreditAccountRepository) Find(queryOptions map[string]interfac @@ -201,7 +201,7 @@ func (repository *CreditAccountRepository) Find(queryOptions map[string]interfac
201 if participatorName, ok := queryOptions["participatorName"]; ok && participatorName != "" { 201 if participatorName, ok := queryOptions["participatorName"]; ok && participatorName != "" {
202 query.Where(`(credit_account.participator->>'userName')::text LIKE ?`, fmt.Sprintf("%%%s%%", participatorName)) 202 query.Where(`(credit_account.participator->>'userName')::text LIKE ?`, fmt.Sprintf("%%%s%%", participatorName))
203 } 203 }
204 - if cooperationContractNumber, ok := queryOptions["cooperation_contract_number"]; ok && cooperationContractNumber != "" { 204 + if cooperationContractNumber, ok := queryOptions["cooperationContractNumber"]; ok && cooperationContractNumber != "" {
205 query.Where(`cooperation_contract_number = ?`, fmt.Sprintf("%%%s%%", cooperationContractNumber)) 205 query.Where(`cooperation_contract_number = ?`, fmt.Sprintf("%%%s%%", cooperationContractNumber))
206 } 206 }
207 if paymentStatus, ok := queryOptions["paymentStatus"]; ok && paymentStatus.(int32) != 0 { 207 if paymentStatus, ok := queryOptions["paymentStatus"]; ok && paymentStatus.(int32) != 0 {