|
|
@@ -57,6 +57,8 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
public Object getAlertLog() throws ParseException {
|
|
|
ParameterObject obj = getParameterObject();
|
|
|
Long userId = Long.valueOf(obj.getString("userId"));
|
|
|
+ String userTp = obj.getString("userType");
|
|
|
+ log.info("当前系统进来为{}",userTp);
|
|
|
Set<String> userTypeSet = new HashSet<>();
|
|
|
List<String> userTypeList = new ArrayList<>();
|
|
|
SysUserExt sysUserExt = sysUserExtService.selectSysUserExtById(userId);
|
|
|
@@ -106,7 +108,7 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
log.info("开始匹配用户:{}",JSON.toJSON(sysUserExt));
|
|
|
if ((strings.contains("1") || strings.contains("2")) && sysUserExt.getSalesLevel().equals("customer_level")){
|
|
|
//满足类型对应a
|
|
|
- AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0");
|
|
|
+ AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0",userTp);
|
|
|
if (alertLog!=null){
|
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|
|
|
updateAlertLog(alertConfiguration1,alertLog,sdf,"1");
|
|
|
@@ -120,7 +122,7 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
}
|
|
|
}
|
|
|
if((strings.contains("0") || strings.contains("2")) && !sysUserExt.getSalesLevel().equals("customer_level")){
|
|
|
- AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0");
|
|
|
+ AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0",userTp);
|
|
|
if (alertLog!=null){
|
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|
|
|
updateAlertLog(alertConfiguration1,alertLog,sdf,"1");
|
|
|
@@ -138,7 +140,7 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
if (sysUserShopExt != null){
|
|
|
log.info("开始匹配门店信息:{}",JSON.toJSON(sysUserShopExt));
|
|
|
if((strings.contains("3") || strings.contains("2")) && userTypeSet.contains("0")){
|
|
|
- AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0");
|
|
|
+ AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0",userTp);
|
|
|
if (alertLog!=null){
|
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|
|
|
updateAlertLog(alertConfiguration1,alertLog,sdf,"1");
|
|
|
@@ -152,7 +154,7 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
}
|
|
|
}
|
|
|
if((strings.contains("4") || strings.contains("2")) && userTypeSet.contains("1")){
|
|
|
- AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0");
|
|
|
+ AlertLog alertLog = alertLogService.selectAlertLogByUserIdAndAlertId(userId, alertConfiguration1.getAlertId(),"0",userTp);
|
|
|
if (alertLog!=null){
|
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|
|
|
updateAlertLog(alertConfiguration1,alertLog,sdf,"1");
|