|
@@ -58,22 +58,20 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
SysUserExt sysUserExt = sysUserExtService.selectSysUserExtById(userId);
|
|
SysUserExt sysUserExt = sysUserExtService.selectSysUserExtById(userId);
|
|
|
String salesLevel = sysUserExt.getSalesLevel();
|
|
String salesLevel = sysUserExt.getSalesLevel();
|
|
|
List<String> userTypeList = new ArrayList<>();
|
|
List<String> userTypeList = new ArrayList<>();
|
|
|
- SysUserShopExt sysUserShopExt = sysUserShopExtService.selectSysUserShopExtById(obj.getString("userId"));
|
|
|
|
|
|
|
+ List<SysUserShopExt> sysUserShopExt = sysUserShopExtService.selectSysUserShopExtById(obj.getString("userId"));
|
|
|
|
|
+ Set<String> userTypeSet = new HashSet<>();
|
|
|
|
|
+ for (SysUserShopExt shopExt : sysUserShopExt){
|
|
|
|
|
+ userTypeSet.add(shopExt.getIsShopType());
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
if(("customer_level").equals(salesLevel)||("reseller_level").equals(salesLevel) ){
|
|
if(("customer_level").equals(salesLevel)||("reseller_level").equals(salesLevel) ){
|
|
|
userTypeList.add("1");
|
|
userTypeList.add("1");
|
|
|
}else{
|
|
}else{
|
|
|
userTypeList.add("0");
|
|
userTypeList.add("0");
|
|
|
}
|
|
}
|
|
|
- if (sysUserShopExt != null){
|
|
|
|
|
- if ("0".equals(sysUserShopExt.getIsShopType())){
|
|
|
|
|
- userTypeList.add("3");
|
|
|
|
|
- }else {
|
|
|
|
|
- userTypeList.add("4");
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
//是否有启动弹窗
|
|
//是否有启动弹窗
|
|
|
- AlertConfiguration alertConfiguration1 = alertConfigurationService.selectAlertConfigurationByAlertStatus(userTypeList,sysUserExt.getSalesLevel(),sysUserExt.getOrgCode());
|
|
|
|
|
|
|
+ AlertConfiguration alertConfiguration1 = alertConfigurationService.selectAlertConfigurationByAlertStatus(sysUserExt.getSalesLevel(),sysUserExt.getOrgCode());
|
|
|
|
|
|
|
|
if (alertConfiguration1!=null){
|
|
if (alertConfiguration1!=null){
|
|
|
//有启动
|
|
//有启动
|
|
@@ -120,7 +118,7 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
|
|
|
|
|
//判断该用户是否为金牌店或仿石漆
|
|
//判断该用户是否为金牌店或仿石漆
|
|
|
if (sysUserShopExt != null){
|
|
if (sysUserShopExt != null){
|
|
|
- if((strings.contains("3") || strings.contains("2")) && "0".equals(sysUserShopExt.getIsShopType())){
|
|
|
|
|
|
|
+ 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");
|
|
|
if (alertLog!=null){
|
|
if (alertLog!=null){
|
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|
|
@@ -134,7 +132,7 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
return AjaxResult.success(alertConfiguration1);
|
|
return AjaxResult.success(alertConfiguration1);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if((strings.contains("4") || strings.contains("2")) && "1".equals(sysUserShopExt.getIsShopType())){
|
|
|
|
|
|
|
+ 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");
|
|
|
if (alertLog!=null){
|
|
if (alertLog!=null){
|
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|
|
if (alertLog.getAlertNum()<alertConfiguration1.getAlertNum()){
|