|
@@ -1,5 +1,6 @@
|
|
|
package com.rongwei.bsserver.controller;
|
|
|
|
|
|
+import cn.hutool.core.util.ObjectUtil;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.rongwei.bscommon.sys.service.BsOrganizationService;
|
|
|
import com.rongwei.bscommon.sys.service.DmTableService;
|
|
@@ -186,4 +187,22 @@ public class ZhcxApiController {
|
|
|
JSONObject result = zhcxApiService.syncUserData(data);
|
|
|
return result;
|
|
|
}
|
|
|
+
|
|
|
+ @PostMapping("/getIp")
|
|
|
+ public R getIp(@RequestBody Map<String,Object> map){
|
|
|
+ Object uuip = map.get("uuip");
|
|
|
+ JSONObject jsonData = new JSONObject();
|
|
|
+ jsonData.put("ifReFresh", false);
|
|
|
+ if (ObjectUtil.isEmpty(uuip)) {
|
|
|
+ return R.ok(jsonData);
|
|
|
+ }
|
|
|
+ String ip = (String) uuip;
|
|
|
+ int count = zhcxApiService.getIp(ip);
|
|
|
+ if(count == 0){
|
|
|
+ zhcxApiService.saveIp(ip);
|
|
|
+ jsonData.put("ifReFresh", true);
|
|
|
+ return R.ok(jsonData);
|
|
|
+ }
|
|
|
+ return R.ok(jsonData);
|
|
|
+ }
|
|
|
}
|