ソースを参照

铸造活动显示库存

lajiyouxi-xu 3 年 前
コミット
761a689ee5

+ 11 - 0
src/main/java/com/izouma/nineth/domain/DomainOrder.java

@@ -6,6 +6,7 @@ import com.izouma.nineth.annotations.Searchable;
 import com.izouma.nineth.converter.FileObjectConverter;
 import com.izouma.nineth.converter.FileObjectListConverter;
 import com.izouma.nineth.enums.CollectionStatus;
+import com.izouma.nineth.enums.HyperLinkType;
 import com.izouma.nineth.enums.OrderStatus;
 import com.izouma.nineth.enums.PayMethod;
 import io.swagger.annotations.ApiModelProperty;
@@ -78,4 +79,14 @@ public class DomainOrder extends BaseEntity {
     private LocalDateTime endTime;
 
     private String result;
+
+    @ApiModelProperty("是否打开超链")
+    private boolean openHyperLink = false;
+
+    @ApiModelProperty("超链类型")
+    @Enumerated(EnumType.STRING)
+    private HyperLinkType hyperLinkType;
+
+    @ApiModelProperty("超链地址")
+    private String address;
 }

+ 94 - 0
src/main/java/com/izouma/nineth/domain/Hyperlink.java

@@ -0,0 +1,94 @@
+package com.izouma.nineth.domain;
+
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.izouma.nineth.annotations.Searchable;
+import com.izouma.nineth.converter.FileObjectListConverter;
+import com.izouma.nineth.enums.CollectionStatus;
+import com.izouma.nineth.enums.HyperLinkType;
+import com.izouma.nineth.enums.OrderStatus;
+import com.izouma.nineth.enums.PayMethod;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.*;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.List;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+@Builder
+public class Hyperlink extends UserBaseEntity {
+
+    @ApiModelProperty("用户id")
+    @ExcelProperty("用户id")
+    private Long             userId;
+    @ApiModelProperty("用户名")
+    @ExcelProperty("用户名")
+    private String           userName;
+    @ApiModelProperty("用户头像")
+    private String           userAvatar;
+    @ApiModelProperty("图片")
+    @Column(columnDefinition = "TEXT")
+    @Convert(converter = FileObjectListConverter.class)
+    private List<FileObject> pic;
+    @ApiModelProperty("图片名称")
+    @ExcelProperty("图片名称")
+    private String           picName;
+    @ApiModelProperty("图片名称")
+    @ExcelProperty("图片名称")
+    private String           domainName;
+    @ApiModelProperty("状态")
+    @Enumerated(EnumType.STRING)
+    private CollectionStatus status;
+
+    private String auditResult;
+
+    @ExcelProperty("创建藏品id")
+    private Long createAssetId;
+
+    @ExcelProperty("拥有者id")
+    private Long ownerId;
+
+    private boolean gifted;
+
+    @ApiModelProperty("交易ID")
+    @ExcelProperty("交易id")
+    @Searchable
+    @Column(length = 90)
+    private String transactionId;
+
+    @Enumerated(EnumType.STRING)
+    private OrderStatus orderStatus;
+
+    @Enumerated(EnumType.STRING)
+    private PayMethod payMethod;
+
+    private boolean destroyed;
+
+    @ExcelProperty("价格")
+    private BigDecimal price;
+
+    private Long years;
+
+    private LocalDateTime endTime;
+
+    private String result;
+
+    @ApiModelProperty("是否打开超链")
+    private boolean openHyperLink;
+
+    @ApiModelProperty("超链类型")
+    @Enumerated(EnumType.STRING)
+    private HyperLinkType hyperLinkType;
+
+    @ApiModelProperty("超链地址")
+    private String address;
+
+}

+ 18 - 0
src/main/java/com/izouma/nineth/enums/HyperLinkType.java

@@ -0,0 +1,18 @@
+package com.izouma.nineth.enums;
+
+public enum HyperLinkType {
+    HOMEPAGE("个人主页"),
+    EXTERNALLINK("外部链接"),
+    COLLECTION(" 藏品");
+
+    private final String description;
+
+    HyperLinkType(String description) {
+        this.description = description;
+    }
+
+    public String getDescription() {
+        return description;
+    }
+}
+

+ 2 - 0
src/main/java/com/izouma/nineth/repo/AssetRepo.java

@@ -36,6 +36,8 @@ public interface AssetRepo extends JpaRepository<Asset, Long>, JpaSpecificationE
 
     List<Asset> findByCreatedAtBefore(LocalDateTime localDateTime);
 
+    Asset findByCollectionIdAndStatus(Long collectionId,AssetStatus statuses );
+
     List<Asset> findByConsignmentTrue();
 
     List<Asset> findByTokenIdIn(Iterable<String> tokenId);

+ 2 - 0
src/main/java/com/izouma/nineth/repo/DomainOrderRepo.java

@@ -22,6 +22,8 @@ public interface DomainOrderRepo extends JpaRepository<DomainOrder, Long>, JpaSp
     @Transactional
     void softDelete(Long id);
 
+    DomainOrder findByDomainNameAndOrderStatus(String domainName,OrderStatus orderStatus);
+
     List<DomainOrder> findAllByUserIdAndOrderStatus(Long userId, OrderStatus status);
 
     Page<DomainOrder> findAllByOrderStatusOrderByCreatedAtDesc(OrderStatus status, Pageable pageable);

+ 16 - 0
src/main/java/com/izouma/nineth/repo/HyperlinkRepo.java

@@ -0,0 +1,16 @@
+package com.izouma.nineth.repo;
+
+import com.izouma.nineth.domain.Hyperlink;
+import org.springframework.data.jpa.repository.JpaRepository;
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Modifying;
+import org.springframework.data.jpa.repository.Query;
+
+import javax.transaction.Transactional;
+
+public interface HyperlinkRepo extends JpaRepository<Hyperlink, Long>, JpaSpecificationExecutor<Hyperlink> {
+    @Query("update Hyperlink t set t.del = true where t.id = ?1")
+    @Modifying
+    @Transactional
+    void softDelete(Long id);
+}

+ 8 - 0
src/main/java/com/izouma/nineth/service/DomainOrderService.java

@@ -315,6 +315,14 @@ public class DomainOrderService {
                 sold.put("domain", domainOrder.getDomainName().toLowerCase());
                 sold.put("endTime", domainOrder.getEndTime());
                 sold.put("sold", true);
+                sold.put("isOpenHyperLink",domainOrder.isOpenHyperLink());
+                if(domainOrder.getHyperLinkType() != null){
+                    sold.put("HyperLinkType",domainOrder.getHyperLinkType());
+                }
+                if (domainOrder.getAddress() != null) {
+                    sold.put("Address", domainOrder.getAddress());
+                }
+
                 result.add(sold);
             }
         });

+ 25 - 0
src/main/java/com/izouma/nineth/service/HyperlinkService.java

@@ -0,0 +1,25 @@
+package com.izouma.nineth.service;
+
+import com.izouma.nineth.domain.Hyperlink;
+import com.izouma.nineth.dto.PageQuery;
+import com.izouma.nineth.repo.HyperlinkRepo;
+import com.izouma.nineth.utils.JpaUtils;
+import lombok.AllArgsConstructor;
+import org.springframework.data.domain.Page;
+import org.springframework.stereotype.Service;
+
+@Service
+@AllArgsConstructor
+public class HyperlinkService {
+
+    private HyperlinkRepo hyperlinkRepo;
+
+    public Page<Hyperlink> all(PageQuery pageQuery) {
+        return hyperlinkRepo.findAll(JpaUtils.toSpecification(pageQuery, Hyperlink.class), JpaUtils.toPageRequest(pageQuery));
+    }
+
+
+
+
+
+}

+ 15 - 3
src/main/java/com/izouma/nineth/service/MintActivityService.java

@@ -43,6 +43,7 @@ public class MintActivityService {
     private       RocketMQTemplate              rocketMQTemplate;
     private       GeneralProperties             generalProperties;
     private       TaskScheduler                 taskScheduler;
+    private       SysConfigService              sysConfigService;
     private final Map<Long, ScheduledFuture<?>> tasks = new HashMap<>();
 
 
@@ -51,10 +52,21 @@ public class MintActivityService {
                 .findAll(JpaUtils.toSpecification(pageQuery, MintActivity.class), JpaUtils.toPageRequest(pageQuery));
         List<MintActivity> content = result.getContent();
         List<MintActivity> newContent = new ArrayList<>();
+        String mintCountCollection = sysConfigService.getString("mint_countCollection");
+        String regex = ",";
+        String[] split = mintCountCollection.split(regex);
+
+
         for (MintActivity activity : content) {
-            activity.setVTotal(activity.getTotal());
-            activity.setTotal(0);
-            newContent.add(activity);
+            if (Arrays.asList(split).contains(activity.getMinterId())) {
+                // targetId在split数组中
+                newContent.add(activity);
+            } else {
+                // targetId不在split数组中
+                activity.setVTotal(activity.getTotal());
+                activity.setTotal(0);
+                newContent.add(activity);
+            }
         }
         return new PageImpl<>(newContent, result.getPageable(), result.getTotalElements());
     }

+ 31 - 0
src/main/java/com/izouma/nineth/web/DomainOrderController.java

@@ -1,10 +1,15 @@
 package com.izouma.nineth.web;
 
+import com.izouma.nineth.domain.Asset;
 import com.izouma.nineth.domain.DomainOrder;
 import com.izouma.nineth.dto.excel.DomainCountDTO;
 import com.izouma.nineth.dto.nftdomain.DomainResult;
 import com.izouma.nineth.dto.nftdomain.DomainTop;
+import com.izouma.nineth.enums.AssetStatus;
 import com.izouma.nineth.enums.AuthorityName;
+import com.izouma.nineth.enums.HyperLinkType;
+import com.izouma.nineth.enums.OrderStatus;
+import com.izouma.nineth.repo.AssetRepo;
 import com.izouma.nineth.service.DomainOrderService;
 import com.izouma.nineth.dto.PageQuery;
 import com.izouma.nineth.exception.BusinessException;
@@ -32,6 +37,7 @@ import java.util.Map;
 public class DomainOrderController extends BaseController {
     private DomainOrderService domainOrderService;
     private DomainOrderRepo    domainOrderRepo;
+    private AssetRepo assetRepo;
 
     @PreAuthorize("hasRole('ADMIN')")
     @PostMapping("/save")
@@ -108,6 +114,31 @@ public class DomainOrderController extends BaseController {
     @Cacheable(value = "domainBuyerTop")
     public List<DomainTop> domainTop() {
         return domainOrderService.domainTop();
+    }
+
+    //全局买域名的时候,显示每个域名是否绑定了超链.
+
+
+
+    //自己添加超链
+    @PostMapping("/addHyperLink")
+    public void addHyperLink(@RequestParam Long collectionId,@RequestParam("openHyperLink") boolean openHyperLink,
+                             @RequestParam("hyperLinkType") HyperLinkType hyperLinkType,
+                             @RequestParam("address") String address){
+        Asset byCollectionIdAndStatus = assetRepo.findByCollectionIdAndStatus(collectionId, AssetStatus.NORMAL);
+        String name = byCollectionIdAndStatus.getName();
+        String result = name.substring(name.indexOf(" ") + 1);
+        DomainOrder byDomainNameAndOrderStatus = domainOrderRepo.findByDomainNameAndOrderStatus(result, OrderStatus.FINISH);
+        byDomainNameAndOrderStatus.setOpenHyperLink(true);
+//        byDomainNameAndOrderStatus.setHyperLinkType(domainOrder.getHyperLinkType());
+//        byDomainNameAndOrderStatus.setAddress(domainOrder.getAddress());
+        domainOrderRepo.save(byDomainNameAndOrderStatus);
+
+
+
+
+
+
     }
 }
 

+ 62 - 0
src/main/java/com/izouma/nineth/web/HyperlinkController.java

@@ -0,0 +1,62 @@
+package com.izouma.nineth.web;
+import com.izouma.nineth.domain.Hyperlink;
+import com.izouma.nineth.service.HyperlinkService;
+import com.izouma.nineth.dto.PageQuery;
+import com.izouma.nineth.exception.BusinessException;
+import com.izouma.nineth.repo.HyperlinkRepo;
+import com.izouma.nineth.utils.ObjUtils;
+import com.izouma.nineth.utils.excel.ExcelUtils;
+import lombok.AllArgsConstructor;
+import org.springframework.data.domain.Page;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.List;
+
+@RestController
+@RequestMapping("/hyperlink")
+@AllArgsConstructor
+public class HyperlinkController extends BaseController {
+    private HyperlinkService hyperlinkService;
+    private HyperlinkRepo hyperlinkRepo;
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/save")
+    public Hyperlink save(@RequestBody Hyperlink record) {
+        if (record.getId() != null) {
+            Hyperlink orig = hyperlinkRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
+            ObjUtils.merge(orig, record);
+            return hyperlinkRepo.save(orig);
+        }
+        return hyperlinkRepo.save(record);
+    }
+
+
+    //@PreAuthorize("hasRole('ADMIN')")
+    @PostMapping("/all")
+    public Page<Hyperlink> all(@RequestBody PageQuery pageQuery) {
+        return hyperlinkService.all(pageQuery);
+    }
+
+    @GetMapping("/get/{id}")
+    public Hyperlink get(@PathVariable Long id) {
+        return hyperlinkRepo.findById(id).orElseThrow(new BusinessException("无记录"));
+    }
+
+    @PostMapping("/del/{id}")
+    public void del(@PathVariable Long id) {
+        hyperlinkRepo.softDelete(id);
+    }
+
+    @GetMapping("/excel")
+    @ResponseBody
+    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
+        List<Hyperlink> data = all(pageQuery).getContent();
+        ExcelUtils.export(response, data);
+    }
+
+
+}
+

+ 15 - 3
src/main/java/com/izouma/nineth/web/MintActivityController.java

@@ -5,6 +5,7 @@ import com.izouma.nineth.service.MintActivityService;
 import com.izouma.nineth.dto.PageQuery;
 import com.izouma.nineth.exception.BusinessException;
 import com.izouma.nineth.repo.MintActivityRepo;
+import com.izouma.nineth.service.SysConfigService;
 import com.izouma.nineth.utils.ObjUtils;
 import com.izouma.nineth.utils.excel.ExcelUtils;
 import lombok.AllArgsConstructor;
@@ -15,6 +16,7 @@ import org.springframework.web.bind.annotation.*;
 
 import javax.servlet.http.HttpServletResponse;
 import java.io.IOException;
+import java.util.Arrays;
 import java.util.List;
 
 @RestController
@@ -23,6 +25,7 @@ import java.util.List;
 public class MintActivityController extends BaseController {
     private MintActivityService mintActivityService;
     private MintActivityRepo    mintActivityRepo;
+    private SysConfigService sysConfigService;
 
     @PreAuthorize("hasAnyRole('ADMIN','SAAS')")
     @PostMapping("/save")
@@ -72,9 +75,18 @@ public class MintActivityController extends BaseController {
 //    @Cacheable(cacheNames = "mintActivity", key = "#id")
     public MintActivity get(@PathVariable Long id) {
         MintActivity mintActivity = mintActivityRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-        mintActivity.setVTotal(mintActivity.getTotal());
-        mintActivity.setTotal(0);
-        return mintActivity;
+        String mintCountCollection = sysConfigService.getString("mint_countCollection");
+        String regex = ",";
+        String[] split = mintCountCollection.split(regex);
+        if (Arrays.asList(split).contains(id)) {
+            // Id在split数组中
+            return mintActivity;
+        } else {
+            // Id不在split数组中
+            mintActivity.setVTotal(mintActivity.getTotal());
+            mintActivity.setTotal(0);
+            return mintActivity;
+        }
     }
 
     @PreAuthorize("hasAnyRole('ADMIN','SAAS')")

+ 40 - 42
src/main/vue/package-lock.json

@@ -2118,6 +2118,17 @@
           "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==",
           "dev": true
         },
+        "chalk": {
+          "version": "4.1.2",
+          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
+          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "ansi-styles": "^4.1.0",
+            "supports-color": "^7.1.0"
+          }
+        },
         "debug": {
           "version": "4.3.4",
           "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
@@ -2127,6 +2138,13 @@
             "ms": "2.1.2"
           }
         },
+        "has-flag": {
+          "version": "4.0.0",
+          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
+          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
+          "dev": true,
+          "optional": true
+        },
         "ms": {
           "version": "2.1.2",
           "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
@@ -2141,6 +2159,28 @@
           "requires": {
             "minipass": "^3.1.1"
           }
+        },
+        "supports-color": {
+          "version": "7.2.0",
+          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
+          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "has-flag": "^4.0.0"
+          }
+        },
+        "vue-loader-v16": {
+          "version": "npm:vue-loader@16.8.3",
+          "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
+          "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
+          "dev": true,
+          "optional": true,
+          "requires": {
+            "chalk": "^4.1.0",
+            "hash-sum": "^2.0.0",
+            "loader-utils": "^2.0.0"
+          }
         }
       }
     },
@@ -12147,48 +12187,6 @@
         }
       }
     },
-    "vue-loader-v16": {
-      "version": "npm:vue-loader@16.8.3",
-      "resolved": "https://registry.npmmirror.com/vue-loader/-/vue-loader-16.8.3.tgz",
-      "integrity": "sha512-7vKN45IxsKxe5GcVCbc2qFU5aWzyiLrYJyUuMz4BQLKctCj/fmCa0w6fGiiQ2cLFetNcek1ppGJQDCup0c1hpA==",
-      "dev": true,
-      "optional": true,
-      "requires": {
-        "chalk": "^4.1.0",
-        "hash-sum": "^2.0.0",
-        "loader-utils": "^2.0.0"
-      },
-      "dependencies": {
-        "chalk": {
-          "version": "4.1.2",
-          "resolved": "https://registry.npmmirror.com/chalk/-/chalk-4.1.2.tgz",
-          "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "ansi-styles": "^4.1.0",
-            "supports-color": "^7.1.0"
-          }
-        },
-        "has-flag": {
-          "version": "4.0.0",
-          "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-4.0.0.tgz",
-          "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
-          "dev": true,
-          "optional": true
-        },
-        "supports-color": {
-          "version": "7.2.0",
-          "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-7.2.0.tgz",
-          "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==",
-          "dev": true,
-          "optional": true,
-          "requires": {
-            "has-flag": "^4.0.0"
-          }
-        }
-      }
-    },
     "vue-router": {
       "version": "3.6.4",
       "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.6.4.tgz",

+ 17 - 1
src/main/vue/src/router.js

@@ -1957,6 +1957,22 @@ const router = new Router({
                     meta: {
                        title: '水稻用户操作记录表',
                     },
+               },
+                {
+                    path: '/hyperlinkEdit',
+                    name: 'HyperlinkEdit',
+                    component: () => import(/* webpackChunkName: "hyperlinkEdit" */ '@/views/HyperlinkEdit.vue'),
+                    meta: {
+                       title: '超链编辑',
+                    },
+                },
+                {
+                    path: '/hyperlinkList',
+                    name: 'HyperlinkList',
+                    component: () => import(/* webpackChunkName: "hyperlinkList" */ '@/views/HyperlinkList.vue'),
+                    meta: {
+                       title: '超链',
+                    },
                }
                 /**INSERT_LOCATION**/
             ]
@@ -2017,4 +2033,4 @@ router.beforeEach((to, from, next) => {
     }
 });
 
-export default router;
+export default router;

+ 200 - 0
src/main/vue/src/views/HyperlinkEdit.vue

@@ -0,0 +1,200 @@
+<template>
+    <div class="edit-view">
+        <page-title>
+            <el-button @click="$router.go(-1)" :disabled="saving">取消</el-button>
+            <el-button @click="onDelete" :disabled="saving" type="danger" v-if="formData.id">
+                删除
+            </el-button>
+            <el-button @click="onSave" :loading="saving" type="primary">保存</el-button>
+        </page-title>
+        <div class="edit-view__content-wrapper">
+            <div class="edit-view__content-section">
+                <el-form :model="formData" :rules="rules" ref="form" label-width="112px" label-position="right"
+                         size="small"
+                         style="max-width: 500px;">
+                        <el-form-item prop="userId" label="用户id">
+                                    <el-input-number type="number" v-model="formData.userId"></el-input-number>
+                        </el-form-item>
+                        <el-form-item prop="userName" label="用户名">
+                                    <el-input v-model="formData.userName"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="userAvatar" label="用户头像">
+                                    <el-input v-model="formData.userAvatar"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="pic" label="图片">
+                                    <el-input v-model="formData.pic"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="picName" label="图片名称">
+                                    <el-input v-model="formData.picName"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="domainName" label="图片名称">
+                                    <el-input v-model="formData.domainName"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="status" label="状态">
+                                    <el-select v-model="formData.status" clearable filterable placeholder="请选择">
+                                        <el-option
+                                                v-for="item in statusOptions"
+                                                :key="item.value"
+                                                :label="item.label"
+                                                :value="item.value">
+                                        </el-option>
+                                    </el-select>
+                        </el-form-item>
+                        <el-form-item prop="auditResult" label="auditResult">
+                                    <el-input v-model="formData.auditResult"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="createAssetId" label="createAssetId">
+                                    <el-input-number type="number" v-model="formData.createAssetId"></el-input-number>
+                        </el-form-item>
+                        <el-form-item prop="ownerId" label="ownerId">
+                                    <el-input-number type="number" v-model="formData.ownerId"></el-input-number>
+                        </el-form-item>
+                        <el-form-item prop="gifted" label="gifted">
+                                    <el-input v-model="formData.gifted"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="transactionId" label="交易ID">
+                                    <el-input v-model="formData.transactionId"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="orderStatus" label="orderStatus">
+                                    <el-select v-model="formData.orderStatus" clearable filterable placeholder="请选择">
+                                        <el-option
+                                                v-for="item in orderStatusOptions"
+                                                :key="item.value"
+                                                :label="item.label"
+                                                :value="item.value">
+                                        </el-option>
+                                    </el-select>
+                        </el-form-item>
+                        <el-form-item prop="payMethod" label="payMethod">
+                                    <el-select v-model="formData.payMethod" clearable filterable placeholder="请选择">
+                                        <el-option
+                                                v-for="item in payMethodOptions"
+                                                :key="item.value"
+                                                :label="item.label"
+                                                :value="item.value">
+                                        </el-option>
+                                    </el-select>
+                        </el-form-item>
+                        <el-form-item prop="destroyed" label="destroyed">
+                                    <el-input v-model="formData.destroyed"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="price" label="price">
+                                    <el-input-number type="number" v-model="formData.price"></el-input-number>
+                        </el-form-item>
+                        <el-form-item prop="years" label="years">
+                                    <el-input-number type="number" v-model="formData.years"></el-input-number>
+                        </el-form-item>
+                        <el-form-item prop="endTime" label="endTime">
+                                    <el-date-picker
+                                            v-model="formData.endTime"
+                                            type="datetime"
+                                            value-format="yyyy-MM-dd HH:mm:ss"
+                                            placeholder="选择日期时间">
+                                    </el-date-picker>
+                        </el-form-item>
+                        <el-form-item prop="result" label="result">
+                                    <el-input v-model="formData.result"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="openHyperLink" label="是否打开超链">
+                                    <el-input v-model="formData.openHyperLink"></el-input>
+                        </el-form-item>
+                        <el-form-item prop="hyperLinkType" label="超链类型">
+                                    <el-select v-model="formData.hyperLinkType" clearable filterable placeholder="请选择">
+                                        <el-option
+                                                v-for="item in hyperLinkTypeOptions"
+                                                :key="item.value"
+                                                :label="item.label"
+                                                :value="item.value">
+                                        </el-option>
+                                    </el-select>
+                        </el-form-item>
+                        <el-form-item prop="address" label="超链地址">
+                                    <el-input v-model="formData.address"></el-input>
+                        </el-form-item>
+                    <el-form-item class="form-submit">
+                        <el-button @click="onSave" :loading="saving" type="primary">
+                            保存
+                        </el-button>
+                        <el-button @click="onDelete" :disabled="saving" type="danger" v-if="formData.id">
+                            删除
+                        </el-button>
+                        <el-button @click="$router.go(-1)" :disabled="saving">取消</el-button>
+                    </el-form-item>
+                </el-form>
+            </div>
+        </div>
+    </div>
+</template>
+<script>
+    export default {
+        name: 'HyperlinkEdit',
+        created() {
+            if (this.$route.query.id) {
+                this.$http
+                    .get('hyperlink/get/' + this.$route.query.id)
+                    .then(res => {
+                        this.formData = res;
+                    })
+                    .catch(e => {
+                        console.log(e);
+                        this.$message.error(e.error);
+                    });
+            }
+        },
+        data() {
+            return {
+                saving: false,
+                formData: {
+                },
+                rules: {
+                },
+                statusOptions: [{"label":"审核中","value":"PENDING"},{"label":"通过","value":"SUCCESS"},{"label":"失败","value":"FAIL"}],
+                orderStatusOptions: [{"label":"未支付","value":"NOT_PAID"},{"label":"已支付,处理中","value":"PROCESSING"},{"label":"已完成","value":"FINISH"},{"label":"已取消","value":"CANCELLED"}],
+                payMethodOptions: [{"label":"微信","value":"WEIXIN"},{"label":"支付宝","value":"ALIPAY"},{"label":"无GAS费","value":"FREE"},{"label":"衫德支付","value":"SANDPAY"},{"label":"河马支付","value":"HMPAY"},{"label":"首信易","value":"PAYEASE"},{"label":"余额支付","value":"BALANCE"},{"label":"销毁藏品","value":"DESTROY"}],
+                hyperLinkTypeOptions: [{"label":"个人主页","value":"HOMEPAGE"},{"label":"外部链接","value":"EXTERNALLINK"},{"label":" 藏品","value":"COLLECTION"}],
+            }
+        },
+        methods: {
+            onSave() {
+                this.$refs.form.validate((valid) => {
+                    if (valid) {
+                        this.submit();
+                    } else {
+                        return false;
+                    }
+                });
+            },
+            submit() {
+                let data = {...this.formData};
+
+                this.saving = true;
+                this.$http
+                    .post('/hyperlink/save', data, {body: 'json'})
+                    .then(res => {
+                        this.saving = false;
+                        this.$message.success('成功');
+                        this.$router.go(-1);
+                    })
+                    .catch(e => {
+                        console.log(e);
+                        this.saving = false;
+                        this.$message.error(e.error);
+                    });
+            },
+            onDelete() {
+                this.$confirm('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+                    return this.$http.post(`/hyperlink/del/${this.formData.id}`)
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.$router.go(-1);
+                }).catch(e => {
+                    if (e !== 'cancel') {
+                        console.log(e);
+                        this.$message.error((e || {}).error || '删除失败');
+                    }
+                })
+            },
+        }
+    }
+</script>
+<style lang="less" scoped></style>

+ 262 - 0
src/main/vue/src/views/HyperlinkList.vue

@@ -0,0 +1,262 @@
+<template>
+    <div  class="list-view">
+        <page-title>
+            <el-button @click="addRow" type="primary" icon="el-icon-plus" :disabled="fetchingData || downloading" class="filter-item">
+                新增
+            </el-button>
+            <el-button @click="download" icon="el-icon-upload2" :loading="downloading" :disabled="fetchingData" class="filter-item">
+                导出
+            </el-button>
+        </page-title>
+        <div class="filters-container">
+            <el-input
+                    placeholder="搜索..."
+                    v-model="search"
+                    clearable
+                    class="filter-item search"
+                    @keyup.enter.native="getData"
+            >
+                <el-button @click="getData" slot="append" icon="el-icon-search"> </el-button>
+            </el-input>
+        </div>
+        <el-table :data="tableData" row-key="id" ref="table"
+                  header-row-class-name="table-header-row"
+                  header-cell-class-name="table-header-cell"
+                  row-class-name="table-row" cell-class-name="table-cell"
+                  :height="tableHeight" v-loading="fetchingData">
+            <el-table-column v-if="multipleMode" align="center" type="selection"
+                             width="50">
+            </el-table-column>
+            <el-table-column prop="id" label="ID" width="100">
+            </el-table-column>
+                                <el-table-column prop="userId" label="用户id"
+>
+                    </el-table-column>
+                    <el-table-column prop="userName" label="用户名"
+>
+                    </el-table-column>
+                    <el-table-column prop="userAvatar" label="用户头像"
+>
+                    </el-table-column>
+                    <el-table-column prop="pic" label="图片"
+>
+                    </el-table-column>
+                    <el-table-column prop="picName" label="图片名称"
+>
+                    </el-table-column>
+                    <el-table-column prop="domainName" label="图片名称"
+>
+                    </el-table-column>
+                    <el-table-column prop="status" label="状态"
+                            :formatter="statusFormatter"
+                        >
+                    </el-table-column>
+                    <el-table-column prop="auditResult" label="auditResult"
+>
+                    </el-table-column>
+                    <el-table-column prop="createAssetId" label="createAssetId"
+>
+                    </el-table-column>
+                    <el-table-column prop="ownerId" label="ownerId"
+>
+                    </el-table-column>
+                    <el-table-column prop="gifted" label="gifted"
+>
+                    </el-table-column>
+                    <el-table-column prop="transactionId" label="交易ID"
+>
+                    </el-table-column>
+                    <el-table-column prop="orderStatus" label="orderStatus"
+                            :formatter="orderStatusFormatter"
+                        >
+                    </el-table-column>
+                    <el-table-column prop="payMethod" label="payMethod"
+                            :formatter="payMethodFormatter"
+                        >
+                    </el-table-column>
+                    <el-table-column prop="destroyed" label="destroyed"
+>
+                    </el-table-column>
+                    <el-table-column prop="price" label="price"
+>
+                    </el-table-column>
+                    <el-table-column prop="years" label="years"
+>
+                    </el-table-column>
+                    <el-table-column prop="endTime" label="endTime"
+>
+                    </el-table-column>
+                    <el-table-column prop="result" label="result"
+>
+                    </el-table-column>
+                    <el-table-column prop="openHyperLink" label="是否打开超链"
+>
+                    </el-table-column>
+                    <el-table-column prop="hyperLinkType" label="超链类型"
+                            :formatter="hyperLinkTypeFormatter"
+                        >
+                    </el-table-column>
+                    <el-table-column prop="address" label="超链地址"
+>
+                    </el-table-column>
+            <el-table-column
+                    label="操作"
+                    align="center"
+                    fixed="right"
+                    width="150">
+                <template slot-scope="{row}">
+                    <el-button @click="editRow(row)" type="primary" size="mini" plain>编辑</el-button>
+                    <el-button @click="deleteRow(row)" type="danger" size="mini" plain>删除</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <div class="pagination-wrapper">
+            <!-- <div class="multiple-mode-wrapper">
+                <el-button v-if="!multipleMode" @click="toggleMultipleMode(true)">批量编辑</el-button>
+                <el-button-group v-else>
+                    <el-button @click="operation1">批量操作1</el-button>
+                    <el-button @click="operation2">批量操作2</el-button>
+                    <el-button @click="toggleMultipleMode(false)">取消</el-button>
+                </el-button-group>
+            </div> -->
+            <el-pagination background @size-change="onSizeChange"
+                           @current-change="onCurrentChange" :current-page="page"
+                           :page-sizes="[10, 20, 30, 40, 50]" :page-size="pageSize"
+                           layout="total, sizes, prev, pager, next, jumper"
+                           :total="totalElements">
+            </el-pagination>
+        </div>
+
+    </div>
+</template>
+<script>
+    import { mapState } from "vuex";
+    import pageableTable from "@/mixins/pageableTable";
+
+    export default {
+        name: 'HyperlinkList',
+        mixins: [pageableTable],
+        data() {
+            return {
+                multipleMode: false,
+                search: "",
+                url: "/hyperlink/all",
+                downloading: false,
+                        statusOptions:[{"label":"审核中","value":"PENDING"},{"label":"通过","value":"SUCCESS"},{"label":"失败","value":"FAIL"}],
+                        orderStatusOptions:[{"label":"未支付","value":"NOT_PAID"},{"label":"已支付,处理中","value":"PROCESSING"},{"label":"已完成","value":"FINISH"},{"label":"已取消","value":"CANCELLED"}],
+                        payMethodOptions:[{"label":"微信","value":"WEIXIN"},{"label":"支付宝","value":"ALIPAY"},{"label":"无GAS费","value":"FREE"},{"label":"衫德支付","value":"SANDPAY"},{"label":"河马支付","value":"HMPAY"},{"label":"首信易","value":"PAYEASE"},{"label":"余额支付","value":"BALANCE"},{"label":"销毁藏品","value":"DESTROY"}],
+                        hyperLinkTypeOptions:[{"label":"个人主页","value":"HOMEPAGE"},{"label":"外部链接","value":"EXTERNALLINK"},{"label":" 藏品","value":"COLLECTION"}],
+            }
+        },
+        computed: {
+            selection() {
+                return this.$refs.table.selection.map(i => i.id);
+            }
+        },
+        methods: {
+                    statusFormatter(row, column, cellValue, index) {
+                        let selectedOption = this.statusOptions.find(i => i.value === cellValue);
+                        if (selectedOption) {
+                            return selectedOption.label;
+                        }
+                        return '';
+                    },
+                    orderStatusFormatter(row, column, cellValue, index) {
+                        let selectedOption = this.orderStatusOptions.find(i => i.value === cellValue);
+                        if (selectedOption) {
+                            return selectedOption.label;
+                        }
+                        return '';
+                    },
+                    payMethodFormatter(row, column, cellValue, index) {
+                        let selectedOption = this.payMethodOptions.find(i => i.value === cellValue);
+                        if (selectedOption) {
+                            return selectedOption.label;
+                        }
+                        return '';
+                    },
+                    hyperLinkTypeFormatter(row, column, cellValue, index) {
+                        let selectedOption = this.hyperLinkTypeOptions.find(i => i.value === cellValue);
+                        if (selectedOption) {
+                            return selectedOption.label;
+                        }
+                        return '';
+                    },
+            beforeGetData() {
+                return { search: this.search, query: { del: false } };
+            },
+            toggleMultipleMode(multipleMode) {
+                this.multipleMode = multipleMode;
+                if (!multipleMode) {
+                    this.$refs.table.clearSelection();
+                }
+            },
+            addRow() {
+                this.$router.push({
+                    path: "/hyperlinkEdit",
+                    query: {
+                        ...this.$route.query
+                    }
+                });
+            },
+            editRow(row) {
+                this.$router.push({
+                    path: "/hyperlinkEdit",
+                    query: {
+                    id: row.id
+                    }
+                });
+            },
+            download() {
+                this.downloading = true;
+                this.$axios
+                    .get("/hyperlink/excel", { 
+                        responseType: "blob",
+                        params: { size: 10000 }
+                    })
+                    .then(res => {
+                        console.log(res);
+                        this.downloading = false;
+                        const downloadUrl = window.URL.createObjectURL(new Blob([res.data]));
+                        const link = document.createElement("a");
+                        link.href = downloadUrl;
+                        link.setAttribute(
+                            "download",
+                            res.headers["content-disposition"].split("filename=")[1]
+                        );
+                        document.body.appendChild(link);
+                        link.click();
+                        link.remove();
+                    })
+                    .catch(e => {
+                        console.log(e);
+                        this.downloading = false;
+                        this.$message.error(e.error);
+                    });
+            },
+            operation1() {
+                this.$notify({
+                    title: '提示',
+                    message: this.selection
+                });
+            },
+            operation2() {
+                this.$message('操作2');
+            },
+            deleteRow(row) {
+                this.$alert('删除将无法恢复,确认要删除么?', '警告', {type: 'error'}).then(() => {
+                    return this.$http.post(`/hyperlink/del/${row.id}`)
+                }).then(() => {
+                    this.$message.success('删除成功');
+                    this.getData();
+                }).catch(e => {
+                    if (e !== 'cancel') {
+                        this.$message.error(e.error);
+                    }
+                })
+            },
+        }
+    }
+</script>
+<style lang="less" scoped>
+</style>