Browse Source

部分bug修复

liyuntian 10 months ago
parent
commit
61841e14f6

+ 2 - 1
mcp/src/main/java/com/chuanxia/mcp/bean/model/CdnUa.java

@@ -1,5 +1,6 @@
 package com.chuanxia.mcp.bean.model;
 package com.chuanxia.mcp.bean.model;
 
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -16,7 +17,7 @@ import java.util.Date;
 @Data
 @Data
 @ApiModel("ua")
 @ApiModel("ua")
 public class CdnUa {
 public class CdnUa {
-    @TableId("id")
+    @TableId(type = IdType.AUTO)
     @ApiModelProperty("主键")
     @ApiModelProperty("主键")
     private Integer id;
     private Integer id;
 
 

+ 0 - 1
mcp/src/main/java/com/chuanxia/mcp/service/impl/CdnDoaminServiceImpl.java

@@ -147,7 +147,6 @@ public class CdnDoaminServiceImpl extends ServiceImpl<CdnDomainMapper, CdnDomain
         //根据ip获取归属地
         //根据ip获取归属地
         String requestIp = IpUtil.getRequestIp(request);
         String requestIp = IpUtil.getRequestIp(request);
         try {
         try {
-            requestIp = "27.37.0.1";
             String cityInfo = IpUtil.getCityInfo(requestIp);
             String cityInfo = IpUtil.getCityInfo(requestIp);
             CdnDomain cdnDomain = new CdnDomain();
             CdnDomain cdnDomain = new CdnDomain();
             if (StringUtils.isNotBlank(cityInfo)) {
             if (StringUtils.isNotBlank(cityInfo)) {

+ 12 - 0
mcp/src/main/resources/application-test.yml

@@ -0,0 +1,12 @@
+spring:
+  datasource:
+    driver-class-name: com.mysql.cj.jdbc.Driver
+    url: jdbc:mysql://47.113.187.94:36792/mcp?serverTimezone=UTC&characterEncoding=utf8
+    username: root
+    password: chuanxia112233
+mybatis-plus:
+  configuration:
+    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+    map-underscore-to-camel-case: false
+project:
+  address: https://mcp-api.szchuanxia.cn/api