فهرست منبع

Merge branch 'master' of http://git.izouma.com/xiongzhu/raex_back into dev-meta

sunkean 2 سال پیش
والد
کامیت
1079ff47a4

+ 0 - 46
src/main/java/com/izouma/nineth/domain/RiceTask.java

@@ -1,46 +0,0 @@
-package com.izouma.nineth.domain;
-
-
-import io.swagger.annotations.ApiModel;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-
-/**
- * id:任务的唯一标识,使用自增长主键。
- * name:任务的名称。
- * description:任务的描述。
- * type:任务的类型,例如签到任务、邀请任务、积分兑换任务等。
- * score:任务完成后可以获得的积分数。
- * maxTimesPerDay:每天最多可以完成的次数。
- * lastResetTime:最近一次重置任务的时间戳,用于判断是否需要重置任务进度。
- * 这个实体类还可以根据实际情况进行扩展,例如可以增加任务的开始时间、结束时间等字段。
- */
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Entity
-@ApiModel("水稻定时任务")
-public class RiceTask extends BaseEntity {
-
-    @Column(name = "name")
-    private String name;
-
-    @Column(name = "description")
-    private String description;
-
-    @Column(name = "type")
-    private String type;
-
-    @Column(name = "score")
-    private Integer score;
-
-    @Column(name = "max_times_per_day")
-    private Integer maxTimesPerDay;
-
-    @Column(name = "last_reset_time")
-    private Long lastResetTime;
-}

+ 0 - 56
src/main/java/com/izouma/nineth/domain/RiceWaterTypeForWatreing.java

@@ -1,56 +0,0 @@
-package com.izouma.nineth.domain;
-
-
-import com.izouma.nineth.enums.RiceBubbleStatus;
-import com.izouma.nineth.enums.RiceWaterType;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.AllArgsConstructor;
-import lombok.Data;
-import lombok.NoArgsConstructor;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.EnumType;
-import javax.persistence.Enumerated;
-import java.time.LocalDateTime;
-
-@Data
-@AllArgsConstructor
-@NoArgsConstructor
-@Entity
-@ApiModel("水稻水滴类型对应浇水")
-public class RiceWaterTypeForWatreing  extends BaseEntity {
-
-    @ApiModelProperty("用户ID")
-    @Column(name = "user_id")
-    private Long userId;
-
-    @ApiModelProperty("类型:水滴,活动积分,积分,经验值")
-    @Enumerated(EnumType.STRING)
-    private RiceWaterType type;
-
-
-    @ApiModelProperty("类型数量")
-    private Long counts;
-
-    @ApiModelProperty("气泡状态类型,未点击,已点击,已过期")
-    @Column(name = "rice_bubble_status")
-    private RiceBubbleStatus riceBubbleStatus;
-
-    @ApiModelProperty("气泡创建时间")
-    @Column(name = "bubble_created_at")
-    private LocalDateTime bubbleCreatedAt;
-
-    public  Long getCounts(){
-        return  counts == null ? 0 : counts;
-    }
-
-
-
-}
-
-
-
-
-

+ 3 - 1
src/main/java/com/izouma/nineth/enums/AuthorityName.java

@@ -12,7 +12,9 @@ public enum AuthorityName {
     ROLE_MESSAGE("留言管理员"),
     ROLE_SAAS("SAAS管理员"),
     ROLE_META("元宇宙管理员"),
-    ROLE_GROUP("群组管理员");
+    ROLE_GROUP("群组管理员"),
+    ROLE_RESOURCES("党建管理员");
+
     private final String description;
 
     AuthorityName(String description) {

+ 1 - 0
src/main/java/com/izouma/nineth/enums/MetaResourcesType.java

@@ -4,6 +4,7 @@ public enum MetaResourcesType {
     PARTY_ONE("党建一楼"),
     PARTY_TWO("党建二楼"),
     METAVERSE("元宇宙"),
+    COURSE("选课"),
     PARTY_THREE("党建三楼");
 
     private final String description;

+ 0 - 21
src/main/java/com/izouma/nineth/enums/RiceBubbleStatus.java

@@ -1,21 +0,0 @@
-package com.izouma.nineth.enums;
-
-
-public enum RiceBubbleStatus {
-
-    NOT_CLICKED("未点击"),
-    CLICKED("已点击"),
-    EXPIRED("已过期");
-
-
-
-    private final String description;
-
-    RiceBubbleStatus(String description) {
-        this.description = description;
-    }
-
-    public String getDescription() {
-        return description;
-    }
-}

+ 4 - 0
src/main/java/com/izouma/nineth/repo/MetaResourcesRepo.java

@@ -2,6 +2,7 @@ package com.izouma.nineth.repo;
 
 import com.izouma.nineth.domain.MetaResources;
 import com.izouma.nineth.dto.MetaRestResult;
+import com.izouma.nineth.enums.MetaResourcesType;
 import org.springframework.data.jpa.repository.JpaRepository;
 import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
 import org.springframework.data.jpa.repository.Modifying;
@@ -9,6 +10,7 @@ import org.springframework.data.jpa.repository.Query;
 
 import javax.naming.Name;
 import javax.transaction.Transactional;
+import java.util.List;
 
 public interface MetaResourcesRepo extends JpaRepository<MetaResources, Long>, JpaSpecificationExecutor<MetaResources> {
     @Query("update MetaResources t set t.del = true where t.id = ?1")
@@ -17,4 +19,6 @@ public interface MetaResourcesRepo extends JpaRepository<MetaResources, Long>, J
     void softDelete(Long id);
 
     MetaResources findByNameAndDel(String name, boolean del);
+
+    List<MetaResources> findByTypeAndDel(MetaResourcesType type, boolean del);
 }

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

@@ -1,16 +0,0 @@
-package com.izouma.nineth.repo;
-
-import com.izouma.nineth.domain.RiceWaterTypeForWatreing;
-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 RiceWaterTypeForWatreingRepo extends JpaRepository<RiceWaterTypeForWatreing, Long>, JpaSpecificationExecutor<RiceWaterTypeForWatreing> {
-    @Query("update RiceWaterTypeForWatreing t set t.del = true where t.id = ?1")
-    @Modifying
-    @Transactional
-    void softDelete(Long id);
-}

+ 3 - 0
src/main/java/com/izouma/nineth/repo/nftdomain/DomainAskRepo.java

@@ -29,6 +29,9 @@ public interface DomainAskRepo extends JpaRepository<DomainAsk, Long>, JpaSpecif
     @Query(nativeQuery = true, value = "select count(da.id) count,da.pic_url pic,da.domain_order_id domainOrderId,a.id assetId,da.`name` picName,da.end_time endTime from domain_ask da inner join asset a on a.id = da.asset_id where da.status in ('REFUNDED','ASKING','FINISH') and da.owner_id = ?1 and a.status = 'NORMAL' group by da.asset_id order by a.created_at desc")
     List<Map<String, Object>> askGroup(Long userId);
 
+    @Query(value = "select sum(price) from DomainAsk where status <> 'CANCELLED' and createdAt <= ?1 and createdAt >= ?2")
+    BigDecimal sumToday(LocalDateTime start, LocalDateTime end);
+
     int countByAssetIdAndUserIdAndStatusInAndDelFalse(Long assetId, Long userId, Set<DomainAskStatus> statuses);
 
     int countByAssetIdAndOwnerIdAndStatusInAndDelFalse(Long assetId, Long userId, Set<DomainAskStatus> statuses);

+ 0 - 20
src/main/java/com/izouma/nineth/service/RiceWaterTypeForWatreingService.java

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

+ 7 - 1
src/main/java/com/izouma/nineth/service/StatisticService.java

@@ -8,12 +8,14 @@ import com.github.kevinsawicki.http.HttpRequest;
 import com.izouma.nineth.config.GeneralProperties;
 import com.izouma.nineth.domain.*;
 import com.izouma.nineth.domain.Collection;
+import com.izouma.nineth.domain.nftdomain.DomainAsk;
 import com.izouma.nineth.dto.PageQuery;
 import com.izouma.nineth.dto.excel.GlobalSearchDTO;
 import com.izouma.nineth.dto.nftdomain.CollectionDTO;
 import com.izouma.nineth.enums.*;
 import com.izouma.nineth.exception.BusinessException;
 import com.izouma.nineth.repo.*;
+import com.izouma.nineth.repo.nftdomain.DomainAskRepo;
 import com.izouma.nineth.utils.netease.CheckSumBuilder;
 import lombok.AllArgsConstructor;
 import org.apache.commons.lang.RandomStringUtils;
@@ -50,6 +52,7 @@ public class StatisticService {
     private MintActivityService mintActivityService;
     private UserService         userService;
     private ShowroomService     showroomService;
+    private DomainAskRepo       domainAskRepo;
 
     public Map<String, Object> total(Long userId, Long companyId) {
         User user1 = userRepo.findByIdAndDelFalse(userId).orElseThrow(new BusinessException("无用户"));
@@ -470,7 +473,8 @@ public class StatisticService {
         BigDecimal todaySc = scs.stream().reduce(BigDecimal::add).orElse(BigDecimal.ZERO);
         today.put("serviceCharge", todaySc);
         //域名
-        BigDecimal domainOrder1 = Optional.ofNullable(domainOrderRepo.sumToday(todayStart, todayEnd)).orElse(BigDecimal.ZERO);
+        BigDecimal domainOrder1 = Optional.ofNullable(domainOrderRepo.sumToday(todayStart, todayEnd))
+                                          .orElse(BigDecimal.ZERO);
         BigDecimal domainTotal = domainOrder.stream().map(Order::getTotalPrice).reduce(BigDecimal::add)
                                             .orElse(BigDecimal.ZERO);
         Long count = domainOrderRepo.countToday(todayStart, todayEnd);
@@ -481,6 +485,8 @@ public class StatisticService {
         today.put("domainOrder", Optional.of(domainOrder1.add(domainTotal)).orElse(BigDecimal.ZERO));
         today.put("domainOrderMonth", Optional.ofNullable(domainOrderMonth).orElse(BigDecimal.ZERO));
         today.put("countMonth", Optional.ofNullable(countMonth).orElse(0L));
+        today.put("ask", Optional.ofNullable(domainAskRepo.sumToday(todayEnd, todayStart)).orElse(BigDecimal.ZERO));
+
         //saas
         BigDecimal saas = orderRepo.sumSaas(todayStart, todayEnd);
         today.put("saas", Optional.ofNullable(saas).orElse(BigDecimal.ZERO));

+ 10 - 0
src/main/java/com/izouma/nineth/web/MetaResourcesController.java

@@ -5,6 +5,7 @@ import com.izouma.nineth.domain.MetaResourcesLikeRecord;
 import com.izouma.nineth.dto.MetaResourcesLikeDTO;
 import com.izouma.nineth.dto.MetaRestResult;
 import com.izouma.nineth.dto.PageQuery;
+import com.izouma.nineth.enums.MetaResourcesType;
 import com.izouma.nineth.exception.BusinessException;
 import com.izouma.nineth.repo.MetaResourcesLikeRecordRepo;
 import com.izouma.nineth.repo.MetaResourcesRepo;
@@ -123,5 +124,14 @@ public class MetaResourcesController extends BaseController {
         }
         return MetaRestResult.returnSuccess(metaResourcesLikeDTO);
     }
+
+    @GetMapping("/getValue/{type}")
+    public MetaRestResult<List<MetaResources>> getValue(@PathVariable MetaResourcesType type) {
+        List<MetaResources> metaResources = metaResourcesRepo.findByTypeAndDel(type,false);
+        if (Objects.isNull(metaResources)) {
+            return MetaRestResult.returnError("当前类型不存在!");
+        }
+        return MetaRestResult.returnSuccess(metaResources);
+    }
 }
 

+ 0 - 60
src/main/java/com/izouma/nineth/web/RiceWaterTypeForWatreingController.java

@@ -1,60 +0,0 @@
-package com.izouma.nineth.web;
-import com.izouma.nineth.domain.RiceWaterTypeForWatreing;
-import com.izouma.nineth.service.RiceWaterTypeForWatreingService;
-import com.izouma.nineth.dto.PageQuery;
-import com.izouma.nineth.exception.BusinessException;
-import com.izouma.nineth.repo.RiceWaterTypeForWatreingRepo;
-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("/riceWaterTypeForWatreing")
-@AllArgsConstructor
-public class RiceWaterTypeForWatreingController extends BaseController {
-    private RiceWaterTypeForWatreingService riceWaterTypeForWatreingService;
-    private RiceWaterTypeForWatreingRepo riceWaterTypeForWatreingRepo;
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/save")
-    public RiceWaterTypeForWatreing save(@RequestBody RiceWaterTypeForWatreing record) {
-        if (record.getId() != null) {
-            RiceWaterTypeForWatreing orig = riceWaterTypeForWatreingRepo.findById(record.getId()).orElseThrow(new BusinessException("无记录"));
-            ObjUtils.merge(orig, record);
-            return riceWaterTypeForWatreingRepo.save(orig);
-        }
-        return riceWaterTypeForWatreingRepo.save(record);
-    }
-
-
-    //@PreAuthorize("hasRole('ADMIN')")
-    @PostMapping("/all")
-    public Page<RiceWaterTypeForWatreing> all(@RequestBody PageQuery pageQuery) {
-        return riceWaterTypeForWatreingService.all(pageQuery);
-    }
-
-    @GetMapping("/get/{id}")
-    public RiceWaterTypeForWatreing get(@PathVariable Long id) {
-        return riceWaterTypeForWatreingRepo.findById(id).orElseThrow(new BusinessException("无记录"));
-    }
-
-    @PostMapping("/del/{id}")
-    public void del(@PathVariable Long id) {
-        riceWaterTypeForWatreingRepo.softDelete(id);
-    }
-
-    @GetMapping("/excel")
-    @ResponseBody
-    public void excel(HttpServletResponse response, PageQuery pageQuery) throws IOException {
-        List<RiceWaterTypeForWatreing> data = all(pageQuery).getContent();
-        ExcelUtils.export(response, data);
-    }
-}
-

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

@@ -2086,6 +2086,14 @@ const router = new Router({
                        title: '元宇宙奖励空投编辑',
                     },
                 },
+                {
+                    path: '/domainAskList',
+                    name: 'DomainAskList',
+                    component: () => import(/* webpackChunkName: "domainAskList" */ '@/views/DomainAskList.vue'),
+                    meta: {
+                        title: '叫价列表',
+                    },
+                },
                 {
                     path: '/metaAwardDropList',
                     name: 'MetaAwardDropList',
@@ -2153,4 +2161,4 @@ router.beforeEach((to, from, next) => {
     }
 });
 
-export default router;
+export default router;

+ 1 - 1
src/main/vue/src/views/Admin.vue

@@ -2,7 +2,7 @@
     <el-container id="app">
         <el-aside :width="collapse ? '65px' : '200px'" class="aside">
             <div v-if="collapse" class="logo-wrapper collapse" @click="$router.push('/dashboard')"></div>
-            <div v-else class="logo-wrapper" @click="$router.push('/dashboard')">RAEX绿洲</div>
+            <div v-if="$store.state.userInfo.id != '8266668'" v-else class="logo-wrapper" @click="$router.push('/dashboard')">RAEX绿洲</div>
             <el-menu :collapse="collapse" :background-color="$theme['menu-bg']" :text-color="$theme['menu-text-color']"
                 :active-text-color="$theme['menu-text-color-active']" :unique-opened="true" :router="true"
                 :default-active="activeMenu" style="border-right: 1px solid #545c64" class="el-menu-vertical-pushUtils">

+ 14 - 14
src/main/vue/src/views/DomainAskList.vue

@@ -1,9 +1,9 @@
 <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="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>
@@ -79,16 +79,16 @@
                     <el-table-column prop="serviceCharge" 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-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">
@@ -174,7 +174,7 @@
             download() {
                 this.downloading = true;
                 this.$axios
-                    .get("/domainAsk/excel", { 
+                    .get("/domainAsk/excel", {
                         responseType: "blob",
                         params: { size: 10000 }
                     })

+ 121 - 93
src/main/vue/src/views/MetaResourcesEdit.vue

@@ -6,16 +6,36 @@
         </page-title>
         <div class="edit-view__content-wrapper">
             <div class="edit-view__content-section">
-                <el-form :model="formData" :rules="rules" ref="form" label-width="82px" label-position="right" size="small"
-                    style="max-width: 500px;">
+                <el-form
+                    :model="formData"
+                    :rules="rules"
+                    ref="form"
+                    label-width="82px"
+                    label-position="right"
+                    size="small"
+                    style="max-width: 500px;"
+                >
                     <el-form-item prop="name" label="文件名称">
                         <el-input v-model="formData.name"></el-input>
                     </el-form-item>
                     <el-form-item prop="type" label="类型">
                         <el-select v-model="formData.type" clearable filterable placeholder="请选择">
-                            <el-option v-for="item in typeOptions" :key="item.value" :label="item.label"
-                                :value="item.value">
-                            </el-option>
+                            <template v-if="$store.state.userInfo.id === '8266668'">
+                                <el-option
+                                    v-for="item in typeOptionsExceptMeta"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value"
+                                ></el-option>
+                            </template>
+                            <template v-if="$store.state.userInfo.id != '8266668'">
+                                <el-option
+                                    v-for="item in typeOptions"
+                                    :key="item.value"
+                                    :label="item.label"
+                                    :value="item.value"
+                                ></el-option>
+                            </template>
                         </el-select>
                     </el-form-item>
                     <el-form-item prop="value" label="文件">
@@ -34,99 +54,107 @@
 </template>
 <script>
 export default {
-	name: 'MetaResourcesEdit',
-	created() {
-		if (this.$route.query.id) {
-			this.$http
-				.get('metaResources/get/' + this.$route.query.id)
-				.then(res => {
-					this.formData = res;
-				})
-				.catch(e => {
-					console.log(e);
-					this.$message.error(e.error);
-				});
-		}
-	},
-	data() {
-		return {
-			saving: false,
+    name: 'MetaResourcesEdit',
+    created() {
+        if (this.$route.query.id) {
+            this.$http
+                .get('metaResources/get/' + this.$route.query.id)
+                .then(res => {
+                    this.formData = res;
+                })
+                .catch(e => {
+                    console.log(e);
+                    this.$message.error(e.error);
+                });
+        }
+    },
+    data() {
+        return {
+            saving: false,
             type: '',
-			typeOptions: [{ label: '党建一楼', value: 'PARTY_ONE' },
-			{ label: '党建二楼', value: 'PARTY_TWO' },
-			{ label: '党建三楼', value: 'PARTY_THREE' },
-            { label: '元宇宙', value: 'METAVERSE' }
-		],
-			formData: {},
-			rules: {
-				name: [
-					{
-						required: true,
-						message: '请输入名称',
-						trigger: 'blur'
-					}
-				],
-				type: [
-                    { 
-                        required: true, 
+            typeOptions: [
+                { label: '党建一楼', value: 'PARTY_ONE' },
+                { label: '党建二楼', value: 'PARTY_TWO' },
+                { label: '党建三楼', value: 'PARTY_THREE' },
+                { label: '元宇宙', value: 'METAVERSE' },
+                { label: '选课', value: 'COURSE' }
+            ],
+            typeOptionsExceptMeta: [
+                { label: '党建一楼', value: 'PARTY_ONE' },
+                { label: '党建二楼', value: 'PARTY_TWO' },
+                { label: '党建三楼', value: 'PARTY_THREE' },
+                { label: '选课', value: 'COURSE' }
+            ],
+            formData: {},
+            rules: {
+                name: [
+                    {
+                        required: true,
+                        message: '请输入名称',
+                        trigger: 'blur'
+                    }
+                ],
+                type: [
+                    {
+                        required: true,
                         message: '请选择类型',
                         trigger: 'blur'
-                     }
+                    }
                 ],
-				value: [
-					{
-						required: true,
-						message: '请上传文件',
-						trigger: 'blur'
-					}
-				]
-			}
-		};
-	},
-	methods: {
-		onSave() {
-			this.$refs.form.validate(valid => {
-				if (valid) {
-					this.submit();
-				} else {
-					return false;
-				}
-			});
-		},
-		submit() {
-			let data = { ...this.formData };
+                value: [
+                    {
+                        required: true,
+                        message: '请上传文件',
+                        trigger: 'blur'
+                    }
+                ]
+            }
+        };
+    },
+    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('/metaResources/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(`/metaResources/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 || '删除失败');
-					}
-				});
-		}
-	}
+            this.saving = true;
+            this.$http
+                .post('/metaResources/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(`/metaResources/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>

+ 25 - 8
src/main/vue/src/views/MetaResourcesList.vue

@@ -22,12 +22,22 @@
         </page-title>
         <div class="filters-container">
             <el-select v-model="type" clearable placeholder="请选择类型" @change="getData">
-                <el-option
-                    v-for="item in typeOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value"
-                ></el-option>
+                <template v-if="$store.state.userInfo.id === '8266668'">
+                    <el-option
+                        v-for="item in typeOptionsExceptMeta"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                    ></el-option>
+                </template>
+                <template v-if="$store.state.userInfo.id != '8266668'">
+                    <el-option
+                        v-for="item in typeOptions"
+                        :key="item.value"
+                        :label="item.label"
+                        :value="item.value"
+                    ></el-option>
+                </template>
             </el-select>
             <el-input
                 placeholder="搜索..."
@@ -86,14 +96,21 @@ export default {
     mixins: [pageableTable],
     data() {
         return {
-            type: '',
+            type: 'PARTY_ONE',
             multipleMode: false,
             search: '',
             typeOptions: [
                 { label: '党建一楼', value: 'PARTY_ONE' },
                 { label: '党建二楼', value: 'PARTY_TWO' },
                 { label: '党建三楼', value: 'PARTY_THREE' },
-                { label: '元宇宙', value: 'METAVERSE' }
+                { label: '元宇宙', value: 'METAVERSE' },
+                { label: '选课', value: 'COURSE' }
+            ],
+            typeOptionsExceptMeta: [
+                { label: '党建一楼', value: 'PARTY_ONE' },
+                { label: '党建二楼', value: 'PARTY_TWO' },
+                { label: '党建三楼', value: 'PARTY_THREE' },
+                { label: '选课', value: 'COURSE' }
             ],
             url: '/metaResources/all',
             downloading: false

+ 1 - 0
src/main/vue/src/widgets/Detail.vue

@@ -40,6 +40,7 @@
                     <el-table-column align="center" prop="domainOrderMonth" label="本月域名"> </el-table-column>
                     <el-table-column align="center" prop="domainCount" label="域名注册"> </el-table-column>
                     <el-table-column align="center" prop="countMonth" label="本月注册"> </el-table-column>
+                    <el-table-column align="center" prop="ask" label="叫价"> </el-table-column>
                 </el-table>
             </div>
             <canvas ref="chart" class="chart"></canvas>