Pre Merge pull request !63 from keppel/master
11
pom.xml
@ -32,6 +32,7 @@
|
|||||||
<redisson.version>3.15.2</redisson.version>
|
<redisson.version>3.15.2</redisson.version>
|
||||||
<lock4j.version>2.2.1</lock4j.version>
|
<lock4j.version>2.2.1</lock4j.version>
|
||||||
<datasource.version>3.4.0</datasource.version>
|
<datasource.version>3.4.0</datasource.version>
|
||||||
|
<captcha.version>1.2.8</captcha.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<!-- 依赖声明 -->
|
<!-- 依赖声明 -->
|
||||||
@ -181,6 +182,13 @@
|
|||||||
<version>${ruoyi-vue-plus.version}</version>
|
<version>${ruoyi-vue-plus.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 滑动验证码 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.anji-plus</groupId>
|
||||||
|
<artifactId>spring-boot-starter-captcha</artifactId>
|
||||||
|
<version>${captcha.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</dependencyManagement>
|
</dependencyManagement>
|
||||||
|
|
||||||
@ -192,6 +200,9 @@
|
|||||||
<module>ruoyi-generator</module>
|
<module>ruoyi-generator</module>
|
||||||
<module>ruoyi-common</module>
|
<module>ruoyi-common</module>
|
||||||
<module>ruoyi-demo</module>
|
<module>ruoyi-demo</module>
|
||||||
|
<module>ruoyi-coupons</module>
|
||||||
|
<module>ruoyi-product</module>
|
||||||
|
<module>ruoyi-activity</module>
|
||||||
</modules>
|
</modules>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
|
|
||||||
|
|||||||
19
ruoyi-activity/pom.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi-vue-plus</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>2.4.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-activity</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -48,12 +48,24 @@
|
|||||||
<artifactId>ruoyi-generator</artifactId>
|
<artifactId>ruoyi-generator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 产品模块-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-product</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<!-- demo模块 -->
|
<!-- demo模块 -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.ruoyi</groupId>
|
<groupId>com.ruoyi</groupId>
|
||||||
<artifactId>ruoyi-demo</artifactId>
|
<artifactId>ruoyi-demo</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- 滑动验证码 -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.anji-plus</groupId>
|
||||||
|
<artifactId>spring-boot-starter-captcha</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
@ -1,121 +0,0 @@
|
|||||||
package com.ruoyi.web.controller.common;
|
|
||||||
|
|
||||||
import cn.hutool.captcha.AbstractCaptcha;
|
|
||||||
import cn.hutool.captcha.CircleCaptcha;
|
|
||||||
import cn.hutool.captcha.LineCaptcha;
|
|
||||||
import cn.hutool.captcha.ShearCaptcha;
|
|
||||||
import cn.hutool.captcha.generator.CodeGenerator;
|
|
||||||
import cn.hutool.captcha.generator.RandomGenerator;
|
|
||||||
import cn.hutool.core.convert.Convert;
|
|
||||||
import cn.hutool.core.util.IdUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.ruoyi.common.constant.Constants;
|
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
|
||||||
import com.ruoyi.framework.captcha.UnsignedMathGenerator;
|
|
||||||
import com.ruoyi.framework.config.properties.CaptchaProperties;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.concurrent.TimeUnit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码操作处理
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
@RestController
|
|
||||||
public class CaptchaController {
|
|
||||||
|
|
||||||
// 圆圈干扰验证码
|
|
||||||
@Resource(name = "CircleCaptcha")
|
|
||||||
private CircleCaptcha circleCaptcha;
|
|
||||||
// 线段干扰的验证码
|
|
||||||
@Resource(name = "LineCaptcha")
|
|
||||||
private LineCaptcha lineCaptcha;
|
|
||||||
// 扭曲干扰验证码
|
|
||||||
@Resource(name = "ShearCaptcha")
|
|
||||||
private ShearCaptcha shearCaptcha;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RedisCache redisCache;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private CaptchaProperties captchaProperties;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 生成验证码
|
|
||||||
*/
|
|
||||||
@GetMapping("/captchaImage")
|
|
||||||
public AjaxResult getCode() {
|
|
||||||
Map<String, Object> ajax = new HashMap<>();
|
|
||||||
Boolean enabled = captchaProperties.getEnabled();
|
|
||||||
ajax.put("enabled", enabled);
|
|
||||||
if (!enabled) {
|
|
||||||
return AjaxResult.success(ajax);
|
|
||||||
}
|
|
||||||
// 保存验证码信息
|
|
||||||
String uuid = IdUtil.simpleUUID();
|
|
||||||
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|
|
||||||
String code = null;
|
|
||||||
// 生成验证码
|
|
||||||
CodeGenerator codeGenerator;
|
|
||||||
AbstractCaptcha captcha;
|
|
||||||
switch (captchaProperties.getType()) {
|
|
||||||
case "math":
|
|
||||||
codeGenerator = new UnsignedMathGenerator(captchaProperties.getNumberLength());
|
|
||||||
break;
|
|
||||||
case "char":
|
|
||||||
codeGenerator = new RandomGenerator(captchaProperties.getCharLength());
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new IllegalArgumentException("验证码类型异常");
|
|
||||||
}
|
|
||||||
switch (captchaProperties.getCategory()) {
|
|
||||||
case "line":
|
|
||||||
captcha = lineCaptcha;
|
|
||||||
break;
|
|
||||||
case "circle":
|
|
||||||
captcha = circleCaptcha;
|
|
||||||
break;
|
|
||||||
case "shear":
|
|
||||||
captcha = shearCaptcha;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
throw new IllegalArgumentException("验证码类别异常");
|
|
||||||
}
|
|
||||||
captcha.setGenerator(codeGenerator);
|
|
||||||
captcha.createCode();
|
|
||||||
if ("math".equals(captchaProperties.getType())) {
|
|
||||||
code = getCodeResult(captcha.getCode());
|
|
||||||
} else if ("char".equals(captchaProperties.getType())) {
|
|
||||||
code = captcha.getCode();
|
|
||||||
}
|
|
||||||
redisCache.setCacheObject(verifyKey, code, Constants.CAPTCHA_EXPIRATION, TimeUnit.MINUTES);
|
|
||||||
ajax.put("uuid", uuid);
|
|
||||||
ajax.put("img", captcha.getImageBase64());
|
|
||||||
return AjaxResult.success(ajax);
|
|
||||||
}
|
|
||||||
|
|
||||||
private String getCodeResult(String capStr) {
|
|
||||||
int numberLength = captchaProperties.getNumberLength();
|
|
||||||
int a = Convert.toInt(StrUtil.sub(capStr, 0, numberLength).trim());
|
|
||||||
char operator = capStr.charAt(numberLength);
|
|
||||||
int b = Convert.toInt(StrUtil.sub(capStr, numberLength + 1, numberLength + 1 + numberLength).trim());
|
|
||||||
switch (operator) {
|
|
||||||
case '*':
|
|
||||||
return a * b + "";
|
|
||||||
case '+':
|
|
||||||
return a + b + "";
|
|
||||||
case '-':
|
|
||||||
return a - b + "";
|
|
||||||
default:
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
package com.ruoyi.web.controller.product;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.product.bo.ProBannerAddBo;
|
||||||
|
import com.ruoyi.product.bo.ProBannerEditBo;
|
||||||
|
import com.ruoyi.product.bo.ProBannerQueryBo;
|
||||||
|
import com.ruoyi.product.service.IProBannerService;
|
||||||
|
import com.ruoyi.product.vo.ProBannerVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner管理Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-06-30
|
||||||
|
*/
|
||||||
|
@Api(value = "banner管理控制器", tags = {"banner管理管理"})
|
||||||
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/product/proBanner")
|
||||||
|
public class ProBannerController extends BaseController {
|
||||||
|
|
||||||
|
private final IProBannerService iProBannerService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询banner管理列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询banner管理列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:banner:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<ProBannerVo> list(@Validated ProBannerQueryBo bo) {
|
||||||
|
return iProBannerService.queryPageList(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出banner管理列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出banner管理列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:banner:export')")
|
||||||
|
@Log(title = "banner管理", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult<ProBannerVo> export(@Validated ProBannerQueryBo bo) {
|
||||||
|
List<ProBannerVo> list = iProBannerService.queryList(bo);
|
||||||
|
ExcelUtil<ProBannerVo> util = new ExcelUtil<ProBannerVo>(ProBannerVo.class);
|
||||||
|
return util.exportExcel(list, "banner管理");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取banner管理详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取banner管理详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:banner:query')")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public AjaxResult<ProBannerVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(iProBannerService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增banner管理
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增banner管理")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:banner:add')")
|
||||||
|
@Log(title = "banner管理", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit
|
||||||
|
@PostMapping()
|
||||||
|
public AjaxResult<Void> add(@Validated @RequestBody ProBannerAddBo bo) {
|
||||||
|
return toAjax(iProBannerService.insertByAddBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改banner管理
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改banner管理")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:banner:edit')")
|
||||||
|
@Log(title = "banner管理", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit
|
||||||
|
@PutMapping()
|
||||||
|
public AjaxResult<Void> edit(@Validated @RequestBody ProBannerEditBo bo) {
|
||||||
|
return toAjax(iProBannerService.updateByEditBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除banner管理
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除banner管理")
|
||||||
|
@PreAuthorize("@ss.hasPermi('system:banner:remove')")
|
||||||
|
@Log(title = "banner管理", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(iProBannerService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,114 @@
|
|||||||
|
package com.ruoyi.web.controller.product;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.product.bo.ProCategoryAddBo;
|
||||||
|
import com.ruoyi.product.bo.ProCategoryEditBo;
|
||||||
|
import com.ruoyi.product.bo.ProCategoryQueryBo;
|
||||||
|
import com.ruoyi.product.service.IProCategoryService;
|
||||||
|
import com.ruoyi.product.vo.ProCategoryVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品服务类别Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-14
|
||||||
|
*/
|
||||||
|
@Api(value = "商品服务类别控制器", tags = {"商品服务类别管理"})
|
||||||
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/product/proCategory")
|
||||||
|
public class ProCategoryController extends BaseController {
|
||||||
|
|
||||||
|
private final IProCategoryService iProCategoryService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品服务类别列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询商品服务类别列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proCategory:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<ProCategoryVo> list(@Validated ProCategoryQueryBo bo) {
|
||||||
|
return iProCategoryService.queryPageList(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proCategory:list')")
|
||||||
|
@GetMapping("/listCategoriesWithoutPage")
|
||||||
|
public List<ProCategoryVo> listCategoriesWithoutPage(ProCategoryQueryBo proCategory) {
|
||||||
|
return iProCategoryService.queryList(proCategory);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出商品服务类别列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出商品服务类别列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proCategory:export')")
|
||||||
|
@Log(title = "商品服务类别", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult<ProCategoryVo> export(@Validated ProCategoryQueryBo bo) {
|
||||||
|
List<ProCategoryVo> list = iProCategoryService.queryList(bo);
|
||||||
|
ExcelUtil<ProCategoryVo> util = new ExcelUtil<>(ProCategoryVo.class);
|
||||||
|
return util.exportExcel(list, "商品服务类别");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商品服务类别详细信息
|
||||||
|
*/
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proCategory:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(iProCategoryService.getById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品服务类别
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增商品服务类别")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proCategory:add')")
|
||||||
|
@Log(title = "商品服务类别", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit
|
||||||
|
@PostMapping()
|
||||||
|
public AjaxResult<Void> add(@Validated @RequestBody ProCategoryAddBo bo) {
|
||||||
|
return toAjax(iProCategoryService.insertByAddBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品服务类别
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改商品服务类别")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proCategory:edit')")
|
||||||
|
@Log(title = "商品服务类别", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit
|
||||||
|
@PutMapping()
|
||||||
|
public AjaxResult<Void> edit(@Validated @RequestBody ProCategoryEditBo bo) {
|
||||||
|
return toAjax(iProCategoryService.updateByEditBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品服务类别
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除商品服务类别")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proCategory:remove')")
|
||||||
|
@Log(title = "商品服务类别", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(iProCategoryService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,111 @@
|
|||||||
|
package com.ruoyi.web.controller.product;
|
||||||
|
|
||||||
|
import com.ruoyi.common.annotation.Log;
|
||||||
|
import com.ruoyi.common.annotation.RepeatSubmit;
|
||||||
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.product.bo.ProItemAddBo;
|
||||||
|
import com.ruoyi.product.bo.ProItemEditBo;
|
||||||
|
import com.ruoyi.product.bo.ProItemQueryBo;
|
||||||
|
import com.ruoyi.product.service.IProItemService;
|
||||||
|
import com.ruoyi.product.vo.ProItemVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品详情Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
@Api(value = "商品详情控制器", tags = {"商品详情管理"})
|
||||||
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/product/proItem")
|
||||||
|
public class ProItemController extends BaseController {
|
||||||
|
|
||||||
|
private final IProItemService iProItemService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询商品详情列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("查询商品详情列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItem:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<ProItemVo> list(@Validated ProItemQueryBo bo) {
|
||||||
|
return iProItemService.queryPageList(bo);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出商品详情列表
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出商品详情列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItem:export')")
|
||||||
|
@Log(title = "商品详情", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult<ProItemVo> export(@Validated ProItemQueryBo bo) {
|
||||||
|
List<ProItemVo> list = iProItemService.queryList(bo);
|
||||||
|
ExcelUtil<ProItemVo> util = new ExcelUtil<>(ProItemVo.class);
|
||||||
|
return util.exportExcel(list, "商品详情");
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取商品详情详细信息
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取商品详情详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItem:query')")
|
||||||
|
@GetMapping("/{id}")
|
||||||
|
public AjaxResult<ProItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||||
|
@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(iProItemService.getProItemById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增商品详情
|
||||||
|
*/
|
||||||
|
@ApiOperation("新增商品详情")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItem:add')")
|
||||||
|
@Log(title = "商品详情", businessType = BusinessType.INSERT)
|
||||||
|
@RepeatSubmit
|
||||||
|
@PostMapping()
|
||||||
|
public AjaxResult<Void> add(@Validated @RequestBody ProItemAddBo bo) {
|
||||||
|
return toAjax(iProItemService.insertByAddBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改商品详情
|
||||||
|
*/
|
||||||
|
@ApiOperation("修改商品详情")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItem:edit')")
|
||||||
|
@Log(title = "商品详情", businessType = BusinessType.UPDATE)
|
||||||
|
@RepeatSubmit
|
||||||
|
@PutMapping()
|
||||||
|
public AjaxResult<Void> edit(@Validated @RequestBody ProItemEditBo bo) {
|
||||||
|
return toAjax(iProItemService.updateByEditBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除商品详情
|
||||||
|
*/
|
||||||
|
@ApiOperation("删除商品详情")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItem:remove')")
|
||||||
|
@Log(title = "商品详情", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||||
|
@PathVariable Long[] ids) {
|
||||||
|
return toAjax(iProItemService.deleteWithValidByIds(Arrays.asList(ids), true) ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
/*
|
||||||
|
package com.ruoyi.web.controller.product;
|
||||||
|
|
||||||
|
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.page.TableDataInfo;
|
||||||
|
import com.ruoyi.common.enums.BusinessType;
|
||||||
|
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||||
|
import com.ruoyi.product.bo.ProItemSpecificationAddBo;
|
||||||
|
import com.ruoyi.product.bo.ProItemSpecificationEditBo;
|
||||||
|
import com.ruoyi.product.bo.ProItemSpecificationQueryBo;
|
||||||
|
import com.ruoyi.product.service.IProItemSpecificationService;
|
||||||
|
import com.ruoyi.product.vo.ProItemSpecificationVo;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 商品规格Controller
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-06
|
||||||
|
*//*
|
||||||
|
|
||||||
|
@Api(value = "商品规格控制器", tags = {"商品规格管理"})
|
||||||
|
@RequiredArgsConstructor(onConstructor_ = @Autowired)
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/product/proItemSpecification")
|
||||||
|
public class ProItemSpecificationController extends BaseController {
|
||||||
|
|
||||||
|
private final IProItemSpecificationService iProItemSpecificationService;
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 查询商品规格列表
|
||||||
|
*//*
|
||||||
|
|
||||||
|
@ApiOperation("查询商品规格列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItemSpecification:list')")
|
||||||
|
@GetMapping("/list")
|
||||||
|
public TableDataInfo<ProItemSpecificationVo> list(ProItemSpecificationQueryBo bo) {
|
||||||
|
startPage();
|
||||||
|
List<ProItemSpecificationVo> list = iProItemSpecificationService.queryList(bo);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 导出商品规格列表
|
||||||
|
*//*
|
||||||
|
|
||||||
|
@ApiOperation("导出商品规格列表")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItemSpecification:export')")
|
||||||
|
@Log(title = "商品规格", businessType = BusinessType.EXPORT)
|
||||||
|
@GetMapping("/export")
|
||||||
|
public AjaxResult<ProItemSpecificationVo> export(ProItemSpecificationQueryBo bo) {
|
||||||
|
List<ProItemSpecificationVo> list = iProItemSpecificationService.queryList(bo);
|
||||||
|
ExcelUtil<ProItemSpecificationVo> util = new ExcelUtil<>(ProItemSpecificationVo.class);
|
||||||
|
return util.exportExcel(list, "proItemSpecification");
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 获取商品规格详细信息
|
||||||
|
*//*
|
||||||
|
|
||||||
|
@ApiOperation("获取商品规格详细信息")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItemSpecification:query')")
|
||||||
|
@GetMapping(value = "/{id}")
|
||||||
|
public AjaxResult<ProItemSpecificationVo> getInfo(@PathVariable("id") Long id) {
|
||||||
|
return AjaxResult.success(iProItemSpecificationService.queryById(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 新增商品规格
|
||||||
|
*//*
|
||||||
|
|
||||||
|
@ApiOperation("新增商品规格")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItemSpecification:add')")
|
||||||
|
@Log(title = "商品规格", businessType = BusinessType.INSERT)
|
||||||
|
@PostMapping
|
||||||
|
public AjaxResult<Void> add(@RequestBody ProItemSpecificationAddBo bo) {
|
||||||
|
return toAjax(iProItemSpecificationService.insertByAddBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 修改商品规格
|
||||||
|
*//*
|
||||||
|
|
||||||
|
@ApiOperation("修改商品规格")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItemSpecification:edit')")
|
||||||
|
@Log(title = "商品规格", businessType = BusinessType.UPDATE)
|
||||||
|
@PutMapping
|
||||||
|
public AjaxResult<Void> edit(@RequestBody ProItemSpecificationEditBo bo) {
|
||||||
|
return toAjax(iProItemSpecificationService.updateByEditBo(bo) ? 1 : 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
|
/**
|
||||||
|
* 删除商品规格
|
||||||
|
*//*
|
||||||
|
|
||||||
|
@ApiOperation("删除商品规格")
|
||||||
|
@PreAuthorize("@ss.hasPermi('product:proItemSpecification:remove')")
|
||||||
|
@Log(title = "商品规格", businessType = BusinessType.DELETE)
|
||||||
|
@DeleteMapping("/{ids}")
|
||||||
|
public AjaxResult<Void> remove(@PathVariable Long ids) {
|
||||||
|
return toAjax(iProItemSpecificationService.deleteWithValidByIds(Collections.singletonList(ids), true) ? 1 : 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
@ -1,11 +1,15 @@
|
|||||||
package com.ruoyi.web.controller.system;
|
package com.ruoyi.web.controller.system;
|
||||||
|
|
||||||
|
import com.anji.captcha.model.common.ResponseModel;
|
||||||
|
import com.anji.captcha.model.vo.CaptchaVO;
|
||||||
|
import com.anji.captcha.service.CaptchaService;
|
||||||
import com.ruoyi.common.constant.Constants;
|
import com.ruoyi.common.constant.Constants;
|
||||||
import com.ruoyi.common.core.domain.AjaxResult;
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
import com.ruoyi.common.core.domain.model.LoginBody;
|
import com.ruoyi.common.core.domain.model.LoginBody;
|
||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
|
import com.ruoyi.common.exception.BaseException;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
import com.ruoyi.framework.web.service.SysLoginService;
|
import com.ruoyi.framework.web.service.SysLoginService;
|
||||||
import com.ruoyi.framework.web.service.SysPermissionService;
|
import com.ruoyi.framework.web.service.SysPermissionService;
|
||||||
@ -17,10 +21,7 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录验证
|
* 登录验证
|
||||||
@ -28,8 +29,7 @@ import java.util.Set;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
public class SysLoginController
|
public class SysLoginController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private SysLoginService loginService;
|
private SysLoginService loginService;
|
||||||
|
|
||||||
@ -42,6 +42,9 @@ public class SysLoginController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private TokenService tokenService;
|
private TokenService tokenService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CaptchaService captchaService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 登录方法
|
* 登录方法
|
||||||
*
|
*
|
||||||
@ -49,14 +52,18 @@ public class SysLoginController
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
public AjaxResult login(@RequestBody LoginBody loginBody)
|
public AjaxResult login(@RequestBody LoginBody loginBody) {
|
||||||
{
|
CaptchaVO vo = new CaptchaVO();
|
||||||
Map<String,Object> ajax = new HashMap<>();
|
vo.setCaptchaVerification(loginBody.getCode());
|
||||||
|
ResponseModel verification = captchaService.verification(vo);
|
||||||
|
if (!Objects.equals("0000", verification.getRepCode())) {
|
||||||
|
throw new BaseException("验证码校验失败!");
|
||||||
|
}
|
||||||
// 生成令牌
|
// 生成令牌
|
||||||
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(),
|
String token = loginService.login(loginBody.getUsername(), loginBody.getPassword());
|
||||||
loginBody.getUuid());
|
Map<String, String> result = new HashMap<>();
|
||||||
ajax.put(Constants.TOKEN, token);
|
result.put(Constants.TOKEN, token);
|
||||||
return AjaxResult.success(ajax);
|
return AjaxResult.success(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -65,8 +72,7 @@ public class SysLoginController
|
|||||||
* @return 用户信息
|
* @return 用户信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("getInfo")
|
@GetMapping("getInfo")
|
||||||
public AjaxResult getInfo()
|
public AjaxResult getInfo() {
|
||||||
{
|
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||||
SysUser user = loginUser.getUser();
|
SysUser user = loginUser.getUser();
|
||||||
// 角色集合
|
// 角色集合
|
||||||
@ -86,8 +92,7 @@ public class SysLoginController
|
|||||||
* @return 路由信息
|
* @return 路由信息
|
||||||
*/
|
*/
|
||||||
@GetMapping("getRouters")
|
@GetMapping("getRouters")
|
||||||
public AjaxResult getRouters()
|
public AjaxResult getRouters() {
|
||||||
{
|
|
||||||
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
|
||||||
// 用户信息
|
// 用户信息
|
||||||
SysUser user = loginUser.getUser();
|
SysUser user = loginUser.getUser();
|
||||||
|
|||||||
@ -12,9 +12,9 @@ spring:
|
|||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
|
url: jdbc:mysql://${MYSQL_HOST:tb-mysql}:3306/meijai?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true
|
||||||
username: root
|
username: root
|
||||||
password: root
|
password: ${MYSQL_PWD}
|
||||||
# 从库数据源
|
# 从库数据源
|
||||||
slave:
|
slave:
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
@ -66,13 +66,13 @@ spring:
|
|||||||
# redis 配置
|
# redis 配置
|
||||||
redis:
|
redis:
|
||||||
# 地址
|
# 地址
|
||||||
host: localhost
|
host: ${REDIS_HOST:tb-redis}
|
||||||
# 端口,默认为6379
|
# 端口,默认为6379
|
||||||
port: 6379
|
port: 6379
|
||||||
# 数据库索引
|
# 数据库索引
|
||||||
database: 0
|
database: 3
|
||||||
# 密码
|
# 密码
|
||||||
password:
|
password: ${MYSQL_PWD}
|
||||||
# 连接超时时间
|
# 连接超时时间
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
# 是否开启ssl
|
# 是否开启ssl
|
||||||
|
|||||||
@ -13,17 +13,26 @@ ruoyi:
|
|||||||
# 获取ip地址开关
|
# 获取ip地址开关
|
||||||
addressEnabled: true
|
addressEnabled: true
|
||||||
|
|
||||||
|
aj:
|
||||||
captcha:
|
captcha:
|
||||||
# 验证码开关
|
jigsaw: classpath:images/jigsaw
|
||||||
enabled: true
|
pic-click: classpath:images/pic-click
|
||||||
# 验证码类型 math 数组计算 char 字符验证
|
cache-type: local
|
||||||
type: math
|
type: default
|
||||||
# line 线段干扰 circle 圆圈干扰 shear 扭曲干扰
|
water-mark: RuoYi-Vue-Plus
|
||||||
category: circle
|
slip-offset: 5
|
||||||
# 数字验证码位数
|
aes-status: true
|
||||||
numberLength: 1
|
interference-options: 2
|
||||||
# 字符验证码长度
|
history-data-clear-enable: true
|
||||||
charLength: 4
|
req-frequency-limit-enable: true
|
||||||
|
req-get-lock-limit: 5
|
||||||
|
req-get-lock-seconds: 360
|
||||||
|
# get接口一分钟内请求数限制
|
||||||
|
req-get-minute-limit: 30
|
||||||
|
# check接口一分钟内请求数限制
|
||||||
|
req-check-minute-limit: 60
|
||||||
|
# verify接口一分钟内请求数限制
|
||||||
|
req-verify-minute-limit: 60
|
||||||
|
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
server:
|
server:
|
||||||
|
|||||||
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg1.png
Normal file
|
After Width: | Height: | Size: 35 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg10.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg2.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg3.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg4.png
Normal file
|
After Width: | Height: | Size: 51 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg5.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg6.png
Normal file
|
After Width: | Height: | Size: 29 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg7.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg8.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
ruoyi-admin/src/main/resources/images.pic-click/bg9.png
Normal file
|
After Width: | Height: | Size: 39 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg1.png
Normal file
|
After Width: | Height: | Size: 67 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg2.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg3.png
Normal file
|
After Width: | Height: | Size: 94 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg4.png
Normal file
|
After Width: | Height: | Size: 97 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg5.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg6.png
Normal file
|
After Width: | Height: | Size: 83 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg7.png
Normal file
|
After Width: | Height: | Size: 85 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg8.png
Normal file
|
After Width: | Height: | Size: 104 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/original/bg9.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/slidingBlock/1.png
Normal file
|
After Width: | Height: | Size: 6.9 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.3 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/slidingBlock/2.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/slidingBlock/3.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
ruoyi-admin/src/main/resources/images/jigsaw/slidingBlock/4.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
@ -136,4 +136,9 @@ public class Constants
|
|||||||
* 资源映射路径 前缀
|
* 资源映射路径 前缀
|
||||||
*/
|
*/
|
||||||
public static final String REDIS_LOCK_KEY = "redis_lock:";
|
public static final String REDIS_LOCK_KEY = "redis_lock:";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 日期相关常量
|
||||||
|
*/
|
||||||
|
public static final String FULL_DATE_TIME = "yyyy-MM-dd HH:mm:ss";
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,7 +5,7 @@ import lombok.NoArgsConstructor;
|
|||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.time.LocalDateTime;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@ -18,29 +18,42 @@ import java.util.Map;
|
|||||||
@Data
|
@Data
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
public class BaseEntity implements Serializable
|
public class BaseEntity implements Serializable {
|
||||||
{
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 搜索值 */
|
/**
|
||||||
|
* 搜索值
|
||||||
|
*/
|
||||||
private String searchValue;
|
private String searchValue;
|
||||||
|
|
||||||
/** 创建者 */
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
private String createBy;
|
private String createBy;
|
||||||
|
|
||||||
/** 创建时间 */
|
/**
|
||||||
private Date createTime;
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
/** 更新者 */
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
private String updateBy;
|
private String updateBy;
|
||||||
|
|
||||||
/** 更新时间 */
|
/**
|
||||||
private Date updateTime;
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
/** 备注 */
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
/** 请求参数 */
|
/**
|
||||||
|
* 请求参数
|
||||||
|
*/
|
||||||
private Map<String, Object> params = new HashMap<>();
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.ruoyi.common.utils;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import lombok.experimental.UtilityClass;
|
||||||
|
|
||||||
|
@UtilityClass
|
||||||
|
public class IdUtils {
|
||||||
|
|
||||||
|
public Long nextId() {
|
||||||
|
return IdUtil.getSnowflake(1, 1).nextId();
|
||||||
|
}
|
||||||
|
}
|
||||||
19
ruoyi-coupons/pom.xml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi-vue-plus</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>2.4.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-coupons</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
|
||||||
|
</project>
|
||||||
@ -1,85 +0,0 @@
|
|||||||
package com.ruoyi.framework.captcha;
|
|
||||||
|
|
||||||
import cn.hutool.captcha.generator.CodeGenerator;
|
|
||||||
import cn.hutool.core.math.Calculator;
|
|
||||||
import cn.hutool.core.util.CharUtil;
|
|
||||||
import cn.hutool.core.util.RandomUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 无符号计算生成器
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
public class UnsignedMathGenerator implements CodeGenerator {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = -5514819971774091076L;
|
|
||||||
|
|
||||||
private static final String operators = "+-*";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 参与计算数字最大长度
|
|
||||||
*/
|
|
||||||
private final int numberLength;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 构造
|
|
||||||
*/
|
|
||||||
public UnsignedMathGenerator() {
|
|
||||||
this(2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 构造
|
|
||||||
*
|
|
||||||
* @param numberLength 参与计算最大数字位数
|
|
||||||
*/
|
|
||||||
public UnsignedMathGenerator(int numberLength) {
|
|
||||||
this.numberLength = numberLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public String generate() {
|
|
||||||
final int limit = getLimit();
|
|
||||||
int min = RandomUtil.randomInt(limit);
|
|
||||||
int max = RandomUtil.randomInt(min, limit);
|
|
||||||
String number1 = Integer.toString(max);
|
|
||||||
String number2 = Integer.toString(min);
|
|
||||||
number1 = StrUtil.padAfter(number1, this.numberLength, CharUtil.SPACE);
|
|
||||||
number2 = StrUtil.padAfter(number2, this.numberLength, CharUtil.SPACE);
|
|
||||||
|
|
||||||
return number1 + RandomUtil.randomChar(operators) + number2 + '=';
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean verify(String code, String userInputCode) {
|
|
||||||
int result;
|
|
||||||
try {
|
|
||||||
result = Integer.parseInt(userInputCode);
|
|
||||||
} catch (NumberFormatException e) {
|
|
||||||
// 用户输入非数字
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
final int calculateResult = (int) Calculator.conversion(code);
|
|
||||||
return result == calculateResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取验证码长度
|
|
||||||
*
|
|
||||||
* @return 验证码长度
|
|
||||||
*/
|
|
||||||
public int getLength() {
|
|
||||||
return this.numberLength * 2 + 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 根据长度获取参与计算数字最大值
|
|
||||||
*
|
|
||||||
* @return 最大值
|
|
||||||
*/
|
|
||||||
private int getLimit() {
|
|
||||||
return Integer.parseInt("1" + StrUtil.repeat('0', this.numberLength));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,55 +0,0 @@
|
|||||||
package com.ruoyi.framework.config;
|
|
||||||
|
|
||||||
import java.awt.*;
|
|
||||||
|
|
||||||
import cn.hutool.captcha.*;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码配置
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class CaptchaConfig {
|
|
||||||
|
|
||||||
private final int width = 160;
|
|
||||||
private final int height = 60;
|
|
||||||
private final Color background = Color.PINK;
|
|
||||||
private final Font font = new Font("Arial", Font.BOLD, 48);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 圆圈干扰验证码
|
|
||||||
*/
|
|
||||||
@Bean(name = "CircleCaptcha")
|
|
||||||
public CircleCaptcha getCircleCaptcha() {
|
|
||||||
CircleCaptcha captcha = CaptchaUtil.createCircleCaptcha(width, height);
|
|
||||||
captcha.setBackground(background);
|
|
||||||
captcha.setFont(font);
|
|
||||||
return captcha;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 线段干扰的验证码
|
|
||||||
*/
|
|
||||||
@Bean(name = "LineCaptcha")
|
|
||||||
public LineCaptcha getLineCaptcha() {
|
|
||||||
LineCaptcha captcha = CaptchaUtil.createLineCaptcha(width, height);
|
|
||||||
captcha.setBackground(background);
|
|
||||||
captcha.setFont(font);
|
|
||||||
return captcha;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 扭曲干扰验证码
|
|
||||||
*/
|
|
||||||
@Bean(name = "ShearCaptcha")
|
|
||||||
public ShearCaptcha getShearCaptcha() {
|
|
||||||
ShearCaptcha captcha = CaptchaUtil.createShearCaptcha(width, height);
|
|
||||||
captcha.setBackground(background);
|
|
||||||
captcha.setFont(font);
|
|
||||||
return captcha;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -101,7 +101,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
|
|||||||
// 过滤请求
|
// 过滤请求
|
||||||
.authorizeRequests()
|
.authorizeRequests()
|
||||||
// 对于登录login 验证码captchaImage 允许匿名访问
|
// 对于登录login 验证码captchaImage 允许匿名访问
|
||||||
.antMatchers("/login", "/captchaImage").anonymous()
|
.antMatchers("/login", "/captcha/get", "/captcha/check").anonymous()
|
||||||
.antMatchers(
|
.antMatchers(
|
||||||
HttpMethod.GET,
|
HttpMethod.GET,
|
||||||
"/*.html",
|
"/*.html",
|
||||||
|
|||||||
@ -1,41 +0,0 @@
|
|||||||
package com.ruoyi.framework.config.properties;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码 配置属性
|
|
||||||
*
|
|
||||||
* @author Lion Li
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@Component
|
|
||||||
@ConfigurationProperties(prefix = "captcha")
|
|
||||||
public class CaptchaProperties {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码开关
|
|
||||||
*/
|
|
||||||
private Boolean enabled;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码类型
|
|
||||||
*/
|
|
||||||
private String type;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 验证码类别
|
|
||||||
*/
|
|
||||||
private String category;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 数字验证码位数
|
|
||||||
*/
|
|
||||||
private Integer numberLength;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 字符验证码长度
|
|
||||||
*/
|
|
||||||
private Integer charLength;
|
|
||||||
}
|
|
||||||
@ -5,13 +5,10 @@ import com.ruoyi.common.core.domain.entity.SysUser;
|
|||||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||||
import com.ruoyi.common.core.redis.RedisCache;
|
import com.ruoyi.common.core.redis.RedisCache;
|
||||||
import com.ruoyi.common.exception.CustomException;
|
import com.ruoyi.common.exception.CustomException;
|
||||||
import com.ruoyi.common.exception.user.CaptchaException;
|
|
||||||
import com.ruoyi.common.exception.user.CaptchaExpireException;
|
|
||||||
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
import com.ruoyi.common.exception.user.UserPasswordNotMatchException;
|
||||||
import com.ruoyi.common.utils.DateUtils;
|
import com.ruoyi.common.utils.DateUtils;
|
||||||
import com.ruoyi.common.utils.MessageUtils;
|
import com.ruoyi.common.utils.MessageUtils;
|
||||||
import com.ruoyi.common.utils.ServletUtils;
|
import com.ruoyi.common.utils.ServletUtils;
|
||||||
import com.ruoyi.framework.config.properties.CaptchaProperties;
|
|
||||||
import com.ruoyi.system.service.ISysUserService;
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.security.authentication.AuthenticationManager;
|
import org.springframework.security.authentication.AuthenticationManager;
|
||||||
@ -29,8 +26,7 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
@Component
|
@Component
|
||||||
public class SysLoginService
|
public class SysLoginService {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private TokenService tokenService;
|
private TokenService tokenService;
|
||||||
|
|
||||||
@ -40,8 +36,8 @@ public class SysLoginService
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RedisCache redisCache;
|
private RedisCache redisCache;
|
||||||
|
|
||||||
@Autowired
|
/* @Autowired
|
||||||
private CaptchaProperties captchaProperties;
|
private CaptchaProperties captchaProperties;*/
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysUserService userService;
|
private ISysUserService userService;
|
||||||
@ -54,43 +50,21 @@ public class SysLoginService
|
|||||||
*
|
*
|
||||||
* @param username 用户名
|
* @param username 用户名
|
||||||
* @param password 密码
|
* @param password 密码
|
||||||
* @param code 验证码
|
|
||||||
* @param uuid 唯一标识
|
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public String login(String username, String password, String code, String uuid)
|
public String login(String username, String password) {
|
||||||
{
|
|
||||||
HttpServletRequest request = ServletUtils.getRequest();
|
HttpServletRequest request = ServletUtils.getRequest();
|
||||||
if(captchaProperties.getEnabled()) {
|
|
||||||
String verifyKey = Constants.CAPTCHA_CODE_KEY + uuid;
|
|
||||||
String captcha = redisCache.getCacheObject(verifyKey);
|
|
||||||
redisCache.deleteObject(verifyKey);
|
|
||||||
if (captcha == null) {
|
|
||||||
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire"), request);
|
|
||||||
throw new CaptchaExpireException();
|
|
||||||
}
|
|
||||||
if (!code.equalsIgnoreCase(captcha)) {
|
|
||||||
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error"), request);
|
|
||||||
throw new CaptchaException();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 用户验证
|
// 用户验证
|
||||||
Authentication authentication = null;
|
Authentication authentication;
|
||||||
try
|
try {
|
||||||
{
|
|
||||||
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
|
// 该方法会去调用UserDetailsServiceImpl.loadUserByUsername
|
||||||
authentication = authenticationManager
|
authentication = authenticationManager
|
||||||
.authenticate(new UsernamePasswordAuthenticationToken(username, password));
|
.authenticate(new UsernamePasswordAuthenticationToken(username, password));
|
||||||
}
|
} catch (Exception e) {
|
||||||
catch (Exception e)
|
if (e instanceof BadCredentialsException) {
|
||||||
{
|
|
||||||
if (e instanceof BadCredentialsException)
|
|
||||||
{
|
|
||||||
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), request);
|
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.password.not.match"), request);
|
||||||
throw new UserPasswordNotMatchException();
|
throw new UserPasswordNotMatchException();
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage(), request);
|
asyncService.recordLogininfor(username, Constants.LOGIN_FAIL, e.getMessage(), request);
|
||||||
throw new CustomException(e.getMessage());
|
throw new CustomException(e.getMessage());
|
||||||
}
|
}
|
||||||
@ -105,8 +79,7 @@ public class SysLoginService
|
|||||||
/**
|
/**
|
||||||
* 记录登录信息
|
* 记录登录信息
|
||||||
*/
|
*/
|
||||||
public void recordLoginInfo(SysUser user)
|
public void recordLoginInfo(SysUser user) {
|
||||||
{
|
|
||||||
user.setLoginIp(ServletUtils.getClientIP());
|
user.setLoginIp(ServletUtils.getClientIP());
|
||||||
user.setLoginDate(DateUtils.getNowDate());
|
user.setLoginDate(DateUtils.getNowDate());
|
||||||
user.setUpdateBy(user.getUserName());
|
user.setUpdateBy(user.getUserName());
|
||||||
|
|||||||
33
ruoyi-product/pom.xml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>ruoyi-vue-plus</artifactId>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<version>2.4.0</version>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
<artifactId>ruoyi-product</artifactId>
|
||||||
|
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>8</maven.compiler.source>
|
||||||
|
<maven.compiler.target>8</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
<description>
|
||||||
|
产品详情模块
|
||||||
|
</description>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.ruoyi</groupId>
|
||||||
|
<artifactId>ruoyi-common</artifactId>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.xiaoymin</groupId>
|
||||||
|
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||||
|
</dependency>
|
||||||
|
</dependencies>
|
||||||
|
</project>
|
||||||
@ -0,0 +1,53 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner管理添加对象 pro_banner
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-06-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("banner管理添加对象")
|
||||||
|
public class ProBannerAddBo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("banner标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* url跳转(也可能是path)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("url跳转(也可能是path)")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片url
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("图片url")
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否跳转
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("是否跳转")
|
||||||
|
private Integer redirectFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner类型,1应用内跳转,3外部跳转
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("banner类型,1应用内跳转,3外部跳转")
|
||||||
|
private Integer bannerType;
|
||||||
|
}
|
||||||
@ -0,0 +1,63 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: RuoYi-Vue-Plus
|
||||||
|
* @BelongsPackage: com.ruoyi.product.bo
|
||||||
|
* @Author: yefei
|
||||||
|
* @CreateTime: 2021-06-30 16:41
|
||||||
|
* @Description: 编辑
|
||||||
|
*/
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner管理编辑对象 pro_banner
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-06-30
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("banner管理编辑对象")
|
||||||
|
public class ProBannerEditBo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
@ApiModelProperty("主键id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("banner标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* url跳转(也可能是path)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("url跳转(也可能是path)")
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片url
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("图片url")
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否跳转
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("是否跳转")
|
||||||
|
private Integer redirectFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner类型,1应用内跳转,3外部跳转
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("banner类型,1应用内跳转,3外部跳转")
|
||||||
|
private Integer bannerType;
|
||||||
|
}
|
||||||
@ -0,0 +1,70 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @BelongsProject: RuoYi-Vue-Plus
|
||||||
|
* @BelongsPackage: com.ruoyi.product.bo
|
||||||
|
* @Author: yefei
|
||||||
|
* @CreateTime: 2021-06-30 16:37
|
||||||
|
* @Description:
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel("banner管理分页查询对象")
|
||||||
|
public class ProBannerQueryBo extends BaseEntity {
|
||||||
|
/**
|
||||||
|
* 分页大小
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分页大小")
|
||||||
|
private Integer pageSize;
|
||||||
|
/**
|
||||||
|
* 当前页数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前页数")
|
||||||
|
private Integer pageNum;
|
||||||
|
/**
|
||||||
|
* 排序列
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("排序列")
|
||||||
|
private String orderByColumn;
|
||||||
|
/**
|
||||||
|
* 排序的方向desc或者asc
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||||
|
private String isAsc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("banner标题")
|
||||||
|
private String title;
|
||||||
|
/**
|
||||||
|
* url跳转(也可能是path)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("url跳转(也可能是path)")
|
||||||
|
private String url;
|
||||||
|
/**
|
||||||
|
* 图片url
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("图片url")
|
||||||
|
private String picUrl;
|
||||||
|
/**
|
||||||
|
* 是否跳转
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("是否跳转")
|
||||||
|
private Integer redirectFlag;
|
||||||
|
/**
|
||||||
|
* banner类型,1应用内跳转,3外部跳转
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("banner类型,1应用内跳转,3外部跳转")
|
||||||
|
private Integer bannerType;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品服务类别添加对象 pro_category
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品服务类别添加对象")
|
||||||
|
public class ProCategoryAddBo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类别名字")
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* icon图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("icon图片")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注信息")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建者")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新者")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品服务类别编辑对象 pro_category
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品服务类别编辑对象")
|
||||||
|
public class ProCategoryEditBo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("主键id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类别名字")
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* icon图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("icon图片")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注信息")
|
||||||
|
private String remark;
|
||||||
|
}
|
||||||
@ -0,0 +1,54 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品服务类别分页查询对象 pro_category
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel("商品服务类别分页查询对象")
|
||||||
|
public class ProCategoryQueryBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页大小
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分页大小")
|
||||||
|
private Integer pageSize;
|
||||||
|
/**
|
||||||
|
* 当前页数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前页数")
|
||||||
|
private Integer pageNum;
|
||||||
|
/**
|
||||||
|
* 排序列
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("排序列")
|
||||||
|
private String orderByColumn;
|
||||||
|
/**
|
||||||
|
* 排序的方向desc或者asc
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||||
|
private String isAsc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("类别名字")
|
||||||
|
private String categoryName;
|
||||||
|
/**
|
||||||
|
* icon图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("icon图片")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,94 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.ruoyi.product.dto.ProItemPictureDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品详情添加对象 pro_item
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品详情添加对象")
|
||||||
|
public class ProItemAddBo {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("产品名字")
|
||||||
|
private String proName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("价钱")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存(限量库存)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("库存(限量库存)")
|
||||||
|
private Integer sku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封面图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("封面图片")
|
||||||
|
private String coverImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否发布
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("是否发布")
|
||||||
|
private Integer publishFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("发布时间")
|
||||||
|
private Date publishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建者")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新者")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("图片列表")
|
||||||
|
private List<ProItemPictureDTO> proItemPictures;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类id集合")
|
||||||
|
private List<String> proItemCategoryIds;
|
||||||
|
}
|
||||||
@ -0,0 +1,27 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.ruoyi.product.domain.ProItem;
|
||||||
|
import com.ruoyi.product.dto.ProItemPictureDTO;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品详情编辑对象 pro_item
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品详情编辑对象")
|
||||||
|
public class ProItemEditBo extends ProItem {
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty("图片列表")
|
||||||
|
private List<ProItemPictureDTO> proItemPictures;
|
||||||
|
|
||||||
|
@ApiModelProperty("分类id集合")
|
||||||
|
private List<String> proItemCategoryIds;
|
||||||
|
}
|
||||||
@ -0,0 +1,69 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品详情分页查询对象 pro_item
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-07
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel("商品详情分页查询对象")
|
||||||
|
public class ProItemQueryBo extends BaseEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页大小
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分页大小")
|
||||||
|
private Integer pageSize;
|
||||||
|
/**
|
||||||
|
* 当前页数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前页数")
|
||||||
|
private Integer pageNum;
|
||||||
|
/**
|
||||||
|
* 排序列
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("排序列")
|
||||||
|
private String orderByColumn;
|
||||||
|
/**
|
||||||
|
* 排序的方向desc或者asc
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||||
|
private String isAsc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("产品名字")
|
||||||
|
private String proName;
|
||||||
|
/**
|
||||||
|
* 库存(限量库存)
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("库存(限量库存)")
|
||||||
|
private Integer sku;
|
||||||
|
/**
|
||||||
|
* 封面图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("封面图片")
|
||||||
|
private String coverImage;
|
||||||
|
/**
|
||||||
|
* 是否发布
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("是否发布")
|
||||||
|
private Integer publishFlag;
|
||||||
|
|
||||||
|
@ApiModelProperty("是否分页,0不分页,1分页,默认分页")
|
||||||
|
private Integer bePage = 1;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,41 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品关系(预约记录、优惠券)添加对象 pro_item_relation
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品关系(预约记录、优惠券)添加对象")
|
||||||
|
public class ProItemRelationAddBo {
|
||||||
|
|
||||||
|
/** 业务id,可以是预约记录id,也可以是优惠券id */
|
||||||
|
@ApiModelProperty("业务id,可以是预约记录id,也可以是优惠券id")
|
||||||
|
private Long businessId;
|
||||||
|
/** 1表示优惠券类型关联关系,3表示预约类型关联关系 */
|
||||||
|
@ApiModelProperty("1表示优惠券类型关联关系,3表示预约类型关联关系")
|
||||||
|
private String type;
|
||||||
|
/** 商品id */
|
||||||
|
@ApiModelProperty("商品id")
|
||||||
|
private Long proItemId;
|
||||||
|
/** 创建时间 */
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Date createTime;
|
||||||
|
/** 创建人 */
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String createBy;
|
||||||
|
/** 更新时间 */
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
/** 更新人 */
|
||||||
|
@ApiModelProperty("更新人")
|
||||||
|
private String updateBy;
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品关系(预约记录、优惠券)编辑对象 pro_item_relation
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品关系(预约记录、优惠券)编辑对象")
|
||||||
|
public class ProItemRelationEditBo {
|
||||||
|
|
||||||
|
|
||||||
|
/** 业务id,可以是预约记录id,也可以是优惠券id */
|
||||||
|
@ApiModelProperty("业务id,可以是预约记录id,也可以是优惠券id")
|
||||||
|
private Long businessId;
|
||||||
|
|
||||||
|
/** 1表示优惠券类型关联关系,3表示预约类型关联关系 */
|
||||||
|
@ApiModelProperty("1表示优惠券类型关联关系,3表示预约类型关联关系")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 商品id */
|
||||||
|
@ApiModelProperty("商品id")
|
||||||
|
private Long proItemId;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
@ApiModelProperty("更新人")
|
||||||
|
private String updateBy;
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品关系(预约记录、优惠券)分页查询对象 pro_item_relation
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@ApiModel("商品关系(预约记录、优惠券)分页查询对象")
|
||||||
|
public class ProItemRelationQueryBo extends BaseEntity {
|
||||||
|
|
||||||
|
/** 分页大小 */
|
||||||
|
@ApiModelProperty("分页大小")
|
||||||
|
private Integer pageSize;
|
||||||
|
/** 当前页数 */
|
||||||
|
@ApiModelProperty("当前页数")
|
||||||
|
private Integer pageNum;
|
||||||
|
/** 排序列 */
|
||||||
|
@ApiModelProperty("排序列")
|
||||||
|
private String orderByColumn;
|
||||||
|
/** 排序的方向desc或者asc */
|
||||||
|
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||||
|
private String isAsc;
|
||||||
|
|
||||||
|
|
||||||
|
/** 业务id,可以是预约记录id,也可以是优惠券id */
|
||||||
|
@ApiModelProperty("业务id,可以是预约记录id,也可以是优惠券id")
|
||||||
|
private Long businessId;
|
||||||
|
/** 1表示优惠券类型关联关系,3表示预约类型关联关系 */
|
||||||
|
@ApiModelProperty("1表示优惠券类型关联关系,3表示预约类型关联关系")
|
||||||
|
private String type;
|
||||||
|
/** 商品id */
|
||||||
|
@ApiModelProperty("商品id")
|
||||||
|
private Long proItemId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,91 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格添加对象 pro_item_specification
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品规格添加对象")
|
||||||
|
public class ProItemSpecificationAddBo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("商品id")
|
||||||
|
private Long itemId;
|
||||||
|
/**
|
||||||
|
* 规格名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("规格名字")
|
||||||
|
private String specificationTitle;
|
||||||
|
/**
|
||||||
|
* 图片url地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("图片url地址")
|
||||||
|
private String urlPath;
|
||||||
|
/**
|
||||||
|
* 规格库存
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("规格库存")
|
||||||
|
private Integer specificationSku;
|
||||||
|
/**
|
||||||
|
* 价格
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("价格")
|
||||||
|
private BigDecimal price;
|
||||||
|
/**
|
||||||
|
* 别名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("别名")
|
||||||
|
private String aliasName;
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("描述")
|
||||||
|
private String description;
|
||||||
|
/**
|
||||||
|
* 是否上架,0未上架,1上架,默认是0
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("是否上架,0未上架,1上架,默认是0")
|
||||||
|
private String publishFlag;
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("上架时间")
|
||||||
|
private LocalDateTime publishTime;
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人id")
|
||||||
|
private String createBy;
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新人id")
|
||||||
|
private String updateBy;
|
||||||
|
}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
import static com.ruoyi.common.constant.Constants.FULL_DATE_TIME;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格编辑对象 pro_item_specification
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品规格编辑对象")
|
||||||
|
public class ProItemSpecificationEditBo {
|
||||||
|
|
||||||
|
@ApiModelProperty("商品规格id")
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
@ApiModelProperty("商品id")
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格名字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("规格名字")
|
||||||
|
private String specificationTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片url地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("图片url地址")
|
||||||
|
private String urlPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格库存
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("规格库存")
|
||||||
|
private Integer specificationSku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价格
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("价格")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 别名
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("别名")
|
||||||
|
private String aliasName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("描述")
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架,0未上架,1上架,默认是0
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("是否上架,0未上架,1上架,默认是0")
|
||||||
|
private String publishFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = FULL_DATE_TIME)
|
||||||
|
@ApiModelProperty("上架时间")
|
||||||
|
private LocalDateTime publishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新时间")
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("更新人id")
|
||||||
|
private String updateBy;
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package com.ruoyi.product.bo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格分页查询对象 pro_item_specification
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel("商品规格分页查询对象")
|
||||||
|
public class ProItemSpecificationQueryBo {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页大小
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("分页大小")
|
||||||
|
private Integer pageSize;
|
||||||
|
/**
|
||||||
|
* 当前页数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("当前页数")
|
||||||
|
private Integer pageNum;
|
||||||
|
/**
|
||||||
|
* 排序列
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("排序列")
|
||||||
|
private String orderByColumn;
|
||||||
|
/**
|
||||||
|
* 排序的方向desc或者asc
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序的方向", example = "asc,desc")
|
||||||
|
private String isAsc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("商品id")
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
@ApiModelProperty("规格标题")
|
||||||
|
private String specificationTitle;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
}
|
||||||
@ -0,0 +1,83 @@
|
|||||||
|
package com.ruoyi.product.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.FieldFill;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner管理对象 pro_banner
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("pro_banner")
|
||||||
|
public class ProBanner implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner标题
|
||||||
|
*/
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* url跳转(也可能是path)
|
||||||
|
*/
|
||||||
|
private String url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片url
|
||||||
|
*/
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否跳转
|
||||||
|
*/
|
||||||
|
private Integer redirectFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner类型,1应用内跳转,3外部跳转
|
||||||
|
*/
|
||||||
|
private Integer bannerType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
}
|
||||||
@ -0,0 +1,84 @@
|
|||||||
|
package com.ruoyi.product.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品服务类别对象 pro_category
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-14
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("pro_category")
|
||||||
|
public class ProCategory implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别名字
|
||||||
|
*/
|
||||||
|
@Excel(name = "类别名字")
|
||||||
|
private String categoryName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* icon图片
|
||||||
|
*/
|
||||||
|
@Excel(name = "icon图片")
|
||||||
|
private String iconUrl;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注信息
|
||||||
|
*/
|
||||||
|
@Excel(name = "备注信息")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
}
|
||||||
@ -0,0 +1,121 @@
|
|||||||
|
package com.ruoyi.product.domain;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import com.ruoyi.product.dto.ProItemPictureDTO;
|
||||||
|
import com.ruoyi.product.vo.ProItemVo;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品详情对象 pro_item
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-13
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("pro_item")
|
||||||
|
public class ProItem implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 产品名字
|
||||||
|
*/
|
||||||
|
@Excel(name = "产品名字")
|
||||||
|
private String proName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价钱
|
||||||
|
*/
|
||||||
|
@Excel(name = "价钱")
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库存(限量库存)
|
||||||
|
*/
|
||||||
|
@Excel(name = "库存(限量库存)")
|
||||||
|
private Integer sku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 封面图片
|
||||||
|
*/
|
||||||
|
@Excel(name = "封面图片")
|
||||||
|
private String coverImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否发布
|
||||||
|
*/
|
||||||
|
@Excel(name = "是否发布")
|
||||||
|
private Integer publishFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
@Excel(name = "发布时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date publishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
|
||||||
|
|
||||||
|
public ProItemVo toVo(List<ProItemPictureDTO> pictures, List<String> categoryIds) {
|
||||||
|
ProItemVo vo = new ProItemVo();
|
||||||
|
BeanUtil.copyProperties(this, vo);
|
||||||
|
vo.setProItemPictures(pictures);
|
||||||
|
vo.setProItemCategoryIds(categoryIds);
|
||||||
|
return vo;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,73 @@
|
|||||||
|
package com.ruoyi.product.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* proItemCategory对象 pro_item_category
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("pro_item_category")
|
||||||
|
public class ProItemCategory implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分类id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long categoryId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,66 @@
|
|||||||
|
package com.ruoyi.product.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.data.annotation.Id;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* proItemPicture对象 pro_item_picture
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-20
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("pro_item_picture")
|
||||||
|
public class ProItemPicture implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|
||||||
|
/** 主键id */
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 商品id */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/** 图片地址 */
|
||||||
|
private String picUrl;
|
||||||
|
|
||||||
|
/** 类型,1是商品banner图, 3是评论图片 */
|
||||||
|
private Integer picType;
|
||||||
|
|
||||||
|
/** paixu */
|
||||||
|
private Integer picSort;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/** 创建人id */
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/** $column.columnComment */
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/** 更新人id */
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private Map<String, Object> params = new HashMap<>();
|
||||||
|
}
|
||||||
@ -0,0 +1,71 @@
|
|||||||
|
package com.ruoyi.product.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import com.ruoyi.common.annotation.Excel;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品关系(预约记录、优惠券)对象 pro_item_relation
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-09
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("pro_item_relation")
|
||||||
|
public class ProItemRelation implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID=1L;
|
||||||
|
|
||||||
|
|
||||||
|
/** 主键id */
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 业务id,可以是预约记录id,也可以是优惠券id */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long businessId;
|
||||||
|
|
||||||
|
/** 1表示优惠券类型关联关系,3表示预约类型关联关系 */
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/** 商品id */
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long proItemId;
|
||||||
|
|
||||||
|
/** 创建时间 */
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/** 创建人 */
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/** 更新时间 */
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/** 更新人 */
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
public String getStringForProItemId() {
|
||||||
|
return this.proItemId.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,106 @@
|
|||||||
|
package com.ruoyi.product.domain;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格对象 pro_item_specification
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-06
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName("pro_item_specification")
|
||||||
|
public class ProItemSpecification implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.INPUT)
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品id
|
||||||
|
*/
|
||||||
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
|
private Long itemId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格名字
|
||||||
|
*/
|
||||||
|
private String specificationTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片url地址
|
||||||
|
*/
|
||||||
|
private String urlPath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 规格库存
|
||||||
|
*/
|
||||||
|
private Integer specificationSku;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 价格
|
||||||
|
*/
|
||||||
|
private BigDecimal price;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 别名
|
||||||
|
*/
|
||||||
|
private String aliasName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否上架,0未上架,1上架,默认是0
|
||||||
|
*/
|
||||||
|
private String publishFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上架时间
|
||||||
|
*/
|
||||||
|
private LocalDateTime publishTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private LocalDateTime updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新人id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.ruoyi.product.dto;
|
||||||
|
|
||||||
|
import lombok.*;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@Builder
|
||||||
|
public class ProItemPictureDTO {
|
||||||
|
|
||||||
|
private String key;
|
||||||
|
private String value;
|
||||||
|
// 返回出参的时候将值设置成url
|
||||||
|
private String url;
|
||||||
|
}
|
||||||
@ -0,0 +1,17 @@
|
|||||||
|
package com.ruoyi.product.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum PictureTypeEnum {
|
||||||
|
|
||||||
|
SWIPER(1, "轮播图"),
|
||||||
|
COMMENT(3, "评论");
|
||||||
|
private Integer value;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.ruoyi.product.enums;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum PublishFlagEnum {
|
||||||
|
|
||||||
|
YES("1", "已发布"),
|
||||||
|
NO("0", "未发布");
|
||||||
|
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
private String description;
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||||
|
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||||
|
import com.ruoyi.product.domain.ProBanner;
|
||||||
|
import org.apache.ibatis.annotations.CacheNamespace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner管理Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-06-30
|
||||||
|
*/
|
||||||
|
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||||
|
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||||
|
public interface ProBannerMapper extends BaseMapperPlus<ProBanner> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||||
|
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||||
|
import com.ruoyi.product.domain.ProCategory;
|
||||||
|
import org.apache.ibatis.annotations.CacheNamespace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品服务类别Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||||
|
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||||
|
public interface ProCategoryMapper extends BaseMapperPlus<ProCategory> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.ruoyi.product.domain.ProItemCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* proItemCategoryMapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
public interface ProItemCategoryMapper extends BaseMapper<ProItemCategory> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||||
|
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||||
|
import com.ruoyi.product.domain.ProItem;
|
||||||
|
import org.apache.ibatis.annotations.CacheNamespace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品详情Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||||
|
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||||
|
public interface ProItemMapper extends BaseMapperPlus<ProItem> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.product.domain.ProItemPicture;
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* proItemPictureMapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-20
|
||||||
|
*/
|
||||||
|
public interface ProItemPictureMapper extends BaseMapper<ProItemPicture> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||||
|
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||||
|
import com.ruoyi.product.domain.ProItemRelation;
|
||||||
|
import org.apache.ibatis.annotations.CacheNamespace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品关系(预约记录、优惠券)Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-09
|
||||||
|
*/
|
||||||
|
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||||
|
public interface ProItemRelationMapper extends BaseMapperPlus<ProItemRelation> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.ruoyi.product.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.mybatisplus.cache.MybatisPlusRedisCache;
|
||||||
|
import com.ruoyi.common.core.mybatisplus.core.BaseMapperPlus;
|
||||||
|
import com.ruoyi.product.domain.ProItemSpecification;
|
||||||
|
import org.apache.ibatis.annotations.CacheNamespace;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品规格Mapper接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-06-30
|
||||||
|
*/
|
||||||
|
// 如使需切换数据源 请勿使用缓存 会造成数据不一致现象
|
||||||
|
@CacheNamespace(implementation = MybatisPlusRedisCache.class, eviction = MybatisPlusRedisCache.class)
|
||||||
|
public interface ProItemSpecificationMapper extends BaseMapperPlus<ProItemSpecification> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,65 @@
|
|||||||
|
package com.ruoyi.product.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.product.bo.ProBannerAddBo;
|
||||||
|
import com.ruoyi.product.bo.ProBannerEditBo;
|
||||||
|
import com.ruoyi.product.bo.ProBannerQueryBo;
|
||||||
|
import com.ruoyi.product.bo.ProItemRelationQueryBo;
|
||||||
|
import com.ruoyi.product.domain.ProBanner;
|
||||||
|
import com.ruoyi.product.vo.ProBannerVo;
|
||||||
|
import com.ruoyi.product.vo.ProItemRelationVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* banner管理Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-14
|
||||||
|
*/
|
||||||
|
public interface IProBannerService extends IServicePlus<ProBanner> {
|
||||||
|
/**
|
||||||
|
* 查询单个
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProBannerVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<ProBannerVo> queryPageList(ProBannerQueryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
List<ProBannerVo> queryList(ProBannerQueryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据新增业务对象插入banner管理
|
||||||
|
*
|
||||||
|
* @param bo banner管理新增业务对象
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean insertByAddBo(ProBannerAddBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据编辑业务对象修改banner管理
|
||||||
|
*
|
||||||
|
* @param bo banner管理编辑业务对象
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean updateByEditBo(ProBannerEditBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并删除数据
|
||||||
|
*
|
||||||
|
* @param ids 主键集合
|
||||||
|
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,62 @@
|
|||||||
|
package com.ruoyi.product.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.mybatisplus.core.IServicePlus;
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.product.bo.ProCategoryAddBo;
|
||||||
|
import com.ruoyi.product.bo.ProCategoryEditBo;
|
||||||
|
import com.ruoyi.product.bo.ProCategoryQueryBo;
|
||||||
|
import com.ruoyi.product.domain.ProCategory;
|
||||||
|
import com.ruoyi.product.vo.ProCategoryVo;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品服务类别Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-07-01
|
||||||
|
*/
|
||||||
|
public interface IProCategoryService extends IServicePlus<ProCategory> {
|
||||||
|
/**
|
||||||
|
* 查询单个
|
||||||
|
*
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProCategoryVo queryById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
TableDataInfo<ProCategoryVo> queryPageList(ProCategoryQueryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
List<ProCategoryVo> queryList(ProCategoryQueryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据新增业务对象插入商品服务类别
|
||||||
|
*
|
||||||
|
* @param bo 商品服务类别新增业务对象
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean insertByAddBo(ProCategoryAddBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据编辑业务对象修改商品服务类别
|
||||||
|
*
|
||||||
|
* @param bo 商品服务类别编辑业务对象
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean updateByEditBo(ProCategoryEditBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并删除数据
|
||||||
|
*
|
||||||
|
* @param ids 主键集合
|
||||||
|
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||
@ -0,0 +1,14 @@
|
|||||||
|
package com.ruoyi.product.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.ruoyi.product.domain.ProItemCategory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* proItemCategoryService接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-24
|
||||||
|
*/
|
||||||
|
public interface IProItemCategoryService extends IService<ProItemCategory> {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,19 @@
|
|||||||
|
package com.ruoyi.product.service;
|
||||||
|
|
||||||
|
import com.ruoyi.product.domain.ProItemPicture;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* proItemPictureService接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-03-20
|
||||||
|
*/
|
||||||
|
public interface IProItemPictureService extends IService<ProItemPicture> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
List<ProItemPicture> queryList(ProItemPicture proItemPicture);
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package com.ruoyi.product.service;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
|
import com.ruoyi.product.domain.ProItemRelation;
|
||||||
|
import com.ruoyi.product.vo.ProItemRelationVo;
|
||||||
|
import com.ruoyi.product.bo.ProItemRelationQueryBo;
|
||||||
|
import com.ruoyi.product.bo.ProItemRelationAddBo;
|
||||||
|
import com.ruoyi.product.bo.ProItemRelationEditBo;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品关系(预约记录、优惠券)Service接口
|
||||||
|
*
|
||||||
|
* @author ruoyi
|
||||||
|
* @date 2021-04-09
|
||||||
|
*/
|
||||||
|
public interface IProItemRelationService extends IService<ProItemRelation> {
|
||||||
|
/**
|
||||||
|
* 查询单个
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ProItemRelationVo queryById(Long id);
|
||||||
|
|
||||||
|
TableDataInfo<ProItemRelationVo> queryPageList(ProItemRelationQueryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询列表
|
||||||
|
*/
|
||||||
|
List<ProItemRelationVo> queryList(ProItemRelationQueryBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据新增业务对象插入商品关系(预约记录、优惠券)
|
||||||
|
* @param bo 商品关系(预约记录、优惠券)新增业务对象
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean insertByAddBo(ProItemRelationAddBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据编辑业务对象修改商品关系(预约记录、优惠券)
|
||||||
|
* @param bo 商品关系(预约记录、优惠券)编辑业务对象
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean updateByEditBo(ProItemRelationEditBo bo);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验并删除数据
|
||||||
|
* @param ids 主键集合
|
||||||
|
* @param isValid 是否校验,true-删除前校验,false-不校验
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
|
||||||
|
}
|
||||||