75634 10 mēneši atpakaļ
vecāks
revīzija
15f2410707

+ 13 - 20
pom.xml

@@ -9,31 +9,13 @@
     <name>learning-imitation-product</name>
     <description>Demo project for Spring Boot</description>
 
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-web</artifactId>
         <version>2.1.2.RELEASE</version>
         <relativePath/>
     </parent>
-    <repositories>
-        <repository>
-            <id>aliyun</id>
-            <name>aliyun</name>
-            <url>https://maven.aliyun.com/repository/public</url>
-        </repository>
-    </repositories>
+
     <dependencies>
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -116,6 +98,17 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>8</source>
+                    <target>8</target>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 
 </project>

+ 2 - 3
src/main/java/com/nova/mapper/lk/LuckActivityConfigMapper.java

@@ -2,12 +2,11 @@ package com.nova.mapper.lk;
 
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.nova.entry.lk.LuckActivityConfig;
-import com.nova.view.result.HttpResult;
 import com.nova.vo.activity.LuckActivityConfigVo;
 import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
+
 @Mapper
 public interface LuckActivityConfigMapper extends BaseMapper<LuckActivityConfig> {
 
-    LuckActivityConfigVo getConfig(@Param("activityName") String activityName);
+    LuckActivityConfigVo getConfig(String activityName);
 }

+ 4 - 6
src/main/java/com/nova/service/impl/LuckActivityConfigServiceImpl.java

@@ -1,16 +1,14 @@
 package com.nova.service.impl;
 
-import com.alibaba.fastjson.JSON;
-import com.nova.entry.Config;
 import com.nova.mapper.lk.LuckActivityConfigMapper;
 import com.nova.service.LuckActivityConfigService;
 import com.nova.view.result.HttpResult;
 import com.nova.vo.activity.LuckActivityConfigVo;
-import com.qiniu.util.Json;
 import org.springframework.stereotype.Service;
 import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
+import java.util.List;
 
 @Service
 public class LuckActivityConfigServiceImpl implements LuckActivityConfigService {
@@ -20,12 +18,12 @@ public class LuckActivityConfigServiceImpl implements LuckActivityConfigService
 
     @Override
     public HttpResult getConfig(String activityName) {
-        if (!StringUtils.isEmpty(activityName)){
+        if (!StringUtils.isEmpty(activityName)) {
             LuckActivityConfigVo luckActivityConfigVo = luckActivityConfigMapper.getConfig(activityName);
 
-//            Config config = JSON.parseObject(luckActivityConfigVo.getConfig(),Config.class);
+
             return HttpResult.success();
-        }else {
+        } else {
             return HttpResult.failed();
         }
     }

+ 1 - 1
src/main/resources/application.properties

@@ -5,7 +5,7 @@ spring.datasource.username=sweepstakes
 spring.datasource.password=TdPkwnXdGBt2Ni3n
 spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
 
-mybatis-plus.mapper-locations=classpath*:mappers/*.xml
+mybatis-plus.mapper-locations=classpath*:mapper/*.xml
 mybatis.type-aliases-package=com.nova.entry.lk
 mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
 

+ 3 - 1
src/main/resources/mapper/LuckActivityConfigMapper.xml

@@ -3,7 +3,9 @@
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.nova.mapper.lk.LuckActivityConfigMapper">
-    <select id="getConfig" parameterType="java.lang.String" resultType="com.nova.vo.activity.LuckActivityConfigVo">
+
+
+<select id="getConfig" parameterType="java.lang.String" resultType="com.nova.vo.activity.LuckActivityConfigVo">
         SELECT
             *
         FROM