tanlie 1 өдөр өмнө
parent
commit
3ba2f9c3d5
17 өөрчлөгдсөн 52 нэмэгдсэн , 192 устгасан
  1. 0 7
      wishing-platform/platform-core/pom.xml
  2. 0 4
      wishing-platform/platform-entity/platform-entity-upms/pom.xml
  3. 0 5
      wishing-platform/platform-entity/platform-entity-wishing/pom.xml
  4. 1 9
      wishing-platform/platform-service/platform-service-admin/pom.xml
  5. 0 63
      wishing-platform/platform-service/platform-service-admin/src/test/java/cn/qinys/platform/admin/service/GaoDeServiceTest.java
  6. 0 62
      wishing-platform/platform-service/platform-service-admin/src/test/java/cn/qinys/platform/config/ChatClientConfigTest.java
  7. 23 9
      wishing-platform/platform-service/platform-service-mobile/pom.xml
  8. 1 1
      wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/controller/UserController.java
  9. 1 1
      wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/controller/UserWishController.java
  10. 1 0
      wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/service/impl/ChatServiceImpl.java
  11. 3 0
      wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/tool/DateTimeTools.java
  12. 3 1
      wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/tool/WeatherTools.java
  13. 9 2
      wishing-platform/platform-service/platform-service-mobile/src/main/resources/application.yml
  14. 3 0
      wishing-platform/platform-service/platform-service-mobile/src/test/java/cn/qinys/platform/mobile/service/impl/UserWishServiceImplTest.java
  15. 6 3
      wishing-platform/platform-service/platform-service-mobile/src/test/java/cn/qinys/platform/mobile/tool/WeatherToolsTest.java
  16. 1 9
      wishing-platform/platform-service/platform-service-upms/pom.xml
  17. 0 16
      wishing-platform/platform-service/platform-service-upms/src/test/java/cn/qinys/platform/upms/api/service/IGaoDeKeyServiceTest.java

+ 0 - 7
wishing-platform/platform-core/pom.xml

@@ -105,13 +105,6 @@
                 <artifactId>fastjson2</artifactId>
                 <version>2.0.53</version>
             </dependency>
-            <!-- Source: https://mvnrepository.com/artifact/tools.jackson.core/jackson-databind -->
-            <dependency>
-                <groupId>tools.jackson.core</groupId>
-                <artifactId>jackson-databind</artifactId>
-                <version>3.2.0</version>
-                <scope>compile</scope>
-            </dependency>
         </dependencies>
     </dependencyManagement>
 </project>

+ 0 - 4
wishing-platform/platform-entity/platform-entity-upms/pom.xml

@@ -14,8 +14,4 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
-
-    <dependencies>
-       
-    </dependencies>
 </project>

+ 0 - 5
wishing-platform/platform-entity/platform-entity-wishing/pom.xml

@@ -12,12 +12,7 @@
 
     <name>platform-entity-wishing</name>
 
-
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     </properties>
-
-    <dependencies>
-
-    </dependencies>
 </project>

+ 1 - 9
wishing-platform/platform-service/platform-service-admin/pom.xml

@@ -89,7 +89,7 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>3.5.14</version>
+                <version>4.1.0</version>
                 <executions>
                     <execution>
                         <goals>
@@ -98,14 +98,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.12.0</version>
-                <configuration>
-                    <parameters>true</parameters>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 

+ 0 - 63
wishing-platform/platform-service/platform-service-admin/src/test/java/cn/qinys/platform/admin/service/GaoDeServiceTest.java

@@ -1,63 +0,0 @@
-package cn.qinys.platform.admin.service;
-
-import cn.qinys.platform.admin.mapper.WishingTreeExtensionMapper;
-import cn.qinys.platform.admin.mapper.WishingTreeMapper;
-import cn.qinys.platform.entity.wishing.WishingTree;
-import cn.qinys.platform.entity.wishing.WishingTreeExtension;
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONObject;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
-import jakarta.annotation.Resource;
-import org.junit.jupiter.api.Test;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import java.util.List;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-/**
- * @author lie tan
- * @description
- * @date 2026-06-13 11:26
- **/
-
-@SpringBootTest
-class GaoDeServiceTest {
-
-    @Resource
-    private GaoDeService gaoDeService;
-    @Resource
-    WishingTreeMapper treeMapper;
-    @Resource
-    WishingTreeExtensionMapper treeExtensionMapper;
-
-    @Test
-    void getGaoDeResult() {
-        QueryWrapper<WishingTree> queryWrapper = new QueryWrapper<>();
-        queryWrapper.ge("id", 0);
-        List<WishingTree> trees = treeMapper.selectList(queryWrapper);
-        trees.forEach(tree -> {
-            JSONObject gaoDeResult = gaoDeService.getGaoDeResult(tree.getLongitude(), tree.getLatitude(), 5);
-            JSONObject addressComponent = gaoDeResult.getJSONObject("addressComponent");
-            Integer adcode = addressComponent.getInteger("adcode");
-            UpdateWrapper<WishingTreeExtension> updateWrapper = new UpdateWrapper<>();
-            updateWrapper.eq("tree_id", tree.getId());
-            updateWrapper.set("adcode", adcode);
-            updateWrapper.set("regeocode", JSON.toJSONString(gaoDeResult));
-            int update = treeExtensionMapper.update(updateWrapper);
-            if(update == 0){
-                WishingTreeExtension extension = new WishingTreeExtension();
-                extension.setTreeId(tree.getId());
-                extension.setTotalCount(0);
-                extension.setPublicCount(0);
-                extension.setPrivateCount(0);
-                extension.setAdcode(adcode);
-                extension.setRegeocode(JSON.toJSONString(gaoDeResult));
-                treeExtensionMapper.insert(extension);
-            }
-
-        });
-
-    }
-}

+ 0 - 62
wishing-platform/platform-service/platform-service-admin/src/test/java/cn/qinys/platform/config/ChatClientConfigTest.java

@@ -1,62 +0,0 @@
-package cn.qinys.platform.config;
-
-import cn.qinys.platform.admin.mapper.WishingTreeMapper;
-import cn.qinys.platform.entity.wishing.WishingTree;
-import jakarta.annotation.Resource;
-import org.junit.jupiter.api.Test;
-import org.springframework.ai.chat.client.ChatClient;
-import org.springframework.boot.test.context.SpringBootTest;
-
-import java.util.List;
-
-import static org.junit.jupiter.api.Assertions.*;
-
-/**
- * @author lie tan
- * @description
- * @date 2026-05-30 13:39
- **/
-@SpringBootTest
-class ChatClientConfigTest {
-
-    @Resource
-    ChatClient chatClient;
-    @Resource
-    WishingTreeMapper treeMapper;
-
-    @Test
-    void chatModelTest() {
-
-        String resp = chatClient.prompt()
-                .user("天津市滨海新区泰达街道渣打环球商业服务有限公司(西南门)渣打科营中心")
-                .call().content();
-        System.out.println(resp);
-
-    }
-
-    /***
-     * 渣打环球商业服务有限公司(西南门)渣打科营中心位于天津市滨海新区泰达街道,是渣打银行在华设立的重要战略运营中心之一。泰达街道地处天津经济技术开发区(TEDA)核心区域,这一地区自1984年设立以来,一直是中国北方最具活力的开放型经济高地之一,聚集了大量跨国企业和高端服务业。
-     *
-     * 渣打科营中心作为渣打银行全球运营网络的重要组成部分,主要承担后台支持、数据处理、金融科技研发及客户服务等职能,体现了滨海新区在金融创新和数字化转型方面的优势。中心周边配套设施完善,临近泰达MSD、泰达足球场等商务与生活地标,交通便利,紧邻京津塘高速与滨海新区核心交通枢纽。
-     *
-     * 该区域历史底蕴与现代气息交融,附近有塘沽炮台遗址等历史遗迹,同时亦毗邻滨海文化中心、海河外滩公园等现代人文景观,展现出天津作为沿海开放城市的多元魅力。对于在此工作的金融从业者而言,这里既是高效商务办公的场所,也是感受滨海新区国际化发展脉搏的窗口。s
-     */
-    @Test
-    void updateDescription() {
-        List<WishingTree> wishingTrees = treeMapper.selectList(null);
-        wishingTrees.forEach(tree -> {
-            String summary = this.getDescription(tree.getAddress());
-            tree.setSummary(summary);
-            tree.setDescription(summary);
-            treeMapper.updateById(tree);
-            System.out.println(summary);
-        });
-    }
-
-    private String getDescription(String address) {
-        return chatClient.prompt()
-                .user(address)
-                .call().content();
-    }
-
-}

+ 23 - 9
wishing-platform/platform-service/platform-service-mobile/pom.xml

@@ -36,6 +36,12 @@
             <groupId>org.springframework.boot</groupId>
             <artifactId>spring-boot-starter-test</artifactId>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.junit.jupiter</groupId>
+                    <artifactId>junit-jupiter</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
         <dependency>
             <groupId>com.baomidou</groupId>
@@ -72,6 +78,22 @@
             <version>2.22.22</version>
             <scope>compile</scope>
         </dependency>
+        <dependency>
+            <groupId>com.github.victools</groupId>
+            <artifactId>jsonschema-generator</artifactId>
+            <version>5.0.0</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <version>4.1.0</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-actuator</artifactId>
+        </dependency>
     </dependencies>
     <build>
         <finalName>wishing-mobile</finalName>
@@ -96,7 +118,7 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>3.5.14</version>
+                <version>4.1.0</version>
                 <executions>
                     <execution>
                         <goals>
@@ -105,14 +127,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.12.0</version>
-                <configuration>
-                    <parameters>true</parameters>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 

+ 1 - 1
wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/controller/UserController.java

@@ -32,7 +32,7 @@ public class UserController {
      * @return
      */
     @GetMapping("/login/captcha")
-    public Result<CaptchaResp> getCaptcha(@RequestParam(required = false, defaultValue = "1") String type) {
+    public Result<CaptchaResp> getCaptcha(@RequestParam(name = "type",required = false, defaultValue = "1") String type) {
         CaptchaResp captcha = loginService.getCaptcha(type);
         return new Result<>(captcha);
     }

+ 1 - 1
wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/controller/UserWishController.java

@@ -31,7 +31,7 @@ public class UserWishController {
      * 许愿树下的公开愿望列表
      */
     @GetMapping("/tree/{treeId}")
-    public Result<Page<WishPageResp>> listByTree(@PathVariable Integer treeId, WishPageReq req) {
+    public Result<Page<WishPageResp>> listByTree(@PathVariable("treeId") Integer treeId, WishPageReq req) {
         Page<WishPageResp> resp = wishService.pageByTree(treeId, req);
         return new Result<>(resp);
     }

+ 1 - 0
wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/service/impl/ChatServiceImpl.java

@@ -15,6 +15,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import jakarta.annotation.Resource;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.ai.chat.client.ChatClient;
+
 import org.springframework.stereotype.Service;
 
 @Slf4j

+ 3 - 0
wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/tool/DateTimeTools.java

@@ -1,5 +1,6 @@
 package cn.qinys.platform.mobile.tool;
 
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.ai.tool.annotation.Tool;
 import org.springframework.context.i18n.LocaleContextHolder;
 
@@ -10,11 +11,13 @@ import java.time.LocalDateTime;
  * @description
  * @date 2026-06-13 10:20
  **/
+@Slf4j
 public class DateTimeTools {
 
 
     @Tool(description = "Get the current date and time in the user's timezone")
     String getCurrentDateTime() {
+        log.info("调用日期工具了");
         return LocalDateTime.now().atZone(LocaleContextHolder.getTimeZone().toZoneId()).toString();
     }
 

+ 3 - 1
wishing-platform/platform-service/platform-service-mobile/src/main/java/cn/qinys/platform/mobile/tool/WeatherTools.java

@@ -3,6 +3,7 @@ package cn.qinys.platform.mobile.tool;
 import cn.qinys.platform.base.utils.SpringUtil;
 import cn.qinys.platform.entity.wishing.WishingTreeExtension;
 import cn.qinys.platform.mobile.mapper.WishingTreeExtensionMapper;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.ai.tool.annotation.Tool;
 import org.springframework.web.client.RestTemplate;
 
@@ -11,7 +12,7 @@ import org.springframework.web.client.RestTemplate;
  * @description
  * @date 2026-06-13 10:47
  **/
-
+@Slf4j
 public class WeatherTools {
 
     String key = "88a0c82c3f60a748c6c638ef9db16bca";
@@ -32,6 +33,7 @@ public class WeatherTools {
             along with the current date and time in the user's timezone
             """)
     public String getWeather() {
+        log.info("调用天气工具了");
         WishingTreeExtensionMapper extensionMapper = SpringUtil.getBean(WishingTreeExtensionMapper.class);
         WishingTreeExtension extension = extensionMapper.selectByTreeId(treeId);
         if (extension == null || extension.getAdcode() == null) {

+ 9 - 2
wishing-platform/platform-service/platform-service-mobile/src/main/resources/application.yml

@@ -12,7 +12,7 @@ spring:
       memory:
         repository:
           jdbc:
-            initialize-schema: never
+            initialize-schema: always
 
   application:
     name: wishing-mobile
@@ -34,6 +34,13 @@ jwt:
 captcha:
   width: 100
   height: 40
-
+  content:
+    source: 1234567890
+    length: 4
+    space: 2
+  font:
+    name: "Arial"
+    color: black
+    size: 35
 
 

+ 3 - 0
wishing-platform/platform-service/platform-service-mobile/src/test/java/cn/qinys/platform/mobile/service/impl/UserWishServiceImplTest.java

@@ -1,5 +1,6 @@
 package cn.qinys.platform.mobile.service.impl;
 
+import cn.qinys.platform.entity.wishing.UserWish;
 import cn.qinys.platform.mobile.mapper.UserWishMapper;
 import cn.qinys.platform.mobile.service.ImageService;
 import jakarta.annotation.Resource;
@@ -21,6 +22,8 @@ class UserWishServiceImplTest {
 
     @Test
     void appendWishImage() {
+        //UserWish userWish = userWishMapper.selectById(90);
+        //imageService.appendWishImage(userWish);
 
     }
 

+ 6 - 3
wishing-platform/platform-service/platform-service-mobile/src/test/java/cn/qinys/platform/mobile/tool/WeatherToolsTest.java

@@ -1,7 +1,10 @@
 package cn.qinys.platform.mobile.tool;
 
+
+
 import org.junit.jupiter.api.Test;
 import org.springframework.boot.test.context.SpringBootTest;
+
 /**
 * @author lie tan
 * @description 
@@ -9,14 +12,14 @@ import org.springframework.boot.test.context.SpringBootTest;
 **/
 
 @SpringBootTest
-class WeatherToolsTest {
+public class WeatherToolsTest {
 
 
     @Test
-    void getWeather() {
+    public void getWeather() {
         WeatherTools weatherTools = new WeatherTools(3);
         String weather = weatherTools.getWeather();
-        System.out.println(weather);
+        System.err.println(weather);
     }
 
 

+ 1 - 9
wishing-platform/platform-service/platform-service-upms/pom.xml

@@ -79,7 +79,7 @@
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>3.5.14</version>
+                <version>4.1.0</version>
                 <executions>
                     <execution>
                         <goals>
@@ -88,14 +88,6 @@
                     </execution>
                 </executions>
             </plugin>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.12.0</version>
-                <configuration>
-                    <parameters>true</parameters>
-                </configuration>
-            </plugin>
         </plugins>
     </build>
 

+ 0 - 16
wishing-platform/platform-service/platform-service-upms/src/test/java/cn/qinys/platform/upms/api/service/IGaoDeKeyServiceTest.java

@@ -1,16 +0,0 @@
-package cn.qinys.platform.upms.api.service;
-
-import org.springframework.boot.test.context.SpringBootTest;
-
-/**
- * @author lie tan
- * @description
- * @date 2026-06-13 11:06
- **/
-@SpringBootTest
-class IGaoDeKeyServiceTest {
-
-
-    
-
-}