diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/ProductController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/ProductController.java new file mode 100644 index 0000000..28d87c1 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/back/ProductController.java @@ -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 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 list = productService.selectProductList(product); + ExcelUtil util = new ExcelUtil(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)); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ClientProductController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ClientProductController.java new file mode 100644 index 0000000..a6dab79 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/ClientProductController.java @@ -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 list = productService.selectProductList(product); + return getDataTableData(list); + } +} diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/IndexController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/IndexController.java index f845bfe..dcc2975 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/IndexController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/client/IndexController.java @@ -4,12 +4,10 @@ package com.ruoyi.web.controller.client; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; 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.utils.SecurityUtils; -import com.ruoyi.system.service.IBannerInfoService; -import com.ruoyi.system.service.ICategoryInfoService; -import com.ruoyi.system.service.IMusicInfoService; -import com.ruoyi.system.service.IRecommendInfoService; +import com.ruoyi.system.service.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -32,6 +30,8 @@ public class IndexController extends BaseController { private IRecommendInfoService recommendInfoService; @Autowired private IMusicInfoService musicService; + @Autowired + private INotificationsService notificationsService; /** * @return com.ruoyi.common.core.domain.AjaxResult * 获取banner @@ -85,6 +85,11 @@ public class IndexController extends BaseController { return getDataTableData(list); } - - + // 获取消息通知 + @GetMapping("/notice") + public AjaxResult getNotice(){ + Long userId = SecurityUtils.getUserId(); + List result = notificationsService.selectNotificationsByUserId(userId); + return AjaxResult.success(result); + } } diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml index c050fd5..5bdc5c2 100644 --- a/ruoyi-admin/src/main/resources/application.yml +++ b/ruoyi-admin/src/main/resources/application.yml @@ -16,10 +16,10 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为8080 - port: 8085 + port: 8080 servlet: # 应用的访问路径 - context-path: /dev-api + context-path: / tomcat: # tomcat的URI编码 uri-encoding: UTF-8 @@ -67,14 +67,21 @@ spring: enabled: true # redis 配置 redis: - # 地址 - host: 127.0.0.1 + host: 116.204.124.80 # 端口,默认为6379 - port: 6379 + port: 16379 # 数据库索引 database: 0 # 密码 - password: + password: Lwz19520416443@ + # 地址 +# host: 127.0.0.1 +# # 端口,默认为6379 +# port: 6379 +# # 数据库索引 +# database: 0 +# # 密码 +# password: # 连接超时时间 timeout: 10s lettuce: diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Product.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Product.java new file mode 100644 index 0000000..cea6089 --- /dev/null +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/Product.java @@ -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(); + } +} diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java index 444fc6b..fa8ac53 100644 --- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java +++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/ShopUser.java @@ -14,7 +14,7 @@ public class ShopUser { * 1 账号密码 2 验证码 3 一键登录 */ private int method; - @Getter + private String username; private String password; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CategoryInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CategoryInfoMapper.java index ba52839..d011ab2 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CategoryInfoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/CategoryInfoMapper.java @@ -1,7 +1,6 @@ package com.ruoyi.system.mapper; import com.ruoyi.common.core.domain.entity.CategoryInfo; -import com.ruoyi.common.core.domain.entity.MusicInfo; import org.apache.ibatis.annotations.Param; import java.util.List; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicCollectMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicCollectMapper.java index 493eee1..004bfbd 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicCollectMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicCollectMapper.java @@ -1,7 +1,6 @@ package com.ruoyi.system.mapper; import com.ruoyi.common.core.domain.entity.MusicCollect; -import com.ruoyi.common.core.domain.entity.UserCollect; import java.util.List; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneRelateMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneRelateMapper.java index 0bcf84e..0fc1e4d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneRelateMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/MusicSceneRelateMapper.java @@ -2,15 +2,13 @@ package com.ruoyi.system.mapper; import com.ruoyi.common.core.domain.entity.MusicSceneRelate; -import java.util.List; - /** * 【请填写功能名称】Mapper接口 - * + * * @author ruoyi * @date 2025-07-15 */ -public interface MusicSceneRelateMapper +public interface MusicSceneRelateMapper { int insertMusicSceneRelate(MusicSceneRelate musicSceneRelate); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/NotificationsMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/NotificationsMapper.java index 3d73299..d43564c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/NotificationsMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/NotificationsMapper.java @@ -6,15 +6,15 @@ import java.util.List; /** * 【请填写功能名称】Mapper接口 - * + * * @author ruoyi * @date 2025-08-23 */ -public interface NotificationsMapper +public interface NotificationsMapper { /** * 查询【请填写功能名称】 - * + * * @param id 【请填写功能名称】主键 * @return 【请填写功能名称】 */ @@ -22,7 +22,7 @@ public interface NotificationsMapper /** * 查询【请填写功能名称】列表 - * + * * @param notifications 【请填写功能名称】 * @return 【请填写功能名称】集合 */ @@ -30,7 +30,7 @@ public interface NotificationsMapper /** * 新增【请填写功能名称】 - * + * * @param notifications 【请填写功能名称】 * @return 结果 */ @@ -38,7 +38,7 @@ public interface NotificationsMapper /** * 修改【请填写功能名称】 - * + * * @param notifications 【请填写功能名称】 * @return 结果 */ @@ -46,7 +46,7 @@ public interface NotificationsMapper /** * 删除【请填写功能名称】 - * + * * @param id 【请填写功能名称】主键 * @return 结果 */ @@ -54,9 +54,11 @@ public interface NotificationsMapper /** * 批量删除【请填写功能名称】 - * + * * @param ids 需要删除的数据主键集合 * @return 结果 */ public int deleteNotificationsByIds(Long[] ids); + + List selectNotificationsByUserId(Long userId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductMapper.java new file mode 100644 index 0000000..cbadf5f --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ProductMapper.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecommendInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecommendInfoMapper.java index b7c6f7c..374386a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecommendInfoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecommendInfoMapper.java @@ -1,6 +1,5 @@ package com.ruoyi.system.mapper; -import com.ruoyi.common.core.domain.entity.MusicRecommend; import com.ruoyi.common.core.domain.entity.RecommendInfo; import org.apache.ibatis.annotations.Param; @@ -8,15 +7,15 @@ import java.util.List; /** * 推荐Mapper接口 - * + * * @author ruoyi * @date 2025-07-15 */ -public interface RecommendInfoMapper +public interface RecommendInfoMapper { /** * 查询推荐 - * + * * @param id 推荐主键 * @return 推荐 */ @@ -24,7 +23,7 @@ public interface RecommendInfoMapper /** * 查询推荐列表 - * + * * @param recommendInfo 推荐 * @return 推荐集合 */ @@ -32,7 +31,7 @@ public interface RecommendInfoMapper /** * 新增推荐 - * + * * @param recommendInfo 推荐 * @return 结果 */ @@ -40,7 +39,7 @@ public interface RecommendInfoMapper /** * 修改推荐 - * + * * @param recommendInfo 推荐 * @return 结果 */ @@ -48,7 +47,7 @@ public interface RecommendInfoMapper /** * 删除推荐 - * + * * @param id 推荐主键 * @return 结果 */ @@ -56,7 +55,7 @@ public interface RecommendInfoMapper /** * 批量删除推荐 - * + * * @param ids 需要删除的数据主键集合 * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java index 199621b..b544faf 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ShopUserMapper.java @@ -4,7 +4,6 @@ import com.ruoyi.common.core.domain.entity.ShopUser; import com.ruoyi.common.core.domain.entity.ShopUserResq; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; import java.util.List; diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java index 13d49d6..5342a06 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysConfigMapper.java @@ -1,18 +1,19 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.system.domain.SysConfig; +import java.util.List; + /** * 参数配置 数据层 - * + * * @author ruoyi */ public interface SysConfigMapper { /** * 查询参数配置信息 - * + * * @param config 参数配置信息 * @return 参数配置信息 */ @@ -20,7 +21,7 @@ public interface SysConfigMapper /** * 通过ID查询配置 - * + * * @param configId 参数ID * @return 参数配置信息 */ @@ -28,7 +29,7 @@ public interface SysConfigMapper /** * 查询参数配置列表 - * + * * @param config 参数配置信息 * @return 参数配置集合 */ @@ -36,7 +37,7 @@ public interface SysConfigMapper /** * 根据键名查询参数配置信息 - * + * * @param configKey 参数键名 * @return 参数配置信息 */ @@ -44,7 +45,7 @@ public interface SysConfigMapper /** * 新增参数配置 - * + * * @param config 参数配置信息 * @return 结果 */ @@ -52,7 +53,7 @@ public interface SysConfigMapper /** * 修改参数配置 - * + * * @param config 参数配置信息 * @return 结果 */ @@ -60,7 +61,7 @@ public interface SysConfigMapper /** * 删除参数配置 - * + * * @param configId 参数ID * @return 结果 */ @@ -68,7 +69,7 @@ public interface SysConfigMapper /** * 批量删除参数信息 - * + * * @param configIds 需要删除的参数ID * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java index 384a9b6..d09911d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDeptMapper.java @@ -1,19 +1,20 @@ package com.ruoyi.system.mapper; -import java.util.List; -import org.apache.ibatis.annotations.Param; import com.ruoyi.common.core.domain.entity.SysDept; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 部门管理 数据层 - * + * * @author ruoyi */ public interface SysDeptMapper { /** * 查询部门管理数据 - * + * * @param dept 部门信息 * @return 部门信息集合 */ @@ -21,7 +22,7 @@ public interface SysDeptMapper /** * 根据角色ID查询部门树信息 - * + * * @param roleId 角色ID * @param deptCheckStrictly 部门树选择项是否关联显示 * @return 选中部门列表 @@ -30,7 +31,7 @@ public interface SysDeptMapper /** * 根据部门ID查询信息 - * + * * @param deptId 部门ID * @return 部门信息 */ @@ -38,7 +39,7 @@ public interface SysDeptMapper /** * 根据ID查询所有子部门 - * + * * @param deptId 部门ID * @return 部门列表 */ @@ -46,7 +47,7 @@ public interface SysDeptMapper /** * 根据ID查询所有子部门(正常状态) - * + * * @param deptId 部门ID * @return 子部门数 */ @@ -54,7 +55,7 @@ public interface SysDeptMapper /** * 是否存在子节点 - * + * * @param deptId 部门ID * @return 结果 */ @@ -62,7 +63,7 @@ public interface SysDeptMapper /** * 查询部门是否存在用户 - * + * * @param deptId 部门ID * @return 结果 */ @@ -70,7 +71,7 @@ public interface SysDeptMapper /** * 校验部门名称是否唯一 - * + * * @param deptName 部门名称 * @param parentId 父部门ID * @return 结果 @@ -79,7 +80,7 @@ public interface SysDeptMapper /** * 新增部门信息 - * + * * @param dept 部门信息 * @return 结果 */ @@ -87,7 +88,7 @@ public interface SysDeptMapper /** * 修改部门信息 - * + * * @param dept 部门信息 * @return 结果 */ @@ -95,14 +96,14 @@ public interface SysDeptMapper /** * 修改所在部门正常状态 - * + * * @param deptIds 部门ID组 */ public void updateDeptStatusNormal(Long[] deptIds); /** * 修改子元素关系 - * + * * @param depts 子元素 * @return 结果 */ @@ -110,7 +111,7 @@ public interface SysDeptMapper /** * 删除部门管理信息 - * + * * @param deptId 部门ID * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java index a341f1e..37ec349 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictDataMapper.java @@ -1,19 +1,20 @@ package com.ruoyi.system.mapper; -import java.util.List; -import org.apache.ibatis.annotations.Param; import com.ruoyi.common.core.domain.entity.SysDictData; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 字典表 数据层 - * + * * @author ruoyi */ public interface SysDictDataMapper { /** * 根据条件分页查询字典数据 - * + * * @param dictData 字典数据信息 * @return 字典数据集合信息 */ @@ -21,7 +22,7 @@ public interface SysDictDataMapper /** * 根据字典类型查询字典数据 - * + * * @param dictType 字典类型 * @return 字典数据集合信息 */ @@ -29,7 +30,7 @@ public interface SysDictDataMapper /** * 根据字典类型和字典键值查询字典数据信息 - * + * * @param dictType 字典类型 * @param dictValue 字典键值 * @return 字典标签 @@ -38,7 +39,7 @@ public interface SysDictDataMapper /** * 根据字典数据ID查询信息 - * + * * @param dictCode 字典数据ID * @return 字典数据 */ @@ -46,7 +47,7 @@ public interface SysDictDataMapper /** * 查询字典数据 - * + * * @param dictType 字典类型 * @return 字典数据 */ @@ -54,7 +55,7 @@ public interface SysDictDataMapper /** * 通过字典ID删除字典数据信息 - * + * * @param dictCode 字典数据ID * @return 结果 */ @@ -62,7 +63,7 @@ public interface SysDictDataMapper /** * 批量删除字典数据信息 - * + * * @param dictCodes 需要删除的字典数据ID * @return 结果 */ @@ -70,7 +71,7 @@ public interface SysDictDataMapper /** * 新增字典数据信息 - * + * * @param dictData 字典数据信息 * @return 结果 */ @@ -78,7 +79,7 @@ public interface SysDictDataMapper /** * 修改字典数据信息 - * + * * @param dictData 字典数据信息 * @return 结果 */ @@ -86,7 +87,7 @@ public interface SysDictDataMapper /** * 同步修改字典类型 - * + * * @param oldDictType 旧字典类型 * @param newDictType 新旧字典类型 * @return 结果 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java index 5fb48fb..cb654f1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysDictTypeMapper.java @@ -1,18 +1,19 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.common.core.domain.entity.SysDictType; +import java.util.List; + /** * 字典表 数据层 - * + * * @author ruoyi */ public interface SysDictTypeMapper { /** * 根据条件分页查询字典类型 - * + * * @param dictType 字典类型信息 * @return 字典类型集合信息 */ @@ -20,14 +21,14 @@ public interface SysDictTypeMapper /** * 根据所有字典类型 - * + * * @return 字典类型集合信息 */ public List selectDictTypeAll(); /** * 根据字典类型ID查询信息 - * + * * @param dictId 字典类型ID * @return 字典类型 */ @@ -35,7 +36,7 @@ public interface SysDictTypeMapper /** * 根据字典类型查询信息 - * + * * @param dictType 字典类型 * @return 字典类型 */ @@ -43,7 +44,7 @@ public interface SysDictTypeMapper /** * 通过字典ID删除字典信息 - * + * * @param dictId 字典ID * @return 结果 */ @@ -51,7 +52,7 @@ public interface SysDictTypeMapper /** * 批量删除字典类型信息 - * + * * @param dictIds 需要删除的字典ID * @return 结果 */ @@ -59,7 +60,7 @@ public interface SysDictTypeMapper /** * 新增字典类型信息 - * + * * @param dictType 字典类型信息 * @return 结果 */ @@ -67,7 +68,7 @@ public interface SysDictTypeMapper /** * 修改字典类型信息 - * + * * @param dictType 字典类型信息 * @return 结果 */ @@ -75,7 +76,7 @@ public interface SysDictTypeMapper /** * 校验字典类型称是否唯一 - * + * * @param dictType 字典类型 * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java index 629866f..a90aa60 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysLogininforMapper.java @@ -1,25 +1,26 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.system.domain.SysLogininfor; +import java.util.List; + /** * 系统访问日志情况信息 数据层 - * + * * @author ruoyi */ public interface SysLogininforMapper { /** * 新增系统登录日志 - * + * * @param logininfor 访问日志对象 */ public void insertLogininfor(SysLogininfor logininfor); /** * 查询系统登录日志集合 - * + * * @param logininfor 访问日志对象 * @return 登录记录集合 */ @@ -27,7 +28,7 @@ public interface SysLogininforMapper /** * 批量删除系统登录日志 - * + * * @param infoIds 需要删除的登录日志ID * @return 结果 */ @@ -35,7 +36,7 @@ public interface SysLogininforMapper /** * 清空系统登录日志 - * + * * @return 结果 */ public int cleanLogininfor(); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java index 99c0c50..82305de 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysMenuMapper.java @@ -1,8 +1,9 @@ package com.ruoyi.system.mapper; -import java.util.List; -import org.apache.ibatis.annotations.Param; 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查询权限 - * + * * @param roleId 角色ID * @return 权限列表 */ @@ -67,7 +68,7 @@ public interface SysMenuMapper /** * 根据角色ID查询菜单树信息 - * + * * @param roleId 角色ID * @param menuCheckStrictly 菜单树选择项是否关联显示 * @return 选中菜单列表 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java index c34f0a2..ba0ea46 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysNoticeMapper.java @@ -1,18 +1,19 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.system.domain.SysNotice; +import java.util.List; + /** * 通知公告表 数据层 - * + * * @author ruoyi */ public interface SysNoticeMapper { /** * 查询公告信息 - * + * * @param noticeId 公告ID * @return 公告信息 */ @@ -20,7 +21,7 @@ public interface SysNoticeMapper /** * 查询公告列表 - * + * * @param notice 公告信息 * @return 公告集合 */ @@ -28,7 +29,7 @@ public interface SysNoticeMapper /** * 新增公告 - * + * * @param notice 公告信息 * @return 结果 */ @@ -36,7 +37,7 @@ public interface SysNoticeMapper /** * 修改公告 - * + * * @param notice 公告信息 * @return 结果 */ @@ -44,7 +45,7 @@ public interface SysNoticeMapper /** * 批量删除公告 - * + * * @param noticeId 公告ID * @return 结果 */ @@ -52,7 +53,7 @@ public interface SysNoticeMapper /** * 批量删除公告信息 - * + * * @param noticeIds 需要删除的公告ID * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java index 2ae6457..08768e0 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysOperLogMapper.java @@ -1,25 +1,26 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.system.domain.SysOperLog; +import java.util.List; + /** * 操作日志 数据层 - * + * * @author ruoyi */ public interface SysOperLogMapper { /** * 新增操作日志 - * + * * @param operLog 操作日志对象 */ public void insertOperlog(SysOperLog operLog); /** * 查询系统操作日志集合 - * + * * @param operLog 操作日志对象 * @return 操作日志集合 */ @@ -27,7 +28,7 @@ public interface SysOperLogMapper /** * 批量删除系统操作日志 - * + * * @param operIds 需要删除的操作日志ID * @return 结果 */ @@ -35,7 +36,7 @@ public interface SysOperLogMapper /** * 查询操作日志详细 - * + * * @param operId 操作ID * @return 操作日志对象 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java index 19be227..568781d 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysPostMapper.java @@ -1,18 +1,19 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.system.domain.SysPost; +import java.util.List; + /** * 岗位信息 数据层 - * + * * @author ruoyi */ public interface SysPostMapper { /** * 查询岗位数据集合 - * + * * @param post 岗位信息 * @return 岗位数据集合 */ @@ -20,14 +21,14 @@ public interface SysPostMapper /** * 查询所有岗位 - * + * * @return 岗位列表 */ public List selectPostAll(); /** * 通过岗位ID查询岗位信息 - * + * * @param postId 岗位ID * @return 角色对象信息 */ @@ -35,7 +36,7 @@ public interface SysPostMapper /** * 根据用户ID获取岗位选择框列表 - * + * * @param userId 用户ID * @return 选中岗位ID列表 */ @@ -43,7 +44,7 @@ public interface SysPostMapper /** * 查询用户所属岗位组 - * + * * @param userName 用户名 * @return 结果 */ @@ -51,7 +52,7 @@ public interface SysPostMapper /** * 删除岗位信息 - * + * * @param postId 岗位ID * @return 结果 */ @@ -59,7 +60,7 @@ public interface SysPostMapper /** * 批量删除岗位信息 - * + * * @param postIds 需要删除的岗位ID * @return 结果 */ @@ -67,7 +68,7 @@ public interface SysPostMapper /** * 修改岗位信息 - * + * * @param post 岗位信息 * @return 结果 */ @@ -75,7 +76,7 @@ public interface SysPostMapper /** * 新增岗位信息 - * + * * @param post 岗位信息 * @return 结果 */ @@ -83,7 +84,7 @@ public interface SysPostMapper /** * 校验岗位名称 - * + * * @param postName 岗位名称 * @return 结果 */ @@ -91,7 +92,7 @@ public interface SysPostMapper /** * 校验岗位编码 - * + * * @param postCode 岗位编码 * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java index f9d3a2f..97625c9 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleDeptMapper.java @@ -1,18 +1,19 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.system.domain.SysRoleDept; +import java.util.List; + /** * 角色与部门关联表 数据层 - * + * * @author ruoyi */ public interface SysRoleDeptMapper { /** * 通过角色ID删除角色和部门关联 - * + * * @param roleId 角色ID * @return 结果 */ @@ -20,7 +21,7 @@ public interface SysRoleDeptMapper /** * 批量删除角色部门关联信息 - * + * * @param ids 需要删除的数据ID * @return 结果 */ @@ -28,7 +29,7 @@ public interface SysRoleDeptMapper /** * 查询部门使用数量 - * + * * @param deptId 部门ID * @return 结果 */ @@ -36,7 +37,7 @@ public interface SysRoleDeptMapper /** * 批量新增角色部门信息 - * + * * @param roleDeptList 角色部门列表 * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java index cf2bd8c..0f6317c 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMapper.java @@ -1,18 +1,19 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.common.core.domain.entity.SysRole; +import java.util.List; + /** * 角色表 数据层 - * + * * @author ruoyi */ public interface SysRoleMapper { /** * 根据条件分页查询角色数据 - * + * * @param role 角色信息 * @return 角色数据集合信息 */ @@ -20,7 +21,7 @@ public interface SysRoleMapper /** * 根据用户ID查询角色 - * + * * @param userId 用户ID * @return 角色列表 */ @@ -28,14 +29,14 @@ public interface SysRoleMapper /** * 查询所有角色 - * + * * @return 角色列表 */ public List selectRoleAll(); /** * 根据用户ID获取角色选择框列表 - * + * * @param userId 用户ID * @return 选中角色ID列表 */ @@ -43,7 +44,7 @@ public interface SysRoleMapper /** * 通过角色ID查询角色 - * + * * @param roleId 角色ID * @return 角色对象信息 */ @@ -51,7 +52,7 @@ public interface SysRoleMapper /** * 根据用户ID查询角色 - * + * * @param userName 用户名 * @return 角色列表 */ @@ -59,7 +60,7 @@ public interface SysRoleMapper /** * 校验角色名称是否唯一 - * + * * @param roleName 角色名称 * @return 角色信息 */ @@ -67,7 +68,7 @@ public interface SysRoleMapper /** * 校验角色权限是否唯一 - * + * * @param roleKey 角色权限 * @return 角色信息 */ @@ -75,7 +76,7 @@ public interface SysRoleMapper /** * 修改角色信息 - * + * * @param role 角色信息 * @return 结果 */ @@ -83,7 +84,7 @@ public interface SysRoleMapper /** * 新增角色信息 - * + * * @param role 角色信息 * @return 结果 */ @@ -91,7 +92,7 @@ public interface SysRoleMapper /** * 通过角色ID删除角色 - * + * * @param roleId 角色ID * @return 结果 */ @@ -99,7 +100,7 @@ public interface SysRoleMapper /** * 批量删除角色信息 - * + * * @param roleIds 需要删除的角色ID * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java index 6602bee..9c66670 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysRoleMenuMapper.java @@ -1,18 +1,19 @@ package com.ruoyi.system.mapper; -import java.util.List; import com.ruoyi.system.domain.SysRoleMenu; +import java.util.List; + /** * 角色与菜单关联表 数据层 - * + * * @author ruoyi */ public interface SysRoleMenuMapper { /** * 查询菜单使用数量 - * + * * @param menuId 菜单ID * @return 结果 */ @@ -20,7 +21,7 @@ public interface SysRoleMenuMapper /** * 通过角色ID删除角色和菜单关联 - * + * * @param roleId 角色ID * @return 结果 */ @@ -28,7 +29,7 @@ public interface SysRoleMenuMapper /** * 批量删除角色菜单关联信息 - * + * * @param ids 需要删除的数据ID * @return 结果 */ @@ -36,7 +37,7 @@ public interface SysRoleMenuMapper /** * 批量新增角色菜单信息 - * + * * @param roleMenuList 角色菜单列表 * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java index 0976eb0..6fc94da 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java @@ -1,19 +1,20 @@ package com.ruoyi.system.mapper; -import java.util.List; -import org.apache.ibatis.annotations.Param; import com.ruoyi.common.core.domain.entity.SysUser; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 用户表 数据层 - * + * * @author ruoyi */ public interface SysUserMapper { /** * 根据条件分页查询用户列表 - * + * * @param sysUser 用户信息 * @return 用户信息集合信息 */ @@ -21,7 +22,7 @@ public interface SysUserMapper /** * 根据条件分页查询已配用户角色列表 - * + * * @param user 用户信息 * @return 用户信息集合信息 */ @@ -29,7 +30,7 @@ public interface SysUserMapper /** * 根据条件分页查询未分配用户角色列表 - * + * * @param user 用户信息 * @return 用户信息集合信息 */ @@ -37,7 +38,7 @@ public interface SysUserMapper /** * 通过用户名查询用户 - * + * * @param userName 用户名 * @return 用户对象信息 */ @@ -45,7 +46,7 @@ public interface SysUserMapper /** * 通过用户ID查询用户 - * + * * @param userId 用户ID * @return 用户对象信息 */ @@ -53,7 +54,7 @@ public interface SysUserMapper /** * 新增用户信息 - * + * * @param user 用户信息 * @return 结果 */ @@ -61,7 +62,7 @@ public interface SysUserMapper /** * 修改用户信息 - * + * * @param user 用户信息 * @return 结果 */ @@ -69,7 +70,7 @@ public interface SysUserMapper /** * 修改用户头像 - * + * * @param userId 用户ID * @param avatar 头像地址 * @return 结果 @@ -78,7 +79,7 @@ public interface SysUserMapper /** * 重置用户密码 - * + * * @param userId 用户ID * @param password 密码 * @return 结果 @@ -87,7 +88,7 @@ public interface SysUserMapper /** * 通过用户ID删除用户 - * + * * @param userId 用户ID * @return 结果 */ @@ -95,7 +96,7 @@ public interface SysUserMapper /** * 批量删除用户信息 - * + * * @param userIds 需要删除的用户ID * @return 结果 */ @@ -103,7 +104,7 @@ public interface SysUserMapper /** * 校验用户名称是否唯一 - * + * * @param userName 用户名称 * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java index 5f7f0d4..609ee46 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserPostMapper.java @@ -1,20 +1,20 @@ package com.ruoyi.system.mapper; -import java.util.List; - import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.system.domain.SysUserPost; +import java.util.List; + /** * 用户与岗位关联表 数据层 - * + * * @author ruoyi */ public interface SysUserPostMapper { /** * 通过用户ID删除用户和岗位关联 - * + * * @param userId 用户ID * @return 结果 */ @@ -22,7 +22,7 @@ public interface SysUserPostMapper /** * 通过岗位ID查询岗位使用数量 - * + * * @param postId 岗位ID * @return 结果 */ @@ -30,7 +30,7 @@ public interface SysUserPostMapper /** * 批量删除用户和岗位关联 - * + * * @param ids 需要删除的数据ID * @return 结果 */ @@ -38,7 +38,7 @@ public interface SysUserPostMapper /** * 批量新增用户岗位信息 - * + * * @param userPostList 用户岗位列表 * @return 结果 */ diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java index 3143ec8..cb79572 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserRoleMapper.java @@ -1,19 +1,20 @@ package com.ruoyi.system.mapper; -import java.util.List; -import org.apache.ibatis.annotations.Param; import com.ruoyi.system.domain.SysUserRole; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 用户与角色关联表 数据层 - * + * * @author ruoyi */ public interface SysUserRoleMapper { /** * 通过用户ID删除用户和角色关联 - * + * * @param userId 用户ID * @return 结果 */ @@ -21,7 +22,7 @@ public interface SysUserRoleMapper /** * 批量删除用户和角色关联 - * + * * @param ids 需要删除的数据ID * @return 结果 */ @@ -29,7 +30,7 @@ public interface SysUserRoleMapper /** * 通过角色ID查询角色使用数量 - * + * * @param roleId 角色ID * @return 结果 */ @@ -37,7 +38,7 @@ public interface SysUserRoleMapper /** * 批量新增用户角色信息 - * + * * @param userRoleList 用户角色列表 * @return 结果 */ @@ -45,7 +46,7 @@ public interface SysUserRoleMapper /** * 删除用户和角色关联信息 - * + * * @param userRole 用户和角色关联信息 * @return 结果 */ @@ -53,7 +54,7 @@ public interface SysUserRoleMapper /** * 批量取消授权用户角色 - * + * * @param roleId 角色ID * @param userIds 需要删除的用户数据ID * @return 结果 diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/INotificationsService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/INotificationsService.java index a0aa742..b2e1ad1 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/INotificationsService.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/INotificationsService.java @@ -70,4 +70,6 @@ public interface INotificationsService public AjaxResult publishNotification(Long id); AjaxResult publishSendAll(Long id); + + List selectNotificationsByUserId(Long userId); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductService.java new file mode 100644 index 0000000..08b2377 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/IProductService.java @@ -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 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); +} diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CShopUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CShopUserServiceImpl.java index bcfd364..714d303 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CShopUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CShopUserServiceImpl.java @@ -49,9 +49,12 @@ public class CShopUserServiceImpl implements ShopUserService { } case "2": // 验证码 - //String code = redisCache.getCacheObject("sms_code:"+shopUser.getPhone()); + String code = redisCache.getCacheObject("sms_code:"+shopUser.getPhone()); + if (code == null){ + code = "9527"; + } // TODO:写死 - String code="9527"; + //String code="9527"; String reqCode = shopUser.getCode(); if (code != null && code.equals(reqCode)){ // 登录 @@ -70,8 +73,14 @@ public class CShopUserServiceImpl implements ShopUserService { UmResp resp = umengConfig.send(uMtoken, deviceTypeUp); if (resp != null && resp.isSuccess()){ String phone = (String) resp.getData().get("mobile"); - shopUser.setPhone(phone); - return loginAndRegis(shopUser); + if (phone != null) { + shopUser.setPhone(phone); + return loginAndRegis(shopUser); + }else { + ShopUser msg = new ShopUser(); + msg.setMsg("手机号获取失败"); + return msg; + } } break; } @@ -132,7 +141,6 @@ public class CShopUserServiceImpl implements ShopUserService { member.setVip(2L); member.setRegisterTime(new Date()); member.setPassword(IdUtil.fastUUID()); - member.setUsername(shopUser.getUsername()); member.setDeviceId(shopUser.getDeviceId()); member.setDeviceType(shopUser.getDeviceType()); member.setHeadImg("/file/download/user/head.jpg"); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotificationsServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotificationsServiceImpl.java index 2d0a5a4..97e6f29 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotificationsServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/NotificationsServiceImpl.java @@ -215,6 +215,11 @@ public class NotificationsServiceImpl implements INotificationsService return AjaxResult.success("通知发布完成"); } + @Override + public List selectNotificationsByUserId(Long userId) { + return notificationsMapper.selectNotificationsByUserId(userId); + } + private void sendAllToThirdParty(Notifications notification) { PushMsgInfo pushMsgInfo = new PushMsgInfo(); pushMsgInfo.setTitle(notification.getTitle()); diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductServiceImpl.java new file mode 100644 index 0000000..fedfa40 --- /dev/null +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/ProductServiceImpl.java @@ -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 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); + } +} diff --git a/ruoyi-system/src/main/resources/mapper/system/NotificationsMapper.xml b/ruoyi-system/src/main/resources/mapper/system/NotificationsMapper.xml index 9083bd5..e6338c4 100644 --- a/ruoyi-system/src/main/resources/mapper/system/NotificationsMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/NotificationsMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + + SELECT n.* FROM notifications n LEFT JOIN notification_records sr on n.id = sr.notification_id + WHERE sr.user_id=#{userId} + + diff --git a/ruoyi-system/src/main/resources/mapper/system/ProductMapper.xml b/ruoyi-system/src/main/resources/mapper/system/ProductMapper.xml new file mode 100644 index 0000000..23f15a1 --- /dev/null +++ b/ruoyi-system/src/main/resources/mapper/system/ProductMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + + + + + insert into product + + product_id, + name, + description, + category_id, + product_type, + status, + original_price, + current_price, + monthly_duration, + quarterly_duration, + stock, + sales, + created_at, + updated_at, + + + #{productId}, + #{name}, + #{description}, + #{categoryId}, + #{productType}, + #{status}, + #{originalPrice}, + #{currentPrice}, + #{monthlyDuration}, + #{quarterlyDuration}, + #{stock}, + #{sales}, + #{createdAt}, + #{updatedAt}, + + + + + update product + + product_id = #{productId}, + name = #{name}, + description = #{description}, + category_id = #{categoryId}, + product_type = #{productType}, + status = #{status}, + original_price = #{originalPrice}, + current_price = #{currentPrice}, + monthly_duration = #{monthlyDuration}, + quarterly_duration = #{quarterlyDuration}, + stock = #{stock}, + sales = #{sales}, + created_at = #{createdAt}, + updated_at = #{updatedAt}, + + where id = #{id} + + + + delete from product where id = #{id} + + + + delete from product where id in + + #{id} + + + \ No newline at end of file diff --git a/ruoyi-system/src/main/resources/mapper/system/RecommendInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RecommendInfoMapper.xml index 73d99ec..a692d94 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RecommendInfoMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RecommendInfoMapper.xml @@ -3,7 +3,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - + @@ -22,7 +22,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - + - + and user_id = #{userId} and share_decs = #{shareDecs} and music_id = #{musicId} @@ -34,12 +34,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" and review = #{review} - + - + - \ No newline at end of file + diff --git a/ruoyi-ui/src/api/system/product.js b/ruoyi-ui/src/api/system/product.js new file mode 100644 index 0000000..2246cf0 --- /dev/null +++ b/ruoyi-ui/src/api/system/product.js @@ -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' + }) +} diff --git a/ruoyi-ui/src/views/product/index.vue b/ruoyi-ui/src/views/product/index.vue new file mode 100644 index 0000000..1ec8ea8 --- /dev/null +++ b/ruoyi-ui/src/views/product/index.vue @@ -0,0 +1,418 @@ + + +