mirror of
https://github.com/hpd840321/starRiverProperty.git
synced 2026-06-09 08:20:31 +08:00
feat: add service config templates and extraction script
Former-commit-id: 1de24b7eb79676d1aba9d799a58c5a753290cf52
This commit is contained in:
@@ -0,0 +1,73 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cn.cloudwalk.ninca</groupId>
|
||||
<artifactId>ninca-crk-from-lib-reactor</artifactId>
|
||||
<version>2.9.1_210630-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
<artifactId>ninca-crk-visitor-management-web</artifactId>
|
||||
<name>ninca-crk-visitor-management-web</name>
|
||||
<description>CFR from ninca-crk-visitor-management-web-2.9.1_210630-SNAPSHOT.jar (embedded pom: none)</description>
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.ninca</groupId>
|
||||
<artifactId>ninca-crk-visitor-management-service</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.ninca</groupId>
|
||||
<artifactId>ninca-crk-visitor-management-interface</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.intelligent</groupId>
|
||||
<artifactId>intelligent-cwoscomponent-interface</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.cloud</groupId>
|
||||
<artifactId>cloudwalk-common-result</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.validation</groupId>
|
||||
<artifactId>validation-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cn.cloudwalk.ninca</groupId>
|
||||
<artifactId>ninca-crk-portal-resource-stubs</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jodd</groupId>
|
||||
<artifactId>jodd-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.web.bind.annotation.ExceptionHandler
|
||||
* org.springframework.web.bind.annotation.ResponseBody
|
||||
* org.springframework.web.bind.annotation.RestControllerAdvice
|
||||
* org.springframework.web.servlet.NoHandlerFoundException
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor;
|
||||
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
import org.springframework.web.servlet.NoHandlerFoundException;
|
||||
|
||||
@RestControllerAdvice(basePackages={"cn.cloudwalk.web.ninca.visitor"})
|
||||
public class VisitorGlobalExceptionHandler {
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
@ExceptionHandler(value={Exception.class})
|
||||
@ResponseBody
|
||||
public CloudwalkResult<Void> exceptionHandler(HttpServletRequest req, Exception e) {
|
||||
this.logger.error("\u670d\u52a1\u5f02\u5e38\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
if (e instanceof NoHandlerFoundException) {
|
||||
return CloudwalkResult.fail((String)"76250001", (String)"\u670d\u52a1\u4e0d\u5b58\u5728");
|
||||
}
|
||||
return CloudwalkResult.fail((String)"76250000", (String)"\u670d\u52a1\u5185\u90e8\u9519\u8bef");
|
||||
}
|
||||
}
|
||||
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.DavinciPicObj
|
||||
* cn.cloudwalk.common.ninca.visitor.util.CollectionUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.util.StringUtils
|
||||
* cn.cloudwalk.service.ninca.visitor.common.VisitorCommonConfigProperties
|
||||
* org.aspectj.lang.JoinPoint
|
||||
* org.aspectj.lang.annotation.AfterReturning
|
||||
* org.aspectj.lang.annotation.Aspect
|
||||
* org.aspectj.lang.annotation.Pointcut
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.aspect;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic;
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.DavinciPicObj;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.CollectionUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.StringUtils;
|
||||
import cn.cloudwalk.service.ninca.visitor.common.VisitorCommonConfigProperties;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Aspect
|
||||
@Component
|
||||
public class VisitorControllerAspect {
|
||||
@Autowired
|
||||
private VisitorCommonConfigProperties visitorCommonConfigProperties;
|
||||
private Logger logger = LoggerFactory.getLogger(VisitorControllerAspect.class);
|
||||
|
||||
@Pointcut(value="execution(public * cn.cloudwalk.web.ninca.visitor..*.controller..*(..))")
|
||||
public void controllerPointcut() {
|
||||
}
|
||||
|
||||
@AfterReturning(returning="ret", value="controllerPointcut()")
|
||||
public void doAfter(JoinPoint joinPoint, Object ret) {
|
||||
if (ret instanceof CloudwalkResult) {
|
||||
CloudwalkResult cloudwalkResult = (CloudwalkResult)ret;
|
||||
Object obj = cloudwalkResult.getData();
|
||||
this.gen(obj);
|
||||
}
|
||||
}
|
||||
|
||||
private void gen(Object obj) {
|
||||
if (obj == null) {
|
||||
return;
|
||||
}
|
||||
if (obj instanceof CloudwalkPageAble) {
|
||||
CloudwalkPageAble cloudwalkPageAble = (CloudwalkPageAble)obj;
|
||||
List tList = (List)cloudwalkPageAble.getDatas();
|
||||
if (CollectionUtils.isNotEmpty((Collection)tList)) {
|
||||
for (Object o : tList) {
|
||||
this.genFullPicUrl(o);
|
||||
}
|
||||
}
|
||||
} else if (obj instanceof ArrayList) {
|
||||
List tList = (List)obj;
|
||||
if (CollectionUtils.isNotEmpty((Collection)tList)) {
|
||||
for (Object o : tList) {
|
||||
this.genFullPicUrl(o);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this.genFullPicUrl(obj);
|
||||
}
|
||||
}
|
||||
|
||||
private void genFullPicUrl(Object o) {
|
||||
Field[] allFields;
|
||||
if (o == null) {
|
||||
return;
|
||||
}
|
||||
Class<?> clazz = o.getClass();
|
||||
for (Field field : allFields = clazz.getDeclaredFields()) {
|
||||
try {
|
||||
Method getMethod;
|
||||
String getMethodName;
|
||||
if (field.isAnnotationPresent(DavinciPicObj.class)) {
|
||||
getMethodName = "get" + StringUtils.toUpperCase((String)field.getName(), (int)1);
|
||||
getMethod = clazz.getMethod(getMethodName, new Class[0]);
|
||||
this.gen(getMethod.invoke(o, new Object[0]));
|
||||
}
|
||||
if (!field.isAnnotationPresent(DavinciPic.class)) continue;
|
||||
getMethodName = "get" + StringUtils.toUpperCase((String)field.getName(), (int)1);
|
||||
getMethod = clazz.getMethod(getMethodName, new Class[0]);
|
||||
String setMethodName = "set" + StringUtils.toUpperCase((String)field.getName(), (int)1);
|
||||
if (field.getType() == List.class) {
|
||||
ArrayList<String> urls = new ArrayList<String>();
|
||||
List paths = (List)getMethod.invoke(o, new Object[0]);
|
||||
if (!CollectionUtils.isNotEmpty((Collection)paths)) continue;
|
||||
for (String path : paths) {
|
||||
urls.add(this.visitorCommonConfigProperties.getCwosFilePath() + path);
|
||||
}
|
||||
Method setMethod = clazz.getMethod(setMethodName, field.getType());
|
||||
setMethod.invoke(o, urls);
|
||||
continue;
|
||||
}
|
||||
String path = (String)getMethod.invoke(o, new Object[0]);
|
||||
if (!StringUtils.isNotBlank((String)path)) continue;
|
||||
Method setMethod = clazz.getMethod(setMethodName, field.getType());
|
||||
setMethod.invoke(o, this.visitorCommonConfigProperties.getCwosFilePath() + path);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5904\u7406\u5931\u8d25", (Throwable)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+146
@@ -0,0 +1,146 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContextBuilder
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.session.extend.DefaultExtendContext
|
||||
* cn.cloudwalk.cloud.session.extend.ExtendContext
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.context.MessageSource
|
||||
* org.springframework.context.i18n.LocaleContextHolder
|
||||
* org.springframework.web.context.request.RequestContextHolder
|
||||
* org.springframework.web.context.request.ServletRequestAttributes
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.common;
|
||||
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContextBuilder;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.session.extend.DefaultExtendContext;
|
||||
import cn.cloudwalk.cloud.session.extend.ExtendContext;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.VisitorExcelUtilExtend;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
public abstract class AbstractCloudwalkController {
|
||||
protected final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
@Autowired
|
||||
private MessageSource messageSource;
|
||||
@Autowired
|
||||
private VisitorExcelUtilExtend visitorExcelUtilExtend;
|
||||
@Autowired
|
||||
private CloudwalkSessionContextHolder cloudwalkSessionContextHolder;
|
||||
|
||||
public CloudwalkCallContext getCloudwalkContext() {
|
||||
CloudwalkCallContext cloudwalkCallContext = CloudwalkCallContextBuilder.buildContext((CloudwalkSessionContextHolder)this.cloudwalkSessionContextHolder);
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||
if (null != attributes) {
|
||||
Map<String, String> cloudWalkExtendContextValue;
|
||||
DefaultExtendContext extendContext = (DefaultExtendContext)cloudwalkCallContext.getExt();
|
||||
if (extendContext != null && extendContext.getValue() != null) {
|
||||
cloudWalkExtendContextValue = (Map)extendContext.getValue();
|
||||
} else {
|
||||
cloudWalkExtendContextValue = new HashMap();
|
||||
extendContext = new DefaultExtendContext();
|
||||
}
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
cloudWalkExtendContextValue.put("loginid", request.getHeader("loginid"));
|
||||
cloudWalkExtendContextValue.put("authorization", request.getHeader("authorization"));
|
||||
extendContext.setValue(cloudWalkExtendContextValue);
|
||||
cloudwalkCallContext.setExt((ExtendContext)extendContext);
|
||||
}
|
||||
return cloudwalkCallContext;
|
||||
}
|
||||
|
||||
protected HttpServletRequest getHttpServletRequest() {
|
||||
return ((ServletRequestAttributes)RequestContextHolder.getRequestAttributes()).getRequest();
|
||||
}
|
||||
|
||||
public String getMessage(String code, String defaultMsg) {
|
||||
return this.messageSource.getMessage(code, null, defaultMsg, LocaleContextHolder.getLocale());
|
||||
}
|
||||
|
||||
public String getMessage(String code) {
|
||||
return this.getMessage(code, "");
|
||||
}
|
||||
|
||||
protected void makeExcelresponse(HttpServletRequest request, HttpServletResponse response, String fileName) {
|
||||
response.setContentType("application/vnd.ms-excel;charset=utf-8");
|
||||
response.setHeader("Content-Disposition", "attachment;filename=" + this.encodeFileName(fileName, request));
|
||||
}
|
||||
|
||||
protected String encodeFileName(String fileNames, HttpServletRequest request) {
|
||||
String codedFilename = null;
|
||||
try {
|
||||
codedFilename = URLEncoder.encode(fileNames, "UTF-8");
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5904\u7406\u5931\u8d25", (Throwable)e);
|
||||
}
|
||||
return codedFilename;
|
||||
}
|
||||
|
||||
protected <T> void exportExcel(String fileName, HttpServletRequest request, HttpServletResponse response, Class<T> clazz, List<T> result) throws IOException, Exception {
|
||||
this.makeExcelresponse(request, response, fileName);
|
||||
this.visitorExcelUtilExtend.exportFromList(result, fileName, (OutputStream)response.getOutputStream(), clazz);
|
||||
}
|
||||
|
||||
protected <T> void exportExcel(String fileName, HttpServletRequest request, HttpServletResponse response, Class<T> clazz, List<T> result, Integer startRow) throws IOException, Exception {
|
||||
this.makeExcelresponse(request, response, fileName);
|
||||
this.visitorExcelUtilExtend.exportFromList(result, fileName, (OutputStream)response.getOutputStream(), clazz, startRow);
|
||||
}
|
||||
|
||||
protected <V, T> CloudwalkResult<List<T>> convertServiceListResultToOpen(CloudwalkResult<List<V>> result, Class<T> cls) {
|
||||
if (result.isSuccess()) {
|
||||
List dataList = (List)result.getData();
|
||||
if (null != dataList) {
|
||||
ArrayList openList = new ArrayList(dataList.size());
|
||||
dataList.stream().forEach(item -> openList.add(BeanCopyUtils.copyProperties((Object)item, (Class)cls)));
|
||||
return CloudwalkResult.success(openList);
|
||||
}
|
||||
return CloudwalkResult.success(null);
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
|
||||
protected <V, T> CloudwalkResult<CloudwalkPageAble<T>> convertServicePageAbleResultToOpen(CloudwalkResult<CloudwalkPageAble<V>> result, Class<T> cls) {
|
||||
CloudwalkPageAble pageAble;
|
||||
if (result.isSuccess() && null != (pageAble = (CloudwalkPageAble)result.getData()) && null != pageAble.getDatas()) {
|
||||
ArrayList openList = new ArrayList(pageAble.getDatas().size());
|
||||
pageAble.getDatas().stream().forEach(item -> openList.add(BeanCopyUtils.copyProperties((Object)item, (Class)cls)));
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo((int)pageAble.getCurrentPage(), (int)pageAble.getPageSize());
|
||||
CloudwalkPageAble openPageAble = new CloudwalkPageAble(openList, pageInfo, pageAble.getTotalRows());
|
||||
return CloudwalkResult.success((Object)openPageAble);
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.storage.service.FileStorageService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.utils.ApplicationContextUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.util.StringUtils
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.common;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.storage.service.FileStorageService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.utils.ApplicationContextUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.StringUtils;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.RecursiveAction;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class BatchDownloadTask<T>
|
||||
extends RecursiveAction {
|
||||
private static final Logger logger = LoggerFactory.getLogger(BatchDownloadTask.class);
|
||||
private static final Integer SIZE = 50;
|
||||
private Map<String, Field> fileField;
|
||||
private Class cls;
|
||||
private List<T> list;
|
||||
|
||||
public BatchDownloadTask(Map<String, Field> fileField, Class cls, List<T> list) {
|
||||
this.fileField = fileField;
|
||||
this.cls = cls;
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void compute() {
|
||||
if (this.list.size() <= SIZE) {
|
||||
for (T entry : this.list) {
|
||||
try {
|
||||
this.computeSingle(entry, this.fileField, this.cls);
|
||||
}
|
||||
catch (ServiceException | IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
|
||||
logger.error("\u5e76\u884c\u5904\u7406\u6587\u4ef6\u4e0b\u8f7d\u51fa\u73b0\u5f02\u5e38", e);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
int middle = this.list.size() / 2;
|
||||
BatchDownloadTask<T> taskLeft = new BatchDownloadTask<T>(this.fileField, this.cls, this.list.subList(0, middle));
|
||||
BatchDownloadTask<T> taskRight = new BatchDownloadTask<T>(this.fileField, this.cls, this.list.subList(middle, this.list.size()));
|
||||
BatchDownloadTask.invokeAll(taskLeft, taskRight);
|
||||
}
|
||||
|
||||
private void computeSingle(T obj, Map<String, Field> fileField, Class cls) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException, ServiceException {
|
||||
FileStorageService fileStorageService = (FileStorageService)ApplicationContextUtils.getBean(FileStorageService.class);
|
||||
for (Map.Entry<String, Field> fieldEntry : fileField.entrySet()) {
|
||||
Method getMethod = cls.getMethod(fieldEntry.getKey(), new Class[0]);
|
||||
Object filePathObj = getMethod.invoke(obj, new Object[0]);
|
||||
String filePath = null;
|
||||
if (filePathObj == null || !StringUtils.isNotBlank((String)(filePath = (String)filePathObj))) continue;
|
||||
byte[] bytes = fileStorageService.fileDownload(filePath);
|
||||
String setMethodName = "set" + StringUtils.toUpperCase((String)fieldEntry.getValue().getName(), (int)1);
|
||||
Method setMethod = cls.getMethod(setMethodName, fieldEntry.getValue().getType());
|
||||
setMethod.invoke(obj, new Object[]{bytes});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.ExcelAttribute
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.ExcelBytesAttribute
|
||||
* cn.cloudwalk.common.ninca.visitor.util.ExcelUtil
|
||||
* cn.cloudwalk.common.ninca.visitor.util.StringUtils
|
||||
* com.google.common.base.Stopwatch
|
||||
* javax.annotation.PreDestroy
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.common;
|
||||
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.ExcelAttribute;
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.ExcelBytesAttribute;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.ExcelUtil;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.StringUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.BatchDownloadTask;
|
||||
import com.google.common.base.Stopwatch;
|
||||
import java.io.OutputStream;
|
||||
import java.lang.reflect.Field;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ForkJoinPool;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.PreDestroy;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class VisitorExcelUtilExtend
|
||||
extends ExcelUtil {
|
||||
protected final Logger logger = LoggerFactory.getLogger(VisitorExcelUtilExtend.class);
|
||||
private static ForkJoinPool forkJoinPool = new ForkJoinPool(8);
|
||||
|
||||
@PreDestroy
|
||||
public void destory() {
|
||||
forkJoinPool.shutdown();
|
||||
}
|
||||
|
||||
public <T> boolean exportFromList(List<T> list, String sheetName, OutputStream output, Class<T> clazz) throws Exception {
|
||||
this.resolveFilePath(list, clazz);
|
||||
return VisitorExcelUtilExtend.getListToExcel(list, (String)sheetName, (OutputStream)output, clazz);
|
||||
}
|
||||
|
||||
public <T> boolean exportFromList(List<T> list, String sheetName, OutputStream output, Class<T> clazz, Integer startRow) throws Exception {
|
||||
this.resolveFilePath(list, clazz);
|
||||
return VisitorExcelUtilExtend.getListToExcel(list, (String)sheetName, (OutputStream)output, clazz, (Integer)startRow);
|
||||
}
|
||||
|
||||
private <T> void resolveFilePath(List<T> list, Class<T> clazz) throws Exception {
|
||||
Field[] allFields = clazz.getDeclaredFields();
|
||||
HashMap<String, Field> fieldMap = new HashMap<String, Field>();
|
||||
for (Field field : allFields) {
|
||||
ExcelBytesAttribute bytesAttribute;
|
||||
String pathField;
|
||||
if (!field.isAnnotationPresent(ExcelAttribute.class) || !field.isAnnotationPresent(ExcelBytesAttribute.class) || !StringUtils.isNotBlank((String)(pathField = (bytesAttribute = field.getAnnotation(ExcelBytesAttribute.class)).pathField()))) continue;
|
||||
String getMethod = "get" + StringUtils.toUpperCase((String)pathField, (int)1);
|
||||
fieldMap.put(getMethod, field);
|
||||
}
|
||||
if (fieldMap.size() == 0) {
|
||||
return;
|
||||
}
|
||||
Stopwatch stopwatch = Stopwatch.createStarted();
|
||||
BatchDownloadTask<T> batchDownloadTask = new BatchDownloadTask<T>(fieldMap, clazz, list);
|
||||
forkJoinPool.submit(batchDownloadTask).get();
|
||||
this.logger.info("\u4e0b\u8f7d\u56fe\u7247\u8017\u65f6:{},\u8bb0\u5f55\u6761\u6570:{}", (Object)stopwatch.elapsed(TimeUnit.SECONDS), (Object)list.size());
|
||||
}
|
||||
}
|
||||
|
||||
+69
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.config.param.VisitorConfigEditParam
|
||||
* cn.cloudwalk.client.ninca.visitor.config.param.VisitorConfigQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.config.result.VisitorConfigQueryResult
|
||||
* cn.cloudwalk.client.ninca.visitor.config.service.VisitorConfigService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.config.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.config.param.VisitorConfigEditParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.config.param.VisitorConfigQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.config.result.VisitorConfigQueryResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.config.service.VisitorConfigService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.config.form.VisitorConfigEditForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.config.form.VisitorConfigQueryForm;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/visitor/config"})
|
||||
public class VisitorConfigController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private VisitorConfigService visitorConfigService;
|
||||
|
||||
@PostMapping(value={"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody VisitorConfigEditForm form) {
|
||||
try {
|
||||
VisitorConfigEditParam param = (VisitorConfigEditParam)BeanCopyUtils.copyProperties((Object)form, VisitorConfigEditParam.class);
|
||||
return this.visitorConfigService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u4fee\u6539\u8bbf\u5ba2\u914d\u7f6e\u5f02\u5e38\uff0c\u539f\u56e0\uff1a[{}]", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"762508018", (String)this.getMessage("762508018"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/query"})
|
||||
public CloudwalkResult<List<VisitorConfigQueryResult>> query(@RequestBody VisitorConfigQueryForm form) {
|
||||
try {
|
||||
VisitorConfigQueryParam param = new VisitorConfigQueryParam();
|
||||
BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.visitorConfigService.query(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u914d\u7f6e\u5f02\u5e38\uff0c\u539f\u56e0\uff1a[{}]", (Object)e.getMessage(), (Object)e);
|
||||
return CloudwalkResult.fail((String)"762508022", (String)this.getMessage("762508022"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.config.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorConfigEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 6650139587973782119L;
|
||||
private String id;
|
||||
private String configKey;
|
||||
private String configValue;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getConfigKey() {
|
||||
return this.configKey;
|
||||
}
|
||||
|
||||
public void setConfigKey(String configKey) {
|
||||
this.configKey = configKey;
|
||||
}
|
||||
|
||||
public String getConfigValue() {
|
||||
return this.configValue;
|
||||
}
|
||||
|
||||
public void setConfigValue(String configValue) {
|
||||
this.configValue = configValue;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.config.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorConfigQueryForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 6220703135456280120L;
|
||||
private String id;
|
||||
private String configKey;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getConfigKey() {
|
||||
return this.configKey;
|
||||
}
|
||||
|
||||
public void setConfigKey(String configKey) {
|
||||
this.configKey = configKey;
|
||||
}
|
||||
}
|
||||
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.corp.CorpService
|
||||
* cn.cloudwalk.client.ninca.visitor.corp.result.CorpResult
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.corp;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.corp.CorpService;
|
||||
import cn.cloudwalk.client.ninca.visitor.corp.result.CorpResult;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/visitor/corp"})
|
||||
public class CorpController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private CorpService corpService;
|
||||
|
||||
@RequestMapping(value={"get"})
|
||||
public CloudwalkResult<CorpResult> gets() {
|
||||
try {
|
||||
return this.corpService.get(this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u83b7\u53d6\u4f01\u4e1a\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762509001", (String)this.getMessage("762509001"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.device.param.DeviceDefaultEditParam
|
||||
* cn.cloudwalk.client.ninca.visitor.device.param.DeviceDefaultGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.device.param.VisitorDeviceNewPageParam
|
||||
* cn.cloudwalk.client.ninca.visitor.device.result.DeviceDefaultResult
|
||||
* cn.cloudwalk.client.ninca.visitor.device.result.VisitorDeviceResult
|
||||
* cn.cloudwalk.client.ninca.visitor.device.service.DeviceDefaultService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.device.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.device.param.DeviceDefaultEditParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.param.DeviceDefaultGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.param.VisitorDeviceNewPageParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.result.DeviceDefaultResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.result.VisitorDeviceResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.service.DeviceDefaultService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.device.form.DeviceDefaultEditForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.device.form.DeviceDefaultGetsForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.device.form.VisitorDeviceNewPageForm;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/visitor/terminal/default"})
|
||||
public class VisitorDeviceDefaultController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private DeviceDefaultService deviceDefaultService;
|
||||
|
||||
@RequestMapping(value={"/edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody DeviceDefaultEditForm form) {
|
||||
DeviceDefaultEditParam param = new DeviceDefaultEditParam();
|
||||
param = (DeviceDefaultEditParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.deviceDefaultService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u4fee\u6539\u9ed8\u8ba4\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76250517", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/query"})
|
||||
public CloudwalkResult<List<DeviceDefaultResult>> query(@RequestBody DeviceDefaultGetsForm form) {
|
||||
DeviceDefaultGetsParam param = new DeviceDefaultGetsParam();
|
||||
param = (DeviceDefaultGetsParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.deviceDefaultService.gets(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u83b7\u53d6\u9ed8\u8ba4\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76250518", (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorDeviceResult>> page(@RequestBody VisitorDeviceNewPageForm form) {
|
||||
VisitorDeviceNewPageParam param = (VisitorDeviceNewPageParam)BeanCopyUtils.copyProperties((Object)form, VisitorDeviceNewPageParam.class);
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.deviceDefaultService.page(param, page, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u8003\u52e4\u8bbe\u5907\u5206\u9875\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76240201", (String)this.getMessage("76240201"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class DeviceDefaultEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -8241217398166081548L;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.device.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class DeviceDefaultGetsForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -9190981023290122423L;
|
||||
}
|
||||
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.device.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorDeviceNewPageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 5688215744877695100L;
|
||||
private String areaId;
|
||||
private String deviceName;
|
||||
private String districtId;
|
||||
private List<String> districtIds;
|
||||
|
||||
public static long getSerialVersionUID() {
|
||||
return 5688215744877695100L;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return this.areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getDistrictId() {
|
||||
return this.districtId;
|
||||
}
|
||||
|
||||
public void setDistrictId(String districtId) {
|
||||
this.districtId = districtId;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
}
|
||||
|
||||
+56
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletRequestWrapper
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletRequestWrapper;
|
||||
|
||||
public class HeaderMapRequestWrapper
|
||||
extends HttpServletRequestWrapper {
|
||||
private Map<String, String> headerMap = new HashMap<String, String>();
|
||||
|
||||
public HeaderMapRequestWrapper(HttpServletRequest request) {
|
||||
super(request);
|
||||
}
|
||||
|
||||
public void addHeader(String name, String value) {
|
||||
this.headerMap.put(name, value);
|
||||
}
|
||||
|
||||
public String getHeader(String name) {
|
||||
String headerValue = super.getHeader(name);
|
||||
if (this.headerMap.containsKey(name)) {
|
||||
headerValue = this.headerMap.get(name);
|
||||
}
|
||||
return headerValue;
|
||||
}
|
||||
|
||||
public Enumeration<String> getHeaderNames() {
|
||||
ArrayList names = Collections.list(super.getHeaderNames());
|
||||
for (String name : this.headerMap.keySet()) {
|
||||
names.add(name);
|
||||
}
|
||||
return Collections.enumeration(names);
|
||||
}
|
||||
|
||||
public Enumeration<String> getHeaders(String name) {
|
||||
List<Object> values = Collections.list(super.getHeaders(name));
|
||||
if (this.headerMap.containsKey(name)) {
|
||||
values = Arrays.asList(this.headerMap.get(name));
|
||||
}
|
||||
return Collections.enumeration(values);
|
||||
}
|
||||
}
|
||||
|
||||
+75
@@ -0,0 +1,75 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionObject
|
||||
* cn.cloudwalk.cloud.session.extend.DefaultExtendContext
|
||||
* cn.cloudwalk.cloud.session.extend.ExtendContext
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.context.MessageSource
|
||||
* org.springframework.context.i18n.LocaleContextHolder
|
||||
* org.springframework.util.AntPathMatcher
|
||||
* org.springframework.web.filter.OncePerRequestFilter
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionObject;
|
||||
import cn.cloudwalk.cloud.session.extend.DefaultExtendContext;
|
||||
import cn.cloudwalk.cloud.session.extend.ExtendContext;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.i18n.LocaleContextHolder;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
public abstract class VisitorAbstractFilter
|
||||
extends OncePerRequestFilter {
|
||||
private static final AntPathMatcher ANT_PATH_MATCHER = new AntPathMatcher();
|
||||
protected static final String DEFAULT_PLAT_USER_ID = null;
|
||||
protected static final String DEFAULT_USER_ID = null;
|
||||
protected static final String DEFAULT_USER_NAME = null;
|
||||
protected static final String DEFAULT_APPLICATION_ID = null;
|
||||
@Autowired
|
||||
private CloudwalkSessionContextHolder cloudwalkSessionContextHolder;
|
||||
@Autowired
|
||||
private MessageSource messageSource;
|
||||
|
||||
protected String getHeader(HttpServletRequest request, String headerName) {
|
||||
return request.getHeader(headerName);
|
||||
}
|
||||
|
||||
protected boolean match(List<String> patterns, String path) {
|
||||
for (String pattern : patterns) {
|
||||
if (!ANT_PATH_MATCHER.match(pattern, path)) continue;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
protected void buildCloudwalkSessionContext(String businessId, String applicationId, String platUserId, String userName, String userext1, String pid) {
|
||||
DefaultExtendContext extendContext = new DefaultExtendContext();
|
||||
HashMap<String, String> extend = new HashMap<String, String>(2);
|
||||
extend.put("platformuserid", platUserId);
|
||||
extend.put("pid", pid);
|
||||
extendContext.setValue(extend);
|
||||
String[] args = new String[]{userext1, businessId, userName, applicationId};
|
||||
CloudwalkSessionObject sessionObject = new CloudwalkSessionObject(args);
|
||||
sessionObject.setExt((ExtendContext)extendContext);
|
||||
this.cloudwalkSessionContextHolder.putSession(sessionObject);
|
||||
}
|
||||
|
||||
public String getMessage(String code, String defaultMsg) {
|
||||
return this.messageSource.getMessage(code, null, defaultMsg, LocaleContextHolder.getLocale());
|
||||
}
|
||||
|
||||
public String getMessage(String code) {
|
||||
return this.getMessage(code, "");
|
||||
}
|
||||
}
|
||||
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.anonymous.service.AnonymousVerifyService
|
||||
* cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.AnonymousAddSignParam
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.common.ninca.visitor.util.ResponseUtil
|
||||
* cn.cloudwalk.common.ninca.visitor.util.StringUtils
|
||||
* com.google.common.collect.Lists
|
||||
* javax.servlet.FilterChain
|
||||
* javax.servlet.ServletException
|
||||
* javax.servlet.ServletRequest
|
||||
* javax.servlet.ServletResponse
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.anonymous.service.AnonymousVerifyService;
|
||||
import cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.AnonymousAddSignParam;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.ResponseUtil;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.StringUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.filter.VisitorAbstractFilter;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.io.IOException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class VisitorAnonymousVerifyFilter
|
||||
extends VisitorAbstractFilter {
|
||||
@Autowired
|
||||
private AnonymousVerifyService anonymousVerifyService;
|
||||
@Autowired
|
||||
private VisitorApplicationService visitorApplicationService;
|
||||
private static final String FILTER_PATTERN_PATH = "/anonymous/**";
|
||||
private static final List<String> FILTER_PATTERN_TIMELINESS = Lists.newArrayList((Object[])new String[]{"/anonymous/visitor/reg/approve"});
|
||||
private static final long URL_VALID_MAX_TIME = 86400000L;
|
||||
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
if (this.match(Collections.singletonList(FILTER_PATTERN_PATH), request.getRequestURI())) {
|
||||
try {
|
||||
this.verify(request);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
CloudwalkResult result = CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
ResponseUtil.writeJsonResponse((HttpServletResponse)response, (Object)result, (int)401);
|
||||
return;
|
||||
}
|
||||
}
|
||||
filterChain.doFilter((ServletRequest)request, (ServletResponse)response);
|
||||
}
|
||||
|
||||
private void verify(HttpServletRequest request) throws ServiceException {
|
||||
String applicationId;
|
||||
String businessId;
|
||||
String sign = this.getHeader(request, "sign");
|
||||
String bid = this.getHeader(request, "bid");
|
||||
String ct = this.getHeader(request, "ct");
|
||||
String pid = this.getHeader(request, "pid");
|
||||
if (StringUtils.isEmpty((String)sign) || StringUtils.isEmpty((String)bid) || StringUtils.isEmpty((String)ct)) {
|
||||
throw new ServiceException("76250005", this.getMessage("76250005"));
|
||||
}
|
||||
if (this.match(FILTER_PATTERN_TIMELINESS, request.getRequestURI()) && System.currentTimeMillis() - Long.parseLong(ct) > 86400000L) {
|
||||
this.logger.error((Object)"\u6b64\u94fe\u63a5\u5df2\u5931\u6548");
|
||||
throw new ServiceException("76250006", "\u6b64\u94fe\u63a5\u5df2\u5931\u6548");
|
||||
}
|
||||
AnonymousAddSignParam param = new AnonymousAddSignParam();
|
||||
param.setSign(sign);
|
||||
param.setBid(bid);
|
||||
param.setCt(Long.valueOf(ct));
|
||||
param.setPid(pid);
|
||||
CloudwalkResult result = this.anonymousVerifyService.verify(param);
|
||||
if (result.isSuccess()) {
|
||||
businessId = (String)result.getData();
|
||||
applicationId = null;
|
||||
if (StringUtils.isNotBlank((String)businessId)) {
|
||||
applicationId = this.visitorApplicationService.getApplicationId(businessId);
|
||||
}
|
||||
} else {
|
||||
throw new ServiceException(result.getCode(), result.getMessage());
|
||||
}
|
||||
this.buildCloudwalkSessionContext(businessId, applicationId, DEFAULT_PLAT_USER_ID, DEFAULT_USER_NAME, null, pid);
|
||||
}
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.web.filter.CloudwalkContextParameterFilter
|
||||
* javax.servlet.Filter
|
||||
* org.springframework.boot.web.servlet.FilterRegistrationBean
|
||||
* org.springframework.context.annotation.Bean
|
||||
* org.springframework.context.annotation.Configuration
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import cn.cloudwalk.web.filter.CloudwalkContextParameterFilter;
|
||||
import javax.servlet.Filter;
|
||||
import org.springframework.boot.web.servlet.FilterRegistrationBean;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class VisitorFilterConfig {
|
||||
@Bean
|
||||
public FilterRegistrationBean cloudwalkContextParameterFilterRegistrationBean(CloudwalkContextParameterFilter cloudwalkContextParameterFilter) {
|
||||
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
|
||||
filterRegistrationBean.setFilter((Filter)cloudwalkContextParameterFilter);
|
||||
filterRegistrationBean.setOrder(0x7FFFFFFE);
|
||||
return filterRegistrationBean;
|
||||
}
|
||||
}
|
||||
|
||||
+186
@@ -0,0 +1,186 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.davinci.portal.user.result.PortalUserDetailResult
|
||||
* cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionObject
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.session.extend.DefaultExtendContext
|
||||
* cn.cloudwalk.cloud.session.extend.ExtendContext
|
||||
* cn.cloudwalk.common.ninca.visitor.util.ResponseUtil
|
||||
* cn.cloudwalk.common.ninca.visitor.util.RestTemplateUtil
|
||||
* cn.cloudwalk.cwos.client.resource.ResourceClient
|
||||
* com.alibaba.fastjson.JSON
|
||||
* com.fasterxml.jackson.core.type.TypeReference
|
||||
* com.google.common.collect.Lists
|
||||
* javax.annotation.Nullable
|
||||
* javax.servlet.FilterChain
|
||||
* javax.servlet.ServletRequest
|
||||
* javax.servlet.ServletResponse
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* jodd.util.URLDecoder
|
||||
* org.apache.commons.lang3.StringUtils
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.beans.factory.annotation.Value
|
||||
* org.springframework.http.HttpHeaders
|
||||
* org.springframework.stereotype.Component
|
||||
* org.springframework.util.AntPathMatcher
|
||||
* org.springframework.util.MultiValueMap
|
||||
* org.springframework.web.filter.OncePerRequestFilter
|
||||
* org.springframework.web.util.UriComponentsBuilder
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import cn.cloudwalk.client.davinci.portal.user.result.PortalUserDetailResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionObject;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.session.extend.DefaultExtendContext;
|
||||
import cn.cloudwalk.cloud.session.extend.ExtendContext;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.ResponseUtil;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.RestTemplateUtil;
|
||||
import cn.cloudwalk.cwos.client.resource.ResourceClient;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.google.common.collect.Lists;
|
||||
import java.net.URI;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jodd.util.URLDecoder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.util.MultiValueMap;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
@Component
|
||||
public class VisitorGeneralParameterInjectFilter
|
||||
extends OncePerRequestFilter {
|
||||
@Value(value="${portalUser.ip}")
|
||||
private String portalUserIp;
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(VisitorGeneralParameterInjectFilter.class);
|
||||
private static final String DEFAULT_PLAT_USER_ID = null;
|
||||
private static final String DEFAULT_APPLICATION_ID = null;
|
||||
private static final AntPathMatcher ANT_PATH_MATCHER = new AntPathMatcher();
|
||||
private static final String FILTER_PATTERN_PATH = "/intelligent/visitor/**";
|
||||
private static final List<String> UNAUTHORIZATION_PATHS = Lists.newArrayList((Object[])new String[]{""});
|
||||
@Autowired
|
||||
private CloudwalkSessionContextHolder cloudwalkSessionContextHolder;
|
||||
@Autowired
|
||||
private VisitorApplicationService visitorApplicationService;
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) {
|
||||
boolean isAuthorizationPath;
|
||||
boolean bl = isAuthorizationPath = !this.match(UNAUTHORIZATION_PATHS, request.getRequestURI());
|
||||
if (ANT_PATH_MATCHER.match(FILTER_PATTERN_PATH, request.getRequestURI())) {
|
||||
try {
|
||||
this.buildContext(request, isAuthorizationPath);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
CloudwalkResult result = CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
ResponseUtil.writeJsonResponse((HttpServletResponse)response, (Object)result, (int)401);
|
||||
return;
|
||||
}
|
||||
}
|
||||
try {
|
||||
filterChain.doFilter((ServletRequest)request, (ServletResponse)response);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error((Object)"\u53c2\u6570\u6ce8\u518c\u8fc7\u6ee4\u5668\u5931\u8d25,\u539f\u56e0:", (Throwable)e);
|
||||
}
|
||||
finally {
|
||||
this.cloudwalkSessionContextHolder.clearSession();
|
||||
}
|
||||
}
|
||||
|
||||
private void buildContext(HttpServletRequest request, boolean isAuthorizationPath) throws ServiceException {
|
||||
String businessId;
|
||||
Enumeration enumerations = request.getHeaderNames();
|
||||
while (enumerations.hasMoreElements()) {
|
||||
String name = (String)enumerations.nextElement();
|
||||
this.logger.debug((Object)(name + ":" + request.getHeader(name)));
|
||||
}
|
||||
String platUserId = request.getHeader("platformuserid");
|
||||
if (StringUtils.isBlank((CharSequence)platUserId)) {
|
||||
platUserId = DEFAULT_PLAT_USER_ID;
|
||||
}
|
||||
if (StringUtils.isBlank((CharSequence)(businessId = request.getHeader("businessid"))) && isAuthorizationPath) {
|
||||
this.logger.error((Object)"\u7f3a\u5c11businessid\u5934\u90e8\u4fe1\u606f");
|
||||
throw new ServiceException("76250002", "\u7f3a\u5c11header\u53c2\u6570");
|
||||
}
|
||||
PortalUserDetailResult portalUserDetailResult = this.getPortalUserDetailByToken(request.getHeader("authorization"));
|
||||
String userName = request.getHeader("username");
|
||||
userName = StringUtils.isNotBlank((CharSequence)userName) ? URLDecoder.decode((String)userName, (String)"UTF-8") : portalUserDetailResult.getName();
|
||||
String applicationId = DEFAULT_APPLICATION_ID;
|
||||
if (StringUtils.isNotBlank((CharSequence)businessId)) {
|
||||
applicationId = this.visitorApplicationService.getApplicationId(businessId);
|
||||
}
|
||||
String personId = portalUserDetailResult.getPersonId();
|
||||
DefaultExtendContext extendContext = new DefaultExtendContext();
|
||||
HashMap<String, Object> extend = new HashMap<String, Object>(2);
|
||||
extend.put("personId", personId);
|
||||
extend.put("roleIds", portalUserDetailResult.getRoleIds());
|
||||
extendContext.setValue(extend);
|
||||
String[] args = new String[]{platUserId, businessId, userName, applicationId};
|
||||
CloudwalkSessionObject sessionObject = new CloudwalkSessionObject(args);
|
||||
sessionObject.setExt((ExtendContext)extendContext);
|
||||
this.cloudwalkSessionContextHolder.putSession(sessionObject);
|
||||
}
|
||||
|
||||
protected boolean match(List<String> patterns, String path) {
|
||||
for (String pattern : patterns) {
|
||||
if (!ANT_PATH_MATCHER.match(pattern, path)) continue;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private PortalUserDetailResult getPortalUserDetail() throws ServiceException {
|
||||
CloudwalkResult portalUserDetailResultCloudwalkResult = ResourceClient.getInstance().getPortalUserService().getCurrentUserDetail(null);
|
||||
if (portalUserDetailResultCloudwalkResult.isSuccess() && portalUserDetailResultCloudwalkResult.getData() != null) {
|
||||
return (PortalUserDetailResult)portalUserDetailResultCloudwalkResult.getData();
|
||||
}
|
||||
throw new ServiceException(portalUserDetailResultCloudwalkResult.getCode(), portalUserDetailResultCloudwalkResult.getMessage());
|
||||
}
|
||||
|
||||
private PortalUserDetailResult getPortalUserDetailByToken(String authorization) throws ServiceException {
|
||||
URI uri = this.combineAuthClientURI("cwos-portal/portal/user/manage/getCurrentUser", null);
|
||||
HttpHeaders headers = new HttpHeaders();
|
||||
headers.set("Authorization", authorization);
|
||||
CloudwalkResult portalUserDetailResultCloudwalkResult = (CloudwalkResult)RestTemplateUtil.post((URI)uri, null, (HttpHeaders)headers, (TypeReference)new TypeReference<CloudwalkResult<PortalUserDetailResult>>(){});
|
||||
LOGGER.info("http\u8bf7\u6c42\u83b7\u53d6\u7528\u6237\u8be6\u60c5\u7ed3\u675f\uff0c\u6570\u636e\u4e3a\uff1a{}", (Object)JSON.toJSONString((Object)portalUserDetailResultCloudwalkResult.getData()));
|
||||
if (portalUserDetailResultCloudwalkResult.isSuccess() && portalUserDetailResultCloudwalkResult.getData() != null) {
|
||||
return (PortalUserDetailResult)portalUserDetailResultCloudwalkResult.getData();
|
||||
}
|
||||
throw new ServiceException(portalUserDetailResultCloudwalkResult.getCode(), portalUserDetailResultCloudwalkResult.getMessage());
|
||||
}
|
||||
|
||||
private URI combineAuthClientURI(String api, @Nullable MultiValueMap<String, String> params) {
|
||||
return UriComponentsBuilder.fromUriString((String)("http://" + this.portalUserIp)).path(api).queryParams(params).build().toUri();
|
||||
}
|
||||
}
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionObject
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.common.ninca.visitor.util.ResponseUtil
|
||||
* javax.servlet.FilterChain
|
||||
* javax.servlet.ServletException
|
||||
* javax.servlet.ServletRequest
|
||||
* javax.servlet.ServletResponse
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* org.apache.commons.lang3.StringUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
* org.springframework.util.AntPathMatcher
|
||||
* org.springframework.web.filter.OncePerRequestFilter
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionObject;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.ResponseUtil;
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
@Component
|
||||
public class VisitorOpenParameterInjectFilter
|
||||
extends OncePerRequestFilter {
|
||||
private static final String FILTER_PATTERN_PATH = "/intelligent/open/**";
|
||||
private static final String HEADER_KEY_BUSINESSID = "businessid";
|
||||
private static final String HEADER_KEY_APPLICATIONID = "applicationid";
|
||||
private static final String HEADER_KEY_APIID = "apiid";
|
||||
private static final String DEFAULT_CALLER = "defaultUserId";
|
||||
private static final String DEFAULT_CALLER_NAME = "defaultUserName";
|
||||
private static final AntPathMatcher ANT_PATH_MATCHER = new AntPathMatcher();
|
||||
@Autowired
|
||||
private CloudwalkSessionContextHolder cloudwalkSessionContextHolder;
|
||||
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
if (ANT_PATH_MATCHER.match(FILTER_PATTERN_PATH, request.getRequestURI())) {
|
||||
try {
|
||||
this.buildOpenContext(request);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
CloudwalkResult result = CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
ResponseUtil.writeJsonResponse((HttpServletResponse)response, (Object)result, (int)401);
|
||||
return;
|
||||
}
|
||||
}
|
||||
filterChain.doFilter((ServletRequest)request, (ServletResponse)response);
|
||||
}
|
||||
|
||||
private void buildOpenContext(HttpServletRequest request) throws ServiceException {
|
||||
String apiId;
|
||||
Enumeration enumerations = request.getHeaderNames();
|
||||
while (enumerations.hasMoreElements()) {
|
||||
String name = (String)enumerations.nextElement();
|
||||
this.logger.info((Object)(name + ":" + request.getHeader(name)));
|
||||
}
|
||||
String businessId = request.getHeader(HEADER_KEY_BUSINESSID);
|
||||
if (StringUtils.isBlank((CharSequence)businessId)) {
|
||||
this.logger.error((Object)"\u7f3a\u5c11businessid\u5934\u90e8\u4fe1\u606f");
|
||||
throw new ServiceException("76250002", "\u7f3a\u5c11header\u53c2\u6570");
|
||||
}
|
||||
String applicationId = request.getHeader(HEADER_KEY_APPLICATIONID);
|
||||
if (StringUtils.isBlank((CharSequence)applicationId)) {
|
||||
this.logger.warn((Object)"\u7f3a\u5c11applicationid\u5934\u90e8\u4fe1\u606f");
|
||||
}
|
||||
if (StringUtils.isBlank((CharSequence)(apiId = request.getHeader(HEADER_KEY_APIID)))) {
|
||||
this.logger.warn((Object)"\u7f3a\u5c11apiid\u5934\u90e8\u4fe1\u606f");
|
||||
}
|
||||
String[] args = new String[]{DEFAULT_CALLER, businessId, DEFAULT_CALLER_NAME, applicationId};
|
||||
CloudwalkSessionObject sessionObject = new CloudwalkSessionObject(args);
|
||||
this.cloudwalkSessionContextHolder.putSession(sessionObject);
|
||||
}
|
||||
}
|
||||
|
||||
+158
@@ -0,0 +1,158 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.davinci.portal.user.result.PortalUserDetailResult
|
||||
* cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionObject
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.session.extend.DefaultExtendContext
|
||||
* cn.cloudwalk.cloud.session.extend.ExtendContext
|
||||
* cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.visitor.util.ResponseUtil
|
||||
* cn.cloudwalk.cwos.client.resource.ResourceClient
|
||||
* javax.servlet.FilterChain
|
||||
* javax.servlet.ServletException
|
||||
* javax.servlet.ServletRequest
|
||||
* javax.servlet.ServletResponse
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* jodd.util.URLDecoder
|
||||
* org.apache.commons.lang3.StringUtils
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
* org.springframework.util.AntPathMatcher
|
||||
* org.springframework.web.filter.OncePerRequestFilter
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import cn.cloudwalk.client.davinci.portal.user.result.PortalUserDetailResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionObject;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.session.extend.DefaultExtendContext;
|
||||
import cn.cloudwalk.cloud.session.extend.ExtendContext;
|
||||
import cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.ResponseUtil;
|
||||
import cn.cloudwalk.cwos.client.resource.ResourceClient;
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jodd.util.URLDecoder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
@Component
|
||||
public class VisitorThreeParameterInjectFilter
|
||||
extends OncePerRequestFilter {
|
||||
private static final String FILTER_PATTERN_PATH = "/intelligent/three/**";
|
||||
private static final String HEADER_KEY_BUSINESSID = "businessid";
|
||||
private static final String HEADER_KEY_APPLICATIONID = "applicationid";
|
||||
private static final String HEADER_KEY_APIID = "apiid";
|
||||
private static final String HEADER_KEY_PERSON_ID = "personId";
|
||||
private static final String HEADER_KEY_USER_ID = "userid";
|
||||
private static final String DEFAULT_CALLER = "defaultUserId";
|
||||
private static final String DEFAULT_CALLER_NAME = "defaultUserName";
|
||||
private static final AntPathMatcher ANT_PATH_MATCHER = new AntPathMatcher();
|
||||
@Autowired
|
||||
private CloudwalkSessionContextHolder cloudwalkSessionContextHolder;
|
||||
@Autowired
|
||||
private VisitorApplicationService visitorApplicationService;
|
||||
protected final Logger logger = LoggerFactory.getLogger(((Object)((Object)this)).getClass());
|
||||
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
if (ANT_PATH_MATCHER.match(FILTER_PATTERN_PATH, request.getRequestURI())) {
|
||||
try {
|
||||
this.buildOpenContext(request);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
CloudwalkResult result = CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
ResponseUtil.writeJsonResponse((HttpServletResponse)response, (Object)result, (int)401);
|
||||
return;
|
||||
}
|
||||
}
|
||||
filterChain.doFilter((ServletRequest)request, (ServletResponse)response);
|
||||
}
|
||||
|
||||
private void buildOpenContext(HttpServletRequest request) throws ServiceException {
|
||||
Enumeration enumerations = request.getHeaderNames();
|
||||
while (enumerations.hasMoreElements()) {
|
||||
String name = (String)enumerations.nextElement();
|
||||
this.logger.info(name + ":" + request.getHeader(name));
|
||||
}
|
||||
String businessId = request.getHeader(HEADER_KEY_BUSINESSID);
|
||||
if (StringUtils.isBlank((CharSequence)businessId)) {
|
||||
this.logger.error("\u7f3a\u5c11businessid\u5934\u90e8\u4fe1\u606f");
|
||||
throw new ServiceException("76250002", "\u7f3a\u5c11header\u53c2\u6570");
|
||||
}
|
||||
String applicationId = request.getHeader(HEADER_KEY_APPLICATIONID);
|
||||
if (StringUtils.isBlank((CharSequence)applicationId)) {
|
||||
applicationId = this.visitorApplicationService.getApplicationId(businessId);
|
||||
}
|
||||
String platUserId = request.getHeader(HEADER_KEY_USER_ID);
|
||||
CloudwalkSessionObject sessionObject = null;
|
||||
if (StringUtils.isNotBlank((CharSequence)platUserId)) {
|
||||
PortalUserDetailResult portalUserDetailResult = this.getPortalUserDetail(platUserId, businessId);
|
||||
String userName = request.getHeader("username");
|
||||
userName = StringUtils.isNotBlank((CharSequence)userName) ? URLDecoder.decode((String)userName, (String)"UTF-8") : portalUserDetailResult.getName();
|
||||
String personId = portalUserDetailResult.getPersonId();
|
||||
DefaultExtendContext extendContext = new DefaultExtendContext();
|
||||
HashMap<String, Object> extend = new HashMap<String, Object>(2);
|
||||
extend.put(HEADER_KEY_PERSON_ID, personId);
|
||||
extend.put("roleIds", portalUserDetailResult.getRoleIds());
|
||||
extendContext.setValue(extend);
|
||||
String[] args = new String[]{platUserId, businessId, userName, applicationId};
|
||||
sessionObject = new CloudwalkSessionObject(args);
|
||||
sessionObject.setExt((ExtendContext)extendContext);
|
||||
} else {
|
||||
String[] args = new String[]{DEFAULT_CALLER, businessId, DEFAULT_CALLER_NAME, applicationId};
|
||||
sessionObject = new CloudwalkSessionObject(args);
|
||||
}
|
||||
this.cloudwalkSessionContextHolder.putSession(sessionObject);
|
||||
}
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
private PortalUserDetailResult getPortalUserDetail(String platUserId, String businessId) throws ServiceException {
|
||||
try {
|
||||
HashMap<String, String> feignThreadLoaclMap = new HashMap<String, String>();
|
||||
feignThreadLoaclMap.put("platformuserid", platUserId);
|
||||
feignThreadLoaclMap.put(HEADER_KEY_BUSINESSID, businessId);
|
||||
VisitorFeignThreadLocalUtil.set(feignThreadLoaclMap);
|
||||
CloudwalkResult portalUserDetailResultCloudwalkResult = ResourceClient.getInstance().getPortalUserService().getCurrentUserDetail(null);
|
||||
if (portalUserDetailResultCloudwalkResult.isSuccess() && portalUserDetailResultCloudwalkResult.getData() != null) {
|
||||
PortalUserDetailResult portalUserDetailResult = (PortalUserDetailResult)portalUserDetailResultCloudwalkResult.getData();
|
||||
return portalUserDetailResult;
|
||||
}
|
||||
try {
|
||||
throw new ServiceException(portalUserDetailResultCloudwalkResult.getCode(), portalUserDetailResultCloudwalkResult.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u5f53\u524d\u767b\u5f55\u4eba\u4fe1\u606f\u5931\u8d25,\u539f\u56e0:{}", (Throwable)e);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
VisitorFeignThreadLocalUtil.remove();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+164
@@ -0,0 +1,164 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService
|
||||
* cn.cloudwalk.client.davinci.portal.user.result.PortalUserDetailResult
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder
|
||||
* cn.cloudwalk.cloud.context.CloudwalkSessionObject
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.session.extend.DefaultExtendContext
|
||||
* cn.cloudwalk.cloud.session.extend.ExtendContext
|
||||
* cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.visitor.util.ResponseUtil
|
||||
* cn.cloudwalk.cwos.client.resource.ResourceClient
|
||||
* javax.annotation.Resource
|
||||
* javax.servlet.FilterChain
|
||||
* javax.servlet.ServletException
|
||||
* javax.servlet.ServletRequest
|
||||
* javax.servlet.ServletResponse
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* jodd.util.URLDecoder
|
||||
* org.apache.commons.lang3.StringUtils
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
* org.springframework.util.AntPathMatcher
|
||||
* org.springframework.web.filter.OncePerRequestFilter
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.filter;
|
||||
|
||||
import cn.cloudwalk.client.cwoscomponent.intelligent.person.service.PersonService;
|
||||
import cn.cloudwalk.client.davinci.portal.user.result.PortalUserDetailResult;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionContextHolder;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkSessionObject;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.session.extend.DefaultExtendContext;
|
||||
import cn.cloudwalk.cloud.session.extend.ExtendContext;
|
||||
import cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.ResponseUtil;
|
||||
import cn.cloudwalk.cwos.client.resource.ResourceClient;
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.HashMap;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import jodd.util.URLDecoder;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.util.AntPathMatcher;
|
||||
import org.springframework.web.filter.OncePerRequestFilter;
|
||||
|
||||
@Component
|
||||
public class VisitorWxParameterInjectFilter
|
||||
extends OncePerRequestFilter {
|
||||
private static final String FILTER_PATTERN_PATH = "/intelligent/wx/**";
|
||||
private static final String HEADER_KEY_BUSINESSID = "businessid";
|
||||
private static final String HEADER_KEY_APPLICATIONID = "applicationid";
|
||||
private static final String HEADER_KEY_APIID = "apiid";
|
||||
private static final String HEADER_KEY_PERSON_ID = "personId";
|
||||
private static final String HEADER_KEY_USER_ID = "userid";
|
||||
private static final String DEFAULT_CALLER = "defaultUserId";
|
||||
private static final String DEFAULT_CALLER_NAME = "defaultUserName";
|
||||
private static final AntPathMatcher ANT_PATH_MATCHER = new AntPathMatcher();
|
||||
@Autowired
|
||||
private CloudwalkSessionContextHolder cloudwalkSessionContextHolder;
|
||||
@Resource
|
||||
private PersonService personService;
|
||||
protected final Logger logger = LoggerFactory.getLogger(((Object)((Object)this)).getClass());
|
||||
|
||||
protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
|
||||
if (ANT_PATH_MATCHER.match(FILTER_PATTERN_PATH, request.getRequestURI())) {
|
||||
try {
|
||||
this.buildOpenContext(request);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
CloudwalkResult result = CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
ResponseUtil.writeJsonResponse((HttpServletResponse)response, (Object)result, (int)401);
|
||||
return;
|
||||
}
|
||||
}
|
||||
filterChain.doFilter((ServletRequest)request, (ServletResponse)response);
|
||||
}
|
||||
|
||||
private void buildOpenContext(HttpServletRequest request) throws ServiceException {
|
||||
String apiId;
|
||||
Enumeration enumerations = request.getHeaderNames();
|
||||
while (enumerations.hasMoreElements()) {
|
||||
String name = (String)enumerations.nextElement();
|
||||
this.logger.info(name + ":" + request.getHeader(name));
|
||||
}
|
||||
String businessId = request.getHeader(HEADER_KEY_BUSINESSID);
|
||||
if (StringUtils.isBlank((CharSequence)businessId)) {
|
||||
this.logger.error("\u7f3a\u5c11businessid\u5934\u90e8\u4fe1\u606f");
|
||||
throw new ServiceException("76250002", "\u7f3a\u5c11header\u53c2\u6570");
|
||||
}
|
||||
String applicationId = request.getHeader(HEADER_KEY_APPLICATIONID);
|
||||
if (StringUtils.isBlank((CharSequence)applicationId)) {
|
||||
this.logger.warn("\u7f3a\u5c11applicationid\u5934\u90e8\u4fe1\u606f");
|
||||
}
|
||||
if (StringUtils.isBlank((CharSequence)(apiId = request.getHeader(HEADER_KEY_APIID)))) {
|
||||
this.logger.warn("\u7f3a\u5c11apiid\u5934\u90e8\u4fe1\u606f");
|
||||
}
|
||||
String platUserId = request.getHeader(HEADER_KEY_USER_ID);
|
||||
CloudwalkSessionObject sessionObject = null;
|
||||
if (StringUtils.isNotBlank((CharSequence)platUserId)) {
|
||||
PortalUserDetailResult portalUserDetailResult = this.getPortalUserDetail(platUserId, businessId);
|
||||
String userName = request.getHeader("username");
|
||||
userName = StringUtils.isNotBlank((CharSequence)userName) ? URLDecoder.decode((String)userName, (String)"UTF-8") : portalUserDetailResult.getName();
|
||||
String personId = portalUserDetailResult.getPersonId();
|
||||
DefaultExtendContext extendContext = new DefaultExtendContext();
|
||||
HashMap<String, Object> extend = new HashMap<String, Object>(2);
|
||||
extend.put(HEADER_KEY_PERSON_ID, personId);
|
||||
extend.put("roleIds", portalUserDetailResult.getRoleIds());
|
||||
extendContext.setValue(extend);
|
||||
String[] args = new String[]{platUserId, businessId, userName, applicationId};
|
||||
sessionObject = new CloudwalkSessionObject(args);
|
||||
sessionObject.setExt((ExtendContext)extendContext);
|
||||
} else {
|
||||
String[] args = new String[]{DEFAULT_CALLER, businessId, DEFAULT_CALLER_NAME, applicationId};
|
||||
sessionObject = new CloudwalkSessionObject(args);
|
||||
}
|
||||
this.cloudwalkSessionContextHolder.putSession(sessionObject);
|
||||
}
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
private PortalUserDetailResult getPortalUserDetail(String platUserId, String businessId) throws ServiceException {
|
||||
try {
|
||||
HashMap<String, String> feignThreadLoaclMap = new HashMap<String, String>();
|
||||
feignThreadLoaclMap.put("platformuserid", platUserId);
|
||||
feignThreadLoaclMap.put(HEADER_KEY_BUSINESSID, businessId);
|
||||
VisitorFeignThreadLocalUtil.set(feignThreadLoaclMap);
|
||||
CloudwalkResult portalUserDetailResultCloudwalkResult = ResourceClient.getInstance().getPortalUserService().getCurrentUserDetail(null);
|
||||
if (portalUserDetailResultCloudwalkResult.isSuccess() && portalUserDetailResultCloudwalkResult.getData() != null) {
|
||||
PortalUserDetailResult portalUserDetailResult = (PortalUserDetailResult)portalUserDetailResultCloudwalkResult.getData();
|
||||
return portalUserDetailResult;
|
||||
}
|
||||
try {
|
||||
throw new ServiceException(portalUserDetailResultCloudwalkResult.getCode(), portalUserDetailResultCloudwalkResult.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u5f53\u524d\u767b\u5f55\u4eba\u4fe1\u606f\u5931\u8d25,\u539f\u56e0:{}", (Throwable)e);
|
||||
}
|
||||
}
|
||||
finally {
|
||||
VisitorFeignThreadLocalUtil.remove();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService
|
||||
* cn.cloudwalk.client.ninca.visitor.device.service.DeviceContextService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.session.company.CompanyContext
|
||||
* cn.cloudwalk.cloud.session.extend.DefaultExtendContext
|
||||
* cn.cloudwalk.cloud.session.extend.ExtendContext
|
||||
* cn.cloudwalk.cloud.session.user.UserContext
|
||||
* cn.cloudwalk.cloud.utils.CloudwalkDateUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.handler;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.common.VisitorApplicationService;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.service.DeviceContextService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.session.company.CompanyContext;
|
||||
import cn.cloudwalk.cloud.session.extend.DefaultExtendContext;
|
||||
import cn.cloudwalk.cloud.session.extend.ExtendContext;
|
||||
import cn.cloudwalk.cloud.session.user.UserContext;
|
||||
import cn.cloudwalk.cloud.utils.CloudwalkDateUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil;
|
||||
import java.util.HashMap;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
public abstract class AbstractEventHandler {
|
||||
protected static final Logger LOGGER = LoggerFactory.getLogger(AbstractEventHandler.class);
|
||||
@Autowired
|
||||
private DeviceContextService deviceContextService;
|
||||
@Autowired
|
||||
private VisitorApplicationService visitorApplicationService;
|
||||
private static final String DEFAULT_CALLER = "defaultUserId";
|
||||
private static final String DEFAULT_CALLER_NAME = "defaultUserName";
|
||||
|
||||
public CloudwalkCallContext getCloudwalkContext(String businessId, String deviceCode) throws ServiceException {
|
||||
CloudwalkCallContext context = new CloudwalkCallContext();
|
||||
CompanyContext companyContext = new CompanyContext();
|
||||
companyContext.setCompanyId(businessId);
|
||||
context.setCompany(companyContext);
|
||||
UserContext userContext = new UserContext();
|
||||
userContext.setCaller(DEFAULT_CALLER);
|
||||
userContext.setCallerName(DEFAULT_CALLER_NAME);
|
||||
context.setUser(userContext);
|
||||
context.setCallTime(CloudwalkDateUtils.getCurrentDate());
|
||||
HashMap<String, String> feignThreadLoaclMap = new HashMap<String, String>();
|
||||
feignThreadLoaclMap.put("businessid", businessId);
|
||||
feignThreadLoaclMap.put("applicationid", this.visitorApplicationService.getApplicationId(businessId));
|
||||
feignThreadLoaclMap.put("platformuserid", DEFAULT_CALLER);
|
||||
feignThreadLoaclMap.put("username", DEFAULT_CALLER_NAME);
|
||||
VisitorFeignThreadLocalUtil.set(feignThreadLoaclMap);
|
||||
this.buildDeviceContext(context, deviceCode);
|
||||
return context;
|
||||
}
|
||||
|
||||
private void buildDeviceContext(CloudwalkCallContext context, String deviceCode) throws ServiceException {
|
||||
CloudwalkResult deviceContextResult = this.deviceContextService.get(context, deviceCode);
|
||||
if (deviceContextResult.isSuccess()) {
|
||||
DefaultExtendContext extendContext = new DefaultExtendContext();
|
||||
extendContext.setValue(deviceContextResult.getData());
|
||||
context.setExt((ExtendContext)extendContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.record.service.ProtocolCaptureService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil
|
||||
* cn.cloudwalk.cwos.client.event.event.FaceCaptureEvent
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.handler;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.record.service.ProtocolCaptureService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil;
|
||||
import cn.cloudwalk.cwos.client.event.event.FaceCaptureEvent;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import cn.cloudwalk.web.ninca.visitor.handler.AbstractEventHandler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@EventTopicSuffix(value={"visitor-mgmt"})
|
||||
public class FaceCaptureEventHandler
|
||||
extends AbstractEventHandler
|
||||
implements EventHandler<FaceCaptureEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(FaceCaptureEventHandler.class);
|
||||
@Autowired
|
||||
private ProtocolCaptureService protocolCaptureService;
|
||||
|
||||
public void onEvent(FaceCaptureEvent faceCaptureEvent) {
|
||||
try {
|
||||
CloudwalkCallContext cloudwalkCallContext = this.getCloudwalkContext(faceCaptureEvent.getBusinessId(), faceCaptureEvent.getDeviceId());
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u6bd4\u5bf9\u6293\u62cd\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0:{}", (Object)e.getMessage());
|
||||
}
|
||||
finally {
|
||||
VisitorFeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.record.service.ProtocolRecordUploadService
|
||||
* cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil
|
||||
* cn.cloudwalk.cwos.client.event.event.PersonRecordUploadEvent
|
||||
* cn.cloudwalk.event.annotation.EventTopicSuffix
|
||||
* cn.cloudwalk.event.handler.EventHandler
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.handler;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.record.service.ProtocolRecordUploadService;
|
||||
import cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil;
|
||||
import cn.cloudwalk.cwos.client.event.event.PersonRecordUploadEvent;
|
||||
import cn.cloudwalk.event.annotation.EventTopicSuffix;
|
||||
import cn.cloudwalk.event.handler.EventHandler;
|
||||
import cn.cloudwalk.web.ninca.visitor.handler.AbstractEventHandler;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@EventTopicSuffix(value={"visitor-mgmt"})
|
||||
public class PersonRecordUploadEventHandler
|
||||
extends AbstractEventHandler
|
||||
implements EventHandler<PersonRecordUploadEvent> {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(PersonRecordUploadEventHandler.class);
|
||||
@Autowired
|
||||
private ProtocolRecordUploadService protocolRecordUploadService;
|
||||
|
||||
public void onEvent(PersonRecordUploadEvent personRecordUploadEvent) {
|
||||
VisitorFeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.record.result.VisitorRecordResultEvent
|
||||
* cn.cloudwalk.client.ninca.visitor.record.service.ProtocolRecordUploadService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil
|
||||
* com.alibaba.fastjson.JSON
|
||||
* com.alibaba.fastjson.JSONObject
|
||||
* org.apache.kafka.clients.consumer.ConsumerRecord
|
||||
* org.slf4j.Logger
|
||||
* org.slf4j.LoggerFactory
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.kafka.annotation.KafkaListener
|
||||
* org.springframework.stereotype.Component
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.handler;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.record.result.VisitorRecordResultEvent;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.service.ProtocolRecordUploadService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil;
|
||||
import cn.cloudwalk.web.ninca.visitor.handler.AbstractEventHandler;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.apache.kafka.clients.consumer.ConsumerRecord;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.kafka.annotation.KafkaListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class VisitorRecordUploadEventHandler
|
||||
extends AbstractEventHandler {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(VisitorRecordUploadEventHandler.class);
|
||||
@Autowired
|
||||
private ProtocolRecordUploadService protocolRecordUploadService;
|
||||
|
||||
/*
|
||||
* WARNING - Removed try catching itself - possible behaviour change.
|
||||
*/
|
||||
@KafkaListener(topics={"VISITOR_RECORD_TOPICelevator_record"})
|
||||
public void consume(ConsumerRecord<String, String> record) {
|
||||
LOGGER.info("\u6d3e\u68af\u63a8\u8fc7\u6765\u5f97\u6570\u636e\u65f6\u95f4", (Object)record.timestamp());
|
||||
try {
|
||||
LOGGER.info("\u6d3e\u68af\u63a8\u8fc7\u6765\u5f97\u6570\u636eVisitorRecordResultEvent--------Value:{}", record.value());
|
||||
String value = (String)record.value();
|
||||
VisitorRecordResultEvent visitorRecordResultEvent = (VisitorRecordResultEvent)JSONObject.parseObject((String)value, VisitorRecordResultEvent.class);
|
||||
LOGGER.info("\u6d3e\u68af\u63a8\u8fc7\u6765\u5f97\u6570\u636e\u5b9e\u4f53:{}", (Object)JSON.toJSONString((Object)visitorRecordResultEvent));
|
||||
CloudwalkCallContext context = this.getCloudwalkContext(visitorRecordResultEvent.getBusinessId(), visitorRecordResultEvent.getDeviceCode());
|
||||
this.protocolRecordUploadService.uploadVistor(visitorRecordResultEvent, context);
|
||||
}
|
||||
catch (Exception e) {
|
||||
LOGGER.error("\u8bbf\u5ba2\u6dfb\u52a0\u8bc6\u522b\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0:{}", (Object)e.getMessage());
|
||||
}
|
||||
finally {
|
||||
VisitorFeignThreadLocalUtil.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+77
@@ -0,0 +1,77 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.importrecord.param.ImportExportQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.importrecord.param.ImportQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.importrecord.result.ImportRecordExcelResult
|
||||
* cn.cloudwalk.client.ninca.visitor.importrecord.result.ImportResult
|
||||
* cn.cloudwalk.client.ninca.visitor.importrecord.serivce.ImportRecordService
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* javax.servlet.http.HttpServletResponse
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.importrecord.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.importrecord.param.ImportExportQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.importrecord.param.ImportQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.importrecord.result.ImportRecordExcelResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.importrecord.result.ImportResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.importrecord.serivce.ImportRecordService;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.importrecord.form.ImportExportQueryForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.importrecord.form.ImportQueryForm;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/visitor/import/record"})
|
||||
public class VisitorImportController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private ImportRecordService importRecordService;
|
||||
|
||||
@RequestMapping(value={"page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<ImportResult>> page(@RequestBody ImportQueryForm form) {
|
||||
ImportQueryParam param = new ImportQueryParam();
|
||||
param = (ImportQueryParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.importRecordService.page(param, page, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u5bfc\u5165\u65e5\u5fd7\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76251301", (String)this.getMessage("76251301"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"export"})
|
||||
public void export(@RequestBody ImportExportQueryForm form, HttpServletRequest request, HttpServletResponse response) {
|
||||
try {
|
||||
ImportExportQueryParam param = new ImportExportQueryParam();
|
||||
param = (ImportExportQueryParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
List importRecordExcelResults = this.importRecordService.export(param, this.getCloudwalkContext());
|
||||
this.exportExcel("\u5bfc\u5165\u65e5\u5fd7.xls", request, response, ImportRecordExcelResult.class, importRecordExcelResults);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u51fa\u5bfc\u5165\u65e5\u5fd7\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.importrecord.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ImportExportQueryForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -3297936546194549727L;
|
||||
private String id;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.importrecord.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class ImportQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 1499399582099924136L;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private String createUserName;
|
||||
|
||||
public String getCreateUserName() {
|
||||
return this.createUserName;
|
||||
}
|
||||
|
||||
public void setCreateUserName(String createUserName) {
|
||||
this.createUserName = createUserName;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
|
||||
+302
@@ -0,0 +1,302 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.config.param.VisitorConfigQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.config.result.VisitorConfigQueryResult
|
||||
* cn.cloudwalk.client.ninca.visitor.config.service.VisitorConfigService
|
||||
* cn.cloudwalk.client.ninca.visitor.device.param.DeviceDefaultGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.device.result.DeviceDefaultResult
|
||||
* cn.cloudwalk.client.ninca.visitor.device.service.DeviceDefaultService
|
||||
* cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordPageParam
|
||||
* cn.cloudwalk.client.ninca.visitor.record.service.VisitorRecordService
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterAddParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterAddResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorComplexQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorDelParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorEditParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService
|
||||
* cn.cloudwalk.cloud.context.CloudwalkCallContext
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorConfigKeyEnum
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum
|
||||
* cn.cloudwalk.common.ninca.visitor.em.YesNoTypeEnum
|
||||
* cn.cloudwalk.common.ninca.visitor.util.CollectionUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.config.param.VisitorConfigQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.config.result.VisitorConfigQueryResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.config.service.VisitorConfigService;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.param.DeviceDefaultGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.result.DeviceDefaultResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.device.service.DeviceDefaultService;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordPageParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.service.VisitorRecordService;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterAddParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterAddResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorComplexQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorDelParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorEditParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService;
|
||||
import cn.cloudwalk.cloud.context.CloudwalkCallContext;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorConfigKeyEnum;
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.visitor.em.YesNoTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.CollectionUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.form.VisitorOpenAddForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.form.VisitorOpenDelForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.form.VisitorOpenEditForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.form.VisitorOpenPageForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.form.VisitorRecordOpenPageForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.result.VisitorGetsOpenResult;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.result.VisitorPageOpenResult;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.result.VisitorRecordOpenResult;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorGetsForm;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/open/visitor"})
|
||||
public class VisitorOpenController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private VisitorService visitorService;
|
||||
@Autowired
|
||||
private DeviceDefaultService deviceDefaultService;
|
||||
@Autowired
|
||||
private VisitorRegisterService visitorRegisterService;
|
||||
@Autowired
|
||||
private VisitorConfigService visitorConfigService;
|
||||
@Autowired
|
||||
private VisitorRecordService visitorRecordService;
|
||||
|
||||
@PostMapping(value={"/card-reg"})
|
||||
public CloudwalkResult<String> cardReg(@RequestBody VisitorOpenAddForm form) {
|
||||
CloudwalkCallContext context = this.getCloudwalkContext();
|
||||
if (this.needAudit(context)) {
|
||||
return this.addVisitorRegister(form, VisitorRegisterTypeEnum.CARD_REG, context);
|
||||
}
|
||||
VisitorNewParam param = new VisitorNewParam();
|
||||
param = (VisitorNewParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setRegFaceUrl(form.getRegFace());
|
||||
param.setDisplayUrl(form.getDisplay());
|
||||
param.setRegType(VisitorRegisterTypeEnum.CARD_REG);
|
||||
if (CollectionUtils.isEmpty(form.getDeviceIds())) {
|
||||
try {
|
||||
param.setDeviceIds(this.getDeviceDefault(context));
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
return CloudwalkResult.fail((String)"76250521", (String)this.getMessage("76250521"));
|
||||
}
|
||||
}
|
||||
try {
|
||||
CloudwalkResult result = this.visitorService.add(param, this.getCloudwalkContext());
|
||||
if (result.isSuccess()) {
|
||||
return CloudwalkResult.success((Object)((VisitorAddResult)result.getData()).getPersonId());
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/add"})
|
||||
public CloudwalkResult<String> add(@RequestBody VisitorOpenAddForm form) {
|
||||
CloudwalkCallContext context = this.getCloudwalkContext();
|
||||
if (this.needAudit(context)) {
|
||||
return this.addVisitorRegister(form, VisitorRegisterTypeEnum.OTHER, context);
|
||||
}
|
||||
VisitorNewParam param = new VisitorNewParam();
|
||||
param = (VisitorNewParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setRegFaceUrl(form.getRegFace());
|
||||
param.setDisplayUrl(form.getDisplay());
|
||||
param.setRegType(VisitorRegisterTypeEnum.OTHER);
|
||||
if (CollectionUtils.isEmpty(form.getDeviceIds())) {
|
||||
try {
|
||||
param.setDeviceIds(this.getDeviceDefault(context));
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
return CloudwalkResult.fail((String)"76250521", (String)this.getMessage("76250521"));
|
||||
}
|
||||
}
|
||||
try {
|
||||
CloudwalkResult result = this.visitorService.add(param, this.getCloudwalkContext());
|
||||
if (result.isSuccess()) {
|
||||
return CloudwalkResult.success((Object)((VisitorAddResult)result.getData()).getPersonId());
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody VisitorOpenEditForm form) {
|
||||
VisitorEditParam param = new VisitorEditParam();
|
||||
param = (VisitorEditParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setRegFaceUrl(form.getRegFace());
|
||||
param.setDisplayUrl(form.getDisplay());
|
||||
CloudwalkCallContext context = this.getCloudwalkContext();
|
||||
if (CollectionUtils.isEmpty(form.getDeviceIds())) {
|
||||
try {
|
||||
param.setDeviceIds(this.getDeviceDefault(context));
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
return CloudwalkResult.fail((String)"76250521", (String)this.getMessage("76250521"));
|
||||
}
|
||||
}
|
||||
try {
|
||||
return this.visitorService.edit(param, context);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u7f16\u8f91\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody VisitorOpenDelForm form) {
|
||||
VisitorDelParam param = new VisitorDelParam();
|
||||
param = (VisitorDelParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5220\u9664\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510003", (String)this.getMessage("762510003"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorPageOpenResult>> page(@RequestBody VisitorOpenPageForm form) {
|
||||
VisitorComplexQueryParam param = new VisitorComplexQueryParam();
|
||||
param = (VisitorComplexQueryParam)BeanCopyUtils.copyProperties((Object)((Object)form), (Object)param);
|
||||
param.setFromOpen(true);
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.convertServicePageAbleResultToOpen(this.visitorService.page(param, page, this.getCloudwalkContext()), VisitorPageOpenResult.class);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510005", (String)this.getMessage("762510005"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"record/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorRecordOpenResult>> recordPage(@RequestBody VisitorRecordOpenPageForm form) {
|
||||
VisitorRecordPageParam param = new VisitorRecordPageParam();
|
||||
param = (VisitorRecordPageParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setFromOpen(true);
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.convertServicePageAbleResultToOpen(this.visitorRecordService.page(param, page, this.getCloudwalkContext()), VisitorRecordOpenResult.class);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u5230\u8bbf\u8bb0\u5f55\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76251201", (String)this.getMessage("76251201"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"gets"})
|
||||
public CloudwalkResult<List<VisitorGetsOpenResult>> get(@RequestBody VisitorGetsForm form) {
|
||||
VisitorGetsParam param = new VisitorGetsParam();
|
||||
param = (VisitorGetsParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.convertServiceListResultToOpen(this.visitorService.getsIncludeDeviceInfo(param, this.getCloudwalkContext()), VisitorGetsOpenResult.class);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u83b7\u53d6\u8bbf\u5ba2\u4fe1\u606f\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510004", (String)this.getMessage("762510004"));
|
||||
}
|
||||
}
|
||||
|
||||
private List<String> getDeviceDefault(CloudwalkCallContext context) throws ServiceException {
|
||||
DeviceDefaultGetsParam deviceDefaultGetsParam = new DeviceDefaultGetsParam();
|
||||
try {
|
||||
CloudwalkResult cloudwalkResult = this.deviceDefaultService.gets(deviceDefaultGetsParam, context);
|
||||
if (cloudwalkResult.isSuccess() && CollectionUtils.isNotEmpty((Collection)((Collection)cloudwalkResult.getData()))) {
|
||||
List<String> deviceIds = ((List)cloudwalkResult.getData()).stream().map(DeviceDefaultResult::getDeviceId).collect(Collectors.toList());
|
||||
return deviceIds;
|
||||
}
|
||||
throw new ServiceException("\u672a\u67e5\u5230\u9ed8\u8ba4\u8bbe\u5907");
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u83b7\u53d6\u9ed8\u8ba4\u8bbe\u5907\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
throw new ServiceException((Throwable)e);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean needAudit(CloudwalkCallContext context) {
|
||||
VisitorConfigQueryParam visitorConfigQueryParam = new VisitorConfigQueryParam();
|
||||
visitorConfigQueryParam.setConfigKey(VisitorConfigKeyEnum.VISITOR_REGISTER_AUDIT.getCode());
|
||||
try {
|
||||
CloudwalkResult visiorConfigQueryResult = this.visitorConfigService.query(visitorConfigQueryParam, context);
|
||||
if (visiorConfigQueryResult.isSuccess() && CollectionUtils.isNotEmpty((Collection)((Collection)visiorConfigQueryResult.getData()))) {
|
||||
VisitorConfigQueryResult queryResult = (VisitorConfigQueryResult)((List)visiorConfigQueryResult.getData()).get(0);
|
||||
return YesNoTypeEnum.Y.getCode().toString().equals(queryResult.getConfigValue());
|
||||
}
|
||||
return false;
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u5ba1\u6838\u5f00\u5173\u53c2\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
private CloudwalkResult<String> addVisitorRegister(VisitorOpenAddForm form, VisitorRegisterTypeEnum registerTypeEnum, CloudwalkCallContext context) {
|
||||
VisitorRegisterAddParam param = new VisitorRegisterAddParam();
|
||||
param = (VisitorRegisterAddParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setImage(form.getRegFace());
|
||||
param.setRegType(registerTypeEnum);
|
||||
param.setBegVisiterTime(form.getBegVisitorTime());
|
||||
param.setEndVisiterTime(form.getEndVisitorTime());
|
||||
Long time = form.getEndVisitorTime() - form.getBegVisitorTime();
|
||||
param.setTime(Long.valueOf(time / 60L / 60L / 1000L));
|
||||
try {
|
||||
CloudwalkResult result = this.visitorRegisterService.add(param, context);
|
||||
if (result.isSuccess()) {
|
||||
return CloudwalkResult.success((Object)((VisitorRegisterAddResult)result.getData()).getId());
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+242
@@ -0,0 +1,242 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterAddParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterApproveParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterEditParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterIdentifyParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterPageParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterSyncParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorYZTQrcodeUploadParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterAddResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterCountResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterPageResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterQueryResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorDeviceResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum
|
||||
* cn.cloudwalk.common.ninca.visitor.util.StringUtils
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterAddParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterApproveParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterEditParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterIdentifyParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterPageParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterSyncParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorYZTQrcodeUploadParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterAddResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterCountResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterPageResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterQueryResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorDeviceResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.StringUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.open.form.VisitorOpenAddForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterAddForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterApproveForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterEditForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterGetsForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterIdentifyForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterPageForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterSyncForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorYZTQrcodeUploadForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorGetsForm;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/wx/visitor"})
|
||||
public class VisitorWxController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private VisitorService visitorService;
|
||||
@Autowired
|
||||
private VisitorRegisterService visitorRegisterService;
|
||||
|
||||
@PostMapping(value={"/add"})
|
||||
public CloudwalkResult<String> add(@RequestBody VisitorOpenAddForm form) {
|
||||
VisitorNewParam param = new VisitorNewParam();
|
||||
param = (VisitorNewParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setRegFaceUrl(form.getRegFace());
|
||||
param.setDisplayUrl(form.getDisplay());
|
||||
param.setRegType(VisitorRegisterTypeEnum.MINI_PROGRAM);
|
||||
try {
|
||||
CloudwalkResult result = this.visitorService.add(param, this.getCloudwalkContext());
|
||||
if (result.isSuccess()) {
|
||||
return CloudwalkResult.success((Object)((VisitorAddResult)result.getData()).getPersonId());
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"gets"})
|
||||
public CloudwalkResult<List<VisitorDeviceResult>> gets(@RequestBody VisitorGetsForm form) {
|
||||
VisitorGetsParam param = new VisitorGetsParam();
|
||||
param = (VisitorGetsParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorService.getsIncludeDeviceInfo(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u83b7\u53d6\u8bbf\u5ba2\u4fe1\u606f\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510004", (String)this.getMessage("762510004"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/register/add"})
|
||||
public CloudwalkResult<VisitorRegisterAddResult> add(@RequestBody VisitorRegisterAddForm form) {
|
||||
VisitorRegisterAddParam param = (VisitorRegisterAddParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterAddParam.class);
|
||||
param.setRegType(VisitorRegisterTypeEnum.MINI_PROGRAM);
|
||||
try {
|
||||
return this.visitorRegisterService.add(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u6ce8\u518c\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
if (StringUtils.isNotBlank((String)e.getCode())) {
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
return CloudwalkResult.fail((String)"762510024", (String)this.getMessage("762510024"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/register/identify"})
|
||||
public CloudwalkResult<Boolean> identify(@RequestBody VisitorRegisterIdentifyForm form) {
|
||||
VisitorRegisterIdentifyParam param = (VisitorRegisterIdentifyParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterIdentifyParam.class);
|
||||
try {
|
||||
return this.visitorRegisterService.identify(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u8bbf\u5ba2\u6838\u9a8c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
if (StringUtils.isNotBlank((String)e.getCode())) {
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
return CloudwalkResult.fail((String)"762510024", (String)this.getMessage("762510024"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/register/edit"})
|
||||
public CloudwalkResult<VisitorRegisterAddResult> edit(@RequestBody VisitorRegisterEditForm form) {
|
||||
VisitorRegisterEditParam param = new VisitorRegisterEditParam();
|
||||
param = (VisitorRegisterEditParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setRegType(VisitorRegisterTypeEnum.MINI_PROGRAM);
|
||||
try {
|
||||
return this.visitorRegisterService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u7f16\u8f91\u8bbf\u5ba2\u6ce8\u518c\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/register/gets"})
|
||||
public CloudwalkResult<List<VisitorRegisterQueryResult>> gets(@RequestBody VisitorRegisterGetsForm form) {
|
||||
VisitorRegisterGetsParam param = (VisitorRegisterGetsParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterGetsParam.class);
|
||||
try {
|
||||
return this.visitorRegisterService.gets(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u6ce8\u518c\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510038", (String)this.getMessage("762510038"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/register/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorRegisterPageResult>> page(@RequestBody VisitorRegisterPageForm form) {
|
||||
VisitorRegisterPageParam param = (VisitorRegisterPageParam)BeanCopyUtils.copyProperties((Object)((Object)form), VisitorRegisterPageParam.class);
|
||||
try {
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
return this.visitorRegisterService.page(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u8bbf\u5ba2\u6ce8\u518c\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510025", (String)this.getMessage("762510025"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/register/approve"})
|
||||
public CloudwalkResult<Boolean> approve(@RequestBody VisitorRegisterApproveForm form) {
|
||||
VisitorRegisterApproveParam param = (VisitorRegisterApproveParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterApproveParam.class);
|
||||
param.setFromWx(true);
|
||||
try {
|
||||
return this.visitorRegisterService.approve(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5ba1\u6838\u8bbf\u5ba2\u6ce8\u518c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510026", (String)this.getMessage("762510026"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/register/count"})
|
||||
public CloudwalkResult<List<VisitorRegisterCountResult>> count() {
|
||||
try {
|
||||
return this.visitorRegisterService.count(this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u7edf\u8ba1\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508050", (String)"762508050");
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/register/pending/sync"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorRegisterQueryResult>> pendingSync(@RequestBody VisitorRegisterSyncForm form) {
|
||||
try {
|
||||
VisitorRegisterSyncParam param = (VisitorRegisterSyncParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterSyncParam.class);
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
return this.visitorRegisterService.pendingSync(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508051", (String)"762508051");
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/qrcode/upload"})
|
||||
public CloudwalkResult<Boolean> qrcodeUpload(@RequestBody VisitorYZTQrcodeUploadForm form) {
|
||||
try {
|
||||
VisitorYZTQrcodeUploadParam param = (VisitorYZTQrcodeUploadParam)BeanCopyUtils.copyProperties((Object)form, VisitorYZTQrcodeUploadParam.class);
|
||||
return this.visitorRegisterService.qrcodeUpload(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u4e0a\u4f20\u5fae\u4fe1\u5c0f\u7a0b\u5e8f\u4e8c\u7ef4\u7801\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508052", (String)"762508052");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+193
@@ -0,0 +1,193 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorOpenAddForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -6220349914646200390L;
|
||||
private String name;
|
||||
private String personId;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private String regFace;
|
||||
private String display;
|
||||
private String greetWord;
|
||||
private String cardNo;
|
||||
private String visitorCode;
|
||||
private List<String> deviceIds;
|
||||
private String remark;
|
||||
private Integer sex;
|
||||
private String companyName;
|
||||
private String cause;
|
||||
private String carryOn;
|
||||
private String licensePlate;
|
||||
private String telephone;
|
||||
private String personTelephone;
|
||||
private String detailedAddress;
|
||||
private List<String> floorIds;
|
||||
|
||||
public List<String> getFloorIds() {
|
||||
return this.floorIds;
|
||||
}
|
||||
|
||||
public void setFloorIds(List<String> floorIds) {
|
||||
this.floorIds = floorIds;
|
||||
}
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public Integer getSex() {
|
||||
return this.sex;
|
||||
}
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getCarryOn() {
|
||||
return this.carryOn;
|
||||
}
|
||||
|
||||
public void setCarryOn(String carryOn) {
|
||||
this.carryOn = carryOn;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return this.licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFace() {
|
||||
return this.regFace;
|
||||
}
|
||||
|
||||
public void setRegFace(String regFace) {
|
||||
this.regFace = regFace;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorOpenDelForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7661244444942567043L;
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+192
@@ -0,0 +1,192 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorOpenEditForm
|
||||
implements Serializable {
|
||||
private String id;
|
||||
private String name;
|
||||
private String personId;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private String regFace;
|
||||
private String display;
|
||||
private String greetWord;
|
||||
private String cardNo;
|
||||
private String visitorCode;
|
||||
private String remark;
|
||||
private List<String> deviceIds;
|
||||
private Integer sex;
|
||||
private String companyName;
|
||||
private String cause;
|
||||
private String carryOn;
|
||||
private String licensePlate;
|
||||
private String telephone;
|
||||
private String personTelephone;
|
||||
private String detailedAddress;
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public Integer getSex() {
|
||||
return this.sex;
|
||||
}
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getCarryOn() {
|
||||
return this.carryOn;
|
||||
}
|
||||
|
||||
public void setCarryOn(String carryOn) {
|
||||
this.carryOn = carryOn;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return this.licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFace() {
|
||||
return this.regFace;
|
||||
}
|
||||
|
||||
public void setRegFace(String regFace) {
|
||||
this.regFace = regFace;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.form;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorOpenGetsForm {
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorOpenPageForm
|
||||
extends CloudwalkBasePageForm {
|
||||
private Integer status;
|
||||
private String name;
|
||||
private String personName;
|
||||
private List<String> deviceIds;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private Integer regType;
|
||||
private String detailedAddress;
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public Integer getRegType() {
|
||||
return this.regType;
|
||||
}
|
||||
|
||||
public void setRegType(Integer regType) {
|
||||
this.regType = regType;
|
||||
}
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorRecordOpenPageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -2066712958286305794L;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private List<String> deviceIds;
|
||||
private String visitorName;
|
||||
private String receiverName;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getVisitorName() {
|
||||
return this.visitorName;
|
||||
}
|
||||
|
||||
public void setVisitorName(String visitorName) {
|
||||
this.visitorName = visitorName;
|
||||
}
|
||||
|
||||
public String getReceiverName() {
|
||||
return this.receiverName;
|
||||
}
|
||||
|
||||
public void setReceiverName(String receiverName) {
|
||||
this.receiverName = receiverName;
|
||||
}
|
||||
}
|
||||
|
||||
+210
@@ -0,0 +1,210 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorDeviceInfoResult
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.result;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorDeviceInfoResult;
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorGetsOpenResult
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -6341146450099890321L;
|
||||
private String id;
|
||||
private String name;
|
||||
private String cardNo;
|
||||
private String greetWord;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
@DavinciPic
|
||||
private String regFaceUrl;
|
||||
@DavinciPic
|
||||
private String displayUrl;
|
||||
private String remark;
|
||||
private String visitorCode;
|
||||
private Long lastUpdateTime;
|
||||
private List<VisitorDeviceInfoResult> deviceInfo;
|
||||
private Integer sex;
|
||||
private String companyName;
|
||||
private String cause;
|
||||
private String carryOn;
|
||||
private String licensePlate;
|
||||
private String telephone;
|
||||
private String personTelephone;
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public Integer getSex() {
|
||||
return this.sex;
|
||||
}
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getCarryOn() {
|
||||
return this.carryOn;
|
||||
}
|
||||
|
||||
public void setCarryOn(String carryOn) {
|
||||
this.carryOn = carryOn;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return this.licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFaceUrl() {
|
||||
return this.regFaceUrl;
|
||||
}
|
||||
|
||||
public void setRegFaceUrl(String regFaceUrl) {
|
||||
this.regFaceUrl = regFaceUrl;
|
||||
}
|
||||
|
||||
public String getDisplayUrl() {
|
||||
return this.displayUrl;
|
||||
}
|
||||
|
||||
public void setDisplayUrl(String displayUrl) {
|
||||
this.displayUrl = displayUrl;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
|
||||
public Long getLastUpdateTime() {
|
||||
return this.lastUpdateTime;
|
||||
}
|
||||
|
||||
public void setLastUpdateTime(Long lastUpdateTime) {
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
}
|
||||
|
||||
public List<VisitorDeviceInfoResult> getDeviceInfo() {
|
||||
return this.deviceInfo;
|
||||
}
|
||||
|
||||
public void setDeviceInfo(List<VisitorDeviceInfoResult> deviceInfo) {
|
||||
this.deviceInfo = deviceInfo;
|
||||
}
|
||||
}
|
||||
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.result;
|
||||
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic;
|
||||
|
||||
public class VisitorPageOpenResult {
|
||||
private String id;
|
||||
private String name;
|
||||
private String cardNo;
|
||||
private String greetWord;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
@DavinciPic
|
||||
private String regFaceUrl;
|
||||
@DavinciPic
|
||||
private String displayUrl;
|
||||
private String remark;
|
||||
private String visitorCode;
|
||||
private Long lastUpdateTime;
|
||||
private Integer sex;
|
||||
private String companyName;
|
||||
private String cause;
|
||||
private String carryOn;
|
||||
private String licensePlate;
|
||||
private String telephone;
|
||||
private String personTelephone;
|
||||
private Integer regType;
|
||||
private Integer validStatus;
|
||||
|
||||
public Integer getRegType() {
|
||||
return this.regType;
|
||||
}
|
||||
|
||||
public void setRegType(Integer regType) {
|
||||
this.regType = regType;
|
||||
}
|
||||
|
||||
public Integer getValidStatus() {
|
||||
return this.validStatus;
|
||||
}
|
||||
|
||||
public void setValidStatus(Integer validStatus) {
|
||||
this.validStatus = validStatus;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public Integer getSex() {
|
||||
return this.sex;
|
||||
}
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getCarryOn() {
|
||||
return this.carryOn;
|
||||
}
|
||||
|
||||
public void setCarryOn(String carryOn) {
|
||||
this.carryOn = carryOn;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return this.licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFaceUrl() {
|
||||
return this.regFaceUrl;
|
||||
}
|
||||
|
||||
public void setRegFaceUrl(String regFaceUrl) {
|
||||
this.regFaceUrl = regFaceUrl;
|
||||
}
|
||||
|
||||
public String getDisplayUrl() {
|
||||
return this.displayUrl;
|
||||
}
|
||||
|
||||
public void setDisplayUrl(String displayUrl) {
|
||||
this.displayUrl = displayUrl;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
|
||||
public Long getLastUpdateTime() {
|
||||
return this.lastUpdateTime;
|
||||
}
|
||||
|
||||
public void setLastUpdateTime(Long lastUpdateTime) {
|
||||
this.lastUpdateTime = lastUpdateTime;
|
||||
}
|
||||
}
|
||||
|
||||
+272
@@ -0,0 +1,272 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.open.result;
|
||||
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.DavinciPic;
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
public class VisitorRecordOpenResult
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7671207718927334038L;
|
||||
private String id;
|
||||
private String visitorId;
|
||||
private String visitorName;
|
||||
private String businessId;
|
||||
private String deviceId;
|
||||
private String deviceCode;
|
||||
private String deviceName;
|
||||
private Long signTime;
|
||||
private String signAddress;
|
||||
private String deviceTypeId;
|
||||
private String deviceTypeName;
|
||||
@DavinciPic
|
||||
private String facePath;
|
||||
@DavinciPic
|
||||
private String spotImgPath;
|
||||
@DavinciPic
|
||||
private String panoramaPath;
|
||||
private BigDecimal score;
|
||||
private Integer status;
|
||||
private BigDecimal threshold;
|
||||
private Integer tumoverType;
|
||||
private String remark;
|
||||
private String receiverId;
|
||||
private String receiverName;
|
||||
private String deviceAreaId;
|
||||
private String deviceAreaName;
|
||||
private String deviceDistrictId;
|
||||
private String deviceDistrictName;
|
||||
private String deviceDistrictPath;
|
||||
private String deviceDistrictMergeName;
|
||||
private String cause;
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getDeviceDistrictId() {
|
||||
return this.deviceDistrictId;
|
||||
}
|
||||
|
||||
public void setDeviceDistrictId(String deviceDistrictId) {
|
||||
this.deviceDistrictId = deviceDistrictId;
|
||||
}
|
||||
|
||||
public String getDeviceDistrictName() {
|
||||
return this.deviceDistrictName;
|
||||
}
|
||||
|
||||
public void setDeviceDistrictName(String deviceDistrictName) {
|
||||
this.deviceDistrictName = deviceDistrictName;
|
||||
}
|
||||
|
||||
public String getDeviceDistrictPath() {
|
||||
return this.deviceDistrictPath;
|
||||
}
|
||||
|
||||
public void setDeviceDistrictPath(String deviceDistrictPath) {
|
||||
this.deviceDistrictPath = deviceDistrictPath;
|
||||
}
|
||||
|
||||
public String getDeviceDistrictMergeName() {
|
||||
return this.deviceDistrictMergeName;
|
||||
}
|
||||
|
||||
public void setDeviceDistrictMergeName(String deviceDistrictMergeName) {
|
||||
this.deviceDistrictMergeName = deviceDistrictMergeName;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getVisitorId() {
|
||||
return this.visitorId;
|
||||
}
|
||||
|
||||
public void setVisitorId(String visitorId) {
|
||||
this.visitorId = visitorId;
|
||||
}
|
||||
|
||||
public String getVisitorName() {
|
||||
return this.visitorName;
|
||||
}
|
||||
|
||||
public void setVisitorName(String visitorName) {
|
||||
this.visitorName = visitorName;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return this.deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public Long getSignTime() {
|
||||
return this.signTime;
|
||||
}
|
||||
|
||||
public void setSignTime(Long signTime) {
|
||||
this.signTime = signTime;
|
||||
}
|
||||
|
||||
public String getSignAddress() {
|
||||
return this.signAddress;
|
||||
}
|
||||
|
||||
public void setSignAddress(String signAddress) {
|
||||
this.signAddress = signAddress;
|
||||
}
|
||||
|
||||
public String getDeviceTypeId() {
|
||||
return this.deviceTypeId;
|
||||
}
|
||||
|
||||
public void setDeviceTypeId(String deviceTypeId) {
|
||||
this.deviceTypeId = deviceTypeId;
|
||||
}
|
||||
|
||||
public String getDeviceTypeName() {
|
||||
return this.deviceTypeName;
|
||||
}
|
||||
|
||||
public void setDeviceTypeName(String deviceTypeName) {
|
||||
this.deviceTypeName = deviceTypeName;
|
||||
}
|
||||
|
||||
public String getFacePath() {
|
||||
return this.facePath;
|
||||
}
|
||||
|
||||
public void setFacePath(String facePath) {
|
||||
this.facePath = facePath;
|
||||
}
|
||||
|
||||
public String getSpotImgPath() {
|
||||
return this.spotImgPath;
|
||||
}
|
||||
|
||||
public void setSpotImgPath(String spotImgPath) {
|
||||
this.spotImgPath = spotImgPath;
|
||||
}
|
||||
|
||||
public String getPanoramaPath() {
|
||||
return this.panoramaPath;
|
||||
}
|
||||
|
||||
public void setPanoramaPath(String panoramaPath) {
|
||||
this.panoramaPath = panoramaPath;
|
||||
}
|
||||
|
||||
public BigDecimal getScore() {
|
||||
return this.score;
|
||||
}
|
||||
|
||||
public void setScore(BigDecimal score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public BigDecimal getThreshold() {
|
||||
return this.threshold;
|
||||
}
|
||||
|
||||
public void setThreshold(BigDecimal threshold) {
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
public Integer getTumoverType() {
|
||||
return this.tumoverType;
|
||||
}
|
||||
|
||||
public void setTumoverType(Integer tumoverType) {
|
||||
this.tumoverType = tumoverType;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getReceiverId() {
|
||||
return this.receiverId;
|
||||
}
|
||||
|
||||
public void setReceiverId(String receiverId) {
|
||||
this.receiverId = receiverId;
|
||||
}
|
||||
|
||||
public String getReceiverName() {
|
||||
return this.receiverName;
|
||||
}
|
||||
|
||||
public void setReceiverName(String receiverName) {
|
||||
this.receiverName = receiverName;
|
||||
}
|
||||
|
||||
public String getDeviceAreaId() {
|
||||
return this.deviceAreaId;
|
||||
}
|
||||
|
||||
public void setDeviceAreaId(String deviceAreaId) {
|
||||
this.deviceAreaId = deviceAreaId;
|
||||
}
|
||||
|
||||
public String getDeviceAreaName() {
|
||||
return this.deviceAreaName;
|
||||
}
|
||||
|
||||
public void setDeviceAreaName(String deviceAreaName) {
|
||||
this.deviceAreaName = deviceAreaName;
|
||||
}
|
||||
}
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordPageParam
|
||||
* cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.record.result.VisitorOverviewResult
|
||||
* cn.cloudwalk.client.ninca.visitor.record.result.VisitorQueryResult
|
||||
* cn.cloudwalk.client.ninca.visitor.record.result.VisitorRecordResult
|
||||
* cn.cloudwalk.client.ninca.visitor.record.result.VisitorRecordResultExcel
|
||||
* cn.cloudwalk.client.ninca.visitor.record.service.VisitorRecordService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.service.ninca.visitor.export.VisitorRecordExportAsyncService
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.GetMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.record.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordPageParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.result.VisitorOverviewResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.result.VisitorQueryResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.result.VisitorRecordResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.result.VisitorRecordResultExcel;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.service.VisitorRecordService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.service.ninca.visitor.export.VisitorRecordExportAsyncService;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.record.form.VisitorRecordPageForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.record.form.VisitorRecordQueryForm;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/visitor/record/"})
|
||||
public class VisitorRecordController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private VisitorRecordService visitorRecordService;
|
||||
@Autowired
|
||||
private VisitorRecordExportAsyncService visitorRecordExportAsyncService;
|
||||
|
||||
@RequestMapping(value={"page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorRecordResult>> page(@RequestBody VisitorRecordPageForm form) {
|
||||
VisitorRecordPageParam param = new VisitorRecordPageParam();
|
||||
param = (VisitorRecordPageParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.visitorRecordService.page(param, page, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bc6\u522b\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76251201", (String)this.getMessage("76251201"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"overview"})
|
||||
public CloudwalkResult<VisitorOverviewResult> getOverview(@RequestBody VisitorRecordPageForm form) {
|
||||
VisitorRecordPageParam param = new VisitorRecordPageParam();
|
||||
param = (VisitorRecordPageParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorRecordService.getOverview(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u5230\u8bbf\u4eba\u6570\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76251204", (String)this.getMessage("76251204"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"query"})
|
||||
public CloudwalkResult<VisitorQueryResult> detail(@RequestBody VisitorRecordQueryForm form) {
|
||||
VisitorRecordQueryParam param = new VisitorRecordQueryParam();
|
||||
param = (VisitorRecordQueryParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorRecordService.query(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bc6\u522b\u8bb0\u5f55\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76251202", (String)this.getMessage("76251202"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"export"})
|
||||
public CloudwalkResult<Boolean> export(@RequestBody VisitorRecordPageForm form) {
|
||||
VisitorRecordPageParam param = new VisitorRecordPageParam();
|
||||
param = (VisitorRecordPageParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorRecordExportAsyncService.startExportTask((Object)param, VisitorRecordResultExcel.class, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u51fa\u8bbf\u5ba2\u5230\u8bbf\u8bb0\u5f55\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"76251203", (String)this.getMessage("76251203"));
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping(value={"maxRecord"})
|
||||
public CloudwalkResult<Long> exportMaxRecord() {
|
||||
try {
|
||||
return this.visitorRecordExportAsyncService.exportMaxRecord();
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u83b7\u53d6\u6700\u5927\u5bfc\u51fa\u8bb0\u5f55\u5931\u8d25", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508021", (String)"\u83b7\u53d6\u6700\u5927\u5bfc\u51fa\u8bb0\u5f55\u5931\u8d25");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+84
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.record.service.VisitorRecordService
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.record.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.record.param.VisitorRecordQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.record.service.VisitorRecordService;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.record.form.VisitorRecordQueryForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorAddForm;
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/three/visitor/record"})
|
||||
public class VisitorRecordThreeController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private VisitorRecordService visitorRecordService;
|
||||
@Autowired
|
||||
private VisitorService visitorService;
|
||||
|
||||
@RequestMapping(value={"/query"})
|
||||
public CloudwalkResult<List<VisitorResult>> detail(@RequestBody VisitorRecordQueryForm form) {
|
||||
VisitorRecordQueryParam param = new VisitorRecordQueryParam();
|
||||
param = (VisitorRecordQueryParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorRecordService.queryVisitor(param);
|
||||
}
|
||||
catch (Exception e) {
|
||||
return CloudwalkResult.fail((String)"\u67e5\u8be2\u8bc6\u522b\u8bb0\u5f55\u8be6\u60c5\u5931\u8d25", (String)"\u67e5\u8be2\u8bc6\u522b\u8bb0\u5f55\u8be6\u60c5\u5931\u8d25");
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/add"})
|
||||
public CloudwalkResult<String> add(@RequestBody VisitorAddForm form) {
|
||||
VisitorNewParam param = new VisitorNewParam();
|
||||
param = (VisitorNewParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setRegType(VisitorRegisterTypeEnum.CARD_REG);
|
||||
try {
|
||||
CloudwalkResult result = this.visitorService.add(param, this.getCloudwalkContext());
|
||||
if (result.isSuccess()) {
|
||||
return CloudwalkResult.success((Object)((VisitorAddResult)result.getData()).getPersonId());
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u8bbf\u5ba2\u673a\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u8bbf\u5ba2\u673a\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510001", (String)this.getMessage("762510001"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.ExcelAttribute
|
||||
* cn.cloudwalk.common.ninca.visitor.annotation.ExcelBytesAttribute
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.record.form;
|
||||
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.ExcelAttribute;
|
||||
import cn.cloudwalk.common.ninca.visitor.annotation.ExcelBytesAttribute;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorRecordExcel
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -4331179441899913031L;
|
||||
private String spotImgPath;
|
||||
@ExcelAttribute(name="\u6293\u62cd\u7167", column="A", isPic=true)
|
||||
@ExcelBytesAttribute(pathField="spotImgPath")
|
||||
private byte[] spotImgPathBytes;
|
||||
private String faceUrl;
|
||||
@ExcelAttribute(name="\u6ce8\u518c\u7167", column="B", isPic=true)
|
||||
@ExcelBytesAttribute(pathField="faceUrl")
|
||||
private byte[] faceUrlBytes;
|
||||
@ExcelAttribute(name="\u59d3\u540d", column="C")
|
||||
private String personName;
|
||||
@ExcelAttribute(name="\u63a5\u5f85\u4eba\u5458", column="D")
|
||||
private String receiverName;
|
||||
@ExcelAttribute(name="\u5730\u70b9", column="E")
|
||||
private String deviceAddress;
|
||||
@ExcelAttribute(name="\u8bbe\u5907\u540d\u79f0", column="F")
|
||||
private String deviceName;
|
||||
@ExcelAttribute(name="\u8bc6\u522b\u65f6\u95f4", column="G", isDate=true)
|
||||
private Long signTime;
|
||||
|
||||
public String getSpotImgPath() {
|
||||
return this.spotImgPath;
|
||||
}
|
||||
|
||||
public void setSpotImgPath(String spotImgPath) {
|
||||
this.spotImgPath = spotImgPath;
|
||||
}
|
||||
|
||||
public byte[] getSpotImgPathBytes() {
|
||||
return this.spotImgPathBytes;
|
||||
}
|
||||
|
||||
public void setSpotImgPathBytes(byte[] spotImgPathBytes) {
|
||||
this.spotImgPathBytes = spotImgPathBytes;
|
||||
}
|
||||
|
||||
public byte[] getFaceUrlBytes() {
|
||||
return this.faceUrlBytes;
|
||||
}
|
||||
|
||||
public void setFaceUrlBytes(byte[] faceUrlBytes) {
|
||||
this.faceUrlBytes = faceUrlBytes;
|
||||
}
|
||||
|
||||
public String getFaceUrl() {
|
||||
return this.faceUrl;
|
||||
}
|
||||
|
||||
public void setFaceUrl(String faceUrl) {
|
||||
this.faceUrl = faceUrl;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getReceiverName() {
|
||||
return this.receiverName;
|
||||
}
|
||||
|
||||
public void setReceiverName(String receiverName) {
|
||||
this.receiverName = receiverName;
|
||||
}
|
||||
|
||||
public String getDeviceAddress() {
|
||||
return this.deviceAddress;
|
||||
}
|
||||
|
||||
public void setDeviceAddress(String deviceAddress) {
|
||||
this.deviceAddress = deviceAddress;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return this.deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public Long getSignTime() {
|
||||
return this.signTime;
|
||||
}
|
||||
|
||||
public void setSignTime(Long signTime) {
|
||||
this.signTime = signTime;
|
||||
}
|
||||
}
|
||||
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.record.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorRecordPageForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -2066712958286305794L;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
private List<String> deviceIds;
|
||||
private String visitorName;
|
||||
private String receiverName;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getVisitorName() {
|
||||
return this.visitorName;
|
||||
}
|
||||
|
||||
public void setVisitorName(String visitorName) {
|
||||
this.visitorName = visitorName;
|
||||
}
|
||||
|
||||
public String getReceiverName() {
|
||||
return this.receiverName;
|
||||
}
|
||||
|
||||
public void setReceiverName(String receiverName) {
|
||||
this.receiverName = receiverName;
|
||||
}
|
||||
}
|
||||
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.record.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorRecordQueryForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -1053434760807971788L;
|
||||
private String visitorId;
|
||||
private String businessId;
|
||||
|
||||
public String getVisitorId() {
|
||||
return this.visitorId;
|
||||
}
|
||||
|
||||
public void setVisitorId(String visitorId) {
|
||||
this.visitorId = visitorId;
|
||||
}
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
}
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterApproveParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterPageParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterPageResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterQueryResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterApproveParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterPageParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterPageResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterQueryResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterApproveForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterGetsForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterPageForm;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/visitor/reg"})
|
||||
public class VisitorRegisterController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private VisitorRegisterService visitorRegisterService;
|
||||
|
||||
@RequestMapping(value={"/page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorRegisterPageResult>> page(@RequestBody VisitorRegisterPageForm form) {
|
||||
VisitorRegisterPageParam param = (VisitorRegisterPageParam)BeanCopyUtils.copyProperties((Object)((Object)form), VisitorRegisterPageParam.class);
|
||||
try {
|
||||
CloudwalkPageInfo pageInfo = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
return this.visitorRegisterService.page(param, pageInfo, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5206\u9875\u67e5\u8be2\u8bbf\u5ba2\u6ce8\u518c\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510025", (String)this.getMessage("762510025"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/approve"})
|
||||
public CloudwalkResult<Boolean> approve(@RequestBody VisitorRegisterApproveForm form) {
|
||||
VisitorRegisterApproveParam param = (VisitorRegisterApproveParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterApproveParam.class);
|
||||
try {
|
||||
return this.visitorRegisterService.approve(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5ba1\u6838\u8bbf\u5ba2\u6ce8\u518c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510026", (String)this.getMessage("762510026"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/gets"})
|
||||
public CloudwalkResult<List<VisitorRegisterQueryResult>> gets(@RequestBody VisitorRegisterGetsForm form) {
|
||||
VisitorRegisterGetsParam param = (VisitorRegisterGetsParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterGetsParam.class);
|
||||
try {
|
||||
return this.visitorRegisterService.gets(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u6ce8\u518c\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510038", (String)this.getMessage("762510038"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/count/pending"})
|
||||
public CloudwalkResult<Integer> pendingCount() {
|
||||
try {
|
||||
return this.visitorRegisterService.pendingCount(this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u7edf\u8ba1\u5f85\u5ba1\u6838\u4eba\u5458\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508057", (String)this.getMessage("762508057"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+115
@@ -0,0 +1,115 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterAddParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterApproveParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetPidInfoParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterAddResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterPidInfoResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterQueryResult
|
||||
* cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum
|
||||
* cn.cloudwalk.common.ninca.visitor.util.StringUtils
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterAddParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterApproveParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetPidInfoParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorRegisterGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterAddResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterPidInfoResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorRegisterQueryResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.service.VisitorRegisterService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum;
|
||||
import cn.cloudwalk.common.ninca.visitor.util.StringUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterAddForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterApproveForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterGetPidInfoForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.register.form.VisitorRegisterGetsForm;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/anonymous/visitor/reg"})
|
||||
public class VisitorRegisterOuterController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private VisitorRegisterService visitorRegisterService;
|
||||
|
||||
@RequestMapping(value={"/add"})
|
||||
public CloudwalkResult<String> add(@RequestBody VisitorRegisterAddForm form) {
|
||||
VisitorRegisterAddParam param = (VisitorRegisterAddParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterAddParam.class);
|
||||
param.setRegType(VisitorRegisterTypeEnum.SWEEP_CODE);
|
||||
try {
|
||||
CloudwalkResult result = this.visitorRegisterService.add(param, this.getCloudwalkContext());
|
||||
if (result.isSuccess()) {
|
||||
return CloudwalkResult.success((Object)((VisitorRegisterAddResult)result.getData()).getId());
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u6ce8\u518c\u8bb0\u5f55\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
if (StringUtils.isNotBlank((String)e.getCode())) {
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
return CloudwalkResult.fail((String)"762510024", (String)this.getMessage("762510024"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/approve"})
|
||||
public CloudwalkResult<Boolean> approve(@RequestBody VisitorRegisterApproveForm form) {
|
||||
VisitorRegisterApproveParam param = (VisitorRegisterApproveParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterApproveParam.class);
|
||||
try {
|
||||
return this.visitorRegisterService.outerApprove(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5ba1\u6838\u8bbf\u5ba2\u6ce8\u518c\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510026", (String)this.getMessage("762510026"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/gets"})
|
||||
public CloudwalkResult<List<VisitorRegisterQueryResult>> gets(@RequestBody VisitorRegisterGetsForm form) {
|
||||
VisitorRegisterGetsParam param = (VisitorRegisterGetsParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterGetsParam.class);
|
||||
try {
|
||||
return this.visitorRegisterService.gets(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u6ce8\u518c\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510038", (String)this.getMessage("762510038"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"/pid-info"})
|
||||
public CloudwalkResult<VisitorRegisterPidInfoResult> add(@RequestBody VisitorRegisterGetPidInfoForm form) {
|
||||
VisitorRegisterGetPidInfoParam param = (VisitorRegisterGetPidInfoParam)BeanCopyUtils.copyProperties((Object)form, VisitorRegisterGetPidInfoParam.class);
|
||||
try {
|
||||
return this.visitorRegisterService.getPidInfo(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u83b7\u53d6\u4eba\u5458\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
if (StringUtils.isNotBlank((String)e.getCode())) {
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
return CloudwalkResult.fail((String)"762508048", (String)this.getMessage("762508048"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+259
@@ -0,0 +1,259 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorRegisterAddForm
|
||||
implements Serializable {
|
||||
private Integer addType;
|
||||
private String name;
|
||||
private String telephone;
|
||||
private String personName;
|
||||
private String personTelephone;
|
||||
private Long begVisiterTime;
|
||||
private Long endVisiterTime;
|
||||
private Long time;
|
||||
private String image;
|
||||
private String ul;
|
||||
private String pid;
|
||||
private String cardNo;
|
||||
private VisitorRegisterTypeEnum regType;
|
||||
private String remark;
|
||||
private String workNo;
|
||||
private String visitorCode;
|
||||
private String greetWord;
|
||||
private Integer sex;
|
||||
private String companyName;
|
||||
private String cause;
|
||||
private String carryOn;
|
||||
private String licensePlate;
|
||||
private String personId;
|
||||
private String detailedAddress;
|
||||
private List<String> deviceIds;
|
||||
private List<String> floorIds;
|
||||
private Integer isDevice;
|
||||
|
||||
public List<String> getFloorIds() {
|
||||
return this.floorIds;
|
||||
}
|
||||
|
||||
public void setFloorIds(List<String> floorIds) {
|
||||
this.floorIds = floorIds;
|
||||
}
|
||||
|
||||
public Integer getIsDevice() {
|
||||
return this.isDevice;
|
||||
}
|
||||
|
||||
public void setIsDevice(Integer isDevice) {
|
||||
this.isDevice = isDevice;
|
||||
}
|
||||
|
||||
public Integer getAddType() {
|
||||
return this.addType;
|
||||
}
|
||||
|
||||
public void setAddType(Integer addType) {
|
||||
this.addType = addType;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getPid() {
|
||||
return this.pid;
|
||||
}
|
||||
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public Long getBegVisiterTime() {
|
||||
return this.begVisiterTime;
|
||||
}
|
||||
|
||||
public void setBegVisiterTime(Long begVisiterTime) {
|
||||
this.begVisiterTime = begVisiterTime;
|
||||
}
|
||||
|
||||
public Long getTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
public void setTime(Long time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return this.image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getUl() {
|
||||
return this.ul;
|
||||
}
|
||||
|
||||
public void setUl(String ul) {
|
||||
this.ul = ul;
|
||||
}
|
||||
|
||||
public Long getEndVisiterTime() {
|
||||
return this.endVisiterTime;
|
||||
}
|
||||
|
||||
public void setEndVisiterTime(Long endVisiterTime) {
|
||||
this.endVisiterTime = endVisiterTime;
|
||||
}
|
||||
|
||||
public VisitorRegisterTypeEnum getRegType() {
|
||||
return this.regType;
|
||||
}
|
||||
|
||||
public void setRegType(VisitorRegisterTypeEnum regType) {
|
||||
this.regType = regType;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getWorkNo() {
|
||||
return this.workNo;
|
||||
}
|
||||
|
||||
public void setWorkNo(String workNo) {
|
||||
this.workNo = workNo;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public Integer getSex() {
|
||||
return this.sex;
|
||||
}
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getCarryOn() {
|
||||
return this.carryOn;
|
||||
}
|
||||
|
||||
public void setCarryOn(String carryOn) {
|
||||
this.carryOn = carryOn;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return this.licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
}
|
||||
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorRegisterApproveForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -3656235876610742516L;
|
||||
private List<String> ids;
|
||||
private List<String> deviceIds;
|
||||
private Integer approveStatus;
|
||||
private String approveDesc;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public Integer getApproveStatus() {
|
||||
return this.approveStatus;
|
||||
}
|
||||
|
||||
public void setApproveStatus(Integer approveStatus) {
|
||||
this.approveStatus = approveStatus;
|
||||
}
|
||||
|
||||
public String getApproveDesc() {
|
||||
return this.approveDesc;
|
||||
}
|
||||
|
||||
public void setApproveDesc(String approveDesc) {
|
||||
this.approveDesc = approveDesc;
|
||||
}
|
||||
}
|
||||
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorRegisterEditForm
|
||||
implements Serializable {
|
||||
private String id;
|
||||
private String name;
|
||||
private String telephone;
|
||||
private String personName;
|
||||
private String personTelephone;
|
||||
private Long begVisiterTime;
|
||||
private Long time;
|
||||
private String image;
|
||||
private String ul;
|
||||
private String pid;
|
||||
private String cardNo;
|
||||
private String detailedAddress;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getPid() {
|
||||
return this.pid;
|
||||
}
|
||||
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public Long getBegVisiterTime() {
|
||||
return this.begVisiterTime;
|
||||
}
|
||||
|
||||
public void setBegVisiterTime(Long begVisiterTime) {
|
||||
this.begVisiterTime = begVisiterTime;
|
||||
}
|
||||
|
||||
public Long getTime() {
|
||||
return this.time;
|
||||
}
|
||||
|
||||
public void setTime(Long time) {
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return this.image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getUl() {
|
||||
return this.ul;
|
||||
}
|
||||
|
||||
public void setUl(String ul) {
|
||||
this.ul = ul;
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorRegisterGetPidInfoForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -6024384293252045633L;
|
||||
private String pid;
|
||||
|
||||
public String getPid() {
|
||||
return this.pid;
|
||||
}
|
||||
|
||||
public void setPid(String pid) {
|
||||
this.pid = pid;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorRegisterGetsForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -639457370864874724L;
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorRegisterIdentifyForm
|
||||
implements Serializable {
|
||||
private String regFace;
|
||||
private String display;
|
||||
private String cardNo;
|
||||
|
||||
public String getRegFace() {
|
||||
return this.regFace;
|
||||
}
|
||||
|
||||
public void setRegFace(String regFace) {
|
||||
this.regFace = regFace;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
}
|
||||
|
||||
+50
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
|
||||
public class VisitorRegisterPageForm
|
||||
extends CloudwalkBasePageForm {
|
||||
private Integer approveStatus;
|
||||
private String name;
|
||||
private String telephone;
|
||||
private String personName;
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Integer getApproveStatus() {
|
||||
return this.approveStatus;
|
||||
}
|
||||
|
||||
public void setApproveStatus(Integer approveStatus) {
|
||||
this.approveStatus = approveStatus;
|
||||
}
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorRegisterSyncForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 6890682191343347275L;
|
||||
private String id;
|
||||
private Long lastSyncTime;
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getLastSyncTime() {
|
||||
return this.lastSyncTime;
|
||||
}
|
||||
|
||||
public void setLastSyncTime(Long lastSyncTime) {
|
||||
this.lastSyncTime = lastSyncTime;
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.register.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorYZTQrcodeUploadForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 6890682391343347275L;
|
||||
private String qrcodeBase64;
|
||||
|
||||
public String getQrcodeBase64() {
|
||||
return this.qrcodeBase64;
|
||||
}
|
||||
|
||||
public void setQrcodeBase64(String qrcodeBase64) {
|
||||
this.qrcodeBase64 = qrcodeBase64;
|
||||
}
|
||||
}
|
||||
|
||||
+68
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.register.param.VisitorAnalyseCycleParam
|
||||
* cn.cloudwalk.client.ninca.visitor.register.result.VisitorAnalyseCycleResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorAnalyseCountParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorAnalyseService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* javax.annotation.Resource
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.register.param.VisitorAnalyseCycleParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.register.result.VisitorAnalyseCycleResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorAnalyseCountParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorAnalyseService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorAnalyseCountForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorAnalyseCycleForm;
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/analyse/visitor"})
|
||||
public class VisitorAnalyseController
|
||||
extends AbstractCloudwalkController {
|
||||
@Resource
|
||||
private VisitorAnalyseService visitorAnalyseService;
|
||||
|
||||
@PostMapping(value={"/cycle"})
|
||||
public CloudwalkResult<List<VisitorAnalyseCycleResult>> analyseCycle(@RequestBody VisitorAnalyseCycleForm form) {
|
||||
VisitorAnalyseCycleParam param = (VisitorAnalyseCycleParam)BeanCopyUtils.copyProperties((Object)form, VisitorAnalyseCycleParam.class);
|
||||
try {
|
||||
return this.visitorAnalyseService.analyseCycle(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u8bbf\u5ba2\u7edf\u8ba1\u5206\u6790\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508028", (String)this.getMessage("762508028"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/count"})
|
||||
public CloudwalkResult<Integer> analyseCount(@RequestBody VisitorAnalyseCountForm form) {
|
||||
VisitorAnalyseCountParam param = (VisitorAnalyseCountParam)BeanCopyUtils.copyProperties((Object)form, VisitorAnalyseCountParam.class);
|
||||
try {
|
||||
return this.visitorAnalyseService.analyseCount(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u8bbf\u5ba2\u5355\u6761\u7edf\u8ba1\u5206\u6790\u67e5\u8be2\u5931\u8d25\uff0c\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508028", (String)this.getMessage("762508028"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+223
@@ -0,0 +1,223 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.client.ninca.visitor.anonymous.service.AnonymousVerifyService
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorComplexQueryParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorDelParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorDeviceAddDeviceParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorEditParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorGetsParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorImportParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.AnonymousAddSignResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorDeviceResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorPageResult
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorResultExcel
|
||||
* cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService
|
||||
* cn.cloudwalk.cloud.exception.ServiceException
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageAble
|
||||
* cn.cloudwalk.cloud.page.CloudwalkPageInfo
|
||||
* cn.cloudwalk.cloud.result.CloudwalkResult
|
||||
* cn.cloudwalk.cloud.utils.BeanCopyUtils
|
||||
* cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum
|
||||
* cn.cloudwalk.service.ninca.visitor.export.VisitorExportAsyncService
|
||||
* javax.annotation.Resource
|
||||
* javax.servlet.http.HttpServletRequest
|
||||
* org.springframework.beans.factory.annotation.Autowired
|
||||
* org.springframework.web.bind.annotation.PostMapping
|
||||
* org.springframework.web.bind.annotation.RequestBody
|
||||
* org.springframework.web.bind.annotation.RequestMapping
|
||||
* org.springframework.web.bind.annotation.RestController
|
||||
* org.springframework.web.context.request.RequestContextHolder
|
||||
* org.springframework.web.context.request.ServletRequestAttributes
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.controller;
|
||||
|
||||
import cn.cloudwalk.client.ninca.visitor.anonymous.service.AnonymousVerifyService;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorComplexQueryParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorDelParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorDeviceAddDeviceParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorEditParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorGetsParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorImportParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.param.VisitorNewParam;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.AnonymousAddSignResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorAddResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorDeviceResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorPageResult;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.result.VisitorResultExcel;
|
||||
import cn.cloudwalk.client.ninca.visitor.visitor.service.VisitorService;
|
||||
import cn.cloudwalk.cloud.exception.ServiceException;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageAble;
|
||||
import cn.cloudwalk.cloud.page.CloudwalkPageInfo;
|
||||
import cn.cloudwalk.cloud.result.CloudwalkResult;
|
||||
import cn.cloudwalk.cloud.utils.BeanCopyUtils;
|
||||
import cn.cloudwalk.common.ninca.visitor.config.VisitorFeignThreadLocalUtil;
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum;
|
||||
import cn.cloudwalk.service.ninca.visitor.export.VisitorExportAsyncService;
|
||||
import cn.cloudwalk.web.ninca.visitor.common.AbstractCloudwalkController;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorAddForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorDelForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorDeviceAddDeviceFrom;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorEditForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorGetsForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorImportForm;
|
||||
import cn.cloudwalk.web.ninca.visitor.visitor.form.VisitorQueryForm;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value={"/intelligent/visitor/"})
|
||||
public class VisitorController
|
||||
extends AbstractCloudwalkController {
|
||||
@Autowired
|
||||
private VisitorService visitorService;
|
||||
@Resource
|
||||
private AnonymousVerifyService anonymousVerifyService;
|
||||
@Autowired
|
||||
private VisitorExportAsyncService visitorExportAsyncService;
|
||||
|
||||
@RequestMapping(value={"add"})
|
||||
public CloudwalkResult<String> add(@RequestBody VisitorAddForm form) {
|
||||
VisitorNewParam param = new VisitorNewParam();
|
||||
param = (VisitorNewParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
param.setRegType(VisitorRegisterTypeEnum.BACKSTAGE);
|
||||
try {
|
||||
CloudwalkResult result = this.visitorService.add(param, this.getCloudwalkContext());
|
||||
if (result.isSuccess()) {
|
||||
return CloudwalkResult.success((Object)((VisitorAddResult)result.getData()).getPersonId());
|
||||
}
|
||||
return CloudwalkResult.fail((String)result.getCode(), (String)result.getMessage());
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510001", (String)this.getMessage("762510001"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"edit"})
|
||||
public CloudwalkResult<Boolean> edit(@RequestBody VisitorEditForm form) {
|
||||
VisitorEditParam param = new VisitorEditParam();
|
||||
param = (VisitorEditParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorService.edit(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u7f16\u8f91\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510002", (String)this.getMessage("762510002"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"delete"})
|
||||
public CloudwalkResult<Boolean> delete(@RequestBody VisitorDelForm form) {
|
||||
VisitorDelParam param = new VisitorDelParam();
|
||||
param = (VisitorDelParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorService.delete(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5220\u9664\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510003", (String)this.getMessage("762510003"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"gets"})
|
||||
public CloudwalkResult<List<VisitorDeviceResult>> gets(@RequestBody VisitorGetsForm form) {
|
||||
VisitorGetsParam param = new VisitorGetsParam();
|
||||
param = (VisitorGetsParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
try {
|
||||
return this.visitorService.getsIncludeDeviceInfo(param, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u83b7\u53d6\u8bbf\u5ba2\u4fe1\u606f\u8be6\u60c5\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510004", (String)this.getMessage("762510004"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"page"})
|
||||
public CloudwalkResult<CloudwalkPageAble<VisitorPageResult>> page(@RequestBody VisitorQueryForm form) {
|
||||
VisitorComplexQueryParam param = new VisitorComplexQueryParam();
|
||||
param = (VisitorComplexQueryParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
CloudwalkPageInfo page = new CloudwalkPageInfo(form.getCurrentPage(), form.getRowsOfPage());
|
||||
try {
|
||||
return this.visitorService.page(param, page, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u67e5\u8be2\u8bbf\u5ba2\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510005", (String)this.getMessage("762510005"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"import"})
|
||||
public CloudwalkResult<Boolean> batchImport(@RequestBody VisitorImportForm form) {
|
||||
try {
|
||||
VisitorImportParam param = new VisitorImportParam();
|
||||
param = (VisitorImportParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes)RequestContextHolder.getRequestAttributes();
|
||||
Map headerMap = VisitorFeignThreadLocalUtil.getRequestHeader((HttpServletRequest)attributes.getRequest());
|
||||
this.visitorService.batchImport(param, headerMap, this.getCloudwalkContext());
|
||||
return CloudwalkResult.success((Object)true);
|
||||
}
|
||||
catch (ServiceException e) {
|
||||
this.logger.error("\u5bfc\u5165\u8bbf\u5ba2\u4eba\u5458\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)e.getCode(), (String)e.getMessage());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u5165\u8bbf\u5ba2\u4eba\u5458\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762510006", (String)this.getMessage("762510006"));
|
||||
}
|
||||
}
|
||||
|
||||
@RequestMapping(value={"export"})
|
||||
public CloudwalkResult<Boolean> export(@RequestBody VisitorQueryForm form) {
|
||||
try {
|
||||
VisitorComplexQueryParam param = new VisitorComplexQueryParam();
|
||||
param = (VisitorComplexQueryParam)BeanCopyUtils.copyProperties((Object)form, (Object)param);
|
||||
return this.visitorExportAsyncService.startExportTask((Object)param, VisitorResultExcel.class, null, this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u5bfc\u51fa\u8bbf\u5ba2\u4eba\u5458\u4fe1\u606f\u5931\u8d25\uff0c\u539f\u56e0\uff1a{}", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508056", (String)this.getMessage("762508056"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"/addDevice"})
|
||||
public CloudwalkResult<Boolean> deviceAdd(@RequestBody VisitorDeviceAddDeviceFrom form) {
|
||||
VisitorDeviceAddDeviceParam param = (VisitorDeviceAddDeviceParam)BeanCopyUtils.copyProperties((Object)form, VisitorDeviceAddDeviceParam.class);
|
||||
try {
|
||||
this.visitorService.deviceAdd(param, this.getCloudwalkContext());
|
||||
return CloudwalkResult.success((Object)true);
|
||||
}
|
||||
catch (Exception e) {
|
||||
this.logger.error("\u65b0\u589e\u8bbf\u5ba2\u5173\u8054\u8bbe\u5907\u5931\u8d25\uff0c\u5931\u8d25\u539f\u56e0\uff1a", (Throwable)e);
|
||||
return CloudwalkResult.fail((String)"762508017", (String)this.getMessage("762508017"));
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping(value={"qrcodeSign"})
|
||||
public CloudwalkResult<AnonymousAddSignResult> qrcodeSign() {
|
||||
try {
|
||||
return this.anonymousVerifyService.sign(this.getCloudwalkContext());
|
||||
}
|
||||
catch (Exception e) {
|
||||
return CloudwalkResult.fail((String)"76251999", (String)this.getMessage("76251999"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+260
@@ -0,0 +1,260 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import cn.cloudwalk.common.ninca.visitor.em.VisitorRegisterTypeEnum;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorAddForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 7773670316855458438L;
|
||||
private String name;
|
||||
private String cardNo;
|
||||
private String greetWord;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private String regFaceUrl;
|
||||
private String displayUrl;
|
||||
private String remark;
|
||||
private String workNo;
|
||||
private String visitorCode;
|
||||
private List<String> deviceIds;
|
||||
private String registerId;
|
||||
private VisitorRegisterTypeEnum regType;
|
||||
private Integer sex;
|
||||
private String companyName;
|
||||
private String cause;
|
||||
private String carryOn;
|
||||
private String licensePlate;
|
||||
private String telephone;
|
||||
private String personTelephone;
|
||||
private String detailedAddress;
|
||||
private List<String> floorIds;
|
||||
private Integer isDevice;
|
||||
private String operatorUserId;
|
||||
private String deviceCode;
|
||||
|
||||
public String getOperatorUserId() {
|
||||
return this.operatorUserId;
|
||||
}
|
||||
|
||||
public void setOperatorUserId(String operatorUserId) {
|
||||
this.operatorUserId = operatorUserId;
|
||||
}
|
||||
|
||||
public String getDeviceCode() {
|
||||
return this.deviceCode;
|
||||
}
|
||||
|
||||
public void setDeviceCode(String deviceCode) {
|
||||
this.deviceCode = deviceCode;
|
||||
}
|
||||
|
||||
public Integer getIsDevice() {
|
||||
return this.isDevice;
|
||||
}
|
||||
|
||||
public void setIsDevice(Integer isDevice) {
|
||||
this.isDevice = isDevice;
|
||||
}
|
||||
|
||||
public List<String> getFloorIds() {
|
||||
return this.floorIds;
|
||||
}
|
||||
|
||||
public void setFloorIds(List<String> floorIds) {
|
||||
this.floorIds = floorIds;
|
||||
}
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFaceUrl() {
|
||||
return this.regFaceUrl;
|
||||
}
|
||||
|
||||
public void setRegFaceUrl(String regFaceUrl) {
|
||||
this.regFaceUrl = regFaceUrl;
|
||||
}
|
||||
|
||||
public String getDisplayUrl() {
|
||||
return this.displayUrl;
|
||||
}
|
||||
|
||||
public void setDisplayUrl(String displayUrl) {
|
||||
this.displayUrl = displayUrl;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getWorkNo() {
|
||||
return this.workNo;
|
||||
}
|
||||
|
||||
public void setWorkNo(String workNo) {
|
||||
this.workNo = workNo;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
|
||||
public String getRegisterId() {
|
||||
return this.registerId;
|
||||
}
|
||||
|
||||
public void setRegisterId(String registerId) {
|
||||
this.registerId = registerId;
|
||||
}
|
||||
|
||||
public VisitorRegisterTypeEnum getRegType() {
|
||||
return this.regType;
|
||||
}
|
||||
|
||||
public void setRegType(VisitorRegisterTypeEnum regType) {
|
||||
this.regType = regType;
|
||||
}
|
||||
|
||||
public Integer getSex() {
|
||||
return this.sex;
|
||||
}
|
||||
|
||||
public void setSex(Integer sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getCarryOn() {
|
||||
return this.carryOn;
|
||||
}
|
||||
|
||||
public void setCarryOn(String carryOn) {
|
||||
this.carryOn = carryOn;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return this.licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
}
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class VisitorAnalyseCountForm
|
||||
implements Serializable {
|
||||
private String businessId;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
public class VisitorAnalyseCycleForm {
|
||||
private String businessId;
|
||||
private Integer timeType;
|
||||
|
||||
public String getBusinessId() {
|
||||
return this.businessId;
|
||||
}
|
||||
|
||||
public void setBusinessId(String businessId) {
|
||||
this.businessId = businessId;
|
||||
}
|
||||
|
||||
public Integer getTimeType() {
|
||||
return this.timeType;
|
||||
}
|
||||
|
||||
public void setTimeType(Integer timeType) {
|
||||
this.timeType = timeType;
|
||||
}
|
||||
}
|
||||
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorDelForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -6884725505862799877L;
|
||||
private List<String> ids;
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorDeviceAddDeviceFrom
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -773309286522938843L;
|
||||
private List<String> personIds;
|
||||
private List<String> deviceIds;
|
||||
|
||||
public List<String> getPersonIds() {
|
||||
return this.personIds;
|
||||
}
|
||||
|
||||
public void setPersonIds(List<String> personIds) {
|
||||
this.personIds = personIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
}
|
||||
|
||||
+202
@@ -0,0 +1,202 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorEditForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 908852031911807716L;
|
||||
private String id;
|
||||
private String name;
|
||||
private String cardNo;
|
||||
private String greetWord;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private String regFaceUrl;
|
||||
private String displayUrl;
|
||||
private String remark;
|
||||
private String workNo;
|
||||
private String visitorCode;
|
||||
private List<String> deviceIds;
|
||||
private String telephone;
|
||||
private String personTelephone;
|
||||
private String detailedAddress;
|
||||
private String companyName;
|
||||
private String cause;
|
||||
private String carryOn;
|
||||
private String licensePlate;
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFaceUrl() {
|
||||
return this.regFaceUrl;
|
||||
}
|
||||
|
||||
public void setRegFaceUrl(String regFaceUrl) {
|
||||
this.regFaceUrl = regFaceUrl;
|
||||
}
|
||||
|
||||
public String getDisplayUrl() {
|
||||
return this.displayUrl;
|
||||
}
|
||||
|
||||
public void setDisplayUrl(String displayUrl) {
|
||||
this.displayUrl = displayUrl;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getWorkNo() {
|
||||
return this.workNo;
|
||||
}
|
||||
|
||||
public void setWorkNo(String workNo) {
|
||||
this.workNo = workNo;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
|
||||
public String getCompanyName() {
|
||||
return this.companyName;
|
||||
}
|
||||
|
||||
public void setCompanyName(String companyName) {
|
||||
this.companyName = companyName;
|
||||
}
|
||||
|
||||
public String getCause() {
|
||||
return this.cause;
|
||||
}
|
||||
|
||||
public void setCause(String cause) {
|
||||
this.cause = cause;
|
||||
}
|
||||
|
||||
public String getCarryOn() {
|
||||
return this.carryOn;
|
||||
}
|
||||
|
||||
public void setCarryOn(String carryOn) {
|
||||
this.carryOn = carryOn;
|
||||
}
|
||||
|
||||
public String getLicensePlate() {
|
||||
return this.licensePlate;
|
||||
}
|
||||
|
||||
public void setLicensePlate(String licensePlate) {
|
||||
this.licensePlate = licensePlate;
|
||||
}
|
||||
}
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorGetsForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7692725135585478776L;
|
||||
private List<String> ids;
|
||||
private Integer isDelete;
|
||||
|
||||
public Integer getIsDelete() {
|
||||
return this.isDelete;
|
||||
}
|
||||
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
public List<String> getIds() {
|
||||
return this.ids;
|
||||
}
|
||||
|
||||
public void setIds(List<String> ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
|
||||
+76
@@ -0,0 +1,76 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorImportForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = -7832785131233745245L;
|
||||
private List<String> deviceIds;
|
||||
private String filePath;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private String fileName;
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return this.filePath;
|
||||
}
|
||||
|
||||
public void setFilePath(String filePath) {
|
||||
this.filePath = filePath;
|
||||
}
|
||||
|
||||
public String getFileName() {
|
||||
return this.fileName;
|
||||
}
|
||||
|
||||
public void setFileName(String fileName) {
|
||||
this.fileName = fileName;
|
||||
}
|
||||
}
|
||||
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorNewForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 7773670316855458438L;
|
||||
private String name;
|
||||
private String cardNo;
|
||||
private String greetWord;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private String regFace;
|
||||
private String display;
|
||||
private String remark;
|
||||
private String workNo;
|
||||
private String visitorCode;
|
||||
private List<String> deviceIds;
|
||||
private String telephone;
|
||||
private String personTelephone;
|
||||
private String detailedAddress;
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getTelephone() {
|
||||
return this.telephone;
|
||||
}
|
||||
|
||||
public void setTelephone(String telephone) {
|
||||
this.telephone = telephone;
|
||||
}
|
||||
|
||||
public String getPersonTelephone() {
|
||||
return this.personTelephone;
|
||||
}
|
||||
|
||||
public void setPersonTelephone(String personTelephone) {
|
||||
this.personTelephone = personTelephone;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFace() {
|
||||
return this.regFace;
|
||||
}
|
||||
|
||||
public void setRegFace(String regFace) {
|
||||
this.regFace = regFace;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getWorkNo() {
|
||||
return this.workNo;
|
||||
}
|
||||
|
||||
public void setWorkNo(String workNo) {
|
||||
this.workNo = workNo;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
}
|
||||
|
||||
+108
@@ -0,0 +1,108 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*
|
||||
* Could not load the following classes:
|
||||
* cn.cloudwalk.cloud.page.CloudwalkBasePageForm
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import cn.cloudwalk.cloud.page.CloudwalkBasePageForm;
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorQueryForm
|
||||
extends CloudwalkBasePageForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 1880730257834543834L;
|
||||
private String name;
|
||||
private String personName;
|
||||
private List<String> deviceIds;
|
||||
private Integer status;
|
||||
private Integer syncStatus;
|
||||
private List<String> districtIds;
|
||||
private List<String> areaIds;
|
||||
private Integer regType;
|
||||
private Long startTime;
|
||||
private Long endTime;
|
||||
|
||||
public Long getStartTime() {
|
||||
return this.startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(Long startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public Long getEndTime() {
|
||||
return this.endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(Long endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
|
||||
public Integer getRegType() {
|
||||
return this.regType;
|
||||
}
|
||||
|
||||
public void setRegType(Integer regType) {
|
||||
this.regType = regType;
|
||||
}
|
||||
|
||||
public List<String> getDistrictIds() {
|
||||
return this.districtIds;
|
||||
}
|
||||
|
||||
public void setDistrictIds(List<String> districtIds) {
|
||||
this.districtIds = districtIds;
|
||||
}
|
||||
|
||||
public List<String> getAreaIds() {
|
||||
return this.areaIds;
|
||||
}
|
||||
|
||||
public void setAreaIds(List<String> areaIds) {
|
||||
this.areaIds = areaIds;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return this.status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getSyncStatus() {
|
||||
return this.syncStatus;
|
||||
}
|
||||
|
||||
public void setSyncStatus(Integer syncStatus) {
|
||||
this.syncStatus = syncStatus;
|
||||
}
|
||||
}
|
||||
|
||||
+148
@@ -0,0 +1,148 @@
|
||||
/*
|
||||
* Decompiled with CFR 0.152.
|
||||
*/
|
||||
package cn.cloudwalk.web.ninca.visitor.visitor.form;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
public class VisitorUpdateForm
|
||||
implements Serializable {
|
||||
private static final long serialVersionUID = 908852031911807716L;
|
||||
private String id;
|
||||
private String name;
|
||||
private String cardNo;
|
||||
private String greetWord;
|
||||
private String personId;
|
||||
private String personName;
|
||||
private Long begVisitorTime;
|
||||
private Long endVisitorTime;
|
||||
private String regFace;
|
||||
private String display;
|
||||
private String remark;
|
||||
private String workNo;
|
||||
private String visitorCode;
|
||||
private List<String> deviceIds;
|
||||
private String detailedAddress;
|
||||
|
||||
public String getDetailedAddress() {
|
||||
return this.detailedAddress;
|
||||
}
|
||||
|
||||
public void setDetailedAddress(String detailedAddress) {
|
||||
this.detailedAddress = detailedAddress;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return this.id;
|
||||
}
|
||||
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public void setDeviceIds(List<String> deviceIds) {
|
||||
this.deviceIds = deviceIds;
|
||||
}
|
||||
|
||||
public List<String> getDeviceIds() {
|
||||
return this.deviceIds;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCardNo() {
|
||||
return this.cardNo;
|
||||
}
|
||||
|
||||
public void setCardNo(String cardNo) {
|
||||
this.cardNo = cardNo;
|
||||
}
|
||||
|
||||
public String getGreetWord() {
|
||||
return this.greetWord;
|
||||
}
|
||||
|
||||
public void setGreetWord(String greetWord) {
|
||||
this.greetWord = greetWord;
|
||||
}
|
||||
|
||||
public String getPersonId() {
|
||||
return this.personId;
|
||||
}
|
||||
|
||||
public void setPersonId(String personId) {
|
||||
this.personId = personId;
|
||||
}
|
||||
|
||||
public String getPersonName() {
|
||||
return this.personName;
|
||||
}
|
||||
|
||||
public void setPersonName(String personName) {
|
||||
this.personName = personName;
|
||||
}
|
||||
|
||||
public Long getBegVisitorTime() {
|
||||
return this.begVisitorTime;
|
||||
}
|
||||
|
||||
public void setBegVisitorTime(Long begVisitorTime) {
|
||||
this.begVisitorTime = begVisitorTime;
|
||||
}
|
||||
|
||||
public Long getEndVisitorTime() {
|
||||
return this.endVisitorTime;
|
||||
}
|
||||
|
||||
public void setEndVisitorTime(Long endVisitorTime) {
|
||||
this.endVisitorTime = endVisitorTime;
|
||||
}
|
||||
|
||||
public String getRegFace() {
|
||||
return this.regFace;
|
||||
}
|
||||
|
||||
public void setRegFace(String regFace) {
|
||||
this.regFace = regFace;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return this.remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getWorkNo() {
|
||||
return this.workNo;
|
||||
}
|
||||
|
||||
public void setWorkNo(String workNo) {
|
||||
this.workNo = workNo;
|
||||
}
|
||||
|
||||
public String getVisitorCode() {
|
||||
return this.visitorCode;
|
||||
}
|
||||
|
||||
public void setVisitorCode(String visitorCode) {
|
||||
this.visitorCode = visitorCode;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
Summary for /tmp/crk_lib_extract_6o_f40r3/ninca-crk-visitor-management-web-2.9.1_210630-SNAPSHOT.jar
|
||||
Decompiled with CFR 0.152
|
||||
Reference in New Issue
Block a user