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