wangfei 6 år sedan
förälder
incheckning
86dfea1b10
3 ändrade filer med 52 tillägg och 3 borttagningar
  1. 48
    0
      log/common.log
  2. 3
    2
      service/coupon/coupon.go
  3. 1
    1
      service/message/news.go

+ 48
- 0
log/common.log Visa fil

@@ -142,3 +142,51 @@
142 142
 2018/09/21 03:22:13 [E] 用户没有设置默认案场
143 143
 2018/09/21 03:22:13 [E] 用户没有设置默认案场
144 144
 2018/09/21 03:22:16 [E] 用户没有设置默认案场
145
+2018/09/25 09:32:27 [E] 用户没有设置默认案场
146
+2018/09/25 09:32:27 [E] 用户没有设置默认案场
147
+2018/09/25 09:32:27 [E] 统计会员总数失败: Error 1370: execute command denied to user 'spaceofcheng'@'localhost' for routine 'cdkj.fun_total_customer'
148
+2018/09/25 09:32:28 [E] 用户没有设置默认案场
149
+2018/09/25 09:59:43 [E] 用户没有设置默认案场
150
+2018/09/25 09:59:43 [E] 用户没有设置默认案场
151
+2018/09/25 09:59:43 [E] 统计会员总数失败: Error 1370: execute command denied to user 'spaceofcheng'@'localhost' for routine 'cdkj.fun_total_customer'
152
+2018/09/25 09:59:43 [E] 用户没有设置默认案场
153
+2018/09/25 10:00:36 [E] 用户没有设置默认案场
154
+2018/09/25 10:00:53 [E] 用户没有设置默认案场
155
+2018/09/25 10:00:53 [E] 用户没有设置默认案场
156
+2018/09/25 10:01:04 [E] 用户没有设置默认案场
157
+2018/09/25 10:01:12 [E] 用户没有设置默认案场
158
+2018/09/25 10:01:34 [E] 用户没有设置默认案场
159
+2018/09/25 10:01:36 [E] 用户没有设置默认案场
160
+2018/09/25 10:01:37 [E] 用户没有设置默认案场
161
+2018/09/25 10:01:38 [E] 用户没有设置默认案场
162
+2018/09/25 10:01:39 [E] 用户没有设置默认案场
163
+2018/09/25 10:01:40 [E] 用户没有设置默认案场
164
+2018/09/25 10:01:41 [E] 用户没有设置默认案场
165
+2018/09/25 10:02:06 [E] 用户没有设置默认案场
166
+2018/09/25 10:02:07 [E] 用户没有设置默认案场
167
+2018/09/25 10:33:31 [E] 用户没有设置默认案场
168
+2018/09/25 10:33:31 [E] 用户没有设置默认案场
169
+2018/09/25 10:34:18 [E] 用户没有设置默认案场
170
+2018/09/25 10:34:18 [E] 用户没有设置默认案场
171
+2018/09/25 10:34:18 [E] 用户没有设置默认案场
172
+2018/09/25 10:34:19 [E] 用户没有设置默认案场
173
+2018/09/25 10:34:20 [E] 用户没有设置默认案场
174
+2018/09/25 10:34:26 [E] 用户没有设置默认案场
175
+2018/09/25 10:34:34 [E] 用户没有设置默认案场
176
+2018/09/25 10:36:05 [E] 用户没有设置默认案场
177
+2018/09/25 10:36:06 [E] 用户没有设置默认案场
178
+2018/09/25 10:36:12 [E] 用户没有设置默认案场
179
+2018/09/25 10:37:32 [E] 用户没有设置默认案场
180
+2018/09/25 10:37:33 [E] 用户没有设置默认案场
181
+2018/09/25 10:37:34 [E] 用户没有设置默认案场
182
+2018/09/25 10:37:36 [E] 用户没有设置默认案场
183
+2018/09/25 10:39:44 [E] 用户没有设置默认案场
184
+2018/09/25 10:39:45 [E] 用户没有设置默认案场
185
+2018/09/25 10:39:46 [E] 用户没有设置默认案场
186
+2018/09/25 10:49:52 [E] 用户没有设置默认案场
187
+2018/09/25 10:49:56 [E] 用户没有设置默认案场
188
+2018/09/25 10:50:04 [E] 用户没有设置默认案场
189
+2018/09/25 10:52:56 [E] 用户没有设置默认案场
190
+2018/09/25 10:52:58 [E] 用户没有设置默认案场
191
+2018/09/25 10:53:02 [E] 用户没有设置默认案场
192
+2018/09/25 11:03:32 [E] 用户没有设置默认案场

+ 3
- 2
service/coupon/coupon.go Visa fil

@@ -515,7 +515,7 @@ func (s *CouponServ) ReceiveCoupon(id, saleid, serialcode string) error {
515 515
 	if coupon.TotalCount <= coupon.SentCount && coupon.IsOver == 0 {
516 516
 		return errors.New("log-error-优惠券已领完!")
517 517
 	}
518
-	if coupon.EndDate.Before(time.Now()) {
518
+	if coupon.ValidDays <= 0 && coupon.EndDate.Before(time.Now()) {
519 519
 		return errors.New("log-error-优惠券已过期")
520 520
 	}
521 521
 
@@ -606,7 +606,8 @@ func (s *CouponServ) ChannelReceiveCoupon(id string) error {
606 606
 	if coupon.TotalCount <= coupon.SentCount && coupon.IsOver == 0 {
607 607
 		return errors.New("log-error-优惠券已领完!")
608 608
 	}
609
-	if coupon.EndDate.Before(time.Now()) {
609
+
610
+	if coupon.ValidDays <= 0 && coupon.EndDate.Before(time.Now()) {
610 611
 		return errors.New("log-error-优惠券已过期")
611 612
 	}
612 613
 

+ 1
- 1
service/message/news.go Visa fil

@@ -37,7 +37,7 @@ func (s *MessageServ) GetNewsList(locationid, title, orgid string, page int, pag
37 37
 
38 38
 // GetNewsByLocation 根据位置id获取咨询信息
39 39
 func (s *MessageServ) GetNewsByLocation(locationid, orgid string) ([]model.TaCmsNews, error) {
40
-	news, err := s.dao.GetNewsByLocation(locationid, orgid)
40
+	news, err := s.dao.GetNewsByLocationShow(locationid, orgid)
41 41
 	if err != nil {
42 42
 		utils.LogError("获取列表失败: " + err.Error())
43 43
 		return nil, errors.New("获取列表失败")