|
@@ -5,6 +5,7 @@ import ( |
|
@@ -5,6 +5,7 @@ import ( |
5
|
"strings"
|
5
|
"strings"
|
6
|
"time"
|
6
|
"time"
|
7
|
|
7
|
|
|
|
8
|
+ "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/domain"
|
8
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction"
|
9
|
"gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction"
|
9
|
)
|
10
|
)
|
10
|
|
11
|
|
|
@@ -40,9 +41,9 @@ func (dao BusinessBonusDao) SearchBusinessBonus(partnerId int64, partnerNameMatc |
|
@@ -40,9 +41,9 @@ func (dao BusinessBonusDao) SearchBusinessBonus(partnerId int64, partnerNameMatc |
40
|
,partner_info.partner_name,business_bonus.bonus_has
|
41
|
,partner_info.partner_name,business_bonus.bonus_has
|
41
|
FROM business_bonus
|
42
|
FROM business_bonus
|
42
|
JOIN partner_info ON business_bonus.partner_info_id=partner_info.id
|
43
|
JOIN partner_info ON business_bonus.partner_info_id=partner_info.id
|
43
|
- WHERE business_bonus.is_disable=0 AND business_bonus.company_id = ? `
|
44
|
+ WHERE business_bonus.is_disable=? AND business_bonus.company_id = ? `
|
44
|
partnerCondition := []string{}
|
45
|
partnerCondition := []string{}
|
45
|
- allParam := []interface{}{companyId}
|
46
|
+ allParam := []interface{}{domain.BUSINESS_BONUS_ENABLE, companyId}
|
46
|
if partnerId > 0 {
|
47
|
if partnerId > 0 {
|
47
|
partnerCondition = append(partnerCondition, ` business_bonus.partner_info_id=? `)
|
48
|
partnerCondition = append(partnerCondition, ` business_bonus.partner_info_id=? `)
|
48
|
allParam = append(allParam, partnerId)
|
49
|
allParam = append(allParam, partnerId)
|
|
@@ -70,9 +71,9 @@ func (dao BusinessBonusDao) CountBusinessBonus(partnerId int64, partnerNameMatch |
|
@@ -70,9 +71,9 @@ func (dao BusinessBonusDao) CountBusinessBonus(partnerId int64, partnerNameMatch |
70
|
sql := `SELECT count(*)
|
71
|
sql := `SELECT count(*)
|
71
|
FROM business_bonus
|
72
|
FROM business_bonus
|
72
|
JOIN partner_info ON business_bonus.partner_info_id=partner_info.id
|
73
|
JOIN partner_info ON business_bonus.partner_info_id=partner_info.id
|
73
|
- WHERE business_bonus.is_disable=0 AND business_bonus.company_id = ? `
|
74
|
+ WHERE business_bonus.is_disable=? AND business_bonus.company_id = ? `
|
74
|
partnerCondition := []string{}
|
75
|
partnerCondition := []string{}
|
75
|
- allParam := []interface{}{companyId}
|
76
|
+ allParam := []interface{}{domain.BUSINESS_BONUS_ENABLE, companyId}
|
76
|
if partnerId > 0 {
|
77
|
if partnerId > 0 {
|
77
|
partnerCondition = append(partnerCondition, ` business_bonus.partner_info_id=? `)
|
78
|
partnerCondition = append(partnerCondition, ` business_bonus.partner_info_id=? `)
|
78
|
allParam = append(allParam, partnerId)
|
79
|
allParam = append(allParam, partnerId)
|