|
|
@@ -1,5 +1,6 @@ |
|
|
package com.iformall.domain.po; |
|
|
package com.iformall.domain.po; |
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.alibaba.fastjson.JSONObject; |
|
|
import com.baomidou.mybatisplus.annotation.TableField; |
|
|
import com.baomidou.mybatisplus.annotation.TableField; |
|
|
import com.baomidou.mybatisplus.annotation.TableName; |
|
|
import com.baomidou.mybatisplus.annotation.TableName; |
|
|
@@ -13,6 +14,7 @@ import lombok.EqualsAndHashCode; |
|
|
|
|
|
|
|
|
import java.util.Date; |
|
|
import java.util.Date; |
|
|
import java.util.HashMap; |
|
|
import java.util.HashMap; |
|
|
|
|
|
import java.util.Iterator; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.Map; |
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
@@ -157,6 +159,26 @@ public class WxScoreRules extends BaseTenantEntity { |
|
|
|
|
|
|
|
|
return null; |
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static JSONArray removeRuleObj(JSONArray rule,EnumScoreType scoreType) { |
|
|
|
|
|
if (rule == null) { |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
JSONArray ret = new JSONArray(); |
|
|
|
|
|
for (Iterator crule = rule.iterator();crule.hasNext();) { |
|
|
|
|
|
JSONObject jo = (JSONObject) crule.next(); |
|
|
|
|
|
Integer id = jo.getInteger(WxScoreRules.ID); |
|
|
|
|
|
if ( id!= null && id.equals(scoreType.getCode())){ |
|
|
|
|
|
continue; |
|
|
|
|
|
}else { |
|
|
|
|
|
ret.add(jo); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
if (ret.size() <= 0 ) { |
|
|
|
|
|
return null; |
|
|
|
|
|
} |
|
|
|
|
|
return ret; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public static JSONObject createBusinessDefaultJson(Integer businessId,String businessNme) { |
|
|
public static JSONObject createBusinessDefaultJson(Integer businessId,String businessNme) { |
|
|
String json = "{\"businessId\":"+businessId+",\"title\":\""+businessNme+"\",\"limit\":"+DEFAULT_LIMIT+",\"step\":"+DEFAULT_STEP+",\"score\":"+DEFAULT_SCORE+" ,\"desc\":\"线上交易1元\"}" ; |
|
|
String json = "{\"businessId\":"+businessId+",\"title\":\""+businessNme+"\",\"limit\":"+DEFAULT_LIMIT+",\"step\":"+DEFAULT_STEP+",\"score\":"+DEFAULT_SCORE+" ,\"desc\":\"线上交易1元\"}" ; |
|
|
|