Przeglądaj źródła

部分bug修复

liyuntian 10 miesięcy temu
rodzic
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;
 
+import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
 import com.baomidou.mybatisplus.annotation.TableName;
@@ -16,7 +17,7 @@ import java.util.Date;
 @Data
 @ApiModel("ua")
 public class CdnUa {
-    @TableId("id")
+    @TableId(type = IdType.AUTO)
     @ApiModelProperty("主键")
     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获取归属地
         String requestIp = IpUtil.getRequestIp(request);
         try {
-            requestIp = "27.37.0.1";
             String cityInfo = IpUtil.getCityInfo(requestIp);
             CdnDomain cdnDomain = new CdnDomain();
             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