Forráskód Böngészése

Merge branch 'master' of http://192.168.20.122:3000/root/MemberCenter_DW

Jacky Wong 5 éve%!(EXTRA string=óta)
szülő
commit
856994fe07

+ 7 - 0
member-services/src/main/resources/templates/index.ftl

@@ -380,6 +380,13 @@ function ar_main() {
 
     dest = dest.replace("\#","");
 
+    var test = document.getElementById('test');
+    var childs = test.childNodes;
+
+    for(var i = childs .length - 1; i >= 0; i--) {
+        test.removeChild(childs[i]);
+    }
+
     //通过插入图片访问该地址
     document.getElementById("test").innerHTML += "<img src=\"" + dest + "\" border=\"0\" width=\"1\" height=\"1\" />";
 }

+ 10 - 4
member-weixin-service/src/main/java/com/liangjian/dataplatform/member/service/impl/UserIngOrdersService.java

@@ -94,7 +94,7 @@ public class UserIngOrdersService implements IUserIngOrdersService {
         if(secretPhone!=null&&secretPhone!=""){
             WeixinUserInfo weixinUserInfo=weixinUserInfoRepository.queryBySecretPhone(secretPhone).get();
             if(weixinUserInfo!=null){
-                ingValue=weixinUserInfo.getPoint();
+                ingValue=weixinUserInfo.getGrowth();
             }
             //全部等级
             List<UserLevelUnit> userLevelUnits=userLevelUnitRepository.findAll();
@@ -116,18 +116,24 @@ public class UserIngOrdersService implements IUserIngOrdersService {
 
         MemIngProduct mpd=pdlist.isEmpty() ? null : pdlist.get(0);
         Set<MemIngProductLevel> mset=new HashSet<MemIngProductLevel>();
-        Integer ing=mpd.getMarketIng();
+        Integer ingCode=0;
+
         if(mpd!=null){
             Set<MemIngProductLevel> productLevel = mpd.getProductLevel();
+            ingCode=productLevel.size();
             for(MemIngProductLevel me : productLevel){
                 if(me.getLevelId().equals(level)){
                     //指定价格
+                    mset.clear();
                     mset.add(me);
                     break;
                 }else if(ingValue>0){
-                    mset.clear();
-                    mset.add(me);
+                    if(me.getLevel().getLevel()>=ingCode){
+                        mset.clear();
+                        mset.add(me);
+                    }
                 }
+
             }
             mpd.setProductLevel(mset);
         }