作者 Your Name

修复一些错误

... ... @@ -134,7 +134,7 @@ func (c *PGRewardSummaryStaticService) CreateRewardSummaryByEmployeeProductRecor
"sectionId": param.WorkStation.SectionId,
"workshopId": param.WorkStation.WorkshopId,
"workerId": param.ProductWorker.UserId,
"recordDateStr": param.CreatedAt.Format("200-01-02"),
"recordDateStr": param.CreatedAt.Format("2006-01-02"),
}
_, summaryList, err := rewardSummaryRepo.Find(condtion)
... ...
... ... @@ -137,6 +137,10 @@ func (repo *RewardSummaryRepository) Find(queryOptions map[string]interface{}) (
if v, ok := queryOptions["recordDateStr"]; ok {
query.Where("record_date_str=?", v)
}
//用户id
if v, ok := queryOptions["workerId"]; ok {
query.Where(`worker->>'userId'='?'`, v)
}
cnt, err := query.SelectAndCount()
if err != nil {
return 0, nil, err
... ...