소스 검색

wish detail

tanlie 6 시간 전
부모
커밋
b7c1c94504

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

@@ -49,7 +49,7 @@ public class UserWishController {
      * 愿望详情
      */
     @GetMapping("/{id}")
-    public Result<WishDetailResp> detail(@PathVariable Integer id) {
+    public Result<WishDetailResp> detail(@PathVariable("id") Integer id) {
         WishDetailResp resp = wishService.getDetail(id);
         return new Result<>(resp);
     }

+ 36 - 0
wishing-platform/platform-service/platform-service-mobile/src/test/java/cn/qinys/platform/mobile/service/AttachmentServiceTest.java

@@ -0,0 +1,36 @@
+package cn.qinys.platform.mobile.service;
+
+import cn.qinys.platform.entity.wishing.UserWish;
+import cn.qinys.platform.mobile.mapper.UserWishMapper;
+import jakarta.annotation.Resource;
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+import java.util.List;
+
+/**
+ * @author lie tan
+ * @description
+ * @date 2026-06-29 21:26
+ **/
+@SpringBootTest
+class AttachmentServiceTest {
+
+    @Resource
+    UserWishMapper wishMapper;
+
+
+    //@Test
+    void updateImage() {
+        List<UserWish> userWishes = wishMapper.selectList(null);
+        for (UserWish wish : userWishes) {
+            String image = wish.getImages();
+            String s = image.replaceAll("https://image.qinys.cn/202606", "https://image.qinys.cn");
+            wish.setImages(s);
+            wishMapper.updateById(wish);
+        }
+
+    }
+
+
+}