|
|
|
@@ -5,16 +5,14 @@ import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import com.iformall.common.IdWorker; |
|
|
|
import com.iformall.common.ResultData; |
|
|
|
import com.iformall.domain.po.*; |
|
|
|
import com.iformall.domain.po.base.TenantEntity; |
|
|
|
import com.iformall.domain.po.WxBusiness; |
|
|
|
import com.iformall.domain.po.WxPropertyContract; |
|
|
|
import com.iformall.domain.po.WxRentContract; |
|
|
|
import com.iformall.domain.po.WxScoreRules; |
|
|
|
import com.iformall.enums.*; |
|
|
|
import com.iformall.mapper.WxBusinessMapper; |
|
|
|
import com.iformall.mapper.WxPropertyContractMapper; |
|
|
|
import com.iformall.mapper.WxRentContractMapper; |
|
|
|
import com.iformall.service.WxBusinessService; |
|
|
|
import com.iformall.service.WxMallService; |
|
|
|
import com.iformall.utils.Constant; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
import org.apache.commons.collections.CollectionUtils; |
|
|
|
@@ -45,6 +43,9 @@ public class WxBusinessServiceImpl implements WxBusinessService { |
|
|
|
private WxRentContractMapper wxRentContractMapper; |
|
|
|
@Autowired |
|
|
|
private WxPropertyContractMapper wxPropertyContractMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxMallService wxMallService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
@Qualifier("scoreRuleRedisTemplate") |
|
|
|
@@ -326,23 +327,51 @@ public class WxBusinessServiceImpl implements WxBusinessService { |
|
|
|
} |
|
|
|
|
|
|
|
//删除积分规则,成长值规则缓存 |
|
|
|
String key = Constant.SCORE_RULES_KEY_PREV + record.getFinalTenantId(); |
|
|
|
delRulesRedis(record.getFinalTenantId()); |
|
|
|
} |
|
|
|
|
|
|
|
private void delRulesRedis(String finalTenantId){ |
|
|
|
//删除积分规则,成长值规则缓存 |
|
|
|
String key = Constant.SCORE_RULES_KEY_PREV + finalTenantId; |
|
|
|
boolean hasKey = scoreRulesRedisTemplate.hasKey(key); |
|
|
|
if (hasKey) { |
|
|
|
scoreRulesRedisTemplate.delete(key); |
|
|
|
} |
|
|
|
|
|
|
|
String key1 = Constant.CREDIT_RULES_KEY_PREV + record.getFinalTenantId(); |
|
|
|
|
|
|
|
String key1 = Constant.CREDIT_RULES_KEY_PREV + finalTenantId; |
|
|
|
boolean hasKey1 = scoreRulesRedisTemplate.hasKey(key1); |
|
|
|
if (hasKey1) { |
|
|
|
scoreRulesRedisTemplate.delete(key1); |
|
|
|
} |
|
|
|
|
|
|
|
String key2 = Constant.CREDIT_DOUBLE_RULES_KEY_PREV + record.getFinalTenantId(); |
|
|
|
|
|
|
|
String key2 = Constant.CREDIT_DOUBLE_RULES_KEY_PREV + finalTenantId; |
|
|
|
boolean hasKey2 = scoreRulesRedisTemplate.hasKey(key2); |
|
|
|
if (hasKey2) { |
|
|
|
scoreRulesRedisTemplate.delete(key2); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
TenantEntity tenantEntity = new TenantEntity(); |
|
|
|
tenantEntity.setTenantId(finalTenantId); |
|
|
|
List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity); |
|
|
|
if(tenantEntitys != null && tenantEntitys.size() > 0){ |
|
|
|
for (TenantEntity entity:tenantEntitys) { |
|
|
|
String scorekey = Constant.SCORE_RULES_KEY_PREV + entity.getTenantId(); |
|
|
|
if (scoreRulesRedisTemplate.hasKey(scorekey)) { |
|
|
|
scoreRulesRedisTemplate.delete(scorekey); |
|
|
|
} |
|
|
|
|
|
|
|
String creditkey = Constant.CREDIT_RULES_KEY_PREV + entity.getTenantId(); |
|
|
|
if (scoreRulesRedisTemplate.hasKey(creditkey)) { |
|
|
|
scoreRulesRedisTemplate.delete(creditkey); |
|
|
|
} |
|
|
|
|
|
|
|
String creditDoublekey = Constant.CREDIT_DOUBLE_RULES_KEY_PREV + entity.getTenantId(); |
|
|
|
if (scoreRulesRedisTemplate.hasKey(creditDoublekey)) { |
|
|
|
scoreRulesRedisTemplate.delete(creditDoublekey); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |