|
@@ -2,7 +2,9 @@ package com.iamberry.wechat.service;
|
|
|
|
|
|
|
|
|
|
import com.iamberry.wechat.core.entity.activity.ActivityDate;
|
|
import com.iamberry.wechat.core.entity.activity.ActivityDate;
|
|
|
|
+import com.iamberry.wechat.core.entity.admin.FullReduction;
|
|
import com.iamberry.wechat.face.admin.SystemService;
|
|
import com.iamberry.wechat.face.admin.SystemService;
|
|
|
|
+import com.iamberry.wechat.face.member.MemberService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Component;
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
|
@@ -18,6 +20,9 @@ public class ActivityUtil {
|
|
@Autowired
|
|
@Autowired
|
|
private SystemService systemService;
|
|
private SystemService systemService;
|
|
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private MemberService memberService;
|
|
|
|
+
|
|
private SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
private SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -70,4 +75,19 @@ public class ActivityUtil {
|
|
return activityDate;
|
|
return activityDate;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 查询用户是否有38节满减满赠优惠
|
|
|
|
+ * @return true/false;
|
|
|
|
+ */
|
|
|
|
+ public boolean getFullReduction(String openid){
|
|
|
|
+ if(openid == null || openid.equals("")){
|
|
|
|
+ return false;
|
|
|
|
+ }
|
|
|
|
+ FullReduction fullReduction = memberService.getFullReduction(openid);
|
|
|
|
+ if(fullReduction == null){
|
|
|
|
+ return false;
|
|
|
|
+ }else{
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|