[新增功能](master): 修复一个BUG

1. imei判断的bug
master
土豆兄弟 3 years ago
parent 77323b098e
commit c342609bce

@ -173,11 +173,8 @@ public class MobileMonitorCallbackAPI {
private boolean preRuleForReq(BaiduMobileMonitorCallbackRequestVO vo) { private boolean preRuleForReq(BaiduMobileMonitorCallbackRequestVO vo) {
String imei = vo.getImei(); String imei = vo.getImei();
if (StrUtil.isBlank(imei)) {
return Boolean.TRUE;
}
if (StrUtil.isNotBlank(imei) && StrUtil.equalsIgnoreCase(IMEI_TAG, imei) && StrUtil.equalsIgnoreCase(IMEI_NULL_TAG,imei)) { if (StrUtil.isBlank(imei) || StrUtil.equalsIgnoreCase(IMEI_TAG, imei) || StrUtil.equalsIgnoreCase(IMEI_NULL_TAG,imei)) {
return Boolean.TRUE; return Boolean.TRUE;
} }
return Boolean.FALSE; return Boolean.FALSE;

@ -1,13 +1,38 @@
package com.baiyee.adcallback; package com.baiyee.adcallback;
import org.junit.jupiter.api.Test; import cn.hutool.json.JSONUtil;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest public class AdCallbackApplicationTests {
class AdCallbackApplicationTests { static class User{
private String name;
private Integer age;
@Test public String getName() {
void contextLoads() { return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
} }
public static void main(String[] args) {
User user = new User();
user.setName("123");
user.setAge(0);
System.out.println(JSONUtil.toJsonStr(user));
}
} }

Loading…
Cancel
Save