|
@@ -22,6 +22,7 @@ import cn.com.ctop.common.module.entity.UserAllocation;
|
|
import cn.com.ctop.common.module.mapper.SysUserMapper;
|
|
import cn.com.ctop.common.module.mapper.SysUserMapper;
|
|
import cn.com.ctop.common.module.mapper.UserAllocationMapper;
|
|
import cn.com.ctop.common.module.mapper.UserAllocationMapper;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
import cn.com.ctop.common.module.service.ICtopOauthTokenService;
|
|
|
|
+import cn.com.ctop.common.module.service.IRuleDataAccountKuaishouService;
|
|
import cn.com.ctop.common.module.service.IRuleDataAccountService;
|
|
import cn.com.ctop.common.module.service.IRuleDataAccountService;
|
|
import cn.com.ctop.common.module.service.ISendMessageService;
|
|
import cn.com.ctop.common.module.service.ISendMessageService;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
import cn.com.ctop.common.module.utils.Check;
|
|
@@ -82,6 +83,8 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
@Autowired
|
|
@Autowired
|
|
private IRuleDataAccountService ruleDataAccountService;
|
|
private IRuleDataAccountService ruleDataAccountService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private IRuleDataAccountKuaishouService ruleDataAccountKuaishouService;
|
|
|
|
+ @Autowired
|
|
private AlarmEventSendMapper alarmEventSendMapper;
|
|
private AlarmEventSendMapper alarmEventSendMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private UserAllocationMapper userAllocationMapper;
|
|
private UserAllocationMapper userAllocationMapper;
|
|
@@ -142,12 +145,12 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
Map<Long, Object> map = (Map<Long, Object>) ruleGroupMap.get(templates.getTemplateId());
|
|
Map<Long, Object> map = (Map<Long, Object>) ruleGroupMap.get(templates.getTemplateId());
|
|
Integer type = (Integer) map.get("type");
|
|
Integer type = (Integer) map.get("type");
|
|
JSONObject matchData = null;
|
|
JSONObject matchData = null;
|
|
- //媒体类型 1:头条2:快手
|
|
|
|
|
|
+ //媒体类型 1,3:头条2:快手
|
|
if (NoEn.NO1.valueInt() == type || NoEn.NO3.valueInt() == type) {
|
|
if (NoEn.NO1.valueInt() == type || NoEn.NO3.valueInt() == type) {
|
|
//查询抖音匹配数据
|
|
//查询抖音匹配数据
|
|
- matchData = getRuleData(templates.getAccountId());
|
|
|
|
|
|
+ matchData = getRuleData(templates.getAccountId(), "TT");
|
|
} else {
|
|
} else {
|
|
- //TODO 获取快手数据
|
|
|
|
|
|
+ matchData = getRuleData(templates.getAccountId(), "KS");
|
|
}
|
|
}
|
|
if (Check.isNull(matchData)) {
|
|
if (Check.isNull(matchData)) {
|
|
log.warn("获取匹配数据失败");
|
|
log.warn("获取匹配数据失败");
|
|
@@ -818,9 +821,14 @@ public class RuleGroupServiceImpl extends ServiceImpl<RuleGroupMapper, RuleGroup
|
|
* @throws
|
|
* @throws
|
|
* @author ZHAOXA
|
|
* @author ZHAOXA
|
|
*/
|
|
*/
|
|
- private JSONObject getRuleData(Long accountId) {
|
|
|
|
|
|
+ private JSONObject getRuleData(Long accountId, String type) {
|
|
try {
|
|
try {
|
|
- return ruleDataAccountService.getRuleDataByAccountId(accountId);
|
|
|
|
|
|
+ if ("TT".equals(type)) {
|
|
|
|
+ return ruleDataAccountService.getRuleDataByAccountId(accountId);
|
|
|
|
+ }
|
|
|
|
+ if ("KS".equals(type)) {
|
|
|
|
+ return ruleDataAccountKuaishouService.getKuaiShouRuleDataByAccountId(accountId);
|
|
|
|
+ }
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
log.error("获取匹配数据集异常", e);
|
|
log.error("获取匹配数据集异常", e);
|
|
}
|
|
}
|