浏览代码

fixed entity

zero 1 年之前
父节点
当前提交
c69144c791

+ 110 - 0
src/main/java/com/example/xiaoshiweixinback/business/common/base/Constants.java

@@ -0,0 +1,110 @@
+package com.example.xiaoshiweixinback.business.common.base;
+
+import java.util.HashMap;
+import java.util.Map;
+
+public class Constants {
+
+    public static final String API_XIAO_SHI_WXBACK = "/api/xiaoshi/weixinback";
+    public static final String ADMIN_USERNAME = "admin";
+
+    public static final Integer PATENT_CLASS_NUMBER_IPC = 1;
+    public static final Integer PATENT_CLASS_NUMBER_CPC = 2;
+    public static final Integer PATENT_CLASS_NUMBER_UPC = 3;
+    public static final Integer PATENT_CLASS_NUMBER_LOC = 4;
+    public static final Integer MAX_IMPORT_TASK_COUNT=5;
+    public static final  Integer IMPORT_PATENT_TO=1;
+    /**
+     * 分隔符-竖线
+     */
+    public static final String SEPARATOR_VERTICAL_BAR = " | ";
+
+    /**
+     * 系统字段类型-查询检索
+     */
+    public static final String SYSTEM_FIELD_QUERY = "query";
+
+    /**
+     * 系统字段类型-专利导出
+     */
+    public static final String SYSTEM_FIELD_EXPORT = "export";
+
+    /**
+     * 系统字段类型-专利列表
+     */
+    public static final String SYSTEM_FIELD_PATENT_LIST = "list";
+
+    /**
+     * 系统字段类型-专题库字段
+     */
+    public static final String SYSTEM_FIELD_PROJECT = "project";
+
+    /**
+     * 专题库导入专利任务名称
+     */
+    public static final Integer TASK_IMPORT_PATENT = 1;
+
+    /**
+     * 专利说明书导入任务名称
+     */
+    public static final Integer TASK_IMPORT_PATENT_INSTRUCTION = 3;
+
+    /**
+     * 专利导出任务名称
+     */
+    public static final Integer TASK_EXPORT_PATENT = 2;
+
+    /**
+     * 日期位移值
+     */
+    public static final Map<String, Integer> DATE_OFFSET = new HashMap<String, Integer>() {{
+        put("月", -1);
+        put("季", -3);
+        put("半年", -6);
+        put("年", -12);
+        put("2年", -24);
+        put("3年", -36);
+        put("5年", -60);
+    }};
+
+    /**
+     * 专利类型
+     */
+    public static final String PATENT_TYPE = "PATENT_TYPE";
+
+    /**
+     * 机构类型
+     */
+    public static final String ORGAN_TYPE = "ORGAN_TYPE";
+
+    /**
+     * 许可人/被许可人
+     */
+    public static final String LICENSOR_TYPE = "LICENSOR_TYPE";
+
+    /**
+     * 简单法律状态
+     */
+    public static final String PATENT_SIMPLE_STATUS = "PATENT_SIMPLE_STATUS";
+
+    /**
+     * 国家
+     */
+    public static final String COUNTRIES = "COUNTRIES";
+
+    /**
+     * 法律状态
+     */
+    public static final String PATENT_STATUS = "PATENT_STATUS";
+
+    /**
+     * 企业应用场景
+     */
+    public static final String ENTERPRISE_APPLICATION_SCENARIO = "ENTERPRISE_APPLICATION_SCENARIO";
+
+    /**
+     * 调查类型
+     */
+    public static final String INVESTIGATION_TYPE = "INVESTIGATION_TYPE";
+
+}

+ 2 - 1
src/main/java/com/example/xiaoshiweixinback/controller/LoginController.java

@@ -1,6 +1,7 @@
 package com.example.xiaoshiweixinback.controller;
 
 
+import com.example.xiaoshiweixinback.business.common.base.Constants;
 import com.example.xiaoshiweixinback.entity.dto.LoginDTO;
 import com.example.xiaoshiweixinback.entity.dto.WXLoginDTO;
 import com.example.xiaoshiweixinback.entity.vo.LoginVO;
@@ -19,8 +20,8 @@ import org.springframework.web.bind.annotation.RestController;
  * 登录相关接口
  * @author: 高昌奎
  */
+@RequestMapping(Constants.API_XIAO_SHI_WXBACK + "/patent")
 @RestController
-@RequestMapping("/login")
 public class LoginController {
 
     @Autowired

+ 2 - 0
src/main/java/com/example/xiaoshiweixinback/entity/dto/LoginDTO.java

@@ -1,6 +1,8 @@
 package com.example.xiaoshiweixinback.entity.dto;
 
 
+import lombok.Data;
+
 @Data
 public class LoginDTO {
 

+ 3 - 39
src/main/java/com/example/xiaoshiweixinback/entity/dto/WXLoginDTO.java

@@ -1,5 +1,8 @@
 package com.example.xiaoshiweixinback.entity.dto;
 
+import lombok.Data;
+
+@Data
 public class WXLoginDTO {
 
     //微信openid
@@ -7,43 +10,4 @@ public class WXLoginDTO {
 
     private String token;
 
-    public String getToken() {
-        return token;
-    }
-
-    public void setToken(String token) {
-        this.token = token;
-    }
-
-    public String getOpenId() {
-        return openId;
-    }
-
-    public void setOpenId(String openId) {
-        this.openId = openId;
-    }
-
-    public Integer getIdentityType() {
-        return identityType;
-    }
-
-    public void setIdentityType(Integer identityType) {
-        this.identityType = identityType;
-    }
-
-    public Integer getCompanyId() {
-        return companyId;
-    }
-
-    public void setCompanyId(Integer companyId) {
-        this.companyId = companyId;
-    }
-
-    public Integer getTalentId() {
-        return talentId;
-    }
-
-    public void setTalentId(Integer talentId) {
-        this.talentId = talentId;
-    }
 }

+ 3 - 0
src/main/java/com/example/xiaoshiweixinback/entity/vo/Jscode2SessionWo.java

@@ -1,11 +1,14 @@
 package com.example.xiaoshiweixinback.entity.vo;
 
+import lombok.Data;
+
 /**
  * @Description: code置换openid返回的实体<br>微信返回例子:{"session_key":"GdbSHJQi8B+odx5R8umU1w==","expires_in":7200,"openid":"oCwYd0dN-NO8Sxvf_iIwN6c4S4Rs"}
  * @author Orange
  * @date 2017年7月24日
  *
  */
+@Data
 public class Jscode2SessionWo {
     private String session_key;
     private String expires_in;

+ 2 - 0
src/main/java/com/example/xiaoshiweixinback/entity/vo/LoginVO.java

@@ -1,5 +1,7 @@
 package com.example.xiaoshiweixinback.entity.vo;
 
+import lombok.Data;
+
 @Data
 public class LoginVO {
 

+ 4 - 3
src/main/java/com/example/xiaoshiweixinback/entity/vo/SendCodeVO.java

@@ -1,13 +1,14 @@
 package com.example.xiaoshiweixinback.entity.vo;
 
-import io.swagger.annotations.ApiModelProperty;
+import jakarta.validation.constraints.NotBlank;
+import lombok.Data;
 
-import javax.validation.constraints.NotBlank;
 
+@Data
 public class SendCodeVO {
 
+    //手机号
     @NotBlank
-    @ApiModelProperty(example="",required=false,value="手机号")
     private String phoneNo;
 
     public String getPhoneNo() {

+ 5 - 27
src/main/java/com/example/xiaoshiweixinback/entity/vo/WXLoginVO.java

@@ -1,39 +1,17 @@
 package com.example.xiaoshiweixinback.entity.vo;
 
-import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
 
+@Data
 public class WXLoginVO {
 
-    @ApiModelProperty(example="",required=false,value="code")
+    //code
     private String code;
 
-    @ApiModelProperty(example="",required=false,value="包括敏感数据在内的完整用户信息的加密数据")
+    //包括敏感数据在内的完整用户信息的加密数据
     private String encryptedData;
 
-    @ApiModelProperty(example="",required=false,value="加密算法的初始向量")
+    //加密算法的初始向量
     private String iv;
 
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getEncryptedData() {
-        return encryptedData;
-    }
-
-    public void setEncryptedData(String encryptedData) {
-        this.encryptedData = encryptedData;
-    }
-
-    public String getIv() {
-        return iv;
-    }
-
-    public void setIv(String iv) {
-        this.iv = iv;
-    }
 }

+ 0 - 1
src/main/java/com/example/xiaoshiweixinback/service/LoginService.java

@@ -1,7 +1,6 @@
 package com.example.xiaoshiweixinback.service;
 
 
-import com.alibaba.fastjson2.JSONObject;
 import com.example.xiaoshiweixinback.business.common.log.LogHelper;
 import com.example.xiaoshiweixinback.business.exception.BusinessException;
 import com.example.xiaoshiweixinback.business.exception.ExceptionEnum;