yh
This commit is contained in:
@@ -0,0 +1,98 @@
|
|||||||
|
package com.ruoyi.web.controller.back;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.Product;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.system.service.IProductService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-10-27
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/back/product")
|
||||||
|
public class ProductController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IProductService productService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:product:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Product product)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Product> list = productService.selectProductList(product);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出商品列表
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:product:export')")
|
||||||
|
@Log(title = "商品", businessType = BusinessType.EXPORT)
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, Product product)
|
||||||
|
{
|
||||||
|
List<Product> list = productService.selectProductList(product);
|
||||||
|
ExcelUtil<Product> util = new ExcelUtil<Product>(Product.class);
|
||||||
|
util.exportExcel(response, list, "商品数据");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商品详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:product:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") String id)
|
||||||
|
{
|
||||||
|
return success(productService.selectProductById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:product:add')")
|
||||||
|
@Log(title = "商品", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult add(@RequestBody Product product)
|
||||||
|
{
|
||||||
|
return toAjax(productService.insertProduct(product));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:product:edit')")
|
||||||
|
@Log(title = "商品", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult edit(@RequestBody Product product)
|
||||||
|
{
|
||||||
|
return toAjax(productService.updateProduct(product));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:product:remove')")
|
||||||
|
@Log(title = "商品", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult remove(@PathVariable String[] ids)
|
||||||
|
{
|
||||||
|
return toAjax(productService.deleteProductByIds(ids));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
package com.ruoyi.web.controller.client;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.domain.entity.Product;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.system.service.IProductService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-10-27
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/client/product")
|
||||||
|
public class ClientProductController extends BaseController
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private IProductService productService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品列表
|
||||||
|
*/
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo list(Product product)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<Product> list = productService.selectProductList(product);
|
||||||
|
return getDataTableData(list);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,12 +4,10 @@ package com.ruoyi.web.controller.client;
|
|||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.MusicInfo;
|
import com.ruoyi.common.core.domain.entity.MusicInfo;
|
||||||
|
import com.ruoyi.common.core.domain.entity.Notifications;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.common.utils.SecurityUtils;
|
import com.ruoyi.common.utils.SecurityUtils;
|
||||||
import com.ruoyi.system.service.IBannerInfoService;
|
import com.ruoyi.system.service.*;
|
||||||
import com.ruoyi.system.service.ICategoryInfoService;
|
|
||||||
import com.ruoyi.system.service.IMusicInfoService;
|
|
||||||
import com.ruoyi.system.service.IRecommendInfoService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
@@ -32,6 +30,8 @@ public class IndexController extends BaseController {
|
|||||||
private IRecommendInfoService recommendInfoService;
|
private IRecommendInfoService recommendInfoService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IMusicInfoService musicService;
|
private IMusicInfoService musicService;
|
||||||
|
@Autowired
|
||||||
|
private INotificationsService notificationsService;
|
||||||
/**
|
/**
|
||||||
* @return com.ruoyi.common.core.domain.AjaxResult
|
* @return com.ruoyi.common.core.domain.AjaxResult
|
||||||
* 获取banner
|
* 获取banner
|
||||||
@@ -85,6 +85,11 @@ public class IndexController extends BaseController {
|
|||||||
return getDataTableData(list);
|
return getDataTableData(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取消息通知
|
||||||
|
@GetMapping("/notice")
|
||||||
|
public AjaxResult getNotice(){
|
||||||
|
Long userId = SecurityUtils.getUserId();
|
||||||
|
List<Notifications> result = notificationsService.selectNotificationsByUserId(userId);
|
||||||
|
return AjaxResult.success(result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,10 @@ ruoyi:
|
|||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
# 服务器的HTTP端口,默认为8080
|
# 服务器的HTTP端口,默认为8080
|
||||||
port: 8085
|
port: 8080
|
||||||
servlet:
|
servlet:
|
||||||
# 应用的访问路径
|
# 应用的访问路径
|
||||||
context-path: /dev-api
|
context-path: /
|
||||||
tomcat:
|
tomcat:
|
||||||
# tomcat的URI编码
|
# tomcat的URI编码
|
||||||
uri-encoding: UTF-8
|
uri-encoding: UTF-8
|
||||||
@@ -67,14 +67,21 @@ spring:
|
|||||||
enabled: true
|
enabled: true
|
||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
host: 116.204.124.80
|
||||||
host: 127.0.0.1
|
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6379
|
port: 16379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 0
|
database: 0
|
||||||
# 密码
|
# 密码
|
||||||
password:
|
password: Lwz19520416443@
|
||||||
|
# 地址
|
||||||
|
# host: 127.0.0.1
|
||||||
|
# # 端口,默认为6379
|
||||||
|
# port: 6379
|
||||||
|
# # 数据库索引
|
||||||
|
# database: 0
|
||||||
|
# # 密码
|
||||||
|
# password:
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
lettuce:
|
lettuce:
|
||||||
|
|||||||
@@ -0,0 +1,252 @@
|
|||||||
|
package com.ruoyi.common.core.domain.entity;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品对象 product
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-10-27
|
||||||
|
*/
|
||||||
|
public class Product extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 商品ID */
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
|
private Long productId;
|
||||||
|
|
||||||
|
/** 商品名称 */
|
||||||
|
@Excel(name = "商品名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/** 商品描述 */
|
||||||
|
@Excel(name = "商品描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/** 分类ID */
|
||||||
|
@Excel(name = "分类ID")
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
/** 商品类型:1-包月,2-包季,3-半年 */
|
||||||
|
@Excel(name = "商品类型:1-包月,2-包季,3-半年 ")
|
||||||
|
private Integer productType;
|
||||||
|
|
||||||
|
/** 状态:0-下架,1-上架 */
|
||||||
|
@Excel(name = "状态:0-下架,1-上架")
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/** 原价(普通商品使用) */
|
||||||
|
@Excel(name = "原价", readConverterExp = "普=通商品使用")
|
||||||
|
private BigDecimal originalPrice;
|
||||||
|
|
||||||
|
/** 现价(普通商品使用) */
|
||||||
|
@Excel(name = "现价", readConverterExp = "普=通商品使用")
|
||||||
|
private BigDecimal currentPrice;
|
||||||
|
|
||||||
|
/** 包月时长(天) */
|
||||||
|
@Excel(name = "包月时长", readConverterExp = "天=")
|
||||||
|
private Long monthlyDuration;
|
||||||
|
|
||||||
|
/** 包季时长(天) */
|
||||||
|
@Excel(name = "包季时长", readConverterExp = "天=")
|
||||||
|
private Long quarterlyDuration;
|
||||||
|
|
||||||
|
/** 库存数量 */
|
||||||
|
@Excel(name = "库存数量")
|
||||||
|
private Long stock;
|
||||||
|
|
||||||
|
/** 销量 */
|
||||||
|
@Excel(name = "销量")
|
||||||
|
private Long sales;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date createdAt;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
|
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
private Date updatedAt;
|
||||||
|
|
||||||
|
public void setId(String id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductId(Long productId)
|
||||||
|
{
|
||||||
|
this.productId = productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getProductId()
|
||||||
|
{
|
||||||
|
return productId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name)
|
||||||
|
{
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName()
|
||||||
|
{
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description)
|
||||||
|
{
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription()
|
||||||
|
{
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCategoryId(Long categoryId)
|
||||||
|
{
|
||||||
|
this.categoryId = categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getCategoryId()
|
||||||
|
{
|
||||||
|
return categoryId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProductType(Integer productType)
|
||||||
|
{
|
||||||
|
this.productType = productType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getProductType()
|
||||||
|
{
|
||||||
|
return productType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus(Integer status)
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOriginalPrice(BigDecimal originalPrice)
|
||||||
|
{
|
||||||
|
this.originalPrice = originalPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getOriginalPrice()
|
||||||
|
{
|
||||||
|
return originalPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrentPrice(BigDecimal currentPrice)
|
||||||
|
{
|
||||||
|
this.currentPrice = currentPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getCurrentPrice()
|
||||||
|
{
|
||||||
|
return currentPrice;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMonthlyDuration(Long monthlyDuration)
|
||||||
|
{
|
||||||
|
this.monthlyDuration = monthlyDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getMonthlyDuration()
|
||||||
|
{
|
||||||
|
return monthlyDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setQuarterlyDuration(Long quarterlyDuration)
|
||||||
|
{
|
||||||
|
this.quarterlyDuration = quarterlyDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getQuarterlyDuration()
|
||||||
|
{
|
||||||
|
return quarterlyDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStock(Long stock)
|
||||||
|
{
|
||||||
|
this.stock = stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getStock()
|
||||||
|
{
|
||||||
|
return stock;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setSales(Long sales)
|
||||||
|
{
|
||||||
|
this.sales = sales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getSales()
|
||||||
|
{
|
||||||
|
return sales;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCreatedAt(Date createdAt)
|
||||||
|
{
|
||||||
|
this.createdAt = createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getCreatedAt()
|
||||||
|
{
|
||||||
|
return createdAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUpdatedAt(Date updatedAt)
|
||||||
|
{
|
||||||
|
this.updatedAt = updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Date getUpdatedAt()
|
||||||
|
{
|
||||||
|
return updatedAt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("productId", getProductId())
|
||||||
|
.append("name", getName())
|
||||||
|
.append("description", getDescription())
|
||||||
|
.append("categoryId", getCategoryId())
|
||||||
|
.append("productType", getProductType())
|
||||||
|
.append("status", getStatus())
|
||||||
|
.append("originalPrice", getOriginalPrice())
|
||||||
|
.append("currentPrice", getCurrentPrice())
|
||||||
|
.append("monthlyDuration", getMonthlyDuration())
|
||||||
|
.append("quarterlyDuration", getQuarterlyDuration())
|
||||||
|
.append("stock", getStock())
|
||||||
|
.append("sales", getSales())
|
||||||
|
.append("createdAt", getCreatedAt())
|
||||||
|
.append("updatedAt", getUpdatedAt())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,7 +14,7 @@ public class ShopUser {
|
|||||||
* 1 账号密码 2 验证码 3 一键登录
|
* 1 账号密码 2 验证码 3 一键登录
|
||||||
*/
|
*/
|
||||||
private int method;
|
private int method;
|
||||||
@Getter
|
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
private String password;
|
private String password;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.entity.CategoryInfo;
|
import com.ruoyi.common.core.domain.entity.CategoryInfo;
|
||||||
import com.ruoyi.common.core.domain.entity.MusicInfo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.entity.MusicCollect;
|
import com.ruoyi.common.core.domain.entity.MusicCollect;
|
||||||
import com.ruoyi.common.core.domain.entity.UserCollect;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@@ -2,15 +2,13 @@ package com.ruoyi.system.mapper;
|
|||||||
|
|
||||||
import com.ruoyi.common.core.domain.entity.MusicSceneRelate;
|
import com.ruoyi.common.core.domain.entity.MusicSceneRelate;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Mapper接口
|
* 【请填写功能名称】Mapper接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-07-15
|
* @date 2025-07-15
|
||||||
*/
|
*/
|
||||||
public interface MusicSceneRelateMapper
|
public interface MusicSceneRelateMapper
|
||||||
{
|
{
|
||||||
|
|
||||||
int insertMusicSceneRelate(MusicSceneRelate musicSceneRelate);
|
int insertMusicSceneRelate(MusicSceneRelate musicSceneRelate);
|
||||||
|
|||||||
@@ -6,15 +6,15 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 【请填写功能名称】Mapper接口
|
* 【请填写功能名称】Mapper接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-08-23
|
* @date 2025-08-23
|
||||||
*/
|
*/
|
||||||
public interface NotificationsMapper
|
public interface NotificationsMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】
|
* 查询【请填写功能名称】
|
||||||
*
|
*
|
||||||
* @param id 【请填写功能名称】主键
|
* @param id 【请填写功能名称】主键
|
||||||
* @return 【请填写功能名称】
|
* @return 【请填写功能名称】
|
||||||
*/
|
*/
|
||||||
@@ -22,7 +22,7 @@ public interface NotificationsMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询【请填写功能名称】列表
|
* 查询【请填写功能名称】列表
|
||||||
*
|
*
|
||||||
* @param notifications 【请填写功能名称】
|
* @param notifications 【请填写功能名称】
|
||||||
* @return 【请填写功能名称】集合
|
* @return 【请填写功能名称】集合
|
||||||
*/
|
*/
|
||||||
@@ -30,7 +30,7 @@ public interface NotificationsMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增【请填写功能名称】
|
* 新增【请填写功能名称】
|
||||||
*
|
*
|
||||||
* @param notifications 【请填写功能名称】
|
* @param notifications 【请填写功能名称】
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -38,7 +38,7 @@ public interface NotificationsMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改【请填写功能名称】
|
* 修改【请填写功能名称】
|
||||||
*
|
*
|
||||||
* @param notifications 【请填写功能名称】
|
* @param notifications 【请填写功能名称】
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -46,7 +46,7 @@ public interface NotificationsMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除【请填写功能名称】
|
* 删除【请填写功能名称】
|
||||||
*
|
*
|
||||||
* @param id 【请填写功能名称】主键
|
* @param id 【请填写功能名称】主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -54,9 +54,11 @@ public interface NotificationsMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除【请填写功能名称】
|
* 批量删除【请填写功能名称】
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteNotificationsByIds(Long[] ids);
|
public int deleteNotificationsByIds(Long[] ids);
|
||||||
|
|
||||||
|
List<Notifications> selectNotificationsByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.Product;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-10-27
|
||||||
|
*/
|
||||||
|
public interface ProductMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询商品
|
||||||
|
*
|
||||||
|
* @param id 商品主键
|
||||||
|
* @return 商品
|
||||||
|
*/
|
||||||
|
public Product selectProductById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品列表
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 商品集合
|
||||||
|
*/
|
||||||
|
public List<Product> selectProductList(Product product);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertProduct(Product product);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateProduct(Product product);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品
|
||||||
|
*
|
||||||
|
* @param id 商品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商品
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductByIds(String[] ids);
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.entity.MusicRecommend;
|
|
||||||
import com.ruoyi.common.core.domain.entity.RecommendInfo;
|
import com.ruoyi.common.core.domain.entity.RecommendInfo;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
@@ -8,15 +7,15 @@ import java.util.List;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 推荐Mapper接口
|
* 推荐Mapper接口
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
* @date 2025-07-15
|
* @date 2025-07-15
|
||||||
*/
|
*/
|
||||||
public interface RecommendInfoMapper
|
public interface RecommendInfoMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询推荐
|
* 查询推荐
|
||||||
*
|
*
|
||||||
* @param id 推荐主键
|
* @param id 推荐主键
|
||||||
* @return 推荐
|
* @return 推荐
|
||||||
*/
|
*/
|
||||||
@@ -24,7 +23,7 @@ public interface RecommendInfoMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询推荐列表
|
* 查询推荐列表
|
||||||
*
|
*
|
||||||
* @param recommendInfo 推荐
|
* @param recommendInfo 推荐
|
||||||
* @return 推荐集合
|
* @return 推荐集合
|
||||||
*/
|
*/
|
||||||
@@ -32,7 +31,7 @@ public interface RecommendInfoMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增推荐
|
* 新增推荐
|
||||||
*
|
*
|
||||||
* @param recommendInfo 推荐
|
* @param recommendInfo 推荐
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -40,7 +39,7 @@ public interface RecommendInfoMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改推荐
|
* 修改推荐
|
||||||
*
|
*
|
||||||
* @param recommendInfo 推荐
|
* @param recommendInfo 推荐
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -48,7 +47,7 @@ public interface RecommendInfoMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除推荐
|
* 删除推荐
|
||||||
*
|
*
|
||||||
* @param id 推荐主键
|
* @param id 推荐主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -56,7 +55,7 @@ public interface RecommendInfoMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除推荐
|
* 批量删除推荐
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import com.ruoyi.common.core.domain.entity.ShopUser;
|
|||||||
import com.ruoyi.common.core.domain.entity.ShopUserResq;
|
import com.ruoyi.common.core.domain.entity.ShopUserResq;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.system.domain.SysConfig;
|
import com.ruoyi.system.domain.SysConfig;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 参数配置 数据层
|
* 参数配置 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysConfigMapper
|
public interface SysConfigMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询参数配置信息
|
* 查询参数配置信息
|
||||||
*
|
*
|
||||||
* @param config 参数配置信息
|
* @param config 参数配置信息
|
||||||
* @return 参数配置信息
|
* @return 参数配置信息
|
||||||
*/
|
*/
|
||||||
@@ -20,7 +21,7 @@ public interface SysConfigMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过ID查询配置
|
* 通过ID查询配置
|
||||||
*
|
*
|
||||||
* @param configId 参数ID
|
* @param configId 参数ID
|
||||||
* @return 参数配置信息
|
* @return 参数配置信息
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +29,7 @@ public interface SysConfigMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询参数配置列表
|
* 查询参数配置列表
|
||||||
*
|
*
|
||||||
* @param config 参数配置信息
|
* @param config 参数配置信息
|
||||||
* @return 参数配置集合
|
* @return 参数配置集合
|
||||||
*/
|
*/
|
||||||
@@ -36,7 +37,7 @@ public interface SysConfigMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据键名查询参数配置信息
|
* 根据键名查询参数配置信息
|
||||||
*
|
*
|
||||||
* @param configKey 参数键名
|
* @param configKey 参数键名
|
||||||
* @return 参数配置信息
|
* @return 参数配置信息
|
||||||
*/
|
*/
|
||||||
@@ -44,7 +45,7 @@ public interface SysConfigMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增参数配置
|
* 新增参数配置
|
||||||
*
|
*
|
||||||
* @param config 参数配置信息
|
* @param config 参数配置信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -52,7 +53,7 @@ public interface SysConfigMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改参数配置
|
* 修改参数配置
|
||||||
*
|
*
|
||||||
* @param config 参数配置信息
|
* @param config 参数配置信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -60,7 +61,7 @@ public interface SysConfigMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除参数配置
|
* 删除参数配置
|
||||||
*
|
*
|
||||||
* @param configId 参数ID
|
* @param configId 参数ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -68,7 +69,7 @@ public interface SysConfigMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除参数信息
|
* 批量删除参数信息
|
||||||
*
|
*
|
||||||
* @param configIds 需要删除的参数ID
|
* @param configIds 需要删除的参数ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysDept;
|
import com.ruoyi.common.core.domain.entity.SysDept;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 部门管理 数据层
|
* 部门管理 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysDeptMapper
|
public interface SysDeptMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询部门管理数据
|
* 查询部门管理数据
|
||||||
*
|
*
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 部门信息集合
|
* @return 部门信息集合
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +22,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色ID查询部门树信息
|
* 根据角色ID查询部门树信息
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @param deptCheckStrictly 部门树选择项是否关联显示
|
* @param deptCheckStrictly 部门树选择项是否关联显示
|
||||||
* @return 选中部门列表
|
* @return 选中部门列表
|
||||||
@@ -30,7 +31,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据部门ID查询信息
|
* 根据部门ID查询信息
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 部门信息
|
* @return 部门信息
|
||||||
*/
|
*/
|
||||||
@@ -38,7 +39,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询所有子部门
|
* 根据ID查询所有子部门
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 部门列表
|
* @return 部门列表
|
||||||
*/
|
*/
|
||||||
@@ -46,7 +47,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据ID查询所有子部门(正常状态)
|
* 根据ID查询所有子部门(正常状态)
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 子部门数
|
* @return 子部门数
|
||||||
*/
|
*/
|
||||||
@@ -54,7 +55,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否存在子节点
|
* 是否存在子节点
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -62,7 +63,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门是否存在用户
|
* 查询部门是否存在用户
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -70,7 +71,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验部门名称是否唯一
|
* 校验部门名称是否唯一
|
||||||
*
|
*
|
||||||
* @param deptName 部门名称
|
* @param deptName 部门名称
|
||||||
* @param parentId 父部门ID
|
* @param parentId 父部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
@@ -79,7 +80,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增部门信息
|
* 新增部门信息
|
||||||
*
|
*
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -87,7 +88,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改部门信息
|
* 修改部门信息
|
||||||
*
|
*
|
||||||
* @param dept 部门信息
|
* @param dept 部门信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -95,14 +96,14 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改所在部门正常状态
|
* 修改所在部门正常状态
|
||||||
*
|
*
|
||||||
* @param deptIds 部门ID组
|
* @param deptIds 部门ID组
|
||||||
*/
|
*/
|
||||||
public void updateDeptStatusNormal(Long[] deptIds);
|
public void updateDeptStatusNormal(Long[] deptIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改子元素关系
|
* 修改子元素关系
|
||||||
*
|
*
|
||||||
* @param depts 子元素
|
* @param depts 子元素
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -110,7 +111,7 @@ public interface SysDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除部门管理信息
|
* 删除部门管理信息
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典表 数据层
|
* 字典表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysDictDataMapper
|
public interface SysDictDataMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询字典数据
|
* 根据条件分页查询字典数据
|
||||||
*
|
*
|
||||||
* @param dictData 字典数据信息
|
* @param dictData 字典数据信息
|
||||||
* @return 字典数据集合信息
|
* @return 字典数据集合信息
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +22,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型查询字典数据
|
* 根据字典类型查询字典数据
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型
|
* @param dictType 字典类型
|
||||||
* @return 字典数据集合信息
|
* @return 字典数据集合信息
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +30,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型和字典键值查询字典数据信息
|
* 根据字典类型和字典键值查询字典数据信息
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型
|
* @param dictType 字典类型
|
||||||
* @param dictValue 字典键值
|
* @param dictValue 字典键值
|
||||||
* @return 字典标签
|
* @return 字典标签
|
||||||
@@ -38,7 +39,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典数据ID查询信息
|
* 根据字典数据ID查询信息
|
||||||
*
|
*
|
||||||
* @param dictCode 字典数据ID
|
* @param dictCode 字典数据ID
|
||||||
* @return 字典数据
|
* @return 字典数据
|
||||||
*/
|
*/
|
||||||
@@ -46,7 +47,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询字典数据
|
* 查询字典数据
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型
|
* @param dictType 字典类型
|
||||||
* @return 字典数据
|
* @return 字典数据
|
||||||
*/
|
*/
|
||||||
@@ -54,7 +55,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过字典ID删除字典数据信息
|
* 通过字典ID删除字典数据信息
|
||||||
*
|
*
|
||||||
* @param dictCode 字典数据ID
|
* @param dictCode 字典数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -62,7 +63,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除字典数据信息
|
* 批量删除字典数据信息
|
||||||
*
|
*
|
||||||
* @param dictCodes 需要删除的字典数据ID
|
* @param dictCodes 需要删除的字典数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -70,7 +71,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增字典数据信息
|
* 新增字典数据信息
|
||||||
*
|
*
|
||||||
* @param dictData 字典数据信息
|
* @param dictData 字典数据信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -78,7 +79,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改字典数据信息
|
* 修改字典数据信息
|
||||||
*
|
*
|
||||||
* @param dictData 字典数据信息
|
* @param dictData 字典数据信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -86,7 +87,7 @@ public interface SysDictDataMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 同步修改字典类型
|
* 同步修改字典类型
|
||||||
*
|
*
|
||||||
* @param oldDictType 旧字典类型
|
* @param oldDictType 旧字典类型
|
||||||
* @param newDictType 新旧字典类型
|
* @param newDictType 新旧字典类型
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysDictType;
|
import com.ruoyi.common.core.domain.entity.SysDictType;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 字典表 数据层
|
* 字典表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysDictTypeMapper
|
public interface SysDictTypeMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询字典类型
|
* 根据条件分页查询字典类型
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型信息
|
* @param dictType 字典类型信息
|
||||||
* @return 字典类型集合信息
|
* @return 字典类型集合信息
|
||||||
*/
|
*/
|
||||||
@@ -20,14 +21,14 @@ public interface SysDictTypeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据所有字典类型
|
* 根据所有字典类型
|
||||||
*
|
*
|
||||||
* @return 字典类型集合信息
|
* @return 字典类型集合信息
|
||||||
*/
|
*/
|
||||||
public List<SysDictType> selectDictTypeAll();
|
public List<SysDictType> selectDictTypeAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型ID查询信息
|
* 根据字典类型ID查询信息
|
||||||
*
|
*
|
||||||
* @param dictId 字典类型ID
|
* @param dictId 字典类型ID
|
||||||
* @return 字典类型
|
* @return 字典类型
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +36,7 @@ public interface SysDictTypeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据字典类型查询信息
|
* 根据字典类型查询信息
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型
|
* @param dictType 字典类型
|
||||||
* @return 字典类型
|
* @return 字典类型
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +44,7 @@ public interface SysDictTypeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过字典ID删除字典信息
|
* 通过字典ID删除字典信息
|
||||||
*
|
*
|
||||||
* @param dictId 字典ID
|
* @param dictId 字典ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +52,7 @@ public interface SysDictTypeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除字典类型信息
|
* 批量删除字典类型信息
|
||||||
*
|
*
|
||||||
* @param dictIds 需要删除的字典ID
|
* @param dictIds 需要删除的字典ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -59,7 +60,7 @@ public interface SysDictTypeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增字典类型信息
|
* 新增字典类型信息
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型信息
|
* @param dictType 字典类型信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +68,7 @@ public interface SysDictTypeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改字典类型信息
|
* 修改字典类型信息
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型信息
|
* @param dictType 字典类型信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -75,7 +76,7 @@ public interface SysDictTypeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验字典类型称是否唯一
|
* 校验字典类型称是否唯一
|
||||||
*
|
*
|
||||||
* @param dictType 字典类型
|
* @param dictType 字典类型
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,25 +1,26 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.system.domain.SysLogininfor;
|
import com.ruoyi.system.domain.SysLogininfor;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 系统访问日志情况信息 数据层
|
* 系统访问日志情况信息 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysLogininforMapper
|
public interface SysLogininforMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 新增系统登录日志
|
* 新增系统登录日志
|
||||||
*
|
*
|
||||||
* @param logininfor 访问日志对象
|
* @param logininfor 访问日志对象
|
||||||
*/
|
*/
|
||||||
public void insertLogininfor(SysLogininfor logininfor);
|
public void insertLogininfor(SysLogininfor logininfor);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询系统登录日志集合
|
* 查询系统登录日志集合
|
||||||
*
|
*
|
||||||
* @param logininfor 访问日志对象
|
* @param logininfor 访问日志对象
|
||||||
* @return 登录记录集合
|
* @return 登录记录集合
|
||||||
*/
|
*/
|
||||||
@@ -27,7 +28,7 @@ public interface SysLogininforMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除系统登录日志
|
* 批量删除系统登录日志
|
||||||
*
|
*
|
||||||
* @param infoIds 需要删除的登录日志ID
|
* @param infoIds 需要删除的登录日志ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +36,7 @@ public interface SysLogininforMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 清空系统登录日志
|
* 清空系统登录日志
|
||||||
*
|
*
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int cleanLogininfor();
|
public int cleanLogininfor();
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 菜单表 数据层
|
* 菜单表 数据层
|
||||||
@@ -36,7 +37,7 @@ public interface SysMenuMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色ID查询权限
|
* 根据角色ID查询权限
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 权限列表
|
* @return 权限列表
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +68,7 @@ public interface SysMenuMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据角色ID查询菜单树信息
|
* 根据角色ID查询菜单树信息
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @param menuCheckStrictly 菜单树选择项是否关联显示
|
* @param menuCheckStrictly 菜单树选择项是否关联显示
|
||||||
* @return 选中菜单列表
|
* @return 选中菜单列表
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.system.domain.SysNotice;
|
import com.ruoyi.system.domain.SysNotice;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通知公告表 数据层
|
* 通知公告表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysNoticeMapper
|
public interface SysNoticeMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询公告信息
|
* 查询公告信息
|
||||||
*
|
*
|
||||||
* @param noticeId 公告ID
|
* @param noticeId 公告ID
|
||||||
* @return 公告信息
|
* @return 公告信息
|
||||||
*/
|
*/
|
||||||
@@ -20,7 +21,7 @@ public interface SysNoticeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询公告列表
|
* 查询公告列表
|
||||||
*
|
*
|
||||||
* @param notice 公告信息
|
* @param notice 公告信息
|
||||||
* @return 公告集合
|
* @return 公告集合
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +29,7 @@ public interface SysNoticeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增公告
|
* 新增公告
|
||||||
*
|
*
|
||||||
* @param notice 公告信息
|
* @param notice 公告信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -36,7 +37,7 @@ public interface SysNoticeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改公告
|
* 修改公告
|
||||||
*
|
*
|
||||||
* @param notice 公告信息
|
* @param notice 公告信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -44,7 +45,7 @@ public interface SysNoticeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除公告
|
* 批量删除公告
|
||||||
*
|
*
|
||||||
* @param noticeId 公告ID
|
* @param noticeId 公告ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -52,7 +53,7 @@ public interface SysNoticeMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除公告信息
|
* 批量删除公告信息
|
||||||
*
|
*
|
||||||
* @param noticeIds 需要删除的公告ID
|
* @param noticeIds 需要删除的公告ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,25 +1,26 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.system.domain.SysOperLog;
|
import com.ruoyi.system.domain.SysOperLog;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 操作日志 数据层
|
* 操作日志 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysOperLogMapper
|
public interface SysOperLogMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 新增操作日志
|
* 新增操作日志
|
||||||
*
|
*
|
||||||
* @param operLog 操作日志对象
|
* @param operLog 操作日志对象
|
||||||
*/
|
*/
|
||||||
public void insertOperlog(SysOperLog operLog);
|
public void insertOperlog(SysOperLog operLog);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询系统操作日志集合
|
* 查询系统操作日志集合
|
||||||
*
|
*
|
||||||
* @param operLog 操作日志对象
|
* @param operLog 操作日志对象
|
||||||
* @return 操作日志集合
|
* @return 操作日志集合
|
||||||
*/
|
*/
|
||||||
@@ -27,7 +28,7 @@ public interface SysOperLogMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除系统操作日志
|
* 批量删除系统操作日志
|
||||||
*
|
*
|
||||||
* @param operIds 需要删除的操作日志ID
|
* @param operIds 需要删除的操作日志ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +36,7 @@ public interface SysOperLogMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询操作日志详细
|
* 查询操作日志详细
|
||||||
*
|
*
|
||||||
* @param operId 操作ID
|
* @param operId 操作ID
|
||||||
* @return 操作日志对象
|
* @return 操作日志对象
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.system.domain.SysPost;
|
import com.ruoyi.system.domain.SysPost;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息 数据层
|
* 岗位信息 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysPostMapper
|
public interface SysPostMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询岗位数据集合
|
* 查询岗位数据集合
|
||||||
*
|
*
|
||||||
* @param post 岗位信息
|
* @param post 岗位信息
|
||||||
* @return 岗位数据集合
|
* @return 岗位数据集合
|
||||||
*/
|
*/
|
||||||
@@ -20,14 +21,14 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有岗位
|
* 查询所有岗位
|
||||||
*
|
*
|
||||||
* @return 岗位列表
|
* @return 岗位列表
|
||||||
*/
|
*/
|
||||||
public List<SysPost> selectPostAll();
|
public List<SysPost> selectPostAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过岗位ID查询岗位信息
|
* 通过岗位ID查询岗位信息
|
||||||
*
|
*
|
||||||
* @param postId 岗位ID
|
* @param postId 岗位ID
|
||||||
* @return 角色对象信息
|
* @return 角色对象信息
|
||||||
*/
|
*/
|
||||||
@@ -35,7 +36,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID获取岗位选择框列表
|
* 根据用户ID获取岗位选择框列表
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 选中岗位ID列表
|
* @return 选中岗位ID列表
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +44,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户所属岗位组
|
* 查询用户所属岗位组
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +52,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除岗位信息
|
* 删除岗位信息
|
||||||
*
|
*
|
||||||
* @param postId 岗位ID
|
* @param postId 岗位ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -59,7 +60,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除岗位信息
|
* 批量删除岗位信息
|
||||||
*
|
*
|
||||||
* @param postIds 需要删除的岗位ID
|
* @param postIds 需要删除的岗位ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +68,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改岗位信息
|
* 修改岗位信息
|
||||||
*
|
*
|
||||||
* @param post 岗位信息
|
* @param post 岗位信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -75,7 +76,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增岗位信息
|
* 新增岗位信息
|
||||||
*
|
*
|
||||||
* @param post 岗位信息
|
* @param post 岗位信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -83,7 +84,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验岗位名称
|
* 校验岗位名称
|
||||||
*
|
*
|
||||||
* @param postName 岗位名称
|
* @param postName 岗位名称
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -91,7 +92,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验岗位编码
|
* 校验岗位编码
|
||||||
*
|
*
|
||||||
* @param postCode 岗位编码
|
* @param postCode 岗位编码
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.system.domain.SysRoleDept;
|
import com.ruoyi.system.domain.SysRoleDept;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色与部门关联表 数据层
|
* 角色与部门关联表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysRoleDeptMapper
|
public interface SysRoleDeptMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 通过角色ID删除角色和部门关联
|
* 通过角色ID删除角色和部门关联
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -20,7 +21,7 @@ public interface SysRoleDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除角色部门关联信息
|
* 批量删除角色部门关联信息
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +29,7 @@ public interface SysRoleDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询部门使用数量
|
* 查询部门使用数量
|
||||||
*
|
*
|
||||||
* @param deptId 部门ID
|
* @param deptId 部门ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -36,7 +37,7 @@ public interface SysRoleDeptMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量新增角色部门信息
|
* 批量新增角色部门信息
|
||||||
*
|
*
|
||||||
* @param roleDeptList 角色部门列表
|
* @param roleDeptList 角色部门列表
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysRole;
|
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色表 数据层
|
* 角色表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysRoleMapper
|
public interface SysRoleMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询角色数据
|
* 根据条件分页查询角色数据
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 角色数据集合信息
|
* @return 角色数据集合信息
|
||||||
*/
|
*/
|
||||||
@@ -20,7 +21,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询角色
|
* 根据用户ID查询角色
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 角色列表
|
* @return 角色列表
|
||||||
*/
|
*/
|
||||||
@@ -28,14 +29,14 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有角色
|
* 查询所有角色
|
||||||
*
|
*
|
||||||
* @return 角色列表
|
* @return 角色列表
|
||||||
*/
|
*/
|
||||||
public List<SysRole> selectRoleAll();
|
public List<SysRole> selectRoleAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID获取角色选择框列表
|
* 根据用户ID获取角色选择框列表
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 选中角色ID列表
|
* @return 选中角色ID列表
|
||||||
*/
|
*/
|
||||||
@@ -43,7 +44,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID查询角色
|
* 通过角色ID查询角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 角色对象信息
|
* @return 角色对象信息
|
||||||
*/
|
*/
|
||||||
@@ -51,7 +52,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询角色
|
* 根据用户ID查询角色
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @return 角色列表
|
* @return 角色列表
|
||||||
*/
|
*/
|
||||||
@@ -59,7 +60,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色名称是否唯一
|
* 校验角色名称是否唯一
|
||||||
*
|
*
|
||||||
* @param roleName 角色名称
|
* @param roleName 角色名称
|
||||||
* @return 角色信息
|
* @return 角色信息
|
||||||
*/
|
*/
|
||||||
@@ -67,7 +68,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验角色权限是否唯一
|
* 校验角色权限是否唯一
|
||||||
*
|
*
|
||||||
* @param roleKey 角色权限
|
* @param roleKey 角色权限
|
||||||
* @return 角色信息
|
* @return 角色信息
|
||||||
*/
|
*/
|
||||||
@@ -75,7 +76,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改角色信息
|
* 修改角色信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -83,7 +84,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增角色信息
|
* 新增角色信息
|
||||||
*
|
*
|
||||||
* @param role 角色信息
|
* @param role 角色信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -91,7 +92,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID删除角色
|
* 通过角色ID删除角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -99,7 +100,7 @@ public interface SysRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除角色信息
|
* 批量删除角色信息
|
||||||
*
|
*
|
||||||
* @param roleIds 需要删除的角色ID
|
* @param roleIds 需要删除的角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import com.ruoyi.system.domain.SysRoleMenu;
|
import com.ruoyi.system.domain.SysRoleMenu;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 角色与菜单关联表 数据层
|
* 角色与菜单关联表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysRoleMenuMapper
|
public interface SysRoleMenuMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询菜单使用数量
|
* 查询菜单使用数量
|
||||||
*
|
*
|
||||||
* @param menuId 菜单ID
|
* @param menuId 菜单ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -20,7 +21,7 @@ public interface SysRoleMenuMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID删除角色和菜单关联
|
* 通过角色ID删除角色和菜单关联
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -28,7 +29,7 @@ public interface SysRoleMenuMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除角色菜单关联信息
|
* 批量删除角色菜单关联信息
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -36,7 +37,7 @@ public interface SysRoleMenuMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量新增角色菜单信息
|
* 批量新增角色菜单信息
|
||||||
*
|
*
|
||||||
* @param roleMenuList 角色菜单列表
|
* @param roleMenuList 角色菜单列表
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户表 数据层
|
* 用户表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysUserMapper
|
public interface SysUserMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询用户列表
|
* 根据条件分页查询用户列表
|
||||||
*
|
*
|
||||||
* @param sysUser 用户信息
|
* @param sysUser 用户信息
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +22,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询已配用户角色列表
|
* 根据条件分页查询已配用户角色列表
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +30,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件分页查询未分配用户角色列表
|
* 根据条件分页查询未分配用户角色列表
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 用户信息集合信息
|
* @return 用户信息集合信息
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +38,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户名查询用户
|
* 通过用户名查询用户
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @return 用户对象信息
|
* @return 用户对象信息
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +46,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID查询用户
|
* 通过用户ID查询用户
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 用户对象信息
|
* @return 用户对象信息
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +54,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增用户信息
|
* 新增用户信息
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -61,7 +62,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户信息
|
* 修改用户信息
|
||||||
*
|
*
|
||||||
* @param user 用户信息
|
* @param user 用户信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -69,7 +70,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改用户头像
|
* 修改用户头像
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @param avatar 头像地址
|
* @param avatar 头像地址
|
||||||
* @return 结果
|
* @return 结果
|
||||||
@@ -78,7 +79,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置用户密码
|
* 重置用户密码
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @param password 密码
|
* @param password 密码
|
||||||
* @return 结果
|
* @return 结果
|
||||||
@@ -87,7 +88,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID删除用户
|
* 通过用户ID删除用户
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -95,7 +96,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除用户信息
|
* 批量删除用户信息
|
||||||
*
|
*
|
||||||
* @param userIds 需要删除的用户ID
|
* @param userIds 需要删除的用户ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -103,7 +104,7 @@ public interface SysUserMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验用户名称是否唯一
|
* 校验用户名称是否唯一
|
||||||
*
|
*
|
||||||
* @param userName 用户名称
|
* @param userName 用户名称
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.system.domain.SysUserPost;
|
import com.ruoyi.system.domain.SysUserPost;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户与岗位关联表 数据层
|
* 用户与岗位关联表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysUserPostMapper
|
public interface SysUserPostMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 通过用户ID删除用户和岗位关联
|
* 通过用户ID删除用户和岗位关联
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -22,7 +22,7 @@ public interface SysUserPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过岗位ID查询岗位使用数量
|
* 通过岗位ID查询岗位使用数量
|
||||||
*
|
*
|
||||||
* @param postId 岗位ID
|
* @param postId 岗位ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -30,7 +30,7 @@ public interface SysUserPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除用户和岗位关联
|
* 批量删除用户和岗位关联
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -38,7 +38,7 @@ public interface SysUserPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量新增用户岗位信息
|
* 批量新增用户岗位信息
|
||||||
*
|
*
|
||||||
* @param userPostList 用户岗位列表
|
* @param userPostList 用户岗位列表
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,19 +1,20 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
import com.ruoyi.system.domain.SysUserRole;
|
import com.ruoyi.system.domain.SysUserRole;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户与角色关联表 数据层
|
* 用户与角色关联表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysUserRoleMapper
|
public interface SysUserRoleMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 通过用户ID删除用户和角色关联
|
* 通过用户ID删除用户和角色关联
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -21,7 +22,7 @@ public interface SysUserRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除用户和角色关联
|
* 批量删除用户和角色关联
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -29,7 +30,7 @@ public interface SysUserRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过角色ID查询角色使用数量
|
* 通过角色ID查询角色使用数量
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -37,7 +38,7 @@ public interface SysUserRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量新增用户角色信息
|
* 批量新增用户角色信息
|
||||||
*
|
*
|
||||||
* @param userRoleList 用户角色列表
|
* @param userRoleList 用户角色列表
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -45,7 +46,7 @@ public interface SysUserRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除用户和角色关联信息
|
* 删除用户和角色关联信息
|
||||||
*
|
*
|
||||||
* @param userRole 用户和角色关联信息
|
* @param userRole 用户和角色关联信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +54,7 @@ public interface SysUserRoleMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量取消授权用户角色
|
* 批量取消授权用户角色
|
||||||
*
|
*
|
||||||
* @param roleId 角色ID
|
* @param roleId 角色ID
|
||||||
* @param userIds 需要删除的用户数据ID
|
* @param userIds 需要删除的用户数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
|
|||||||
@@ -70,4 +70,6 @@ public interface INotificationsService
|
|||||||
public AjaxResult publishNotification(Long id);
|
public AjaxResult publishNotification(Long id);
|
||||||
|
|
||||||
AjaxResult publishSendAll(Long id);
|
AjaxResult publishSendAll(Long id);
|
||||||
|
|
||||||
|
List<Notifications> selectNotificationsByUserId(Long userId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.system.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.Product;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-10-27
|
||||||
|
*/
|
||||||
|
public interface IProductService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询商品
|
||||||
|
*
|
||||||
|
* @param id 商品主键
|
||||||
|
* @return 商品
|
||||||
|
*/
|
||||||
|
public Product selectProductById(String id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品列表
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 商品集合
|
||||||
|
*/
|
||||||
|
public List<Product> selectProductList(Product product);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertProduct(Product product);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateProduct(Product product);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商品
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的商品主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductByIds(String[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品信息
|
||||||
|
*
|
||||||
|
* @param id 商品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteProductById(String id);
|
||||||
|
}
|
||||||
@@ -49,9 +49,12 @@ public class CShopUserServiceImpl implements ShopUserService {
|
|||||||
}
|
}
|
||||||
case "2":
|
case "2":
|
||||||
// 验证码
|
// 验证码
|
||||||
//String code = redisCache.getCacheObject("sms_code:"+shopUser.getPhone());
|
String code = redisCache.getCacheObject("sms_code:"+shopUser.getPhone());
|
||||||
|
if (code == null){
|
||||||
|
code = "9527";
|
||||||
|
}
|
||||||
// TODO:写死
|
// TODO:写死
|
||||||
String code="9527";
|
//String code="9527";
|
||||||
String reqCode = shopUser.getCode();
|
String reqCode = shopUser.getCode();
|
||||||
if (code != null && code.equals(reqCode)){
|
if (code != null && code.equals(reqCode)){
|
||||||
// 登录
|
// 登录
|
||||||
@@ -70,8 +73,14 @@ public class CShopUserServiceImpl implements ShopUserService {
|
|||||||
UmResp resp = umengConfig.send(uMtoken, deviceTypeUp);
|
UmResp resp = umengConfig.send(uMtoken, deviceTypeUp);
|
||||||
if (resp != null && resp.isSuccess()){
|
if (resp != null && resp.isSuccess()){
|
||||||
String phone = (String) resp.getData().get("mobile");
|
String phone = (String) resp.getData().get("mobile");
|
||||||
shopUser.setPhone(phone);
|
if (phone != null) {
|
||||||
return loginAndRegis(shopUser);
|
shopUser.setPhone(phone);
|
||||||
|
return loginAndRegis(shopUser);
|
||||||
|
}else {
|
||||||
|
ShopUser msg = new ShopUser();
|
||||||
|
msg.setMsg("手机号获取失败");
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -132,7 +141,6 @@ public class CShopUserServiceImpl implements ShopUserService {
|
|||||||
member.setVip(2L);
|
member.setVip(2L);
|
||||||
member.setRegisterTime(new Date());
|
member.setRegisterTime(new Date());
|
||||||
member.setPassword(IdUtil.fastUUID());
|
member.setPassword(IdUtil.fastUUID());
|
||||||
member.setUsername(shopUser.getUsername());
|
|
||||||
member.setDeviceId(shopUser.getDeviceId());
|
member.setDeviceId(shopUser.getDeviceId());
|
||||||
member.setDeviceType(shopUser.getDeviceType());
|
member.setDeviceType(shopUser.getDeviceType());
|
||||||
member.setHeadImg("/file/download/user/head.jpg");
|
member.setHeadImg("/file/download/user/head.jpg");
|
||||||
|
|||||||
@@ -215,6 +215,11 @@ public class NotificationsServiceImpl implements INotificationsService
|
|||||||
return AjaxResult.success("通知发布完成");
|
return AjaxResult.success("通知发布完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Notifications> selectNotificationsByUserId(Long userId) {
|
||||||
|
return notificationsMapper.selectNotificationsByUserId(userId);
|
||||||
|
}
|
||||||
|
|
||||||
private void sendAllToThirdParty(Notifications notification) {
|
private void sendAllToThirdParty(Notifications notification) {
|
||||||
PushMsgInfo pushMsgInfo = new PushMsgInfo();
|
PushMsgInfo pushMsgInfo = new PushMsgInfo();
|
||||||
pushMsgInfo.setTitle(notification.getTitle());
|
pushMsgInfo.setTitle(notification.getTitle());
|
||||||
|
|||||||
@@ -0,0 +1,94 @@
|
|||||||
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.Product;
|
||||||
|
import com.ruoyi.system.mapper.ProductMapper;
|
||||||
|
import com.ruoyi.system.service.IProductService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品Service业务层处理
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2025-10-27
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ProductServiceImpl implements IProductService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ProductMapper productMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品
|
||||||
|
*
|
||||||
|
* @param id 商品主键
|
||||||
|
* @return 商品
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Product selectProductById(String id)
|
||||||
|
{
|
||||||
|
return productMapper.selectProductById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品列表
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 商品
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<Product> selectProductList(Product product)
|
||||||
|
{
|
||||||
|
return productMapper.selectProductList(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertProduct(Product product)
|
||||||
|
{
|
||||||
|
return productMapper.insertProduct(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品
|
||||||
|
*
|
||||||
|
* @param product 商品
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateProduct(Product product)
|
||||||
|
{
|
||||||
|
return productMapper.updateProduct(product);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除商品
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的商品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteProductByIds(String[] ids)
|
||||||
|
{
|
||||||
|
return productMapper.deleteProductByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品信息
|
||||||
|
*
|
||||||
|
* @param id 商品主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteProductById(String id)
|
||||||
|
{
|
||||||
|
return productMapper.deleteProductById(id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.NotificationsMapper">
|
<mapper namespace="com.ruoyi.system.mapper.NotificationsMapper">
|
||||||
|
|
||||||
<resultMap type="Notifications" id="NotificationsResult">
|
<resultMap type="Notifications" id="NotificationsResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="title" column="title" />
|
<result property="title" column="title" />
|
||||||
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectNotificationsList" parameterType="Notifications" resultMap="NotificationsResult">
|
<select id="selectNotificationsList" parameterType="Notifications" resultMap="NotificationsResult">
|
||||||
<include refid="selectNotificationsVo"/>
|
<include refid="selectNotificationsVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="title != null and title != ''"> and title = #{title}</if>
|
<if test="title != null and title != ''"> and title = #{title}</if>
|
||||||
<if test="content != null and content != ''"> and content = #{content}</if>
|
<if test="content != null and content != ''"> and content = #{content}</if>
|
||||||
<if test="notificationType != null and notificationType != ''"> and notification_type = #{notificationType}</if>
|
<if test="notificationType != null and notificationType != ''"> and notification_type = #{notificationType}</if>
|
||||||
@@ -34,7 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectNotificationsById" parameterType="Long" resultMap="NotificationsResult">
|
<select id="selectNotificationsById" parameterType="Long" resultMap="NotificationsResult">
|
||||||
<include refid="selectNotificationsVo"/>
|
<include refid="selectNotificationsVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@@ -84,9 +84,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteNotificationsByIds" parameterType="String">
|
<delete id="deleteNotificationsByIds" parameterType="String">
|
||||||
delete from notifications where id in
|
delete from notifications where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
|
||||||
|
<select id="selectNotificationsByUserId" resultMap="NotificationsResult">
|
||||||
|
SELECT n.* FROM notifications n LEFT JOIN notification_records sr on n.id = sr.notification_id
|
||||||
|
WHERE sr.user_id=#{userId}
|
||||||
|
</select>
|
||||||
|
</mapper>
|
||||||
|
|||||||
121
ruoyi-system/src/main/resources/mapper/system/ProductMapper.xml
Normal file
121
ruoyi-system/src/main/resources/mapper/system/ProductMapper.xml
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<?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.ProductMapper">
|
||||||
|
|
||||||
|
<resultMap type="Product" id="ProductResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="productId" column="product_id" />
|
||||||
|
<result property="name" column="name" />
|
||||||
|
<result property="description" column="description" />
|
||||||
|
<result property="categoryId" column="category_id" />
|
||||||
|
<result property="productType" column="product_type" />
|
||||||
|
<result property="status" column="status" />
|
||||||
|
<result property="originalPrice" column="original_price" />
|
||||||
|
<result property="currentPrice" column="current_price" />
|
||||||
|
<result property="monthlyDuration" column="monthly_duration" />
|
||||||
|
<result property="quarterlyDuration" column="quarterly_duration" />
|
||||||
|
<result property="stock" column="stock" />
|
||||||
|
<result property="sales" column="sales" />
|
||||||
|
<result property="createdAt" column="created_at" />
|
||||||
|
<result property="updatedAt" column="updated_at" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectProductVo">
|
||||||
|
select id, product_id, name, description, category_id, product_type, status, original_price, current_price, monthly_duration, quarterly_duration, stock, sales, created_at, updated_at from product
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectProductList" parameterType="Product" resultMap="ProductResult">
|
||||||
|
<include refid="selectProductVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="productId != null "> and product_id = #{productId}</if>
|
||||||
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
|
<if test="description != null and description != ''"> and description = #{description}</if>
|
||||||
|
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||||
|
<if test="productType != null "> and product_type = #{productType}</if>
|
||||||
|
<if test="status != null "> and status = #{status}</if>
|
||||||
|
<if test="originalPrice != null "> and original_price = #{originalPrice}</if>
|
||||||
|
<if test="currentPrice != null "> and current_price = #{currentPrice}</if>
|
||||||
|
<if test="monthlyDuration != null "> and monthly_duration = #{monthlyDuration}</if>
|
||||||
|
<if test="quarterlyDuration != null "> and quarterly_duration = #{quarterlyDuration}</if>
|
||||||
|
<if test="stock != null "> and stock = #{stock}</if>
|
||||||
|
<if test="sales != null "> and sales = #{sales}</if>
|
||||||
|
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||||
|
<if test="updatedAt != null "> and updated_at = #{updatedAt}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectProductById" parameterType="String" resultMap="ProductResult">
|
||||||
|
<include refid="selectProductVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertProduct" parameterType="Product" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into product
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="productId != null">product_id,</if>
|
||||||
|
<if test="name != null and name != ''">name,</if>
|
||||||
|
<if test="description != null">description,</if>
|
||||||
|
<if test="categoryId != null">category_id,</if>
|
||||||
|
<if test="productType != null">product_type,</if>
|
||||||
|
<if test="status != null">status,</if>
|
||||||
|
<if test="originalPrice != null">original_price,</if>
|
||||||
|
<if test="currentPrice != null">current_price,</if>
|
||||||
|
<if test="monthlyDuration != null">monthly_duration,</if>
|
||||||
|
<if test="quarterlyDuration != null">quarterly_duration,</if>
|
||||||
|
<if test="stock != null">stock,</if>
|
||||||
|
<if test="sales != null">sales,</if>
|
||||||
|
<if test="createdAt != null">created_at,</if>
|
||||||
|
<if test="updatedAt != null">updated_at,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="productId != null">#{productId},</if>
|
||||||
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
|
<if test="description != null">#{description},</if>
|
||||||
|
<if test="categoryId != null">#{categoryId},</if>
|
||||||
|
<if test="productType != null">#{productType},</if>
|
||||||
|
<if test="status != null">#{status},</if>
|
||||||
|
<if test="originalPrice != null">#{originalPrice},</if>
|
||||||
|
<if test="currentPrice != null">#{currentPrice},</if>
|
||||||
|
<if test="monthlyDuration != null">#{monthlyDuration},</if>
|
||||||
|
<if test="quarterlyDuration != null">#{quarterlyDuration},</if>
|
||||||
|
<if test="stock != null">#{stock},</if>
|
||||||
|
<if test="sales != null">#{sales},</if>
|
||||||
|
<if test="createdAt != null">#{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">#{updatedAt},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateProduct" parameterType="Product">
|
||||||
|
update product
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="productId != null">product_id = #{productId},</if>
|
||||||
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
|
<if test="description != null">description = #{description},</if>
|
||||||
|
<if test="categoryId != null">category_id = #{categoryId},</if>
|
||||||
|
<if test="productType != null">product_type = #{productType},</if>
|
||||||
|
<if test="status != null">status = #{status},</if>
|
||||||
|
<if test="originalPrice != null">original_price = #{originalPrice},</if>
|
||||||
|
<if test="currentPrice != null">current_price = #{currentPrice},</if>
|
||||||
|
<if test="monthlyDuration != null">monthly_duration = #{monthlyDuration},</if>
|
||||||
|
<if test="quarterlyDuration != null">quarterly_duration = #{quarterlyDuration},</if>
|
||||||
|
<if test="stock != null">stock = #{stock},</if>
|
||||||
|
<if test="sales != null">sales = #{sales},</if>
|
||||||
|
<if test="createdAt != null">created_at = #{createdAt},</if>
|
||||||
|
<if test="updatedAt != null">updated_at = #{updatedAt},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteProductById" parameterType="String">
|
||||||
|
delete from product where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteProductByIds" parameterType="String">
|
||||||
|
delete from product where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.RecommendInfoMapper">
|
<mapper namespace="com.ruoyi.system.mapper.RecommendInfoMapper">
|
||||||
|
|
||||||
<resultMap type="RecommendInfo" id="RecommendInfoResult">
|
<resultMap type="RecommendInfo" id="RecommendInfoResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
@@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectRecommendInfoList" parameterType="RecommendInfo" resultMap="RecommendInfoResult">
|
<select id="selectRecommendInfoList" parameterType="RecommendInfo" resultMap="RecommendInfoResult">
|
||||||
<include refid="selectRecommendInfoVo"/>
|
<include refid="selectRecommendInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
|
<if test="creator != null and creator != ''"> and creator = #{creator}</if>
|
||||||
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
<if test="modify != null and modify != ''"> and modify = #{modify}</if>
|
||||||
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</where>
|
</where>
|
||||||
order by id desc
|
order by id desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectRecommendInfoById" parameterType="Long" resultMap="RecommendInfoResult">
|
<select id="selectRecommendInfoById" parameterType="Long" resultMap="RecommendInfoResult">
|
||||||
<include refid="selectRecommendInfoVo"/>
|
<include refid="selectRecommendInfoVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
<if test="isDel != null">is_del = #{isDel},</if>
|
<if test="isDel != null">is_del = #{isDel},</if>
|
||||||
<if test="desc != null">desc = #{desc},</if>
|
<if test="desc != null">`desc` = #{desc},</if>
|
||||||
<if test="backImg != null">back_img = #{backImg},</if>
|
<if test="backImg != null">back_img = #{backImg},</if>
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
@@ -83,7 +83,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteRecommendInfoByIds" parameterType="String">
|
<delete id="deleteRecommendInfoByIds" parameterType="String">
|
||||||
delete from recommend_info where id in
|
delete from recommend_info where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
@@ -103,4 +103,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<delete id="deleteRecommendInfoByReId">
|
<delete id="deleteRecommendInfoByReId">
|
||||||
DELETE FROM music_recommend where recommend_id=#{reId}
|
DELETE FROM music_recommend where recommend_id=#{reId}
|
||||||
</delete>
|
</delete>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.ShareInfoMapper">
|
<mapper namespace="com.ruoyi.system.mapper.ShareInfoMapper">
|
||||||
|
|
||||||
<resultMap type="ShareInfo" id="ShareInfoResult">
|
<resultMap type="ShareInfo" id="ShareInfoResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
<result property="userId" column="user_id" />
|
<result property="userId" column="user_id" />
|
||||||
@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<select id="selectShareInfoList" parameterType="ShareInfo" resultMap="ShareInfoResult">
|
<select id="selectShareInfoList" parameterType="ShareInfo" resultMap="ShareInfoResult">
|
||||||
<include refid="selectShareInfoVo"/>
|
<include refid="selectShareInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
<if test="userId != null "> and user_id = #{userId}</if>
|
<if test="userId != null "> and user_id = #{userId}</if>
|
||||||
<if test="shareDecs != null and shareDecs != ''"> and share_decs = #{shareDecs}</if>
|
<if test="shareDecs != null and shareDecs != ''"> and share_decs = #{shareDecs}</if>
|
||||||
<if test="musicId != null "> and music_id = #{musicId}</if>
|
<if test="musicId != null "> and music_id = #{musicId}</if>
|
||||||
@@ -34,12 +34,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="review != null "> and review = #{review}</if>
|
<if test="review != null "> and review = #{review}</if>
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectShareInfoById" parameterType="String" resultMap="ShareInfoResult">
|
<select id="selectShareInfoById" parameterType="String" resultMap="ShareInfoResult">
|
||||||
<include refid="selectShareInfoVo"/>
|
<include refid="selectShareInfoVo"/>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectShareInfoByMusicId" parameterType="String" resultMap="ShareInfoResult">
|
<select id="selectShareInfoByMusicId" parameterType="String" resultMap="ShareInfoResult">
|
||||||
<include refid="selectShareInfoVo"/>
|
<include refid="selectShareInfoVo"/>
|
||||||
where music_id = #{musicId} limit 1
|
where music_id = #{musicId} limit 1
|
||||||
@@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deleteShareInfoByIds" parameterType="String">
|
<delete id="deleteShareInfoByIds" parameterType="String">
|
||||||
delete from share_info where id in
|
delete from share_info where id in
|
||||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
#{id}
|
#{id}
|
||||||
</foreach>
|
</foreach>
|
||||||
@@ -116,6 +116,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
FROM share_info si
|
FROM share_info si
|
||||||
left join shop_user su on si.user_id = su.user_id
|
left join shop_user su on si.user_id = su.user_id
|
||||||
LEFT JOIN music_info mi on si.music_id = mi.music_id
|
LEFT JOIN music_info mi on si.music_id = mi.music_id
|
||||||
WHERE mi.is_del=0
|
WHERE mi.is_del=0 order by si.update_time desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
44
ruoyi-ui/src/api/system/product.js
Normal file
44
ruoyi-ui/src/api/system/product.js
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询商品列表
|
||||||
|
export function listProduct(query) {
|
||||||
|
return request({
|
||||||
|
url: '/system/product/list',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询商品详细
|
||||||
|
export function getProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/product/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增商品
|
||||||
|
export function addProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/product',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改商品
|
||||||
|
export function updateProduct(data) {
|
||||||
|
return request({
|
||||||
|
url: '/system/product',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除商品
|
||||||
|
export function delProduct(id) {
|
||||||
|
return request({
|
||||||
|
url: '/system/product/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
418
ruoyi-ui/src/views/product/index.vue
Normal file
418
ruoyi-ui/src/views/product/index.vue
Normal file
@@ -0,0 +1,418 @@
|
|||||||
|
<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="${comment}" prop="productId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.productId"
|
||||||
|
placeholder="请输入${comment}"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品名称" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.name"
|
||||||
|
placeholder="请输入商品名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类ID" prop="categoryId">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.categoryId"
|
||||||
|
placeholder="请输入分类ID"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="原价" prop="originalPrice">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.originalPrice"
|
||||||
|
placeholder="请输入原价"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="现价" prop="currentPrice">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.currentPrice"
|
||||||
|
placeholder="请输入现价"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="包月时长" prop="monthlyDuration">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.monthlyDuration"
|
||||||
|
placeholder="请输入包月时长"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="包季时长" prop="quarterlyDuration">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.quarterlyDuration"
|
||||||
|
placeholder="请输入包季时长"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库存数量" prop="stock">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.stock"
|
||||||
|
placeholder="请输入库存数量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="销量" prop="sales">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.sales"
|
||||||
|
placeholder="请输入销量"
|
||||||
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createdAt">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.createdAt"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="更新时间" prop="updatedAt">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="queryParams.updatedAt"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择更新时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</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:product: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="['system:product: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="['system:product: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="['system:product:export']"
|
||||||
|
>导出</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="productList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="商品ID" align="center" prop="id" />
|
||||||
|
<el-table-column label="${comment}" align="center" prop="productId" />
|
||||||
|
<el-table-column label="商品名称" align="center" prop="name" />
|
||||||
|
<el-table-column label="商品描述" align="center" prop="description" />
|
||||||
|
<el-table-column label="分类ID" align="center" prop="categoryId" />
|
||||||
|
<el-table-column label="商品类型:1-包月,2-包季,3-半年 " align="center" prop="productType" />
|
||||||
|
<el-table-column label="状态:0-下架,1-上架" align="center" prop="status" />
|
||||||
|
<el-table-column label="原价" align="center" prop="originalPrice" />
|
||||||
|
<el-table-column label="现价" align="center" prop="currentPrice" />
|
||||||
|
<el-table-column label="包月时长" align="center" prop="monthlyDuration" />
|
||||||
|
<el-table-column label="包季时长" align="center" prop="quarterlyDuration" />
|
||||||
|
<el-table-column label="库存数量" align="center" prop="stock" />
|
||||||
|
<el-table-column label="销量" align="center" prop="sales" />
|
||||||
|
<el-table-column label="创建时间" align="center" prop="createdAt" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createdAt, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="更新时间" align="center" prop="updatedAt" width="180">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.updatedAt, '{y}-{m}-{d}') }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<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:product:edit']"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['system:product: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="${comment}" prop="productId">
|
||||||
|
<el-input v-model="form.productId" placeholder="请输入${comment}" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品名称" prop="name">
|
||||||
|
<el-input v-model="form.name" placeholder="请输入商品名称" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="商品描述" prop="description">
|
||||||
|
<el-input v-model="form.description" type="textarea" placeholder="请输入内容" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="分类ID" prop="categoryId">
|
||||||
|
<el-input v-model="form.categoryId" placeholder="请输入分类ID" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="原价" prop="originalPrice">
|
||||||
|
<el-input v-model="form.originalPrice" placeholder="请输入原价" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="现价" prop="currentPrice">
|
||||||
|
<el-input v-model="form.currentPrice" placeholder="请输入现价" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="包月时长" prop="monthlyDuration">
|
||||||
|
<el-input v-model="form.monthlyDuration" placeholder="请输入包月时长" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="包季时长" prop="quarterlyDuration">
|
||||||
|
<el-input v-model="form.quarterlyDuration" placeholder="请输入包季时长" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="库存数量" prop="stock">
|
||||||
|
<el-input v-model="form.stock" placeholder="请输入库存数量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="销量" prop="sales">
|
||||||
|
<el-input v-model="form.sales" placeholder="请输入销量" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="创建时间" prop="createdAt">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.createdAt"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择创建时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="更新时间" prop="updatedAt">
|
||||||
|
<el-date-picker clearable
|
||||||
|
v-model="form.updatedAt"
|
||||||
|
type="date"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
placeholder="请选择更新时间">
|
||||||
|
</el-date-picker>
|
||||||
|
</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 { listProduct, getProduct, delProduct, addProduct, updateProduct } from "@/api/system/product"
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "Product",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 显示搜索条件
|
||||||
|
showSearch: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 商品表格数据
|
||||||
|
productList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: "",
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
productId: null,
|
||||||
|
name: null,
|
||||||
|
description: null,
|
||||||
|
categoryId: null,
|
||||||
|
productType: null,
|
||||||
|
status: null,
|
||||||
|
originalPrice: null,
|
||||||
|
currentPrice: null,
|
||||||
|
monthlyDuration: null,
|
||||||
|
quarterlyDuration: null,
|
||||||
|
stock: null,
|
||||||
|
sales: null,
|
||||||
|
createdAt: null,
|
||||||
|
updatedAt: null
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: "商品名称不能为空", trigger: "blur" }
|
||||||
|
],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询商品列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
listProduct(this.queryParams).then(response => {
|
||||||
|
this.productList = response.rows
|
||||||
|
this.total = response.total
|
||||||
|
this.loading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
id: null,
|
||||||
|
productId: null,
|
||||||
|
name: null,
|
||||||
|
description: null,
|
||||||
|
categoryId: null,
|
||||||
|
productType: null,
|
||||||
|
status: null,
|
||||||
|
originalPrice: null,
|
||||||
|
currentPrice: null,
|
||||||
|
monthlyDuration: null,
|
||||||
|
quarterlyDuration: null,
|
||||||
|
stock: null,
|
||||||
|
sales: null,
|
||||||
|
createdAt: null,
|
||||||
|
updatedAt: 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
|
||||||
|
getProduct(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) {
|
||||||
|
updateProduct(this.form).then(response => {
|
||||||
|
this.$modal.msgSuccess("修改成功")
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
addProduct(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 delProduct(ids)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.$modal.msgSuccess("删除成功")
|
||||||
|
}).catch(() => {})
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download('system/product/export', {
|
||||||
|
...this.queryParams
|
||||||
|
}, `product_${new Date().getTime()}.xlsx`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
Reference in New Issue
Block a user