Browse Source

add:金句列表v1

zhiqiang.lv 3 months ago
parent
commit
7fd3d079bc

+ 115 - 0
src/main/java/top/lvzhiqiang/controller/GoldenQuotesController.java

@@ -0,0 +1,115 @@
+package top.lvzhiqiang.controller;
+
+import com.alibaba.fastjson.JSONObject;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+import top.lvzhiqiang.dto.R;
+import top.lvzhiqiang.entity.GoldenQuotes;
+import top.lvzhiqiang.enumeration.ResultCodeEnum;
+import top.lvzhiqiang.exception.BusinessException;
+import top.lvzhiqiang.exception.ParameterException;
+import top.lvzhiqiang.mapper.CoinMapper;
+import top.lvzhiqiang.util.DateUtils;
+import top.lvzhiqiang.util.StringUtils;
+
+import javax.annotation.Resource;
+import java.time.LocalDate;
+
+/**
+ * 金句Controller
+ *
+ * @author lvzhiqiang
+ * 2025/9/22 15:36
+ */
+@RestController
+@RequestMapping("/goldenQuotes")
+public class GoldenQuotesController {
+
+    @Resource
+    private CoinMapper coinMapper;
+
+    /**
+     * insertOrUpdateWatchlist
+     *
+     * @author lvzhiqiang
+     * 2025/9/22 15:36
+     */
+    @RequestMapping("/insertOrUpdateGoldenQuotes")
+    @ResponseBody
+    public R insertOrUpdateGoldenQuotes(String id, String author, String sourcePlatform, String originalUrl, String publishTime, String isPinned, String pinPriority, String tags, String content, String crudType, String userName) {
+        if (StringUtils.isEmpty(crudType)) {
+            throw new ParameterException("crudType为空!");
+        }
+
+        Integer userId;
+        if (StringUtils.isEmpty(userName)) {
+            throw new ParameterException("userName为空!");
+        } else {
+            JSONObject coinUser = coinMapper.findUserByUsername(userName);
+            if (coinUser == null) {
+                throw new ParameterException("用户不存在!");
+            }
+            userId = coinUser.getInteger("id");
+        }
+
+        if ("1".equals(crudType)) {
+            // 新增
+            if (StringUtils.isEmpty(author) || StringUtils.isEmpty(sourcePlatform) || StringUtils.isEmpty(content)) {
+                throw new ParameterException("参数为空!");
+            }
+
+            GoldenQuotes goldenQuotes = new GoldenQuotes();
+            goldenQuotes.setAuthor(author);
+            goldenQuotes.setSourcePlatform(sourcePlatform);
+            goldenQuotes.setPublishTime(StringUtils.isEmpty(publishTime) ? LocalDate.now() : LocalDate.parse(publishTime, DateUtils.dateFormatter));
+            goldenQuotes.setContent(content);
+
+            goldenQuotes.setOriginalUrl(originalUrl);
+            goldenQuotes.setIsPinned(StringUtils.isEmpty(isPinned) ? 2 : Integer.parseInt(isPinned));
+            goldenQuotes.setPinPriority(StringUtils.isEmpty(pinPriority) ? 0 : Integer.parseInt(pinPriority));
+            goldenQuotes.setTags(tags);
+
+            coinMapper.insertGoldenQuotes(goldenQuotes);
+        } else if ("2".equals(crudType)) {
+            // 修改
+            if (StringUtils.isEmpty(id)) {
+                throw new ParameterException("id为空!");
+            }
+
+            GoldenQuotes goldenQuotes = coinMapper.findGoldenQuotesById(id);
+            if (goldenQuotes == null) {
+                throw new BusinessException(ResultCodeEnum.UNKNOWN_ERROR.getCode(), "id 不存在!");
+            }
+
+            if (StringUtils.isNotEmpty(author)) {
+                goldenQuotes.setAuthor(author);
+            }
+            if (StringUtils.isNotEmpty(sourcePlatform)) {
+                goldenQuotes.setSourcePlatform(sourcePlatform);
+            }
+            if (StringUtils.isNotEmpty(originalUrl)) {
+                goldenQuotes.setOriginalUrl(originalUrl);
+            }
+            if (StringUtils.isNotEmpty(publishTime)) {
+                goldenQuotes.setPublishTime(LocalDate.parse(publishTime, DateUtils.dateFormatter));
+            }
+            if (StringUtils.isNotEmpty(isPinned)) {
+                goldenQuotes.setIsPinned(Integer.valueOf(isPinned));
+            }
+            if (StringUtils.isNotEmpty(pinPriority)) {
+                goldenQuotes.setPinPriority(Integer.valueOf(pinPriority));
+            }
+            if (StringUtils.isNotEmpty(tags)) {
+                goldenQuotes.setTags(tags);
+            }
+            if (StringUtils.isNotEmpty(content)) {
+                goldenQuotes.setContent(content);
+            }
+
+            coinMapper.updateGoldenQuotes(goldenQuotes);
+        }
+
+        return R.ok().data("success");
+    }
+}

+ 5 - 1
src/main/java/top/lvzhiqiang/entity/CoinApiConfig.java

@@ -89,7 +89,11 @@ public class CoinApiConfig implements Serializable {
 
     private List<JSONObject> categoryList;
 
-    private List<String>ytLivePublishTimeList;
+    private List<String> ytLivePublishTimeList;
+
+    private List<String> goldenQuotesAuthorList;
+    private List<String> goldenQuotesSourcePlatformList;
+    private List<String> goldenQuotesTagsList;
 
     private String userType;
 }

+ 83 - 0
src/main/java/top/lvzhiqiang/entity/GoldenQuotes.java

@@ -0,0 +1,83 @@
+package top.lvzhiqiang.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+import java.time.LocalDateTime;
+
+/**
+ * 金句引用表
+ *
+ * @author lvzhiqiang
+ * 2025/9/22 10:20
+ */
+@Data
+public class GoldenQuotes implements Serializable {
+
+    /**
+     * 主键
+     */
+    private Long id;
+
+    /**
+     * 金句内容
+     */
+    private String content;
+
+    /**
+     * 作者名称
+     */
+    private String author;
+
+    /**
+     * 来源平台(如:微博,知乎,推特等)
+     */
+    private String sourcePlatform;
+
+    /**
+     * 原文链接
+     */
+    private String originalUrl;
+
+    /**
+     * 发布时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private LocalDate publishTime;
+
+    /**
+     * 是否置顶(2:否,1:是)
+     */
+    private Integer isPinned;
+
+    private String isPinnedStr;
+
+    /**
+     * 置顶优先级(数值越大越靠前)
+     */
+    private Integer pinPriority;
+
+    /**
+     * 标签(多个用逗号分隔)
+     */
+    private String tags;
+
+    /**
+     * 书签的创建时间,默认为当前时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime createdAt;
+
+    /**
+     * 书签的最后更新时间,自动更新为当前时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private LocalDateTime updatedAt;
+
+    /**
+     * 删除标志(1:正常,2:已删除)
+     */
+    private Integer deleteFlag;
+}

+ 15 - 0
src/main/java/top/lvzhiqiang/mapper/CoinApiConfigMapper.java

@@ -130,4 +130,19 @@ public interface CoinApiConfigMapper {
 
     @Select("select distinct publish_time from coin_youtube_yt2140_live where delete_flag = 1 and status = 1 order by publish_time desc")
     List<String> findYtLivePublishTimeList();
+
+    @Select("select distinct author from golden_quotes where delete_flag = 1")
+    List<String> findGoldenQuotesAuthorList();
+
+    @Select("select distinct source_platform from golden_quotes where delete_flag = 1")
+    List<String> findGoldenQuotesSourcePlatformList();
+
+    @Select("SELECT M.tags " +
+            "FROM (SELECT SUBSTRING_INDEX(SUBSTRING_INDEX(gq.tags, ',', B.HELP_TOPIC_ID + 1), ',', - 1) AS tags " +
+            "      FROM golden_quotes gq " +
+            "               JOIN MYSQL.HELP_TOPIC B " +
+            "                    ON B.HELP_TOPIC_ID < (LENGTH(gq.tags) - LENGTH(REPLACE(gq.tags, ',', '')) + 1)) M " +
+            "GROUP BY M.tags " +
+            "ORDER BY COUNT(M.tags) DESC")
+    List<String> findGoldenQuotesTagsList();
 }

+ 35 - 0
src/main/java/top/lvzhiqiang/mapper/CoinMapper.java

@@ -411,4 +411,39 @@ public interface CoinMapper {
 
     @Select("select * from coin_currency_holding where symbol = #{symbol} and exchange_category_id = #{exchangeCategoryId}")
     CoinCurrencyHolding findCurrentHoldingBySymbolAndExchangeCategoryId(String symbol, Integer exchangeCategoryId);
+
+    @Select({"<script>" +
+            "select * from golden_quotes WHERE delete_flag = 1" +
+            "<if test=\"keyword != null and keyword != ''\">" +
+            "   and content like concat('%',#{keyword},'%')" +
+            "</if>" +
+            "<if test=\"authorField != null and authorField != ''\">" +
+            "   and author = #{authorField}" +
+            "</if>" +
+            "<if test=\"sourcePlatformField != null and sourcePlatformField != ''\">" +
+            "   and source_platform = #{sourcePlatformField}" +
+            "</if>" +
+            "<if test=\"pinField != null and pinField != ''\">" +
+            "   and is_pinned = #{pinField}" +
+            "</if>" +
+            "<if test=\"tagsField != null and tagsField != ''\">" +
+            "   and tags like concat('%',#{tagsField},'%')" +
+            "</if>" +
+            " order by is_pinned asc,pin_priority desc," +
+            "<foreach collection='sortField' item='sf' index=\"index\" separator=\",\">" +
+            "   ${sf} ${sort}" +
+            " </foreach>" +
+            "</script>"})
+    List<GoldenQuotes> findGoldenQuotesList(Map<String, Object> params);
+
+    @Insert("INSERT INTO golden_quotes(content, author, source_platform, original_url, publish_time, is_pinned, pin_priority, tags) " +
+            "VALUES (#{content}, #{author}, #{sourcePlatform}, #{originalUrl}, #{publishTime}, #{isPinned}, #{pinPriority}, #{tags})")
+    void insertGoldenQuotes(GoldenQuotes goldenQuotes);
+
+    @Update("update golden_quotes set content=#{content},author=#{author},source_platform=#{sourcePlatform},original_url=#{originalUrl},publish_time=#{publishTime}," +
+            "is_pinned=#{isPinned},pin_priority=#{pinPriority},tags=#{tags} where id = #{id}")
+    int updateGoldenQuotes(GoldenQuotes goldenQuotes);
+
+    @Select("select * from golden_quotes where id = #{id}")
+    GoldenQuotes findGoldenQuotesById(String id);
 }

+ 5 - 1
src/main/java/top/lvzhiqiang/service/impl/CoinApiConfigServiceImpl.java

@@ -87,8 +87,12 @@ public class CoinApiConfigServiceImpl implements CoinApiConfigService {
                 coinApiConfig.setExchangeCategoryList(coinApiConfigMapper.findFileCurrentHoldingCategoryList());
             } else if (coinApiConfig.getNameEn().equals("bookmark")) {
                 coinApiConfig.setCategoryList(coinApiConfigMapper.findBookmarkCategoryList(null));
-            }else if (coinApiConfig.getNameEn().equals("youtubeLive")) {
+            } else if (coinApiConfig.getNameEn().equals("youtubeLive")) {
                 coinApiConfig.setYtLivePublishTimeList(coinApiConfigMapper.findYtLivePublishTimeList());
+            } else if (coinApiConfig.getNameEn().equals("goldenQuotes")) {
+                coinApiConfig.setGoldenQuotesAuthorList(coinApiConfigMapper.findGoldenQuotesAuthorList());
+                coinApiConfig.setGoldenQuotesSourcePlatformList(coinApiConfigMapper.findGoldenQuotesSourcePlatformList());
+                coinApiConfig.setGoldenQuotesTagsList(coinApiConfigMapper.findGoldenQuotesTagsList().stream().filter(StringUtils::isNotEmpty).collect(Collectors.toList()));
             }
         }
 

+ 21 - 0
src/main/java/top/lvzhiqiang/service/impl/CoinServiceImpl.java

@@ -1906,11 +1906,32 @@ public class CoinServiceImpl implements CoinService {
 
             renderMainSearch4YoutubeYt2140LiveChapter(yt2140LiveChapterList);
             return yt2140LiveChapterPageInfo;
+        } else if (params.getString("nameEn").equals("goldenQuotes")) {
+            PageHelper.startPage(params.getInteger("pageNo"), params.getInteger("pageSize"), true);
+
+            if (params.containsKey("sortField")) {
+                params.put("sortField", Arrays.asList(params.getString("sortField").split(",")));
+            }
+
+            List<GoldenQuotes> goldenQuotesList = coinMapper.findGoldenQuotesList(params.toJavaObject(Map.class));
+
+            PageInfo<GoldenQuotes> goldenQuotesPageInfo = new PageInfo<>(goldenQuotesList);
+
+            renderMainSearch4GoldenQuotes(goldenQuotesList);
+            return goldenQuotesPageInfo;
         }
 
         return result;
     }
 
+    private void renderMainSearch4GoldenQuotes(List<GoldenQuotes> goldenQuotesList) {
+        for (GoldenQuotes goldenQuotes : goldenQuotesList) {
+            // 是否收藏
+            goldenQuotes.setIsPinnedStr(1 == goldenQuotes.getIsPinned() ? "是" : "否");
+            goldenQuotes.setTags(StringUtils.isNotEmpty(goldenQuotes.getTags()) ? goldenQuotes.getTags() : "");
+        }
+    }
+
     private void renderMainSearch4YoutubeYt2140LiveChapter(List<CoinYoutubeYt2140LiveChapterDTO> yt2140LiveChapterList) {
         for (CoinYoutubeYt2140LiveChapterDTO yt2140LiveChapter : yt2140LiveChapterList) {
             String chapterUrl = yt2140LiveChapter.getOriginalUrl().concat("&t=").concat(String.valueOf(yt2140LiveChapter.getStartTime())).concat("s");

+ 32 - 0
src/main/resources/static/coin.html

@@ -461,6 +461,38 @@
             </select>
         </div>
 
+        <div id="apis-quiet-div-goldenQuotes" style="display: none;">
+            <button class="apis-quiet-div-button3" slideDiv="apis-quiet-content" pageO="prev">上一页</button>
+            <button class="apis-quiet-div-button3" slideDiv="apis-quiet-content" pageO="next">下一页</button>
+            <input type="text" style="width: 100px;padding-top: 3px;" id="apis-quiet-div-goldenQuotes-pageNo" value="1">
+            <input type="text" style="width: 100px;padding-top: 3px;" id="apis-quiet-div-goldenQuotes-pageSize" disabled="disabled" value="20">
+            <input type="text" style="width: 100px;padding-top: 3px;" id="apis-quiet-div-goldenQuotes-pages" disabled="disabled" value="999999">
+            <input type="text" style="width: 100px;padding-top: 3px;" id="apis-quiet-div-goldenQuotes-keyword" placeholder="关键词">
+            <select id="apis-quiet-div-goldenQuotes-authorField" style="height: 24px;">
+                <option value="">作者</option>
+            </select>
+            <select id="apis-quiet-div-goldenQuotes-sourcePlatformField" style="height: 24px;">
+                <option value="">来源</option>
+            </select>
+            <select id="apis-quiet-div-goldenQuotes-pinField" style="height: 24px;">
+                <option value="">置顶</option>
+                <option value="1">是</option>
+                <option value="2">否</option>
+            </select>
+            <select id="apis-quiet-div-goldenQuotes-tagsField" style="height: 24px;">
+                <option value="">标签</option>
+            </select>
+            <select id="apis-quiet-div-goldenQuotes-sortField" style="height: 24px;">
+                <option value="publish_time">发布时间</option>
+                <option value="created_at">创建时间</option>
+                <option value="updated_at">更新时间</option>
+            </select>
+            <select id="apis-quiet-div-goldenQuotes-sort" style="height: 24px;">
+                <option value="desc">desc</option>
+                <option value="asc">asc</option>
+            </select>
+        </div>
+
         <div id="apis-quiet-div-youtubeLive" style="display: none;">
             <button class="apis-quiet-div-button3" slideDiv="apis-quiet-content" pageO="prev">上一页</button>
             <button class="apis-quiet-div-button3" slideDiv="apis-quiet-content" pageO="next">下一页</button>

+ 92 - 2
src/main/resources/static/js/my-coin.js

@@ -213,6 +213,24 @@ function initOther4Select() {
                             ytLivePublishTimeStr += '<option value="' + obj2 + '">' + obj2 + '</option>';
                         });
                         $("#apis-quiet-div-youtubeLive-publishTimeField").append(ytLivePublishTimeStr);
+                    }else if (obj.nameEn === 'goldenQuotes') {
+                        var goldenQuotesAuthorStr = '';
+                        $.each(obj.goldenQuotesAuthorList, function (index2, obj2) {
+                            goldenQuotesAuthorStr += '<option value="' + obj2 + '">' + obj2 + '</option>';
+                        });
+                        $("#apis-quiet-div-goldenQuotes-authorField").append(goldenQuotesAuthorStr);
+
+                        var goldenQuotesSourcePlatformStr = '';
+                        $.each(obj.goldenQuotesSourcePlatformList, function (index2, obj2) {
+                            goldenQuotesSourcePlatformStr += '<option value="' + obj2 + '">' + obj2 + '</option>';
+                        });
+                        $("#apis-quiet-div-goldenQuotes-sourcePlatformField").append(goldenQuotesSourcePlatformStr);
+
+                        var goldenQuotesTagsStr = '';
+                        $.each(obj.goldenQuotesTagsList, function (index2, obj2) {
+                            goldenQuotesTagsStr += '<option value="' + obj2 + '">' + obj2 + '</option>';
+                        });
+                        $("#apis-quiet-div-goldenQuotes-tagsField").append(goldenQuotesTagsStr);
                     }
                 });
 
@@ -531,6 +549,16 @@ function mainSearch(url, nameEn, slideDiv, typetype, needCustomFlag) {
         jsonData.sortField = $("#apis-quiet-div-youtubeLive-sortField").val();
         jsonData.sort = $("#apis-quiet-div-youtubeLive-sort").val();
         jsonData.publishTimeField = $("#apis-quiet-div-youtubeLive-publishTimeField").val();
+    } else if (nameEn === 'goldenQuotes') {
+        jsonData.pageNo = $("#apis-quiet-div-goldenQuotes-pageNo").val();
+        jsonData.pageSize = $("#apis-quiet-div-goldenQuotes-pageSize").val();
+        jsonData.keyword = $("#apis-quiet-div-goldenQuotes-keyword").val();
+        jsonData.authorField = $("#apis-quiet-div-goldenQuotes-authorField").val();
+        jsonData.sourcePlatformField = $("#apis-quiet-div-goldenQuotes-sourcePlatformField").val();
+        jsonData.pinField = $("#apis-quiet-div-goldenQuotes-pinField").val();
+        jsonData.tagsField = $("#apis-quiet-div-goldenQuotes-tagsField").val();
+        jsonData.sortField = $("#apis-quiet-div-goldenQuotes-sortField").val();
+        jsonData.sort = $("#apis-quiet-div-goldenQuotes-sort").val();
     }
 
     $.ajax({
@@ -547,7 +575,7 @@ function mainSearch(url, nameEn, slideDiv, typetype, needCustomFlag) {
                     return;
                 }
 
-                if (nameEn === 'orderHistoryProductType' || nameEn === 'traderList' || nameEn === 'watchlist' || nameEn === 'image' || nameEn === 'cmcmap' || nameEn === 'music' || nameEn === 'currentHolding' || nameEn === 'bookmark' || nameEn === 'youtubeLive') {
+                if (nameEn === 'orderHistoryProductType' || nameEn === 'traderList' || nameEn === 'watchlist' || nameEn === 'image' || nameEn === 'cmcmap' || nameEn === 'music' || nameEn === 'currentHolding' || nameEn === 'bookmark' || nameEn === 'youtubeLive' || nameEn === 'goldenQuotes') {
                     $("#apis-quiet-div-" + nameEn).find("input[id$=pages]").val(data.data.pages);
                     $('#' + slideDiv).find("span.contentSPAN").html(data.data.total);
                     data = data.data.list;
@@ -1269,6 +1297,48 @@ function insertOrUpdateWatchlistSubmit(){
     });
 }
 
+function insertOrUpdateGoldenQuotesSubmit(){
+    var formData = new FormData($("#popup-form")[0]);
+    formData.append("userName", getCookie('username'));
+    $.ajax({
+        url: "goldenQuotes/insertOrUpdateGoldenQuotes", //请求的url地址
+        dataType: "json", //返回格式为json
+        data: formData, //参数值
+        type: "post", //请求方式
+        processData: false,// 告诉jQuery不要去处理发送的数据
+        contentType: false,// 告诉jQuery不要去设置Content-Type请求头
+        async: true, //请求是否异步,默认为异步,这也是ajax重要特性
+        success: function (data) {
+            //$(".popup > .watchlist-loading").css("display", "none");
+            //请求成功时处理
+            if (data != null && $.trim(data) != "" && data.success) {
+                //$("#insertOrUpdateAlert").html(JSON.stringify(data.data));
+                var quietSelectOption = $("#apis-quiet-select option:selected");
+                if ($(quietSelectOption).attr("nameen") === 'goldenQuotes') {
+                    $(".apis-quiet-div-button2").click();
+                }
+            } else {
+                //$("#insertOrUpdateAlert").html(data.message);
+            }
+
+            // 在请求成功后填充数据到结果区域
+            $("#result-content").text(JSON.stringify(data, null, 2));
+            $("#loading-icon").fadeOut();
+            $("#result-container").fadeIn();  // 显示结果区域
+        },
+        beforeSend: function () {
+            //$(".popup > .watchlist-loading").css("display", "block");
+            showLoading();  // 显示加载状态
+        },
+        complete: function () {
+        },
+        error: function (data) {
+            //请求出错处理
+            console.log("insertOrUpdateGoldenQuotes-submit error," + JSON.stringify(data, null, 2));
+        }
+    });
+}
+
 function insertOrUpdateCurrentHoldingSubmit(){
     var formData = new FormData($("#popup-form")[0]);
     formData.append("userName", getCookie('username'));
@@ -1323,7 +1393,7 @@ function initOther4Popup(){
         var slideDiv = $(this).attr("slideDiv");
         quietPop(url, nameEn, slideDiv, typetype);
 
-        if (nameEn != 'watchlist' && nameEn != 'image' && nameEn != 'music' && nameEn != 'currentHolding') {
+        if (nameEn != 'watchlist' && nameEn != 'image' && nameEn != 'music' && nameEn != 'currentHolding' && nameEn != 'goldenQuotes') {
             return;
         }
 
@@ -1349,6 +1419,8 @@ function initOther4Popup(){
             insertOrUpdateMusicSubmit();
         } else if (nameEn === 'currentHolding') {
             insertOrUpdateCurrentHoldingSubmit();
+        } else if (nameEn === 'goldenQuotes') {
+            insertOrUpdateGoldenQuotesSubmit();
         }
     });
 
@@ -1432,6 +1504,24 @@ function quietPop(url, nameEn, slideDiv, typetype) {
     } else if (nameEn === 'allPositionv2') {
     } else if (nameEn === 'orderHistoryProductType') {
     } else if (nameEn === 'traderList') {
+    } else if (nameEn === 'goldenQuotes') {
+        let formContent = "";
+        formContent += '<div class="form-item"><label for="id">Id:</label><input type="text" name="id" placeholder="可为空"></div>';
+        formContent += '<div class="form-item"><label for="author">作者:</label><input type="text" name="author" placeholder="不可为空"></div>';
+        formContent += '<div class="form-item"><label for="sourcePlatform">来源:</label><input type="text" name="sourcePlatform" placeholder="不可为空"></div>';
+        formContent += '<div class="form-item"><label for="originalUrl">原文链接:</label><input type="text" name="originalUrl" placeholder="可为空"></div>';
+        formContent += '<div class="form-item"><label for="publishTime">发布时间:</label><input type="text" name="publishTime" placeholder="可为空,默认当天"></div>';
+        formContent += '<div class="form-item"><label for="isPinned">是否置顶:</label><input type="text" name="isPinned" placeholder="可为空,1是2否"></div>';
+        formContent += '<div class="form-item"><label for="pinPriority">置顶优先级:</label><input type="text" name="pinPriority" placeholder="可为空,数值越大越靠前"></div>';
+        formContent += '<div class="form-item"><label for="tags">标签:</label><input type="text" name="tags" placeholder="可为空,多个用逗号分隔"></div>';
+        formContent += '<div class="form-item"><label for="tags">内容:</label><textarea rows="4" cols="50" style="background: antiquewhite;width: 100%;height: 100%;" name="content"></textarea></div>';
+        formContent += '<div class="form-item"><label for="crudType">crudType:</label><select id="apis-quiet-div-goldenQuotes-crudType" name="crudType"><option value="1">insert</option><option value="2">update</option></select></div>';
+
+        $("#form-container-2").html(formContent);
+
+        $("#popup-form-hidden-nameEn").val(nameEn);
+
+        $("#draggable-popup > h2").text("InsertOrUpdateGoldenQuotes");
     } else if (nameEn === 'watchlist') {
         let formContent = "";
         formContent += '<div class="form-item"><label for="symbol">名称:</label><input type="text" name="symbol" placeholder="不可为空"></div>';