|
@@ -2,6 +2,7 @@ package org.jeecg.modules.smscheck.controller;
|
|
|
|
|
|
|
|
import cn.hutool.core.lang.Dict;
|
|
import cn.hutool.core.lang.Dict;
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
+import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
@@ -19,6 +20,7 @@ import org.jeecg.modules.smscheck.entity.SmsCheckCustomerData;
|
|
|
import org.jeecg.modules.smscheck.entity.SmsCheckCustomerInfo;
|
|
import org.jeecg.modules.smscheck.entity.SmsCheckCustomerInfo;
|
|
|
import org.jeecg.modules.smscheck.entity.SpecialExamination;
|
|
import org.jeecg.modules.smscheck.entity.SpecialExamination;
|
|
|
import org.jeecg.modules.smscheck.service.BusinessReminderCardService;
|
|
import org.jeecg.modules.smscheck.service.BusinessReminderCardService;
|
|
|
|
|
+import org.jeecg.modules.smscheck.util.HttpClientUtil;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
@@ -37,6 +39,7 @@ import java.util.stream.Stream;
|
|
|
public class BusinessReminderCardController {
|
|
public class BusinessReminderCardController {
|
|
|
@Autowired
|
|
@Autowired
|
|
|
private BusinessReminderCardService businessReminderCardService;
|
|
private BusinessReminderCardService businessReminderCardService;
|
|
|
|
|
+ private static final String PHONE_PLACE_API_URL="http://virtual.paipai.com/extinfo/GetMobileProductInfo";
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "入网信息业务-分页列表查询", notes = "入网信息业务-分页列表查询")
|
|
@ApiOperation(value = "入网信息业务-分页列表查询", notes = "入网信息业务-分页列表查询")
|
|
@@ -235,7 +238,7 @@ public class BusinessReminderCardController {
|
|
|
int i = 0;
|
|
int i = 0;
|
|
|
for (BusinessReminderCard reminderCard : businessReminderCard) {
|
|
for (BusinessReminderCard reminderCard : businessReminderCard) {
|
|
|
if (ObjectUtil.isNotNull(reminderCard.getNumberResults())){
|
|
if (ObjectUtil.isNotNull(reminderCard.getNumberResults())){
|
|
|
- if (reminderCard.getNumberResults() !=1){
|
|
|
|
|
|
|
+ if (!reminderCard.getNumberResults().contains("1")){
|
|
|
i++;
|
|
i++;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -249,4 +252,66 @@ public class BusinessReminderCardController {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+
|
|
|
|
|
+ *
|
|
|
|
|
+
|
|
|
|
|
+ * @Title: getMobilePlace
|
|
|
|
|
+
|
|
|
|
|
+ * @Description: 获取手机归属地信息
|
|
|
|
|
+
|
|
|
|
|
+ * @param @param mobile
|
|
|
|
|
+
|
|
|
|
|
+ * @param @return
|
|
|
|
|
+
|
|
|
|
|
+ * @return String
|
|
|
|
|
+
|
|
|
|
|
+ * @throws
|
|
|
|
|
+
|
|
|
|
|
+ */
|
|
|
|
|
+
|
|
|
|
|
+ public String getMobilePlace(String mobile){
|
|
|
|
|
+
|
|
|
|
|
+ HttpClientUtil util = new HttpClientUtil();
|
|
|
|
|
+
|
|
|
|
|
+ String[] strings={"",""};
|
|
|
|
|
+
|
|
|
|
|
+ try {
|
|
|
|
|
+
|
|
|
|
|
+ //访问拍拍的查询接口
|
|
|
|
|
+
|
|
|
|
|
+ String mobileMessage = util.getWebcontent(PHONE_PLACE_API_URL+"?mobile="+mobile+"&amount=10000", "GB2312");
|
|
|
|
|
+
|
|
|
|
|
+ strings = mobileMessage.split(";");
|
|
|
|
|
+
|
|
|
|
|
+ //(页面获取到的消息,除了这些,还有一些html语句)
|
|
|
|
|
+
|
|
|
|
|
+ // string[0]="({mobile:'15850781443',province:'江苏',isp:'中国移动',stock:'1',amount:'10000',maxprice:'0',minprice:'0',cityname:'南京'})";
|
|
|
|
|
+
|
|
|
|
|
+ mobileMessage = strings[0];
|
|
|
|
|
+
|
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(mobileMessage.substring(1, mobileMessage.length()-1));
|
|
|
|
|
+
|
|
|
|
|
+ //解析出省份和city和运营商
|
|
|
|
|
+
|
|
|
|
|
+ String province = jsonObject.getString("province");
|
|
|
|
|
+
|
|
|
|
|
+ String cityname = jsonObject.getString("cityname");
|
|
|
|
|
+
|
|
|
|
|
+ String isp = jsonObject.getString("isp");
|
|
|
|
|
+
|
|
|
|
|
+ return isp+" "+province+cityname;
|
|
|
|
|
+
|
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
+
|
|
|
|
|
+ e.printStackTrace();
|
|
|
|
|
+
|
|
|
|
|
+ // logger.error(strings[0]+e.toString());
|
|
|
|
|
+
|
|
|
|
|
+ return "";
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|