Переглянути джерело

市场大盘日和系统管理的类目管理和品牌管理

wx_zhangxiaocui 3 місяців тому
батько
коміт
5494aad29e

+ 104 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/MarketStockController.java

@@ -0,0 +1,104 @@
+package com.ruoyi.system.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.MarketStock;
+import com.ruoyi.system.service.IMarketStockService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.common.core.page.TableDataInfo;
+
+/**
+ * 市场大盘(日)Controller
+ * 
+ * @author ruoyi
+ * @date 2024-08-20
+ */
+@RestController
+@RequestMapping("/market/daily")
+public class MarketStockController extends BaseController
+{
+    @Autowired
+    private IMarketStockService marketStockService;
+
+    /**
+     * 查询市场大盘(日)列表
+     */
+    @PreAuthorize("@ss.hasPermi('market:daily:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(MarketStock marketStock)
+    {
+        startPage();
+        List<MarketStock> list = marketStockService.selectMarketStockList(marketStock);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出市场大盘(日)列表
+     */
+    @PreAuthorize("@ss.hasPermi('market:daily:export')")
+    @Log(title = "市场大盘(日)", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, MarketStock marketStock)
+    {
+        List<MarketStock> list = marketStockService.selectMarketStockList(marketStock);
+        ExcelUtil<MarketStock> util = new ExcelUtil<MarketStock>(MarketStock.class);
+        util.exportExcel(response, list, "市场大盘(日)数据");
+    }
+
+    /**
+     * 获取市场大盘(日)详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('market:daily:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Integer id)
+    {
+        return AjaxResult.success(marketStockService.selectMarketStockById(id));
+    }
+
+    /**
+     * 新增市场大盘(日)
+     */
+    @PreAuthorize("@ss.hasPermi('market:daily:add')")
+    @Log(title = "市场大盘(日)", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody MarketStock marketStock)
+    {
+        return toAjax(marketStockService.insertMarketStock(marketStock));
+    }
+
+    /**
+     * 修改市场大盘(日)
+     */
+    @PreAuthorize("@ss.hasPermi('market:daily:edit')")
+    @Log(title = "市场大盘(日)", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody MarketStock marketStock)
+    {
+        return toAjax(marketStockService.updateMarketStock(marketStock));
+    }
+
+    /**
+     * 删除市场大盘(日)
+     */
+    @PreAuthorize("@ss.hasPermi('market:daily:remove')")
+    @Log(title = "市场大盘(日)", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Integer[] ids)
+    {
+        return toAjax(marketStockService.deleteMarketStockByIds(ids));
+    }
+}

+ 102 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCategoryController.java

@@ -0,0 +1,102 @@
+package com.ruoyi.system.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.controller.BaseController;
+import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.domain.SysCategory;
+import com.ruoyi.system.service.ISysCategoryService;
+import com.ruoyi.common.utils.poi.ExcelUtil;
+
+/**
+ * 类别Controller
+ * 
+ * @author ruoyi
+ * @date 2024-08-22
+ */
+@RestController
+@RequestMapping("/system/category")
+public class SysCategoryController extends BaseController
+{
+    @Autowired
+    private ISysCategoryService sysCategoryService;
+
+    /**
+     * 查询类别列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:category:list')")
+    @GetMapping("/list")
+    public AjaxResult list(SysCategory sysCategory)
+    {
+        List<SysCategory> list = sysCategoryService.selectSysCategoryList(sysCategory);
+        return AjaxResult.success(list);
+    }
+
+    /**
+     * 导出类别列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:category:export')")
+    @Log(title = "类别", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, SysCategory sysCategory)
+    {
+        List<SysCategory> list = sysCategoryService.selectSysCategoryList(sysCategory);
+        ExcelUtil<SysCategory> util = new ExcelUtil<SysCategory>(SysCategory.class);
+        util.exportExcel(response, list, "类别数据");
+    }
+
+    /**
+     * 获取类别详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:category:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return AjaxResult.success(sysCategoryService.selectSysCategoryById(id));
+    }
+
+    /**
+     * 新增类别
+     */
+    @PreAuthorize("@ss.hasPermi('system:category:add')")
+    @Log(title = "类别", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody SysCategory sysCategory)
+    {
+        return toAjax(sysCategoryService.insertSysCategory(sysCategory));
+    }
+
+    /**
+     * 修改类别
+     */
+    @PreAuthorize("@ss.hasPermi('system:category:edit')")
+    @Log(title = "类别", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody SysCategory sysCategory)
+    {
+        return toAjax(sysCategoryService.updateSysCategory(sysCategory));
+    }
+
+    /**
+     * 删除类别
+     */
+    @PreAuthorize("@ss.hasPermi('system:category:remove')")
+    @Log(title = "类别", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids)
+    {
+        return toAjax(sysCategoryService.deleteSysCategoryByIds(ids));
+    }
+}

+ 233 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/MarketStock.java

@@ -0,0 +1,233 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.BaseEntity;
+
+/**
+ * 市场大盘(日)对象 market_stock
+ * 
+ * @author ruoyi
+ * @date 2024-08-20
+ */
+public class MarketStock extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 渠道 */
+    @Excel(name = "渠道")
+    private String channel;
+
+    /** 父类目 */
+    @Excel(name = "父类目")
+    private String parentCategory;
+
+    /** 子类目 */
+    @Excel(name = "子类目")
+    private String sonCategory;
+
+    /** 时间范围 */
+    @Excel(name = "时间范围")
+    private String time;
+
+    /** 支付金额 */
+    @Excel(name = "支付金额")
+    private String amount;
+
+    /** 搜索热度 */
+    @Excel(name = "搜索热度")
+    private String searchHeat;
+
+    /** 搜索人气 */
+    @Excel(name = "搜索人气")
+    private String searchPopularity;
+
+    /** 加购人气 */
+    @Excel(name = "加购人气")
+    private String purchasePopularity;
+
+    /** 加购热度 */
+    @Excel(name = "加购热度")
+    private String purchaseHeat;
+
+    /** 收藏热度 */
+    @Excel(name = "收藏热度")
+    private String collectionHeat;
+
+    /** 浏览热度 */
+    @Excel(name = "浏览热度")
+    private String browsingHeat;
+
+    /** 访问人气 */
+    @Excel(name = "访问人气")
+    private String visitorPopularity;
+
+    /** 收藏人气 */
+    @Excel(name = "收藏人气")
+    private String collectionPopularity;
+
+    /** 客群指数 */
+    @Excel(name = "客群指数")
+    private String customerBaseIndex;
+
+    /** ID */
+    private Integer id;
+
+    public void setChannel(String channel) 
+    {
+        this.channel = channel;
+    }
+
+    public String getChannel() 
+    {
+        return channel;
+    }
+    public void setParentCategory(String parentCategory) 
+    {
+        this.parentCategory = parentCategory;
+    }
+
+    public String getParentCategory() 
+    {
+        return parentCategory;
+    }
+    public void setSonCategory(String sonCategory) 
+    {
+        this.sonCategory = sonCategory;
+    }
+
+    public String getSonCategory() 
+    {
+        return sonCategory;
+    }
+    public void setTime(String time) 
+    {
+        this.time = time;
+    }
+
+    public String getTime() 
+    {
+        return time;
+    }
+    public void setAmount(String amount) 
+    {
+        this.amount = amount;
+    }
+
+    public String getAmount() 
+    {
+        return amount;
+    }
+    public void setSearchHeat(String searchHeat) 
+    {
+        this.searchHeat = searchHeat;
+    }
+
+    public String getSearchHeat() 
+    {
+        return searchHeat;
+    }
+    public void setSearchPopularity(String searchPopularity) 
+    {
+        this.searchPopularity = searchPopularity;
+    }
+
+    public String getSearchPopularity() 
+    {
+        return searchPopularity;
+    }
+    public void setPurchasePopularity(String purchasePopularity) 
+    {
+        this.purchasePopularity = purchasePopularity;
+    }
+
+    public String getPurchasePopularity() 
+    {
+        return purchasePopularity;
+    }
+    public void setPurchaseHeat(String purchaseHeat) 
+    {
+        this.purchaseHeat = purchaseHeat;
+    }
+
+    public String getPurchaseHeat() 
+    {
+        return purchaseHeat;
+    }
+    public void setCollectionHeat(String collectionHeat) 
+    {
+        this.collectionHeat = collectionHeat;
+    }
+
+    public String getCollectionHeat() 
+    {
+        return collectionHeat;
+    }
+    public void setBrowsingHeat(String browsingHeat) 
+    {
+        this.browsingHeat = browsingHeat;
+    }
+
+    public String getBrowsingHeat() 
+    {
+        return browsingHeat;
+    }
+    public void setVisitorPopularity(String visitorPopularity) 
+    {
+        this.visitorPopularity = visitorPopularity;
+    }
+
+    public String getVisitorPopularity() 
+    {
+        return visitorPopularity;
+    }
+    public void setCollectionPopularity(String collectionPopularity) 
+    {
+        this.collectionPopularity = collectionPopularity;
+    }
+
+    public String getCollectionPopularity() 
+    {
+        return collectionPopularity;
+    }
+    public void setCustomerBaseIndex(String customerBaseIndex) 
+    {
+        this.customerBaseIndex = customerBaseIndex;
+    }
+
+    public String getCustomerBaseIndex() 
+    {
+        return customerBaseIndex;
+    }
+    public void setId(Integer id) 
+    {
+        this.id = id;
+    }
+
+    public Integer getId() 
+    {
+        return id;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("channel", getChannel())
+            .append("parentCategory", getParentCategory())
+            .append("sonCategory", getSonCategory())
+            .append("time", getTime())
+            .append("amount", getAmount())
+            .append("searchHeat", getSearchHeat())
+            .append("searchPopularity", getSearchPopularity())
+            .append("purchasePopularity", getPurchasePopularity())
+            .append("purchaseHeat", getPurchaseHeat())
+            .append("collectionHeat", getCollectionHeat())
+            .append("browsingHeat", getBrowsingHeat())
+            .append("visitorPopularity", getVisitorPopularity())
+            .append("collectionPopularity", getCollectionPopularity())
+            .append("customerBaseIndex", getCustomerBaseIndex())
+            .append("id", getId())
+            .toString();
+    }
+}

+ 72 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/domain/SysCategory.java

@@ -0,0 +1,72 @@
+package com.ruoyi.system.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.ruoyi.common.annotation.Excel;
+import com.ruoyi.common.core.domain.TreeEntity;
+
+/**
+ * 类别对象 sys_category
+ * 
+ * @author ruoyi
+ * @date 2024-08-22
+ */
+public class SysCategory extends TreeEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    private Long id;
+
+    /** 名称 */
+    @Excel(name = "名称")
+    private String categoryName;
+
+    /** 状态(0正常,1不正常) */
+    @Excel(name = "状态", readConverterExp = "0=正常,1不正常")
+    private String status;
+
+    public void setId(Long id) 
+    {
+        this.id = id;
+    }
+
+    public Long getId() 
+    {
+        return id;
+    }
+    public void setCategoryName(String categoryName) 
+    {
+        this.categoryName = categoryName;
+    }
+
+    public String getCategoryName() 
+    {
+        return categoryName;
+    }
+    public void setStatus(String status) 
+    {
+        this.status = status;
+    }
+
+    public String getStatus() 
+    {
+        return status;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("categoryName", getCategoryName())
+            .append("parentId", getParentId())
+            .append("orderNum", getOrderNum())
+            .append("status", getStatus())
+            .append("createBy", getCreateBy())
+            .append("createTime", getCreateTime())
+            .append("updateBy", getUpdateBy())
+            .append("updateTime", getUpdateTime())
+            .append("remark", getRemark())
+            .toString();
+    }
+}

+ 61 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/MarketStockMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.MarketStock;
+
+/**
+ * 市场大盘(日)Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-20
+ */
+public interface MarketStockMapper 
+{
+    /**
+     * 查询市场大盘(日)
+     * 
+     * @param id 市场大盘(日)主键
+     * @return 市场大盘(日)
+     */
+    public MarketStock selectMarketStockById(Integer id);
+
+    /**
+     * 查询市场大盘(日)列表
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 市场大盘(日)集合
+     */
+    public List<MarketStock> selectMarketStockList(MarketStock marketStock);
+
+    /**
+     * 新增市场大盘(日)
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 结果
+     */
+    public int insertMarketStock(MarketStock marketStock);
+
+    /**
+     * 修改市场大盘(日)
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 结果
+     */
+    public int updateMarketStock(MarketStock marketStock);
+
+    /**
+     * 删除市场大盘(日)
+     * 
+     * @param id 市场大盘(日)主键
+     * @return 结果
+     */
+    public int deleteMarketStockById(Integer id);
+
+    /**
+     * 批量删除市场大盘(日)
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteMarketStockByIds(Integer[] ids);
+}

+ 61 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/mapper/SysCategoryMapper.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.mapper;
+
+import java.util.List;
+import com.ruoyi.system.domain.SysCategory;
+
+/**
+ * 类别Mapper接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-22
+ */
+public interface SysCategoryMapper 
+{
+    /**
+     * 查询类别
+     * 
+     * @param id 类别主键
+     * @return 类别
+     */
+    public SysCategory selectSysCategoryById(Long id);
+
+    /**
+     * 查询类别列表
+     * 
+     * @param sysCategory 类别
+     * @return 类别集合
+     */
+    public List<SysCategory> selectSysCategoryList(SysCategory sysCategory);
+
+    /**
+     * 新增类别
+     * 
+     * @param sysCategory 类别
+     * @return 结果
+     */
+    public int insertSysCategory(SysCategory sysCategory);
+
+    /**
+     * 修改类别
+     * 
+     * @param sysCategory 类别
+     * @return 结果
+     */
+    public int updateSysCategory(SysCategory sysCategory);
+
+    /**
+     * 删除类别
+     * 
+     * @param id 类别主键
+     * @return 结果
+     */
+    public int deleteSysCategoryById(Long id);
+
+    /**
+     * 批量删除类别
+     * 
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteSysCategoryByIds(Long[] ids);
+}

+ 61 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/IMarketStockService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.MarketStock;
+
+/**
+ * 市场大盘(日)Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-20
+ */
+public interface IMarketStockService 
+{
+    /**
+     * 查询市场大盘(日)
+     * 
+     * @param id 市场大盘(日)主键
+     * @return 市场大盘(日)
+     */
+    public MarketStock selectMarketStockById(Integer id);
+
+    /**
+     * 查询市场大盘(日)列表
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 市场大盘(日)集合
+     */
+    public List<MarketStock> selectMarketStockList(MarketStock marketStock);
+
+    /**
+     * 新增市场大盘(日)
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 结果
+     */
+    public int insertMarketStock(MarketStock marketStock);
+
+    /**
+     * 修改市场大盘(日)
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 结果
+     */
+    public int updateMarketStock(MarketStock marketStock);
+
+    /**
+     * 批量删除市场大盘(日)
+     * 
+     * @param ids 需要删除的市场大盘(日)主键集合
+     * @return 结果
+     */
+    public int deleteMarketStockByIds(Integer[] ids);
+
+    /**
+     * 删除市场大盘(日)信息
+     * 
+     * @param id 市场大盘(日)主键
+     * @return 结果
+     */
+    public int deleteMarketStockById(Integer id);
+}

+ 61 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCategoryService.java

@@ -0,0 +1,61 @@
+package com.ruoyi.system.service;
+
+import java.util.List;
+import com.ruoyi.system.domain.SysCategory;
+
+/**
+ * 类别Service接口
+ * 
+ * @author ruoyi
+ * @date 2024-08-22
+ */
+public interface ISysCategoryService 
+{
+    /**
+     * 查询类别
+     * 
+     * @param id 类别主键
+     * @return 类别
+     */
+    public SysCategory selectSysCategoryById(Long id);
+
+    /**
+     * 查询类别列表
+     * 
+     * @param sysCategory 类别
+     * @return 类别集合
+     */
+    public List<SysCategory> selectSysCategoryList(SysCategory sysCategory);
+
+    /**
+     * 新增类别
+     * 
+     * @param sysCategory 类别
+     * @return 结果
+     */
+    public int insertSysCategory(SysCategory sysCategory);
+
+    /**
+     * 修改类别
+     * 
+     * @param sysCategory 类别
+     * @return 结果
+     */
+    public int updateSysCategory(SysCategory sysCategory);
+
+    /**
+     * 批量删除类别
+     * 
+     * @param ids 需要删除的类别主键集合
+     * @return 结果
+     */
+    public int deleteSysCategoryByIds(Long[] ids);
+
+    /**
+     * 删除类别信息
+     * 
+     * @param id 类别主键
+     * @return 结果
+     */
+    public int deleteSysCategoryById(Long id);
+}

+ 93 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/MarketStockServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.MarketStockMapper;
+import com.ruoyi.system.domain.MarketStock;
+import com.ruoyi.system.service.IMarketStockService;
+
+/**
+ * 市场大盘(日)Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-08-20
+ */
+@Service
+public class MarketStockServiceImpl implements IMarketStockService 
+{
+    @Autowired
+    private MarketStockMapper marketStockMapper;
+
+    /**
+     * 查询市场大盘(日)
+     * 
+     * @param id 市场大盘(日)主键
+     * @return 市场大盘(日)
+     */
+    @Override
+    public MarketStock selectMarketStockById(Integer id)
+    {
+        return marketStockMapper.selectMarketStockById(id);
+    }
+
+    /**
+     * 查询市场大盘(日)列表
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 市场大盘(日)
+     */
+    @Override
+    public List<MarketStock> selectMarketStockList(MarketStock marketStock)
+    {
+        return marketStockMapper.selectMarketStockList(marketStock);
+    }
+
+    /**
+     * 新增市场大盘(日)
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 结果
+     */
+    @Override
+    public int insertMarketStock(MarketStock marketStock)
+    {
+        return marketStockMapper.insertMarketStock(marketStock);
+    }
+
+    /**
+     * 修改市场大盘(日)
+     * 
+     * @param marketStock 市场大盘(日)
+     * @return 结果
+     */
+    @Override
+    public int updateMarketStock(MarketStock marketStock)
+    {
+        return marketStockMapper.updateMarketStock(marketStock);
+    }
+
+    /**
+     * 批量删除市场大盘(日)
+     * 
+     * @param ids 需要删除的市场大盘(日)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMarketStockByIds(Integer[] ids)
+    {
+        return marketStockMapper.deleteMarketStockByIds(ids);
+    }
+
+    /**
+     * 删除市场大盘(日)信息
+     * 
+     * @param id 市场大盘(日)主键
+     * @return 结果
+     */
+    @Override
+    public int deleteMarketStockById(Integer id)
+    {
+        return marketStockMapper.deleteMarketStockById(id);
+    }
+}

+ 96 - 0
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCategoryServiceImpl.java

@@ -0,0 +1,96 @@
+package com.ruoyi.system.service.impl;
+
+import java.util.List;
+import com.ruoyi.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.ruoyi.system.mapper.SysCategoryMapper;
+import com.ruoyi.system.domain.SysCategory;
+import com.ruoyi.system.service.ISysCategoryService;
+
+/**
+ * 类别Service业务层处理
+ * 
+ * @author ruoyi
+ * @date 2024-08-22
+ */
+@Service
+public class SysCategoryServiceImpl implements ISysCategoryService 
+{
+    @Autowired
+    private SysCategoryMapper sysCategoryMapper;
+
+    /**
+     * 查询类别
+     * 
+     * @param id 类别主键
+     * @return 类别
+     */
+    @Override
+    public SysCategory selectSysCategoryById(Long id)
+    {
+        return sysCategoryMapper.selectSysCategoryById(id);
+    }
+
+    /**
+     * 查询类别列表
+     * 
+     * @param sysCategory 类别
+     * @return 类别
+     */
+    @Override
+    public List<SysCategory> selectSysCategoryList(SysCategory sysCategory)
+    {
+        return sysCategoryMapper.selectSysCategoryList(sysCategory);
+    }
+
+    /**
+     * 新增类别
+     * 
+     * @param sysCategory 类别
+     * @return 结果
+     */
+    @Override
+    public int insertSysCategory(SysCategory sysCategory)
+    {
+        sysCategory.setCreateTime(DateUtils.getNowDate());
+        return sysCategoryMapper.insertSysCategory(sysCategory);
+    }
+
+    /**
+     * 修改类别
+     * 
+     * @param sysCategory 类别
+     * @return 结果
+     */
+    @Override
+    public int updateSysCategory(SysCategory sysCategory)
+    {
+        sysCategory.setUpdateTime(DateUtils.getNowDate());
+        return sysCategoryMapper.updateSysCategory(sysCategory);
+    }
+
+    /**
+     * 批量删除类别
+     * 
+     * @param ids 需要删除的类别主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysCategoryByIds(Long[] ids)
+    {
+        return sysCategoryMapper.deleteSysCategoryByIds(ids);
+    }
+
+    /**
+     * 删除类别信息
+     * 
+     * @param id 类别主键
+     * @return 结果
+     */
+    @Override
+    public int deleteSysCategoryById(Long id)
+    {
+        return sysCategoryMapper.deleteSysCategoryById(id);
+    }
+}

+ 111 - 0
ruoyi-admin/src/main/resources/mapper/market/MarketStockMapper.xml

@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.MarketStockMapper">
+    
+    <resultMap type="MarketStock" id="MarketStockResult">
+        <result property="channel"    column="channel"    />
+        <result property="parentCategory"    column="parent_category"    />
+        <result property="sonCategory"    column="son_category"    />
+        <result property="time"    column="time"    />
+        <result property="amount"    column="amount"    />
+        <result property="searchHeat"    column="search_heat"    />
+        <result property="searchPopularity"    column="search_popularity"    />
+        <result property="purchasePopularity"    column="purchase_popularity"    />
+        <result property="purchaseHeat"    column="purchase_heat"    />
+        <result property="collectionHeat"    column="collection_heat"    />
+        <result property="browsingHeat"    column="browsing_heat"    />
+        <result property="visitorPopularity"    column="visitor_popularity"    />
+        <result property="collectionPopularity"    column="collection_popularity"    />
+        <result property="customerBaseIndex"    column="customer_base_index"    />
+        <result property="id"    column="ID"    />
+    </resultMap>
+
+    <sql id="selectMarketStockVo">
+        select channel, parent_category, son_category, time, amount, search_heat, search_popularity, purchase_popularity, purchase_heat, collection_heat, browsing_heat, visitor_popularity, collection_popularity, customer_base_index, ID from market_stock
+    </sql>
+
+    <select id="selectMarketStockList" parameterType="MarketStock" resultMap="MarketStockResult">
+        <include refid="selectMarketStockVo"/>
+        <where>  
+            <if test="channel != null  and channel != ''"> and channel = #{channel}</if>
+            <if test="parentCategory != null  and parentCategory != ''"> and parent_category = #{parentCategory}</if>
+            <if test="sonCategory != null  and sonCategory != ''"> and son_category = #{sonCategory}</if>
+            <if test="time != null  and time != ''"> and time = #{time}</if>
+        </where>
+    </select>
+    
+    <select id="selectMarketStockById" parameterType="Integer" resultMap="MarketStockResult">
+        <include refid="selectMarketStockVo"/>
+        where ID = #{id}
+    </select>
+        
+    <insert id="insertMarketStock" parameterType="MarketStock" useGeneratedKeys="true" keyProperty="id">
+        insert into market_stock
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="channel != null">channel,</if>
+            <if test="parentCategory != null">parent_category,</if>
+            <if test="sonCategory != null">son_category,</if>
+            <if test="time != null">time,</if>
+            <if test="amount != null">amount,</if>
+            <if test="searchHeat != null">search_heat,</if>
+            <if test="searchPopularity != null">search_popularity,</if>
+            <if test="purchasePopularity != null">purchase_popularity,</if>
+            <if test="purchaseHeat != null">purchase_heat,</if>
+            <if test="collectionHeat != null">collection_heat,</if>
+            <if test="browsingHeat != null">browsing_heat,</if>
+            <if test="visitorPopularity != null">visitor_popularity,</if>
+            <if test="collectionPopularity != null">collection_popularity,</if>
+            <if test="customerBaseIndex != null">customer_base_index,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="channel != null">#{channel},</if>
+            <if test="parentCategory != null">#{parentCategory},</if>
+            <if test="sonCategory != null">#{sonCategory},</if>
+            <if test="time != null">#{time},</if>
+            <if test="amount != null">#{amount},</if>
+            <if test="searchHeat != null">#{searchHeat},</if>
+            <if test="searchPopularity != null">#{searchPopularity},</if>
+            <if test="purchasePopularity != null">#{purchasePopularity},</if>
+            <if test="purchaseHeat != null">#{purchaseHeat},</if>
+            <if test="collectionHeat != null">#{collectionHeat},</if>
+            <if test="browsingHeat != null">#{browsingHeat},</if>
+            <if test="visitorPopularity != null">#{visitorPopularity},</if>
+            <if test="collectionPopularity != null">#{collectionPopularity},</if>
+            <if test="customerBaseIndex != null">#{customerBaseIndex},</if>
+         </trim>
+    </insert>
+
+    <update id="updateMarketStock" parameterType="MarketStock">
+        update market_stock
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="channel != null">channel = #{channel},</if>
+            <if test="parentCategory != null">parent_category = #{parentCategory},</if>
+            <if test="sonCategory != null">son_category = #{sonCategory},</if>
+            <if test="time != null">time = #{time},</if>
+            <if test="amount != null">amount = #{amount},</if>
+            <if test="searchHeat != null">search_heat = #{searchHeat},</if>
+            <if test="searchPopularity != null">search_popularity = #{searchPopularity},</if>
+            <if test="purchasePopularity != null">purchase_popularity = #{purchasePopularity},</if>
+            <if test="purchaseHeat != null">purchase_heat = #{purchaseHeat},</if>
+            <if test="collectionHeat != null">collection_heat = #{collectionHeat},</if>
+            <if test="browsingHeat != null">browsing_heat = #{browsingHeat},</if>
+            <if test="visitorPopularity != null">visitor_popularity = #{visitorPopularity},</if>
+            <if test="collectionPopularity != null">collection_popularity = #{collectionPopularity},</if>
+            <if test="customerBaseIndex != null">customer_base_index = #{customerBaseIndex},</if>
+        </trim>
+        where ID = #{id}
+    </update>
+
+    <delete id="deleteMarketStockById" parameterType="Integer">
+        delete from market_stock where ID = #{id}
+    </delete>
+
+    <delete id="deleteMarketStockByIds" parameterType="String">
+        delete from market_stock where ID in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 90 - 0
ruoyi-admin/src/main/resources/mapper/system/SysCategoryMapper.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruoyi.system.mapper.SysCategoryMapper">
+    
+    <resultMap type="SysCategory" id="SysCategoryResult">
+        <result property="id"    column="id"    />
+        <result property="categoryName"    column="category_name"    />
+        <result property="parentId"    column="parent_id"    />
+        <result property="orderNum"    column="order_num"    />
+        <result property="status"    column="status"    />
+        <result property="createBy"    column="create_by"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateBy"    column="update_by"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="remark"    column="remark"    />
+    </resultMap>
+
+    <sql id="selectSysCategoryVo">
+        select id, category_name, parent_id, order_num, status, create_by, create_time, update_by, update_time, remark from sys_category
+    </sql>
+
+    <select id="selectSysCategoryList" parameterType="SysCategory" resultMap="SysCategoryResult">
+        <include refid="selectSysCategoryVo"/>
+        <where>  
+            <if test="categoryName != null  and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
+        </where>
+    </select>
+    
+    <select id="selectSysCategoryById" parameterType="Long" resultMap="SysCategoryResult">
+        <include refid="selectSysCategoryVo"/>
+        where id = #{id}
+    </select>
+        
+    <insert id="insertSysCategory" parameterType="SysCategory">
+        insert into sys_category
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="categoryName != null and categoryName != ''">category_name,</if>
+            <if test="parentId != null">parent_id,</if>
+            <if test="orderNum != null">order_num,</if>
+            <if test="status != null">status,</if>
+            <if test="createBy != null">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="remark != null">remark,</if>
+         </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="categoryName != null and categoryName != ''">#{categoryName},</if>
+            <if test="parentId != null">#{parentId},</if>
+            <if test="orderNum != null">#{orderNum},</if>
+            <if test="status != null">#{status},</if>
+            <if test="createBy != null">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="remark != null">#{remark},</if>
+         </trim>
+    </insert>
+
+    <update id="updateSysCategory" parameterType="SysCategory">
+        update sys_category
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="categoryName != null and categoryName != ''">category_name = #{categoryName},</if>
+            <if test="parentId != null">parent_id = #{parentId},</if>
+            <if test="orderNum != null">order_num = #{orderNum},</if>
+            <if test="status != null">status = #{status},</if>
+            <if test="createBy != null">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="remark != null">remark = #{remark},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteSysCategoryById" parameterType="Long">
+        delete from sys_category where id = #{id}
+    </delete>
+
+    <delete id="deleteSysCategoryByIds" parameterType="String">
+        delete from sys_category where id in 
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 44 - 0
ruoyi-ui/src/api/market/daily.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询市场大盘(日)列表
+export function listDaily(query) {
+  return request({
+    url: '/market/daily/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询市场大盘(日)详细
+export function getDaily(id) {
+  return request({
+    url: '/market/daily/' + id,
+    method: 'get'
+  })
+}
+
+// 新增市场大盘(日)
+export function addDaily(data) {
+  return request({
+    url: '/market/daily',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改市场大盘(日)
+export function updateDaily(data) {
+  return request({
+    url: '/market/daily',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除市场大盘(日)
+export function delDaily(id) {
+  return request({
+    url: '/market/daily/' + id,
+    method: 'delete'
+  })
+}

+ 44 - 0
ruoyi-ui/src/api/system/category.js

@@ -0,0 +1,44 @@
+import request from '@/utils/request'
+
+// 查询类别列表
+export function listCategory(query) {
+  return request({
+    url: '/system/category/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询类别详细
+export function getCategory(id) {
+  return request({
+    url: '/system/category/' + id,
+    method: 'get'
+  })
+}
+
+// 新增类别
+export function addCategory(data) {
+  return request({
+    url: '/system/category',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改类别
+export function updateCategory(data) {
+  return request({
+    url: '/system/category',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除类别
+export function delCategory(id) {
+  return request({
+    url: '/system/category/' + id,
+    method: 'delete'
+  })
+}

+ 337 - 0
ruoyi-ui/src/views/market/daily/index.vue

@@ -0,0 +1,337 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="渠道" prop="channel">
+        <el-input
+          v-model="queryParams.channel"
+          placeholder="请输入渠道"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="父类目" prop="parentCategory">
+        <el-input
+          v-model="queryParams.parentCategory"
+          placeholder="请输入父类目"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="子类目" prop="sonCategory">
+        <el-input
+          v-model="queryParams.sonCategory"
+          placeholder="请输入子类目"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="时间范围" prop="time">
+        <el-input
+          v-model="queryParams.time"
+          placeholder="请输入时间范围"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['market:daily:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['market:daily:edit']"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['market:daily:remove']"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['market:daily:export']"
+        >导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="dailyList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column label="渠道" align="center" prop="channel" />
+      <el-table-column label="父类目" align="center" prop="parentCategory" />
+      <el-table-column label="子类目" align="center" prop="sonCategory" />
+      <el-table-column label="时间范围" align="center" prop="time" />
+      <el-table-column label="支付金额" align="center" prop="amount" />
+      <el-table-column label="搜索热度" align="center" prop="searchHeat" />
+      <el-table-column label="搜索人气" align="center" prop="searchPopularity" />
+      <el-table-column label="加购人气" align="center" prop="purchasePopularity" />
+      <el-table-column label="加购热度" align="center" prop="purchaseHeat" />
+      <el-table-column label="收藏热度" align="center" prop="collectionHeat" />
+      <el-table-column label="浏览热度" align="center" prop="browsingHeat" />
+      <el-table-column label="访问人气" align="center" prop="visitorPopularity" />
+      <el-table-column label="收藏人气" align="center" prop="collectionPopularity" />
+      <el-table-column label="客群指数" align="center" prop="customerBaseIndex" />
+      <el-table-column label="ID" align="center" prop="id" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['market:daily:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['market:daily:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+    
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改市场大盘(日)对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="渠道" prop="channel">
+          <el-input v-model="form.channel" placeholder="请输入渠道" />
+        </el-form-item>
+        <el-form-item label="父类目" prop="parentCategory">
+          <el-input v-model="form.parentCategory" placeholder="请输入父类目" />
+        </el-form-item>
+        <el-form-item label="子类目" prop="sonCategory">
+          <el-input v-model="form.sonCategory" placeholder="请输入子类目" />
+        </el-form-item>
+        <el-form-item label="时间范围" prop="time">
+          <el-input v-model="form.time" placeholder="请输入时间范围" />
+        </el-form-item>
+        <el-form-item label="支付金额" prop="amount">
+          <el-input v-model="form.amount" placeholder="请输入支付金额" />
+        </el-form-item>
+        <el-form-item label="搜索热度" prop="searchHeat">
+          <el-input v-model="form.searchHeat" placeholder="请输入搜索热度" />
+        </el-form-item>
+        <el-form-item label="搜索人气" prop="searchPopularity">
+          <el-input v-model="form.searchPopularity" placeholder="请输入搜索人气" />
+        </el-form-item>
+        <el-form-item label="加购人气" prop="purchasePopularity">
+          <el-input v-model="form.purchasePopularity" placeholder="请输入加购人气" />
+        </el-form-item>
+        <el-form-item label="加购热度" prop="purchaseHeat">
+          <el-input v-model="form.purchaseHeat" placeholder="请输入加购热度" />
+        </el-form-item>
+        <el-form-item label="收藏热度" prop="collectionHeat">
+          <el-input v-model="form.collectionHeat" placeholder="请输入收藏热度" />
+        </el-form-item>
+        <el-form-item label="浏览热度" prop="browsingHeat">
+          <el-input v-model="form.browsingHeat" placeholder="请输入浏览热度" />
+        </el-form-item>
+        <el-form-item label="访问人气" prop="visitorPopularity">
+          <el-input v-model="form.visitorPopularity" placeholder="请输入访问人气" />
+        </el-form-item>
+        <el-form-item label="收藏人气" prop="collectionPopularity">
+          <el-input v-model="form.collectionPopularity" placeholder="请输入收藏人气" />
+        </el-form-item>
+        <el-form-item label="客群指数" prop="customerBaseIndex">
+          <el-input v-model="form.customerBaseIndex" placeholder="请输入客群指数" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listDaily, getDaily, delDaily, addDaily, updateDaily } from "@/api/market/daily";
+
+export default {
+  name: "Daily",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 市场大盘(日)表格数据
+      dailyList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        channel: null,
+        parentCategory: null,
+        sonCategory: null,
+        time: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询市场大盘(日)列表 */
+    getList() {
+      this.loading = true;
+      listDaily(this.queryParams).then(response => {
+        this.dailyList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        channel: null,
+        parentCategory: null,
+        sonCategory: null,
+        time: null,
+        amount: null,
+        searchHeat: null,
+        searchPopularity: null,
+        purchasePopularity: null,
+        purchaseHeat: null,
+        collectionHeat: null,
+        browsingHeat: null,
+        visitorPopularity: null,
+        collectionPopularity: null,
+        customerBaseIndex: null,
+        id: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!==1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加市场大盘(日)";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id || this.ids
+      getDaily(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改市场大盘(日)";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateDaily(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addDaily(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除市场大盘(日)编号为"' + ids + '"的数据项?').then(function() {
+        return delDaily(ids);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('market/daily/export', {
+        ...this.queryParams
+      }, `daily_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>

+ 288 - 0
ruoyi-ui/src/views/system/category/index.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="名称" prop="categoryName">
+        <el-input
+          v-model="queryParams.categoryName"
+          placeholder="请输入名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+	    <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['system:category:add']"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-sort"
+          size="mini"
+          @click="toggleExpandAll"
+        >展开/折叠</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table
+      v-if="refreshTable"
+      v-loading="loading"
+      :data="categoryList"
+      row-key="id"
+      :default-expand-all="isExpandAll"
+      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
+    >
+      <el-table-column label="名称" prop="categoryName" />
+      <el-table-column label="父类目id" align="center" prop="parentId" />
+      <el-table-column label="排序" align="center" prop="orderNum" />
+      <el-table-column label="状态" align="center" prop="status">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.sys_show_hide" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['system:category:edit']"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-plus"
+            @click="handleAdd(scope.row)"
+            v-hasPermi="['system:category:add']"
+          >新增</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['system:category:remove']"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <!-- 添加或修改类别对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="名称" prop="categoryName">
+          <el-input v-model="form.categoryName" placeholder="请输入名称" />
+        </el-form-item>
+        <el-form-item label="父类目id" prop="parentId">
+          <treeselect v-model="form.parentId" :options="categoryOptions" :normalizer="normalizer" placeholder="请选择父类目id" />
+        </el-form-item>
+        <el-form-item label="排序" prop="orderNum">
+          <el-input v-model="form.orderNum" placeholder="请输入排序" />
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio
+              v-for="dict in dict.type.sys_show_hide"
+              :key="dict.value"
+:label="dict.value"
+            >{{dict.label}}</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "@/api/system/category";
+import Treeselect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
+export default {
+  name: "Category",
+  dicts: ['sys_show_hide'],
+  components: {
+    Treeselect
+  },
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 类别表格数据
+      categoryList: [],
+      // 类别树选项
+      categoryOptions: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 是否展开,默认全部展开
+      isExpandAll: true,
+      // 重新渲染表格状态
+      refreshTable: true,
+      // 查询参数
+      queryParams: {
+        categoryName: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        categoryName: [
+          { required: true, message: "名称不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询类别列表 */
+    getList() {
+      this.loading = true;
+      listCategory(this.queryParams).then(response => {
+        this.categoryList = this.handleTree(response.data, "id", "parentId");
+        this.loading = false;
+      });
+    },
+    /** 转换类别数据结构 */
+    normalizer(node) {
+      if (node.children && !node.children.length) {
+        delete node.children;
+      }
+      return {
+        id: node.id,
+        label: node.categoryName,
+        children: node.children
+      };
+    },
+	/** 查询类别下拉树结构 */
+    getTreeselect() {
+      listCategory().then(response => {
+        this.categoryOptions = [];
+        const data = { id: 0, categoryName: '顶级节点', children: [] };
+        data.children = this.handleTree(response.data, "id", "parentId");
+        this.categoryOptions.push(data);
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        categoryName: null,
+        parentId: null,
+        orderNum: null,
+        status: "0",
+
+        createBy: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 新增按钮操作 */
+    handleAdd(row) {
+      this.reset();
+      this.getTreeselect();
+      if (row != null && row.id) {
+        this.form.parentId = row.id;
+      } else {
+        this.form.parentId = 0;
+      }
+      this.open = true;
+      this.title = "添加类别";
+    },
+    /** 展开/折叠操作 */
+    toggleExpandAll() {
+      this.refreshTable = false;
+      this.isExpandAll = !this.isExpandAll;
+      this.$nextTick(() => {
+        this.refreshTable = true;
+      });
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      this.getTreeselect();
+      if (row != null) {
+        this.form.parentId = row.id;
+      }
+      getCategory(row.id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改类别";
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id != null) {
+            updateCategory(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addCategory(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      this.$modal.confirm('是否确认删除类别编号为"' + row.id + '"的数据项?').then(function() {
+        return delCategory(row.id);
+      }).then(() => {
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    }
+  }
+};
+</script>