|
@@ -12,6 +12,7 @@ import (
|
12
|
12
|
"strings"
|
13
|
13
|
"time"
|
14
|
14
|
|
|
15
|
+ "github.com/astaxie/beego"
|
15
|
16
|
"github.com/yl10/kit/guid"
|
16
|
17
|
)
|
17
|
18
|
|
|
@@ -527,13 +528,15 @@ func (s *CouponServ) ReceiveCoupon(id, saleid, serialcode string) error {
|
527
|
528
|
utils.LogError("领取优惠券获取销售信息失败:", err)
|
528
|
529
|
return errors.New("log-error-领取优惠券失败!")
|
529
|
530
|
}
|
530
|
|
- caseinfo, err := s.userDao.GetUserBelongCase(saleid)
|
531
|
|
- if err != nil {
|
532
|
|
- utils.LogError("领取优惠券获取销售案场信息失败:", err)
|
533
|
|
- return errors.New("log-error-领取优惠券失败!")
|
534
|
|
- }
|
535
|
|
- if caseinfo.CaseId != coupon.CaseId {
|
536
|
|
- return errors.New("log-error-销售不合法!")
|
|
531
|
+ if saleid != beego.AppConfig.String("defaultShareUserID") {
|
|
532
|
+ caseinfo, err := s.userDao.GetUserBelongCase(saleid)
|
|
533
|
+ if err != nil {
|
|
534
|
+ utils.LogError("领取优惠券获取销售案场信息失败:", err)
|
|
535
|
+ return errors.New("log-error-领取优惠券失败!")
|
|
536
|
+ }
|
|
537
|
+ if caseinfo.CaseId != coupon.CaseId {
|
|
538
|
+ return errors.New("log-error-销售不合法!")
|
|
539
|
+ }
|
537
|
540
|
}
|
538
|
541
|
|
539
|
542
|
// 验证码判断
|