作者 yangfu

分红预算列表

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