作者 陈志颖

fix:将所有通过手机号检索的条件修改为使用uersId

@@ -1218,9 +1218,10 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashPerson(updateExchangeC @@ -1218,9 +1218,10 @@ func (cashPoolService *CashPoolService) UpdateExchangeCashPerson(updateExchangeC
1218 activityFoundExchangedSuMoney := activityFound.ExchangedSuMoney 1218 activityFoundExchangedSuMoney := activityFound.ExchangedSuMoney
1219 activityFoundExchangedCash := activityFound.ExchangedCash 1219 activityFoundExchangedCash := activityFound.ExchangedCash
1220 1220
1221 - // TODO 更改:根据uid和companyId,判断当前员工是否有效 1221 + //更改:根据uid和companyId,判断当前员工是否有效
1222 getEmployee := map[string]interface{}{ 1222 getEmployee := map[string]interface{}{
1223 - "account": personFound.EmployeeInfo.EmployeeAccount, 1223 + "uid": personFound.EmployeeInfo.Uid,
  1224 + //"account": personFound.EmployeeInfo.EmployeeAccount,
1224 "companyId": activityFound.CompanyId, 1225 "companyId": activityFound.CompanyId,
1225 } 1226 }
1226 employeeFound, err := employeeRepository.FindOne(getEmployee) 1227 employeeFound, err := employeeRepository.FindOne(getEmployee)
@@ -1535,9 +1536,10 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1535,9 +1536,10 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1535 cashPoolFoundUnExchangeCash := cashPoolFound.UnExchangeCash // 当前公司现金池未兑换现金 1536 cashPoolFoundUnExchangeCash := cashPoolFound.UnExchangeCash // 当前公司现金池未兑换现金
1536 cashPoolFoundExchangedCash := cashPoolFound.ExchangedCash // 当前公司现金池已兑换现金 1537 cashPoolFoundExchangedCash := cashPoolFound.ExchangedCash // 当前公司现金池已兑换现金
1537 1538
1538 - // TODO 更改:根据uid和companyId,判断当前员工是否有效 1539 + // 更改:根据uid和companyId,判断当前员工是否有效
1539 getEmployee := map[string]interface{}{ 1540 getEmployee := map[string]interface{}{
1540 - "account": createExchangeCashPersonCommand.PersonAccount, 1541 + "uid": createExchangeCashPersonCommand.Uid,
  1542 + //"account": createExchangeCashPersonCommand.PersonAccount,
1541 "companyId": activityFound.CompanyId, 1543 "companyId": activityFound.CompanyId,
1542 } 1544 }
1543 employeeFound, err := employeeRepository.FindOne(getEmployee) 1545 employeeFound, err := employeeRepository.FindOne(getEmployee)
@@ -1563,9 +1565,10 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc @@ -1563,9 +1565,10 @@ func (cashPoolService *CashPoolService) ImportCreateExchangeCashPerson(createExc
1563 } 1565 }
1564 employeeFoundSuMoney := employeeFound.SuMoney // 当前导入员工持有的素币值 1566 employeeFoundSuMoney := employeeFound.SuMoney // 当前导入员工持有的素币值
1565 1567
1566 - // TODO 更改:根据uid和activityId判断当前员工是否已经在素币兑换清单中, 1568 + // 更改:根据uid和activityId判断当前员工是否已经在素币兑换清单中,
1567 personFound, _ := exchangeCashPersonListRepository.FindOne(map[string]interface{}{ 1569 personFound, _ := exchangeCashPersonListRepository.FindOne(map[string]interface{}{
1568 - "employeeAccount": employeeFound.EmployeeInfo.EmployeeAccount, 1570 + "uid": employeeFound.EmployeeInfo.Uid,
  1571 + //"employeeAccount": employeeFound.EmployeeInfo.EmployeeAccount,
1569 "activityId": activityFound.ActivityId, 1572 "activityId": activityFound.ActivityId,
1570 }) 1573 })
1571 if personFound == nil { // 当前人员不在兑换素币清单中,新增兑换素币清单 1574 if personFound == nil { // 当前人员不在兑换素币清单中,新增兑换素币清单
@@ -234,7 +234,7 @@ func (unifiedUserCenterService *UnifiedUserCenterService) SyncEmployeeCallback(s @@ -234,7 +234,7 @@ func (unifiedUserCenterService *UnifiedUserCenterService) SyncEmployeeCallback(s
234 if _, err := employeeRepository.Save(employee); err != nil { 234 if _, err := employeeRepository.Save(employee); err != nil {
235 return false, application.ThrowError(application.TRANSACTION_ERROR, err.Error()) 235 return false, application.ThrowError(application.TRANSACTION_ERROR, err.Error())
236 } 236 }
237 - // TODO 业务数据修改 237 + //TODO 业务数据修改
238 break 238 break
239 case "batchDelete": 239 case "batchDelete":
240 err := employeeDao.BatchRemove(uids) 240 err := employeeDao.BatchRemove(uids)
@@ -54,7 +54,6 @@ func (exchangeCashActivity *ExchangeCashActivity) Update(data map[string]interfa @@ -54,7 +54,6 @@ func (exchangeCashActivity *ExchangeCashActivity) Update(data map[string]interfa
54 if createTime, ok := data["createTime"]; ok && createTime.(time.Time).IsZero() { 54 if createTime, ok := data["createTime"]; ok && createTime.(time.Time).IsZero() {
55 exchangeCashActivity.CreateTime = createTime.(time.Time) 55 exchangeCashActivity.CreateTime = createTime.(time.Time)
56 } 56 }
57 - //exchangeCashActivity.CreateTime = time.Now()  
58 return nil 57 return nil
59 } 58 }
60 59
@@ -8,7 +8,7 @@ import ( @@ -8,7 +8,7 @@ import (
8 8
9 /** 9 /**
10 * @Author SteveChan 10 * @Author SteveChan
11 - * @Description //TODO 11 + * @Description
12 * @Date 16:50 2020/12/10 12 * @Date 16:50 2020/12/10
13 * @Param 13 * @Param
14 * @return 14 * @return
@@ -34,7 +34,7 @@ func StringSliceEqualBCE(a, b []int) bool { @@ -34,7 +34,7 @@ func StringSliceEqualBCE(a, b []int) bool {
34 34
35 /** 35 /**
36 * @Author SteveChan 36 * @Author SteveChan
37 - * @Description //TODO 37 + * @Description
38 * @Date 16:50 2020/12/10 38 * @Date 16:50 2020/12/10
39 * @Param 39 * @Param
40 * @return 40 * @return
@@ -50,7 +50,7 @@ func IsContain(items []interface{}, item string) bool { @@ -50,7 +50,7 @@ func IsContain(items []interface{}, item string) bool {
50 50
51 /** 51 /**
52 * @Author SteveChan 52 * @Author SteveChan
53 - * @Description //TODO 53 + * @Description
54 * @Date 16:50 2020/12/10 54 * @Date 16:50 2020/12/10
55 * @Param 55 * @Param
56 * @return 56 * @return
@@ -80,7 +80,7 @@ func (l LocalDate) MarshalJSON() ([]byte, error) { @@ -80,7 +80,7 @@ func (l LocalDate) MarshalJSON() ([]byte, error) {
80 80
81 /** 81 /**
82 * @Author SteveChan 82 * @Author SteveChan
83 - * @Description //TODO 83 + * @Description
84 * @Date 16:49 2020/12/10 84 * @Date 16:49 2020/12/10
85 * @Param 85 * @Param
86 * @return 86 * @return