更新系统
This commit is contained in:
150
ruoyi-modules/ruoyi-mall/pom.xml
Normal file
150
ruoyi-modules/ruoyi-mall/pom.xml
Normal file
@@ -0,0 +1,150 @@
|
||||
<?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>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-modules</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>ruoyi-mall</artifactId>
|
||||
|
||||
<description>
|
||||
商城模块
|
||||
</description>
|
||||
|
||||
<dependencies>
|
||||
|
||||
<!-- 通用工具-->
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-doc</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-sms</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mail</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-idempotent</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-mybatis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-excel</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-security</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-ratelimiter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-translation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-sensitive</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-encrypt</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-tenant</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-system</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-websocket</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/com.github.yulichang/mybatis-plus-join-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>com.github.yulichang</groupId>
|
||||
<artifactId>mybatis-plus-join-boot-starter</artifactId>
|
||||
<version>${com.github.yulichang.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.google.guava</groupId>
|
||||
<artifactId>guava</artifactId>
|
||||
<version>${com.google.guava.version}</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- Log4j 2 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-api</artifactId>
|
||||
<version>${org.apache.logging.log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
<artifactId>log4j-core</artifactId>
|
||||
<version>${org.apache.logging.log4j.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-pay</artifactId>
|
||||
<version>5.3.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.dromara</groupId>
|
||||
<artifactId>ruoyi-common-pay-new</artifactId>
|
||||
<version>5.3.0</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,94 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyBasketBo;
|
||||
import org.dromara.mall.domain.vo.HyBasketVo;
|
||||
import org.dromara.mall.service.IHyBasketService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 购物车
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/basket")
|
||||
public class HyBasketController extends BaseController {
|
||||
|
||||
private final IHyBasketService hyBasketService;
|
||||
|
||||
/**
|
||||
* 查询购物车列表
|
||||
*/
|
||||
@SaCheckPermission("mall:basket:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyBasketVo> list(HyBasketBo bo, PageQuery pageQuery) {
|
||||
return hyBasketService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出购物车列表
|
||||
*/
|
||||
@SaCheckPermission("mall:basket:export")
|
||||
@Log(title = "购物车", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyBasketBo bo, HttpServletResponse response) {
|
||||
List<HyBasketVo> list = hyBasketService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "购物车", HyBasketVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取购物车详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:basket:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyBasketVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyBasketService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改购物车
|
||||
*/
|
||||
@SaCheckPermission("mall:basket:edit")
|
||||
@Log(title = "购物车", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyBasketBo bo) {
|
||||
return toAjax(hyBasketService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除购物车
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:basket:remove")
|
||||
@Log(title = "购物车", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyBasketService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyCodeOrderBo;
|
||||
import org.dromara.mall.domain.vo.HyCodeOrderSumVo;
|
||||
import org.dromara.mall.domain.vo.HyCodeOrderVo;
|
||||
import org.dromara.mall.service.IHyCodeOrderService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员码订单
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/codeOrder")
|
||||
public class HyCodeOrderController extends BaseController {
|
||||
|
||||
private final IHyCodeOrderService hyCodeOrderService;
|
||||
|
||||
/**
|
||||
* 查询会员码订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:codeOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyCodeOrderVo> list(HyCodeOrderBo bo, PageQuery pageQuery) {
|
||||
return hyCodeOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询会员码订单统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:codeOrder:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<HyCodeOrderSumVo> listSum(HyCodeOrderBo bo) {
|
||||
return R.ok(hyCodeOrderService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会员码订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:codeOrder:export")
|
||||
@Log(title = "会员码订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyCodeOrderBo bo, HttpServletResponse response) {
|
||||
List<HyCodeOrderVo> list = hyCodeOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "会员码订单", HyCodeOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员码订单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:codeOrder:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyCodeOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyCodeOrderService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员码订单
|
||||
*/
|
||||
@SaCheckPermission("mall:codeOrder:add")
|
||||
@Log(title = "会员码订单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyCodeOrderBo bo) {
|
||||
return toAjax(hyCodeOrderService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员码订单
|
||||
*/
|
||||
@SaCheckPermission("mall:codeOrder:edit")
|
||||
@Log(title = "会员码订单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyCodeOrderBo bo) {
|
||||
return toAjax(hyCodeOrderService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员码订单
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:codeOrder:remove")
|
||||
@Log(title = "会员码订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyCodeOrderService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyCouponRecordBo;
|
||||
import org.dromara.mall.domain.vo.HyCouponRecordVo;
|
||||
import org.dromara.mall.service.IHyCouponRecordService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/coupon/record")
|
||||
public class HyCouponRecordController extends BaseController {
|
||||
|
||||
private final IHyCouponRecordService couponRecordService;
|
||||
|
||||
/**
|
||||
* 查询会员券抵金记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyCouponRecordVo> list(HyCouponRecordBo bo, PageQuery pageQuery) {
|
||||
return couponRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员券抵金记录详细信息
|
||||
*/
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<HyCouponRecordVo> getInfo(@PathVariable("id") Long id) {
|
||||
return R.ok(couponRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员券抵金记录
|
||||
*/
|
||||
@PostMapping
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyCouponRecordBo bo) {
|
||||
return toAjax(couponRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员券抵金记录
|
||||
*/
|
||||
@PutMapping
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyCouponRecordBo bo) {
|
||||
return toAjax(couponRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员券抵金记录
|
||||
*/
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@PathVariable Long[] ids) {
|
||||
return toAjax(couponRecordService.deleteByIds(ids));
|
||||
}
|
||||
|
||||
private R<Void> toAjax(Boolean result) {
|
||||
return result ? R.ok() : R.fail();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyMemberCodeBo;
|
||||
import org.dromara.mall.domain.vo.HyMemberCodeVo;
|
||||
import org.dromara.mall.service.IHyMemberCodeService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员码兑换
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/memberCode")
|
||||
public class HyMemberCodeController extends BaseController {
|
||||
|
||||
private final IHyMemberCodeService hyMemberCodeService;
|
||||
|
||||
/**
|
||||
* 查询会员码兑换列表
|
||||
*/
|
||||
@SaCheckPermission("mall:memberCode:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyMemberCodeVo> list(HyMemberCodeBo bo, PageQuery pageQuery) {
|
||||
return hyMemberCodeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出会员码兑换列表
|
||||
*/
|
||||
@SaCheckPermission("mall:memberCode:export")
|
||||
@Log(title = "会员码兑换", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyMemberCodeBo bo, HttpServletResponse response) {
|
||||
List<HyMemberCodeVo> list = hyMemberCodeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "会员码兑换", HyMemberCodeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取会员码兑换详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:memberCode:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyMemberCodeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyMemberCodeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增会员码兑换
|
||||
*/
|
||||
@SaCheckPermission("mall:memberCode:add")
|
||||
@Log(title = "会员码兑换", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyMemberCodeBo bo) {
|
||||
return toAjax(hyMemberCodeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改会员码兑换
|
||||
*/
|
||||
@SaCheckPermission("mall:memberCode:edit")
|
||||
@Log(title = "会员码兑换", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyMemberCodeBo bo) {
|
||||
return toAjax(hyMemberCodeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除会员码兑换
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:memberCode:remove")
|
||||
@Log(title = "会员码兑换", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyMemberCodeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyOrderBo;
|
||||
import org.dromara.mall.domain.vo.HyOrderSumVo;
|
||||
import org.dromara.mall.domain.vo.HyOrderVo;
|
||||
import org.dromara.mall.service.IHyOrderService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 总订单
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/order")
|
||||
public class HyOrderController extends BaseController {
|
||||
|
||||
private final IHyOrderService hyOrderService;
|
||||
|
||||
/**
|
||||
* 查询总订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:order:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyOrderVo> list(HyOrderBo bo, PageQuery pageQuery) {
|
||||
return hyOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询总订单统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:order:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<HyOrderSumVo> listSum(HyOrderBo bo) {
|
||||
return R.ok(hyOrderService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出总订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:order:export")
|
||||
@Log(title = "总订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyOrderBo bo, HttpServletResponse response) {
|
||||
List<HyOrderVo> list = hyOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "总订单", HyOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取总订单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:order:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyOrderService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增总订单
|
||||
*/
|
||||
@SaCheckPermission("mall:order:add")
|
||||
@Log(title = "总订单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyOrderBo bo) {
|
||||
return toAjax(hyOrderService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改总订单
|
||||
*/
|
||||
@SaCheckPermission("mall:order:edit")
|
||||
@Log(title = "总订单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyOrderBo bo) {
|
||||
return toAjax(hyOrderService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除总订单
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:order:remove")
|
||||
@Log(title = "总订单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyOrderService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
@SaCheckPermission("mall:order:refund")
|
||||
@Log(title = "订单退款", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/refund")
|
||||
public R<Void> refund(@Validated(EditGroup.class) @RequestBody HyOrderBo bo) throws Exception {
|
||||
return toAjax(hyOrderService.refund(bo));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,154 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyOrderItemBo;
|
||||
import org.dromara.mall.domain.vo.HyOrderItemSumVo;
|
||||
import org.dromara.mall.domain.vo.HyOrderItemVo;
|
||||
import org.dromara.mall.service.IHyOrderItemService;
|
||||
import org.dromara.system.domain.bo.SysTenantBo;
|
||||
import org.dromara.system.domain.vo.SysTenantVo;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单详情
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderItem")
|
||||
public class HyOrderItemController extends BaseController {
|
||||
|
||||
private final IHyOrderItemService hyOrderItemService;
|
||||
|
||||
/**
|
||||
* 查询订单详情列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:list")
|
||||
@GetMapping("/list")
|
||||
@InterceptorIgnore(tenantLine = "true")
|
||||
public TableDataInfo<HyOrderItemVo> list(HyOrderItemBo bo, PageQuery pageQuery) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
return hyOrderItemService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单详情统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<HyOrderItemSumVo> listSum(HyOrderItemBo bo) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
return R.ok(hyOrderItemService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询厂家销量排行榜列表
|
||||
*/
|
||||
@SaCheckPermission("system:tenant:listChart")
|
||||
@GetMapping("/listChart")
|
||||
public TableDataInfo<SysTenantVo> listChart(SysTenantBo bo, PageQuery pageQuery) {
|
||||
return hyOrderItemService.queryPageListChart(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单详情列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:export")
|
||||
@Log(title = "订单详情", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyOrderItemBo bo, HttpServletResponse response) {
|
||||
List<HyOrderItemVo> list = hyOrderItemService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单详情", HyOrderItemVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详情详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyOrderItemVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyOrderItemService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单详情
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:edit")
|
||||
@Log(title = "订单详情", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyOrderItemBo bo) {
|
||||
return toAjax(hyOrderItemService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单详情
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:remove")
|
||||
@Log(title = "订单详情", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyOrderItemService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 确认订单
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:confirm")
|
||||
@GetMapping("/confirm/{id}")
|
||||
public R<Boolean> confirmOrder(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyOrderItemService.confirmOrder(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单退款
|
||||
*/
|
||||
@SaCheckPermission("mall:orderItem:refund")
|
||||
@Log(title = "订单退款", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/refund")
|
||||
public R<Void> refund(@Validated(EditGroup.class) @RequestBody HyOrderItemBo bo) throws Exception {
|
||||
return toAjax(hyOrderItemService.refund(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,159 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyOrderPaymentBo;
|
||||
import org.dromara.mall.domain.vo.HyOrderPaymenSumVo;
|
||||
import org.dromara.mall.domain.vo.HyOrderPaymentVo;
|
||||
import org.dromara.mall.service.IHyOrderPaymentService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单打款
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-27
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderPayment")
|
||||
public class HyOrderPaymentController extends BaseController {
|
||||
|
||||
private final IHyOrderPaymentService hyOrderPaymentService;
|
||||
|
||||
/**
|
||||
* 查询订单打款列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyOrderPaymentVo> list(HyOrderPaymentBo bo, PageQuery pageQuery) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
return hyOrderPaymentService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单打款统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<HyOrderPaymenSumVo> listSum(HyOrderPaymentBo bo) {
|
||||
return R.ok(hyOrderPaymentService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单打款列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:export")
|
||||
@Log(title = "订单打款", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyOrderPaymentBo bo, HttpServletResponse response) {
|
||||
List<HyOrderPaymentVo> list = hyOrderPaymentService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单打款", HyOrderPaymentVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单打款详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyOrderPaymentVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyOrderPaymentService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单打款
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:add")
|
||||
@Log(title = "订单打款", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyOrderPaymentBo bo) {
|
||||
return toAjax(hyOrderPaymentService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单打款
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:edit")
|
||||
@Log(title = "订单打款", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyOrderPaymentBo bo) {
|
||||
return toAjax(hyOrderPaymentService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单打款
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:remove")
|
||||
@Log(title = "订单打款", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyOrderPaymentService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 租户提现
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:withdrawal")
|
||||
@Log(title = "租户提现", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping("/withdrawal")
|
||||
public R<Void> withdrawal(@Validated(AddGroup.class) @RequestBody HyOrderPaymentBo bo) {
|
||||
return toAjax(hyOrderPaymentService.withdrawal(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 标记已打款
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:edit")
|
||||
@Log(title = "订单打款", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/mark")
|
||||
public R<Void> mark(@Validated(EditGroup.class) @RequestBody HyOrderPaymentBo bo) {
|
||||
return toAjax(hyOrderPaymentService.mark(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核拒绝
|
||||
*/
|
||||
@SaCheckPermission("mall:orderPayment:edit")
|
||||
@Log(title = "审核拒绝", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/refuse")
|
||||
public R<Void> refuse(@Validated(EditGroup.class) @RequestBody HyOrderPaymentBo bo) {
|
||||
return toAjax(hyOrderPaymentService.refuse(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyPromoterBo;
|
||||
import org.dromara.mall.domain.vo.HyPromoterSumVo;
|
||||
import org.dromara.mall.domain.vo.HyPromoterVo;
|
||||
import org.dromara.mall.service.IHyPromoterService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 推广员
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/promoter")
|
||||
public class HyPromoterController extends BaseController {
|
||||
|
||||
private final IHyPromoterService hyPromoterService;
|
||||
|
||||
/**
|
||||
* 查询推广员列表
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyPromoterVo> list(HyPromoterBo bo, PageQuery pageQuery) {
|
||||
return hyPromoterService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询推广员统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<HyPromoterSumVo> listSum(HyPromoterBo bo) {
|
||||
return R.ok(hyPromoterService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询渠道下单排行榜列表
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:listChart")
|
||||
@GetMapping("/listChart")
|
||||
public TableDataInfo<HyPromoterVo> listChart(HyPromoterBo bo, PageQuery pageQuery) {
|
||||
return hyPromoterService.queryPageListChart(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出推广员列表
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:export")
|
||||
@Log(title = "推广员", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyPromoterBo bo, HttpServletResponse response) {
|
||||
List<HyPromoterVo> list = hyPromoterService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "推广员", HyPromoterVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取推广员详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyPromoterVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyPromoterService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增推广员
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:add")
|
||||
@Log(title = "推广员", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyPromoterBo bo) {
|
||||
// 验证手机号是否已注册
|
||||
if (hyPromoterService.checkPhoneUnique(bo.getPhone())) {
|
||||
return R.fail("该手机号已注册");
|
||||
}
|
||||
return toAjax(hyPromoterService.register(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改推广员
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:edit")
|
||||
@Log(title = "推广员", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyPromoterBo bo) {
|
||||
return toAjax(hyPromoterService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置密码
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:resetPwd")
|
||||
@Log(title = "推广员", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/resetPwd")
|
||||
public R<Void> resetPwd(@Validated(EditGroup.class) @RequestBody HyPromoterBo bo) {
|
||||
return toAjax(hyPromoterService.resetPasswordAdmin(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除推广员
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:promoter:remove")
|
||||
@Log(title = "推广员", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyPromoterService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyPromoterRecordBo;
|
||||
import org.dromara.mall.domain.vo.HyPromoterRecordVo;
|
||||
import org.dromara.mall.service.IHyPromoterRecordService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 推广员资金记录
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/promoterRecord")
|
||||
public class HyPromoterRecordController extends BaseController {
|
||||
|
||||
private final IHyPromoterRecordService hyPromoterRecordService;
|
||||
|
||||
/**
|
||||
* 查询推广员资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:promoterRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyPromoterRecordVo> list(HyPromoterRecordBo bo, PageQuery pageQuery) {
|
||||
return hyPromoterRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出推广员资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:promoterRecord:export")
|
||||
@Log(title = "推广员资金记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyPromoterRecordBo bo, HttpServletResponse response) {
|
||||
List<HyPromoterRecordVo> list = hyPromoterRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "推广员资金记录", HyPromoterRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取推广员资金记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:promoterRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyPromoterRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyPromoterRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增推广员资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:promoterRecord:add")
|
||||
@Log(title = "推广员资金记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyPromoterRecordBo bo) {
|
||||
return toAjax(hyPromoterRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改推广员资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:promoterRecord:edit")
|
||||
@Log(title = "推广员资金记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyPromoterRecordBo bo) {
|
||||
return toAjax(hyPromoterRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除推广员资金记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:promoterRecord:remove")
|
||||
@Log(title = "推广员资金记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyPromoterRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.HyUserRecordBo;
|
||||
import org.dromara.mall.domain.vo.HyUserRecordVo;
|
||||
import org.dromara.mall.service.IHyUserRecordService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户资金记录
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/userRecord")
|
||||
public class HyUserRecordController extends BaseController {
|
||||
|
||||
private final IHyUserRecordService hyUserRecordService;
|
||||
|
||||
/**
|
||||
* 查询用户资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<HyUserRecordVo> list(HyUserRecordBo bo, PageQuery pageQuery) {
|
||||
return hyUserRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userRecord:export")
|
||||
@Log(title = "用户资金记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HyUserRecordBo bo, HttpServletResponse response) {
|
||||
List<HyUserRecordVo> list = hyUserRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "用户资金记录", HyUserRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户资金记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:userRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<HyUserRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(hyUserRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:userRecord:add")
|
||||
@Log(title = "用户资金记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody HyUserRecordBo bo) {
|
||||
return toAjax(hyUserRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:userRecord:edit")
|
||||
@Log(title = "用户资金记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody HyUserRecordBo bo) {
|
||||
return toAjax(hyUserRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户资金记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:userRecord:remove")
|
||||
@Log(title = "用户资金记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(hyUserRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import com.lakala.zf.laop.java.sdk.demo.utils.V3LakalaBusinessUtils;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* 拉卡拉接口
|
||||
* @author Maosw
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/Lakala")
|
||||
@Tag(name = "拉卡拉接口")
|
||||
public class LakalaController {
|
||||
|
||||
@GetMapping("/getToken")
|
||||
@Operation(summary = "获取SAAS商户Token信息" , description = "获取SAAS商户Token信息")
|
||||
public R<String> getToken() {
|
||||
return R.ok(V3LakalaBusinessUtils.getAccessToken());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzAgreementBo;
|
||||
import org.dromara.mall.domain.vo.TzAgreementVo;
|
||||
import org.dromara.mall.service.ITzAgreementService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 协议
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/agreement")
|
||||
public class TzAgreementController extends BaseController {
|
||||
|
||||
private final ITzAgreementService tzAgreementService;
|
||||
|
||||
/**
|
||||
* 查询协议列表
|
||||
*/
|
||||
@SaCheckPermission("mall:agreement:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzAgreementVo> list(TzAgreementBo bo, PageQuery pageQuery) {
|
||||
return tzAgreementService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出协议列表
|
||||
*/
|
||||
@SaCheckPermission("mall:agreement:export")
|
||||
@Log(title = "协议", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzAgreementBo bo, HttpServletResponse response) {
|
||||
List<TzAgreementVo> list = tzAgreementService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "协议", TzAgreementVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取协议详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:agreement:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzAgreementVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzAgreementService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增协议
|
||||
*/
|
||||
@SaCheckPermission("mall:agreement:add")
|
||||
@Log(title = "协议", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzAgreementBo bo) {
|
||||
return toAjax(tzAgreementService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改协议
|
||||
*/
|
||||
@SaCheckPermission("mall:agreement:edit")
|
||||
@Log(title = "协议", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzAgreementBo bo) {
|
||||
return toAjax(tzAgreementService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除协议
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:agreement:remove")
|
||||
@Log(title = "协议", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzAgreementService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzAreaBo;
|
||||
import org.dromara.mall.domain.vo.TzAreaVo;
|
||||
import org.dromara.mall.service.ITzAreaService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/area")
|
||||
public class TzAreaController extends BaseController {
|
||||
|
||||
private final ITzAreaService tzAreaService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:area:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzAreaVo> list(TzAreaBo bo, PageQuery pageQuery) {
|
||||
return tzAreaService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:area:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzAreaBo bo, HttpServletResponse response) {
|
||||
List<TzAreaVo> list = tzAreaService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzAreaVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param areaId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:area:query")
|
||||
@GetMapping("/{areaId}")
|
||||
public R<TzAreaVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long areaId) {
|
||||
return R.ok(tzAreaService.queryById(areaId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:area:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzAreaBo bo) {
|
||||
return toAjax(tzAreaService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:area:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzAreaBo bo) {
|
||||
return toAjax(tzAreaService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param areaIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:area:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{areaIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] areaIds) {
|
||||
return toAjax(tzAreaService.deleteWithValidByIds(List.of(areaIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzAttachFileVo;
|
||||
import org.dromara.mall.domain.bo.TzAttachFileBo;
|
||||
import org.dromara.mall.service.ITzAttachFileService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/attachFile")
|
||||
public class TzAttachFileController extends BaseController {
|
||||
|
||||
private final ITzAttachFileService tzAttachFileService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:attachFile:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzAttachFileVo> list(TzAttachFileBo bo, PageQuery pageQuery) {
|
||||
return tzAttachFileService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:attachFile:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzAttachFileBo bo, HttpServletResponse response) {
|
||||
List<TzAttachFileVo> list = tzAttachFileService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzAttachFileVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param fileId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:attachFile:query")
|
||||
@GetMapping("/{fileId}")
|
||||
public R<TzAttachFileVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long fileId) {
|
||||
return R.ok(tzAttachFileService.queryById(fileId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:attachFile:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzAttachFileBo bo) {
|
||||
return toAjax(tzAttachFileService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:attachFile:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzAttachFileBo bo) {
|
||||
return toAjax(tzAttachFileService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param fileIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:attachFile:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{fileIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] fileIds) {
|
||||
return toAjax(tzAttachFileService.deleteWithValidByIds(List.of(fileIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzBankCardBo;
|
||||
import org.dromara.mall.domain.vo.TzBankCardVo;
|
||||
import org.dromara.mall.service.ITzBankCardService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 绑定银行卡信息
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/bankCard")
|
||||
public class TzBankCardController extends BaseController {
|
||||
|
||||
private final ITzBankCardService tzBankCardService;
|
||||
|
||||
/**
|
||||
* 查询绑定银行卡信息列表
|
||||
*/
|
||||
@SaCheckPermission("mall:bankCard:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzBankCardVo> list(TzBankCardBo bo, PageQuery pageQuery) {
|
||||
return tzBankCardService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出绑定银行卡信息列表
|
||||
*/
|
||||
@SaCheckPermission("mall:bankCard:export")
|
||||
@Log(title = "绑定银行卡信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzBankCardBo bo, HttpServletResponse response) {
|
||||
List<TzBankCardVo> list = tzBankCardService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "绑定银行卡信息", TzBankCardVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取绑定银行卡信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:bankCard:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzBankCardVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzBankCardService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增绑定银行卡信息
|
||||
*/
|
||||
@SaCheckPermission("mall:bankCard:add")
|
||||
@Log(title = "绑定银行卡信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzBankCardBo bo) {
|
||||
return toAjax(tzBankCardService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改绑定银行卡信息
|
||||
*/
|
||||
@SaCheckPermission("mall:bankCard:edit")
|
||||
@Log(title = "绑定银行卡信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzBankCardBo bo) {
|
||||
return toAjax(tzBankCardService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除绑定银行卡信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:bankCard:remove")
|
||||
@Log(title = "绑定银行卡信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzBankCardService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzBrandBo;
|
||||
import org.dromara.mall.domain.vo.TzBrandVo;
|
||||
import org.dromara.mall.service.ITzBrandService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品牌
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-26
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/brand")
|
||||
public class TzBrandController extends BaseController {
|
||||
|
||||
private final ITzBrandService tzBrandService;
|
||||
|
||||
/**
|
||||
* 查询品牌列表
|
||||
*/
|
||||
@SaCheckPermission("mall:brand:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzBrandVo> list(TzBrandBo bo, PageQuery pageQuery) {
|
||||
return tzBrandService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出品牌列表
|
||||
*/
|
||||
@SaCheckPermission("mall:brand:export")
|
||||
@Log(title = "品牌", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzBrandBo bo, HttpServletResponse response) {
|
||||
List<TzBrandVo> list = tzBrandService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "品牌", TzBrandVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取品牌详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:brand:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzBrandVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzBrandService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增品牌
|
||||
*/
|
||||
@SaCheckPermission("mall:brand:add")
|
||||
@Log(title = "品牌", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzBrandBo bo) {
|
||||
return toAjax(tzBrandService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改品牌
|
||||
*/
|
||||
@SaCheckPermission("mall:brand:edit")
|
||||
@Log(title = "品牌", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzBrandBo bo) {
|
||||
return toAjax(tzBrandService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除品牌
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:brand:remove")
|
||||
@Log(title = "品牌", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzBrandService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzCategoryBrandVo;
|
||||
import org.dromara.mall.domain.bo.TzCategoryBrandBo;
|
||||
import org.dromara.mall.service.ITzCategoryBrandService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/categoryBrand")
|
||||
public class TzCategoryBrandController extends BaseController {
|
||||
|
||||
private final ITzCategoryBrandService tzCategoryBrandService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryBrand:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzCategoryBrandVo> list(TzCategoryBrandBo bo, PageQuery pageQuery) {
|
||||
return tzCategoryBrandService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryBrand:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzCategoryBrandBo bo, HttpServletResponse response) {
|
||||
List<TzCategoryBrandVo> list = tzCategoryBrandService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzCategoryBrandVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryBrand:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzCategoryBrandVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzCategoryBrandService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryBrand:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzCategoryBrandBo bo) {
|
||||
return toAjax(tzCategoryBrandService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryBrand:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzCategoryBrandBo bo) {
|
||||
return toAjax(tzCategoryBrandService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryBrand:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzCategoryBrandService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzCategoryBo;
|
||||
import org.dromara.mall.domain.vo.TzCategoryVo;
|
||||
import org.dromara.mall.service.ITzCategoryService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品类目
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-31
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/category")
|
||||
public class TzCategoryController extends BaseController {
|
||||
|
||||
private final ITzCategoryService tzCategoryService;
|
||||
|
||||
/**
|
||||
* 查询产品类目列表
|
||||
*/
|
||||
@SaCheckPermission("mall:category:list")
|
||||
@GetMapping("/list")
|
||||
public R<List<TzCategoryVo>> list(TzCategoryBo bo) {
|
||||
List<TzCategoryVo> list = tzCategoryService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询产品类目全部列表
|
||||
*/
|
||||
@GetMapping("/listAll")
|
||||
public R<List<TzCategoryVo>> listAll(TzCategoryBo bo) {
|
||||
List<TzCategoryVo> list = tzCategoryService.queryList(bo);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品类目列表
|
||||
*/
|
||||
@SaCheckPermission("mall:category:export")
|
||||
@Log(title = "产品类目", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzCategoryBo bo, HttpServletResponse response) {
|
||||
List<TzCategoryVo> list = tzCategoryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "产品类目", TzCategoryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品类目详细信息
|
||||
*
|
||||
* @param categoryId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:category:query")
|
||||
@GetMapping("/{categoryId}")
|
||||
public R<TzCategoryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long categoryId) {
|
||||
return R.ok(tzCategoryService.queryById(categoryId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品类目
|
||||
*/
|
||||
@SaCheckPermission("mall:category:add")
|
||||
@Log(title = "产品类目", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzCategoryBo bo) {
|
||||
return toAjax(tzCategoryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品类目
|
||||
*/
|
||||
@SaCheckPermission("mall:category:edit")
|
||||
@Log(title = "产品类目", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzCategoryBo bo) {
|
||||
return toAjax(tzCategoryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品类目
|
||||
*
|
||||
* @param categoryIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:category:remove")
|
||||
@Log(title = "产品类目", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{categoryIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] categoryIds) {
|
||||
return toAjax(tzCategoryService.deleteWithValidByIds(List.of(categoryIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzCategoryPropVo;
|
||||
import org.dromara.mall.domain.bo.TzCategoryPropBo;
|
||||
import org.dromara.mall.service.ITzCategoryPropService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/categoryProp")
|
||||
public class TzCategoryPropController extends BaseController {
|
||||
|
||||
private final ITzCategoryPropService tzCategoryPropService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryProp:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzCategoryPropVo> list(TzCategoryPropBo bo, PageQuery pageQuery) {
|
||||
return tzCategoryPropService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryProp:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzCategoryPropBo bo, HttpServletResponse response) {
|
||||
List<TzCategoryPropVo> list = tzCategoryPropService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzCategoryPropVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryProp:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzCategoryPropVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzCategoryPropService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryProp:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzCategoryPropBo bo) {
|
||||
return toAjax(tzCategoryPropService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryProp:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzCategoryPropBo bo) {
|
||||
return toAjax(tzCategoryPropService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:categoryProp:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzCategoryPropService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,146 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzCustomerBo;
|
||||
import org.dromara.mall.domain.vo.TzCustomerSumVo;
|
||||
import org.dromara.mall.domain.vo.TzCustomerVo;
|
||||
import org.dromara.mall.service.ITzCustomerService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/customer")
|
||||
public class TzCustomerController extends BaseController {
|
||||
|
||||
private final ITzCustomerService tzCustomerService;
|
||||
|
||||
/**
|
||||
* 查询客户列表
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzCustomerVo> list(TzCustomerBo bo, PageQuery pageQuery) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setUserId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
return tzCustomerService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询客户列表统计
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:count")
|
||||
@GetMapping("/count")
|
||||
public R<TzCustomerSumVo> queryListCount(TzCustomerBo bo) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setUserId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
return R.ok(tzCustomerService.queryListCount(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户列表
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:export")
|
||||
@Log(title = "客户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzCustomerBo bo, HttpServletResponse response) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setUserId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
List<TzCustomerVo> list = tzCustomerService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "客户", TzCustomerVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzCustomerVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzCustomerService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:add")
|
||||
@Log(title = "客户", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzCustomerBo bo) {
|
||||
return toAjax(tzCustomerService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:edit")
|
||||
@Log(title = "客户", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzCustomerBo bo) {
|
||||
return toAjax(tzCustomerService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:remove")
|
||||
@Log(title = "客户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzCustomerService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 申请退款(客服)
|
||||
*/
|
||||
@SaCheckPermission("mall:customer:refund")
|
||||
@Log(title = "申请退款", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/refund")
|
||||
public R<Void> refund(@RequestBody TzCustomerBo bo) {
|
||||
return toAjax(tzCustomerService.refund(bo));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzCustomerRecordBo;
|
||||
import org.dromara.mall.domain.vo.TzCustomerRecordVo;
|
||||
import org.dromara.mall.service.ITzCustomerRecordService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户资金记录
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/customerRecord")
|
||||
public class TzCustomerRecordController extends BaseController {
|
||||
|
||||
private final ITzCustomerRecordService tzCustomerRecordService;
|
||||
|
||||
/**
|
||||
* 查询客户资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:customerRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzCustomerRecordVo> list(TzCustomerRecordBo bo, PageQuery pageQuery) {
|
||||
return tzCustomerRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:customerRecord:export")
|
||||
@Log(title = "客户资金记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzCustomerRecordBo bo, HttpServletResponse response) {
|
||||
List<TzCustomerRecordVo> list = tzCustomerRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "客户资金记录", TzCustomerRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户资金记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:customerRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzCustomerRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzCustomerRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:customerRecord:add")
|
||||
@Log(title = "客户资金记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzCustomerRecordBo bo) {
|
||||
return toAjax(tzCustomerRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:customerRecord:edit")
|
||||
@Log(title = "客户资金记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzCustomerRecordBo bo) {
|
||||
return toAjax(tzCustomerRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户资金记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:customerRecord:remove")
|
||||
@Log(title = "客户资金记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzCustomerRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzDeliveryVo;
|
||||
import org.dromara.mall.domain.bo.TzDeliveryBo;
|
||||
import org.dromara.mall.service.ITzDeliveryService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 物流公司
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/delivery")
|
||||
public class TzDeliveryController extends BaseController {
|
||||
|
||||
private final ITzDeliveryService tzDeliveryService;
|
||||
|
||||
/**
|
||||
* 查询物流公司列表
|
||||
*/
|
||||
@SaCheckPermission("mall:delivery:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzDeliveryVo> list(TzDeliveryBo bo, PageQuery pageQuery) {
|
||||
return tzDeliveryService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出物流公司列表
|
||||
*/
|
||||
@SaCheckPermission("mall:delivery:export")
|
||||
@Log(title = "物流公司", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzDeliveryBo bo, HttpServletResponse response) {
|
||||
List<TzDeliveryVo> list = tzDeliveryService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "物流公司", TzDeliveryVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取物流公司详细信息
|
||||
*
|
||||
* @param dvyId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:delivery:query")
|
||||
@GetMapping("/{dvyId}")
|
||||
public R<TzDeliveryVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long dvyId) {
|
||||
return R.ok(tzDeliveryService.queryById(dvyId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增物流公司
|
||||
*/
|
||||
@SaCheckPermission("mall:delivery:add")
|
||||
@Log(title = "物流公司", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzDeliveryBo bo) {
|
||||
return toAjax(tzDeliveryService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物流公司
|
||||
*/
|
||||
@SaCheckPermission("mall:delivery:edit")
|
||||
@Log(title = "物流公司", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzDeliveryBo bo) {
|
||||
return toAjax(tzDeliveryService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除物流公司
|
||||
*
|
||||
* @param dvyIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:delivery:remove")
|
||||
@Log(title = "物流公司", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{dvyIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] dvyIds) {
|
||||
return toAjax(tzDeliveryService.deleteWithValidByIds(List.of(dvyIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzHotSearchVo;
|
||||
import org.dromara.mall.domain.bo.TzHotSearchBo;
|
||||
import org.dromara.mall.service.ITzHotSearchService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 热搜
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/hotSearch")
|
||||
public class TzHotSearchController extends BaseController {
|
||||
|
||||
private final ITzHotSearchService tzHotSearchService;
|
||||
|
||||
/**
|
||||
* 查询热搜列表
|
||||
*/
|
||||
@SaCheckPermission("mall:hotSearch:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzHotSearchVo> list(TzHotSearchBo bo, PageQuery pageQuery) {
|
||||
return tzHotSearchService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出热搜列表
|
||||
*/
|
||||
@SaCheckPermission("mall:hotSearch:export")
|
||||
@Log(title = "热搜", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzHotSearchBo bo, HttpServletResponse response) {
|
||||
List<TzHotSearchVo> list = tzHotSearchService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "热搜", TzHotSearchVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取热搜详细信息
|
||||
*
|
||||
* @param hotSearchId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:hotSearch:query")
|
||||
@GetMapping("/{hotSearchId}")
|
||||
public R<TzHotSearchVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long hotSearchId) {
|
||||
return R.ok(tzHotSearchService.queryById(hotSearchId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增热搜
|
||||
*/
|
||||
@SaCheckPermission("mall:hotSearch:add")
|
||||
@Log(title = "热搜", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzHotSearchBo bo) {
|
||||
return toAjax(tzHotSearchService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改热搜
|
||||
*/
|
||||
@SaCheckPermission("mall:hotSearch:edit")
|
||||
@Log(title = "热搜", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzHotSearchBo bo) {
|
||||
return toAjax(tzHotSearchService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除热搜
|
||||
*
|
||||
* @param hotSearchIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:hotSearch:remove")
|
||||
@Log(title = "热搜", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{hotSearchIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] hotSearchIds) {
|
||||
return toAjax(tzHotSearchService.deleteWithValidByIds(List.of(hotSearchIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzIndexImgVo;
|
||||
import org.dromara.mall.domain.bo.TzIndexImgBo;
|
||||
import org.dromara.mall.service.ITzIndexImgService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 主页轮播图
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/indexImg")
|
||||
public class TzIndexImgController extends BaseController {
|
||||
|
||||
private final ITzIndexImgService tzIndexImgService;
|
||||
|
||||
/**
|
||||
* 查询主页轮播图列表
|
||||
*/
|
||||
@SaCheckPermission("mall:indexImg:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzIndexImgVo> list(TzIndexImgBo bo, PageQuery pageQuery) {
|
||||
return tzIndexImgService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出主页轮播图列表
|
||||
*/
|
||||
@SaCheckPermission("mall:indexImg:export")
|
||||
@Log(title = "主页轮播图", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzIndexImgBo bo, HttpServletResponse response) {
|
||||
List<TzIndexImgVo> list = tzIndexImgService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "主页轮播图", TzIndexImgVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取主页轮播图详细信息
|
||||
*
|
||||
* @param imgId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:indexImg:query")
|
||||
@GetMapping("/{imgId}")
|
||||
public R<TzIndexImgVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long imgId) {
|
||||
return R.ok(tzIndexImgService.queryById(imgId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增主页轮播图
|
||||
*/
|
||||
@SaCheckPermission("mall:indexImg:add")
|
||||
@Log(title = "主页轮播图", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzIndexImgBo bo) {
|
||||
return toAjax(tzIndexImgService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改主页轮播图
|
||||
*/
|
||||
@SaCheckPermission("mall:indexImg:edit")
|
||||
@Log(title = "主页轮播图", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzIndexImgBo bo) {
|
||||
return toAjax(tzIndexImgService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除主页轮播图
|
||||
*
|
||||
* @param imgIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:indexImg:remove")
|
||||
@Log(title = "主页轮播图", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{imgIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] imgIds) {
|
||||
return toAjax(tzIndexImgService.deleteWithValidByIds(List.of(imgIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzInvoiceApplyBo;
|
||||
import org.dromara.mall.domain.vo.TzInvoicApplySumVo;
|
||||
import org.dromara.mall.domain.vo.TzInvoiceApplyVo;
|
||||
import org.dromara.mall.service.ITzInvoiceApplyService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发票申请记录
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/invoiceApply")
|
||||
public class TzInvoiceApplyController extends BaseController {
|
||||
|
||||
private final ITzInvoiceApplyService tzInvoiceApplyService;
|
||||
|
||||
/**
|
||||
* 查询发票申请记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceApply:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzInvoiceApplyVo> list(TzInvoiceApplyBo bo, PageQuery pageQuery) {
|
||||
return tzInvoiceApplyService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询发票申请记录统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceApply:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<TzInvoicApplySumVo> listSum(TzInvoiceApplyBo bo) {
|
||||
return R.ok(tzInvoiceApplyService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出发票申请记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceApply:export")
|
||||
@Log(title = "发票申请记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzInvoiceApplyBo bo, HttpServletResponse response) {
|
||||
List<TzInvoiceApplyVo> list = tzInvoiceApplyService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "发票申请记录", TzInvoiceApplyVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发票申请记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceApply:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzInvoiceApplyVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzInvoiceApplyService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发票申请记录
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceApply:add")
|
||||
@Log(title = "发票申请记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzInvoiceApplyBo bo) {
|
||||
return toAjax(tzInvoiceApplyService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发票申请记录
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceApply:edit")
|
||||
@Log(title = "发票申请记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzInvoiceApplyBo bo) {
|
||||
return toAjax(tzInvoiceApplyService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除发票申请记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceApply:remove")
|
||||
@Log(title = "发票申请记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzInvoiceApplyService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzInvoiceTitleBo;
|
||||
import org.dromara.mall.domain.vo.TzInvoiceTitleVo;
|
||||
import org.dromara.mall.service.ITzInvoiceTitleService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 发票抬头信息
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/invoiceTitle")
|
||||
public class TzInvoiceTitleController extends BaseController {
|
||||
|
||||
private final ITzInvoiceTitleService tzInvoiceTitleService;
|
||||
|
||||
/**
|
||||
* 查询发票抬头信息列表
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceTitle:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzInvoiceTitleVo> list(TzInvoiceTitleBo bo, PageQuery pageQuery) {
|
||||
return tzInvoiceTitleService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出发票抬头信息列表
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceTitle:export")
|
||||
@Log(title = "发票抬头信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzInvoiceTitleBo bo, HttpServletResponse response) {
|
||||
List<TzInvoiceTitleVo> list = tzInvoiceTitleService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "发票抬头信息", TzInvoiceTitleVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取发票抬头信息详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceTitle:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzInvoiceTitleVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzInvoiceTitleService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增发票抬头信息
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceTitle:add")
|
||||
@Log(title = "发票抬头信息", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzInvoiceTitleBo bo) {
|
||||
return toAjax(tzInvoiceTitleService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改发票抬头信息
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceTitle:edit")
|
||||
@Log(title = "发票抬头信息", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzInvoiceTitleBo bo) {
|
||||
return toAjax(tzInvoiceTitleService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除发票抬头信息
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:invoiceTitle:remove")
|
||||
@Log(title = "发票抬头信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzInvoiceTitleService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzMessageVo;
|
||||
import org.dromara.mall.domain.bo.TzMessageBo;
|
||||
import org.dromara.mall.service.ITzMessageService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/message")
|
||||
public class TzMessageController extends BaseController {
|
||||
|
||||
private final ITzMessageService tzMessageService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:message:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzMessageVo> list(TzMessageBo bo, PageQuery pageQuery) {
|
||||
return tzMessageService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:message:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzMessageBo bo, HttpServletResponse response) {
|
||||
List<TzMessageVo> list = tzMessageService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzMessageVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:message:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzMessageVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzMessageService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:message:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzMessageBo bo) {
|
||||
return toAjax(tzMessageService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:message:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzMessageBo bo) {
|
||||
return toAjax(tzMessageService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:message:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzMessageService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzNoticeBo;
|
||||
import org.dromara.mall.domain.vo.TzNoticeVo;
|
||||
import org.dromara.mall.service.ITzNoticeService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公告
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/notice")
|
||||
public class TzNoticeController extends BaseController {
|
||||
|
||||
private final ITzNoticeService tzNoticeService;
|
||||
|
||||
/**
|
||||
* 查询公告列表
|
||||
*/
|
||||
@SaCheckPermission("mall:notice:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzNoticeVo> list(TzNoticeBo bo, PageQuery pageQuery) {
|
||||
return tzNoticeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出公告列表
|
||||
*/
|
||||
@SaCheckPermission("mall:notice:export")
|
||||
@Log(title = "公告", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzNoticeBo bo, HttpServletResponse response) {
|
||||
List<TzNoticeVo> list = tzNoticeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "公告", TzNoticeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取公告详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:notice:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzNoticeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzNoticeService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增公告
|
||||
*/
|
||||
@SaCheckPermission("mall:notice:add")
|
||||
@Log(title = "公告", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzNoticeBo bo) {
|
||||
return toAjax(tzNoticeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改公告
|
||||
*/
|
||||
@SaCheckPermission("mall:notice:edit")
|
||||
@Log(title = "公告", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzNoticeBo bo) {
|
||||
return toAjax(tzNoticeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除公告
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:notice:remove")
|
||||
@Log(title = "公告", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzNoticeService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzOrderAllBo;
|
||||
import org.dromara.mall.domain.vo.TzOrderAllVo;
|
||||
import org.dromara.mall.service.ITzOrderAllService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单汇总
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderAll")
|
||||
public class TzOrderAllController extends BaseController {
|
||||
|
||||
private final ITzOrderAllService tzOrderAllService;
|
||||
|
||||
/**
|
||||
* 查询订单汇总列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderAll:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderAllVo> list(TzOrderAllBo bo, PageQuery pageQuery) {
|
||||
return tzOrderAllService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单汇总列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderAll:export")
|
||||
@Log(title = "订单汇总", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderAllBo bo, HttpServletResponse response) {
|
||||
List<TzOrderAllVo> list = tzOrderAllService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单汇总", TzOrderAllVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单汇总详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderAll:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzOrderAllVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzOrderAllService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单汇总
|
||||
*/
|
||||
@SaCheckPermission("mall:orderAll:add")
|
||||
@Log(title = "订单汇总", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzOrderAllBo bo) {
|
||||
return toAjax(tzOrderAllService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单汇总
|
||||
*/
|
||||
@SaCheckPermission("mall:orderAll:edit")
|
||||
@Log(title = "订单汇总", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderAllBo bo) {
|
||||
return toAjax(tzOrderAllService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 总订单确认
|
||||
*/
|
||||
@SaCheckPermission("mall:orderAll:confirm")
|
||||
@Log(title = "总订单确认", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("confirm/{id}")
|
||||
public R<Void> confirm(@NotNull(message = "主键不能为空")@PathVariable Long id) {
|
||||
return toAjax(tzOrderAllService.confirm(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 关闭订单汇总
|
||||
*
|
||||
* @param id 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderAll:remove")
|
||||
@Log(title = "关闭订单汇总", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public R<Void> remove(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return toAjax(tzOrderAllService.deleteWithValidByIds(id));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,229 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.dto.RoleDTO;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzOrderBo;
|
||||
import org.dromara.mall.domain.vo.TzOrderSumVo;
|
||||
import org.dromara.mall.domain.vo.TzOrderVo;
|
||||
import org.dromara.mall.service.ITzOrderService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单(采购员)
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-08-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderBuyer")
|
||||
@Tag(name = "订单(采购员)")
|
||||
public class TzOrderBuyerController extends BaseController {
|
||||
|
||||
private final ITzOrderService tzOrderService;
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderVo> list(TzOrderBo bo, PageQuery pageQuery) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("zh_user".equals(loginUser.getUserType())){
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}else if("cg_user".equals(loginUser.getUserType())){
|
||||
List<RoleDTO> list = loginUser.getRoles();
|
||||
boolean isRole = list.stream().anyMatch(role -> role.getRoleId() == 6);
|
||||
if(!isRole){
|
||||
bo.setBuyerId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return tzOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表统计(采购)
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:count")
|
||||
@GetMapping("/count")
|
||||
public R<TzOrderSumVo> queryListCount(TzOrderBo bo) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("zh_user".equals(loginUser.getUserType())){
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}else if("cg_user".equals(loginUser.getUserType())){
|
||||
List<RoleDTO> list = loginUser.getRoles();
|
||||
boolean isRole = list.stream().anyMatch(role -> role.getRoleId() == 6);
|
||||
if(!isRole){
|
||||
bo.setBuyerId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
}
|
||||
return R.ok(tzOrderService.queryListCountCG(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:export")
|
||||
@Log(title = "订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderBo bo, HttpServletResponse response) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("zh_user".equals(loginUser.getUserType())){
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
List<TzOrderVo> list = tzOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单", TzOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
*
|
||||
* @param orderId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:query")
|
||||
@GetMapping("/{orderId}")
|
||||
public R<TzOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long orderId) {
|
||||
return R.ok(tzOrderService.queryById(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:edit")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.updateByBo(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改发货地址
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:editAddress")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/editAddress")
|
||||
public R<Void> editAddress(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.editAddress(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单指派
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:assign")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/assign")
|
||||
public R<Void> assign(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.assign(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发货
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:deliverGoods")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/deliverGoods")
|
||||
public R<Void> deliverGoods(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.deliverGoods(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改快递单号
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:editExpress")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/editExpress")
|
||||
public R<Void> editExpress(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.editExpress(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 标记已签收
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:signFeceipt")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/signFeceipt")
|
||||
public R<Void> signFeceipt(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.signFeceipt(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 标记已处理
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:processed")
|
||||
@Log(title = "标记已处理", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/processed")
|
||||
public R<Void> processed(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.processed(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 标记已采购
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:purchased")
|
||||
@Log(title = "标记已采购", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/purchased")
|
||||
public R<Void> purchased(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.purchased(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 提交打款信息(采购)
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:remitInfo")
|
||||
@Log(title = "提交打款信息(采购)", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/remitInfo")
|
||||
public R<Void> remitInfo(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.remitInfo(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 关闭订单
|
||||
*/
|
||||
@SaCheckPermission("mall:orderBuyer:close")
|
||||
@Log(title = "订单", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/close/{orderId}")
|
||||
public R<Void> close(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] orderId) {
|
||||
return toAjax(tzOrderService.closeOrder(orderId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzOrderReceiveBo;
|
||||
import org.dromara.mall.domain.vo.TzOrderReceiveSumVo;
|
||||
import org.dromara.mall.domain.vo.TzOrderReceiveVo;
|
||||
import org.dromara.mall.service.ITzOrderReceiveService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单汇款
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderReceive")
|
||||
public class TzOrderReceiveController extends BaseController {
|
||||
|
||||
private final ITzOrderReceiveService tzOrderReceiveService;
|
||||
|
||||
/**
|
||||
* 查询订单汇款列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderReceiveVo> list(TzOrderReceiveBo bo, PageQuery pageQuery) {
|
||||
return tzOrderReceiveService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询订单汇款列表统计
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:count")
|
||||
@GetMapping("/count")
|
||||
public R<TzOrderReceiveSumVo> count(TzOrderReceiveBo bo) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setUserId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
return R.ok(tzOrderReceiveService.queryListCount(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单汇款列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:export")
|
||||
@Log(title = "订单汇款", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderReceiveBo bo, HttpServletResponse response) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setUserId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
List<TzOrderReceiveVo> list = tzOrderReceiveService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单汇款", TzOrderReceiveVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单汇款详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzOrderReceiveVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzOrderReceiveService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单汇款
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:add")
|
||||
@Log(title = "订单汇款", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzOrderReceiveBo bo) {
|
||||
return toAjax(tzOrderReceiveService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单汇款
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:edit")
|
||||
@Log(title = "订单汇款", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderReceiveBo bo) {
|
||||
return toAjax(tzOrderReceiveService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 作废汇款(财务)
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:remove")
|
||||
@Log(title = "作废汇款(财务)", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzOrderReceiveService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 领取汇款(客服)
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
@SaCheckPermission("mall:orderReceive:receive")
|
||||
@Log(title = "领取汇款(客服)", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/receive")
|
||||
public R<Void> examine(@RequestBody TzOrderReceiveBo bo) {
|
||||
return toAjax(tzOrderReceiveService.receive(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 回退汇款(财务)
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
// @SaCheckPermission("mall:orderReceive:fallback")
|
||||
@Log(title = "回退汇款(财务)", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/fallback")
|
||||
public R<Void> fallback(@RequestBody TzOrderReceiveBo bo) {
|
||||
return toAjax(tzOrderReceiveService.fallback(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 审核汇款(财务)
|
||||
*/
|
||||
// @SaCheckPermission("mall:orderReceive:examine")
|
||||
// @Log(title = "审核汇款(财务)", businessType = BusinessType.OTHER)
|
||||
// @PutMapping("/examine")
|
||||
// public R<Void> examine(@Validated(EditGroup.class) @RequestBody TzOrderReceiveBo bo) {
|
||||
// return toAjax(tzOrderReceiveService.examine(bo));
|
||||
// }
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzOrderRecordBo;
|
||||
import org.dromara.mall.domain.vo.TzOrderRecordVo;
|
||||
import org.dromara.mall.service.ITzOrderRecordService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单修改记录
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-08-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderRecord")
|
||||
public class TzOrderRecordController extends BaseController {
|
||||
|
||||
private final ITzOrderRecordService tzOrderRecordService;
|
||||
|
||||
/**
|
||||
* 查询订单修改记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderRecordVo> list(TzOrderRecordBo bo, PageQuery pageQuery) {
|
||||
return tzOrderRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单修改记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRecord:export")
|
||||
@Log(title = "订单修改记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderRecordBo bo, HttpServletResponse response) {
|
||||
List<TzOrderRecordVo> list = tzOrderRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单修改记录", TzOrderRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单修改记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzOrderRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzOrderRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单修改记录
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRecord:add")
|
||||
@Log(title = "订单修改记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzOrderRecordBo bo) {
|
||||
return toAjax(tzOrderRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单修改记录
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRecord:edit")
|
||||
@Log(title = "订单修改记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderRecordBo bo) {
|
||||
return toAjax(tzOrderRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单修改记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRecord:remove")
|
||||
@Log(title = "订单修改记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzOrderRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzOrderRefundVo;
|
||||
import org.dromara.mall.domain.bo.TzOrderRefundBo;
|
||||
import org.dromara.mall.service.ITzOrderRefundService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderRefund")
|
||||
public class TzOrderRefundController extends BaseController {
|
||||
|
||||
private final ITzOrderRefundService tzOrderRefundService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRefund:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderRefundVo> list(TzOrderRefundBo bo, PageQuery pageQuery) {
|
||||
return tzOrderRefundService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRefund:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderRefundBo bo, HttpServletResponse response) {
|
||||
List<TzOrderRefundVo> list = tzOrderRefundService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzOrderRefundVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param refundId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRefund:query")
|
||||
@GetMapping("/{refundId}")
|
||||
public R<TzOrderRefundVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long refundId) {
|
||||
return R.ok(tzOrderRefundService.queryById(refundId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRefund:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzOrderRefundBo bo) {
|
||||
return toAjax(tzOrderRefundService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRefund:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderRefundBo bo) {
|
||||
return toAjax(tzOrderRefundService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param refundIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRefund:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{refundIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] refundIds) {
|
||||
return toAjax(tzOrderRefundService.deleteWithValidByIds(List.of(refundIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,224 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzOrderBo;
|
||||
import org.dromara.mall.domain.vo.TzCustomerVo;
|
||||
import org.dromara.mall.domain.vo.TzOrderSumVo;
|
||||
import org.dromara.mall.domain.vo.TzOrderVo;
|
||||
import org.dromara.mall.service.ITzCustomerService;
|
||||
import org.dromara.mall.service.ITzOrderService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单(客服)
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-08-03
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderSale")
|
||||
@Tag(name = "订单(客服)")
|
||||
public class TzOrderSaleController extends BaseController {
|
||||
|
||||
private final ITzOrderService tzOrderService;
|
||||
|
||||
private final ITzCustomerService tzCustomerService;
|
||||
|
||||
/**
|
||||
* 查询订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderVo> list(TzOrderBo bo, PageQuery pageQuery) {
|
||||
/*LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
List<RoleDTO> list = loginUser.getRoles();
|
||||
boolean isRole = list.stream().anyMatch(role -> role.getRoleId() == 1 || role.getRoleId() == 2);
|
||||
if(!isRole){
|
||||
bo.setSaleId(loginUser.getUserId());
|
||||
}*/
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setSaleId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
return tzOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询订单列表统计
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:count")
|
||||
@GetMapping("/count")
|
||||
public R<TzOrderSumVo> queryListCount(TzOrderBo bo) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setSaleId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
return R.ok(tzOrderService.queryListCount(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:export")
|
||||
@Log(title = "订单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderBo bo, HttpServletResponse response) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if("kf_user".equals(loginUser.getUserType())){
|
||||
bo.setSaleId(loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
List<TzOrderVo> list = tzOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单", TzOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单详细信息
|
||||
*
|
||||
* @param orderId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:query")
|
||||
@GetMapping("/{orderId}")
|
||||
public R<TzOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long orderId) {
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
TzOrderVo tzOrderVo = tzOrderService.queryById(orderId);
|
||||
if(ObjectUtil.notEqual(tzOrderVo.getSaleId(), loginUser.getUserId())){
|
||||
R.fail("您没有权限获取该订单信息");
|
||||
}
|
||||
return R.ok(tzOrderVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增订单
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:add")
|
||||
@Log(title = "订单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:edit")
|
||||
@Log(title = "修改订单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 改价
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:editPrice")
|
||||
@Log(title = "改价", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/editPrice")
|
||||
public R<Void> editPrice(@RequestBody TzOrderBo bo) {
|
||||
TzOrderVo tzOrderVo = tzOrderService.queryById(bo.getOrderId());
|
||||
if("4".equals(tzOrderVo.getStatus()) || "5".equals(tzOrderVo.getStatus()) || "6".equals(tzOrderVo.getStatus()) || "7".equals(tzOrderVo.getStatus())){
|
||||
R.fail("该订单状态不可改价");
|
||||
}
|
||||
return toAjax(tzOrderService.updateGJ(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取客户信息和余额
|
||||
* @param type
|
||||
* @param orderId
|
||||
* @return
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:pay")
|
||||
@PostMapping("/getUserInfo")
|
||||
@Parameters({
|
||||
@Parameter(name = "type", description = "类型 1:汇总订单 2:子订单", required = true),
|
||||
@Parameter(name = "orderId", description = "订单ID", required = true)
|
||||
})
|
||||
public R<TzCustomerVo> getUserInfo(@RequestParam(value = "type") Integer type,@RequestParam(value = "orderId") Integer orderId) {
|
||||
return R.ok(tzOrderService.getUserInfo(type,orderId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 订单支付
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:pay")
|
||||
@Log(title = "订单支付", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/payOrder")
|
||||
public R<Void> payOrder(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.payOrder(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 定金采购
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:depositPurchase")
|
||||
@Log(title = "定金采购", businessType = BusinessType.UPDATE)
|
||||
@PostMapping("/depositPurchase")
|
||||
public R<Void> depositPurchase(@RequestBody TzOrderBo bo) {
|
||||
return toAjax(tzOrderService.depositPurchase(bo));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 关闭订单
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSale:close")
|
||||
@Log(title = "关闭订单", businessType = BusinessType.UPDATE)
|
||||
@GetMapping("/close/{orderId}")
|
||||
public R<Void> close(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] orderId) {
|
||||
return toAjax(tzOrderService.closeOrder(orderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*
|
||||
* @param orderId 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderRefund:remove")
|
||||
@Log(title = "删除", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderId}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] orderId) {
|
||||
return toAjax(tzOrderService.deleteWithValidByIds(List.of(orderId), true));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzOrderSettlementVo;
|
||||
import org.dromara.mall.domain.bo.TzOrderSettlementBo;
|
||||
import org.dromara.mall.service.ITzOrderSettlementService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderSettlement")
|
||||
public class TzOrderSettlementController extends BaseController {
|
||||
|
||||
private final ITzOrderSettlementService tzOrderSettlementService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSettlement:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderSettlementVo> list(TzOrderSettlementBo bo, PageQuery pageQuery) {
|
||||
return tzOrderSettlementService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSettlement:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderSettlementBo bo, HttpServletResponse response) {
|
||||
List<TzOrderSettlementVo> list = tzOrderSettlementService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzOrderSettlementVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param settlementId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSettlement:query")
|
||||
@GetMapping("/{settlementId}")
|
||||
public R<TzOrderSettlementVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long settlementId) {
|
||||
return R.ok(tzOrderSettlementService.queryById(settlementId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSettlement:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzOrderSettlementBo bo) {
|
||||
return toAjax(tzOrderSettlementService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSettlement:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderSettlementBo bo) {
|
||||
return toAjax(tzOrderSettlementService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param settlementIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderSettlement:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{settlementIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] settlementIds) {
|
||||
return toAjax(tzOrderSettlementService.deleteWithValidByIds(List.of(settlementIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzOrderShareBo;
|
||||
import org.dromara.mall.domain.vo.TzOrderShareVo;
|
||||
import org.dromara.mall.service.ITzOrderShareService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单分享
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-14
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/orderShare")
|
||||
public class TzOrderShareController extends BaseController {
|
||||
|
||||
private final ITzOrderShareService tzOrderShareService;
|
||||
|
||||
/**
|
||||
* 查询订单分享列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderShare:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzOrderShareVo> list(TzOrderShareBo bo, PageQuery pageQuery) {
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("cg_user".equals(loginUser.getUserType())) {
|
||||
bo.setUserId(loginUser.getUserId());
|
||||
}
|
||||
return tzOrderShareService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出订单分享列表
|
||||
*/
|
||||
@SaCheckPermission("mall:orderShare:export")
|
||||
@Log(title = "订单分享", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzOrderShareBo bo, HttpServletResponse response) {
|
||||
List<TzOrderShareVo> list = tzOrderShareService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "订单分享", TzOrderShareVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单分享详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:orderShare:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzOrderShareVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzOrderShareService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单分享详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@GetMapping("getOrderShare/{id}")
|
||||
public R<TzOrderShareVo> getOrderShare(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
TzOrderShareVo orderShareVo = tzOrderShareService.queryById(id);
|
||||
if (ObjectUtil.isEmpty(orderShareVo)){
|
||||
return R.fail(-2,"当前链接已失效");
|
||||
}
|
||||
if(orderShareVo.getExpireTime().getTime() < new Date().getTime()){
|
||||
return R.fail(-1,"当前链接已过期");
|
||||
}
|
||||
return R.ok(orderShareVo);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增订单分享
|
||||
*/
|
||||
@SaCheckPermission("mall:orderShare:add")
|
||||
@Log(title = "订单分享", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Long> add(@Validated(AddGroup.class) @RequestBody TzOrderShareBo bo) {
|
||||
return R.ok(tzOrderShareService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改订单分享
|
||||
*/
|
||||
@SaCheckPermission("mall:orderShare:edit")
|
||||
@Log(title = "订单分享", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzOrderShareBo bo) {
|
||||
return toAjax(tzOrderShareService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除订单分享
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:orderShare:remove")
|
||||
@Log(title = "订单分享", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzOrderShareService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzPickAddrVo;
|
||||
import org.dromara.mall.domain.bo.TzPickAddrBo;
|
||||
import org.dromara.mall.service.ITzPickAddrService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户配送地址
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/pickAddr")
|
||||
public class TzPickAddrController extends BaseController {
|
||||
|
||||
private final ITzPickAddrService tzPickAddrService;
|
||||
|
||||
/**
|
||||
* 查询用户配送地址列表
|
||||
*/
|
||||
@SaCheckPermission("mall:pickAddr:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzPickAddrVo> list(TzPickAddrBo bo, PageQuery pageQuery) {
|
||||
return tzPickAddrService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户配送地址列表
|
||||
*/
|
||||
@SaCheckPermission("mall:pickAddr:export")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzPickAddrBo bo, HttpServletResponse response) {
|
||||
List<TzPickAddrVo> list = tzPickAddrService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "用户配送地址", TzPickAddrVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户配送地址详细信息
|
||||
*
|
||||
* @param addrId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:pickAddr:query")
|
||||
@GetMapping("/{addrId}")
|
||||
public R<TzPickAddrVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long addrId) {
|
||||
return R.ok(tzPickAddrService.queryById(addrId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户配送地址
|
||||
*/
|
||||
@SaCheckPermission("mall:pickAddr:add")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzPickAddrBo bo) {
|
||||
return toAjax(tzPickAddrService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户配送地址
|
||||
*/
|
||||
@SaCheckPermission("mall:pickAddr:edit")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzPickAddrBo bo) {
|
||||
return toAjax(tzPickAddrService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户配送地址
|
||||
*
|
||||
* @param addrIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:pickAddr:remove")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{addrIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] addrIds) {
|
||||
return toAjax(tzPickAddrService.deleteWithValidByIds(List.of(addrIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzPictureAlbumBo;
|
||||
import org.dromara.mall.domain.vo.TzPictureAlbumVo;
|
||||
import org.dromara.mall.service.ITzPictureAlbumService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 画册
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-10-04
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/pictureAlbum")
|
||||
public class TzPictureAlbumController extends BaseController {
|
||||
|
||||
private final ITzPictureAlbumService tzPictureAlbumService;
|
||||
|
||||
/**
|
||||
* 查询画册列表
|
||||
*/
|
||||
@SaCheckPermission("mall:pictureAlbum:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzPictureAlbumVo> list(TzPictureAlbumBo bo, PageQuery pageQuery) {
|
||||
return tzPictureAlbumService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出画册列表
|
||||
*/
|
||||
@SaCheckPermission("mall:pictureAlbum:export")
|
||||
@Log(title = "画册", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzPictureAlbumBo bo, HttpServletResponse response) {
|
||||
List<TzPictureAlbumVo> list = tzPictureAlbumService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "画册", TzPictureAlbumVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取画册详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:pictureAlbum:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzPictureAlbumVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzPictureAlbumService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增画册
|
||||
*/
|
||||
@SaCheckPermission("mall:pictureAlbum:add")
|
||||
@Log(title = "画册", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzPictureAlbumBo bo) {
|
||||
return toAjax(tzPictureAlbumService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改画册
|
||||
*/
|
||||
@SaCheckPermission("mall:pictureAlbum:edit")
|
||||
@Log(title = "画册", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzPictureAlbumBo bo) {
|
||||
return toAjax(tzPictureAlbumService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除画册
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:pictureAlbum:remove")
|
||||
@Log(title = "画册", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzPictureAlbumService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzProdBrowseVo;
|
||||
import org.dromara.mall.domain.bo.TzProdBrowseBo;
|
||||
import org.dromara.mall.service.ITzProdBrowseService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品浏览
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-08-05
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodBrowse")
|
||||
public class TzProdBrowseController extends BaseController {
|
||||
|
||||
private final ITzProdBrowseService tzProdBrowseService;
|
||||
|
||||
/**
|
||||
* 查询商品浏览列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodBrowse:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdBrowseVo> list(TzProdBrowseBo bo, PageQuery pageQuery) {
|
||||
return tzProdBrowseService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品浏览列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodBrowse:export")
|
||||
@Log(title = "商品浏览", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdBrowseBo bo, HttpServletResponse response) {
|
||||
List<TzProdBrowseVo> list = tzProdBrowseService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品浏览", TzProdBrowseVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品浏览详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodBrowse:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzProdBrowseVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzProdBrowseService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品浏览
|
||||
*/
|
||||
@SaCheckPermission("mall:prodBrowse:add")
|
||||
@Log(title = "商品浏览", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdBrowseBo bo) {
|
||||
return toAjax(tzProdBrowseService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品浏览
|
||||
*/
|
||||
@SaCheckPermission("mall:prodBrowse:edit")
|
||||
@Log(title = "商品浏览", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdBrowseBo bo) {
|
||||
return toAjax(tzProdBrowseService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品浏览
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodBrowse:remove")
|
||||
@Log(title = "商品浏览", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzProdBrowseService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzProdCommVo;
|
||||
import org.dromara.mall.domain.bo.TzProdCommBo;
|
||||
import org.dromara.mall.service.ITzProdCommService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品评论
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodComm")
|
||||
public class TzProdCommController extends BaseController {
|
||||
|
||||
private final ITzProdCommService tzProdCommService;
|
||||
|
||||
/**
|
||||
* 查询商品评论列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodComm:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdCommVo> list(TzProdCommBo bo, PageQuery pageQuery) {
|
||||
return tzProdCommService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品评论列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodComm:export")
|
||||
@Log(title = "商品评论", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdCommBo bo, HttpServletResponse response) {
|
||||
List<TzProdCommVo> list = tzProdCommService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品评论", TzProdCommVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品评论详细信息
|
||||
*
|
||||
* @param prodCommId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodComm:query")
|
||||
@GetMapping("/{prodCommId}")
|
||||
public R<TzProdCommVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long prodCommId) {
|
||||
return R.ok(tzProdCommService.queryById(prodCommId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品评论
|
||||
*/
|
||||
@SaCheckPermission("mall:prodComm:add")
|
||||
@Log(title = "商品评论", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdCommBo bo) {
|
||||
return toAjax(tzProdCommService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品评论
|
||||
*/
|
||||
@SaCheckPermission("mall:prodComm:edit")
|
||||
@Log(title = "商品评论", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdCommBo bo) {
|
||||
return toAjax(tzProdCommService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品评论
|
||||
*
|
||||
* @param prodCommIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodComm:remove")
|
||||
@Log(title = "商品评论", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{prodCommIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] prodCommIds) {
|
||||
return toAjax(tzProdCommService.deleteWithValidByIds(List.of(prodCommIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,191 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzProdBo;
|
||||
import org.dromara.mall.domain.bo.TzSkuBo;
|
||||
import org.dromara.mall.domain.vo.TzProdSumVo;
|
||||
import org.dromara.mall.domain.vo.TzProdVo;
|
||||
import org.dromara.mall.service.ITzProdService;
|
||||
import org.dromara.mall.service.ITzSkuService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prod")
|
||||
public class TzProdController extends BaseController {
|
||||
|
||||
private final ITzProdService tzProdService;
|
||||
|
||||
private final ITzSkuService tzSkuService;
|
||||
|
||||
/**
|
||||
* 查询商品列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdVo> list(TzProdBo bo, PageQuery pageQuery) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
return tzProdService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品销量排行榜列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:listChart")
|
||||
@GetMapping("/listChart")
|
||||
public TableDataInfo<TzProdVo> listChart(TzProdBo bo, PageQuery pageQuery) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
return tzProdService.queryPageListChart(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品列表统计
|
||||
* @param bo
|
||||
* @return
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:count")
|
||||
@GetMapping("/count")
|
||||
public R<TzProdSumVo> queryListCount(TzProdBo bo) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
return R.ok(tzProdService.queryListCount(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询全部商品列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:listAll")
|
||||
@GetMapping("/listAll")
|
||||
public TableDataInfo<TzProdVo> listAll(TzProdBo bo, PageQuery pageQuery) {
|
||||
return tzProdService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:export")
|
||||
@Log(title = "商品", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdBo bo, HttpServletResponse response) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
// TenantHelper.setDynamic(bo.getTenantId());
|
||||
List<TzProdVo> list = tzProdService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品", TzProdVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品详细信息
|
||||
*
|
||||
* @param prodId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:query")
|
||||
@GetMapping("/{prodId}")
|
||||
public R<TzProdVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long prodId) {
|
||||
return R.ok(tzProdService.queryById(prodId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:add")
|
||||
@Log(title = "商品", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdBo bo) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
// TenantHelper.setDynamic(bo.getTenantId());
|
||||
return toAjax(tzProdService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 检测sku是否为空
|
||||
* @param bo
|
||||
*/
|
||||
private void checkParam(TzProdBo bo) {
|
||||
List<TzSkuBo> skuList = bo.getSkuList();
|
||||
boolean isAllUnUse = true;
|
||||
for (TzSkuBo sku : skuList) {
|
||||
if (sku.getStatus() == 1) {
|
||||
isAllUnUse = false;
|
||||
}
|
||||
}
|
||||
if (isAllUnUse) {
|
||||
throw new RuntimeException("至少要启用一种商品规格");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:edit")
|
||||
@Log(title = "商品", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdBo bo) {
|
||||
return toAjax(tzProdService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品
|
||||
*
|
||||
* @param prodIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prod:remove")
|
||||
@Log(title = "商品", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{prodIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] prodIds) {
|
||||
return toAjax(tzProdService.deleteWithValidByIds(List.of(prodIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzProdFavoriteVo;
|
||||
import org.dromara.mall.domain.bo.TzProdFavoriteBo;
|
||||
import org.dromara.mall.service.ITzProdFavoriteService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品收藏
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodFavorite")
|
||||
public class TzProdFavoriteController extends BaseController {
|
||||
|
||||
private final ITzProdFavoriteService tzProdFavoriteService;
|
||||
|
||||
/**
|
||||
* 查询商品收藏列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodFavorite:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdFavoriteVo> list(TzProdFavoriteBo bo, PageQuery pageQuery) {
|
||||
return tzProdFavoriteService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品收藏列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodFavorite:export")
|
||||
@Log(title = "商品收藏", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdFavoriteBo bo, HttpServletResponse response) {
|
||||
List<TzProdFavoriteVo> list = tzProdFavoriteService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品收藏", TzProdFavoriteVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品收藏详细信息
|
||||
*
|
||||
* @param favoriteId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodFavorite:query")
|
||||
@GetMapping("/{favoriteId}")
|
||||
public R<TzProdFavoriteVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long favoriteId) {
|
||||
return R.ok(tzProdFavoriteService.queryById(favoriteId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品收藏
|
||||
*/
|
||||
@SaCheckPermission("mall:prodFavorite:add")
|
||||
@Log(title = "商品收藏", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdFavoriteBo bo) {
|
||||
return toAjax(tzProdFavoriteService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品收藏
|
||||
*/
|
||||
@SaCheckPermission("mall:prodFavorite:edit")
|
||||
@Log(title = "商品收藏", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdFavoriteBo bo) {
|
||||
return toAjax(tzProdFavoriteService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品收藏
|
||||
*
|
||||
* @param favoriteIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodFavorite:remove")
|
||||
@Log(title = "商品收藏", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{favoriteIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] favoriteIds) {
|
||||
return toAjax(tzProdFavoriteService.deleteWithValidByIds(List.of(favoriteIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.tenant.helper.TenantHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzProdPropBo;
|
||||
import org.dromara.mall.domain.vo.TzProdPropVo;
|
||||
import org.dromara.mall.service.ITzProdPropService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodProp")
|
||||
public class TzProdPropController extends BaseController {
|
||||
|
||||
private final ITzProdPropService tzProdPropService;
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodProp:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdPropVo> list(TzProdPropBo bo, PageQuery pageQuery) {
|
||||
TenantHelper.setDynamic(bo.getTenantId());
|
||||
return tzProdPropService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*/
|
||||
@GetMapping("/listAll")
|
||||
public TableDataInfo<TzProdPropVo> listAll(TzProdPropBo bo, PageQuery pageQuery) {
|
||||
TenantHelper.setDynamic(bo.getTenantId());
|
||||
return tzProdPropService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品规格列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodProp:export")
|
||||
@Log(title = "导出商品规格列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdPropBo bo, HttpServletResponse response) {
|
||||
TenantHelper.setDynamic(bo.getTenantId());
|
||||
List<TzProdPropVo> list = tzProdPropService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品规格", TzProdPropVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品规格详细信息
|
||||
*
|
||||
* @param propId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodProp:query")
|
||||
@GetMapping("/{propId}")
|
||||
public R<TzProdPropVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long propId) {
|
||||
return R.ok(tzProdPropService.queryById(propId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品规格
|
||||
*/
|
||||
@SaCheckPermission("mall:prodProp:add")
|
||||
@Log(title = "新增商品规格", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdPropBo bo) {
|
||||
TenantHelper.setDynamic(bo.getTenantId());
|
||||
return toAjax(tzProdPropService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品规格
|
||||
*/
|
||||
@SaCheckPermission("mall:prodProp:edit")
|
||||
@Log(title = "修改商品规格", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdPropBo bo) {
|
||||
return toAjax(tzProdPropService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品规格
|
||||
*
|
||||
* @param propIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodProp:remove")
|
||||
@Log(title = "删除商品规格", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{propIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] propIds) {
|
||||
return toAjax(tzProdPropService.deleteWithValidByIds(List.of(propIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzProdPropValueBo;
|
||||
import org.dromara.mall.domain.vo.TzProdPropValueVo;
|
||||
import org.dromara.mall.service.ITzProdPropValueService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格值表
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodPropValue")
|
||||
public class TzProdPropValueController extends BaseController {
|
||||
|
||||
private final ITzProdPropValueService tzProdPropValueService;
|
||||
|
||||
/**
|
||||
* 查询商品规格值表列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodPropValue:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdPropValueVo> list(TzProdPropValueBo bo, PageQuery pageQuery) {
|
||||
return tzProdPropValueService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品规格值表列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodPropValue:export")
|
||||
@Log(title = "商品规格值表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdPropValueBo bo, HttpServletResponse response) {
|
||||
List<TzProdPropValueVo> list = tzProdPropValueService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品规格值表", TzProdPropValueVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品规格值表详细信息
|
||||
*
|
||||
* @param valueId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodPropValue:query")
|
||||
@GetMapping("/{valueId}")
|
||||
public R<TzProdPropValueVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long valueId) {
|
||||
return R.ok(tzProdPropValueService.queryById(valueId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品规格值表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodPropValue:add")
|
||||
@Log(title = "商品规格值表", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdPropValueBo bo) {
|
||||
return toAjax(tzProdPropValueService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品规格值表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodPropValue:edit")
|
||||
@Log(title = "商品规格值表", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdPropValueBo bo) {
|
||||
return toAjax(tzProdPropValueService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品规格值表
|
||||
*
|
||||
* @param valueIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodPropValue:remove")
|
||||
@Log(title = "商品规格值表", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{valueIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] valueIds) {
|
||||
return toAjax(tzProdPropValueService.deleteWithValidByIds(List.of(valueIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzProdRecordBo;
|
||||
import org.dromara.mall.domain.vo.TzProdRecordVo;
|
||||
import org.dromara.mall.service.ITzProdRecordService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品价格记录
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodRecord")
|
||||
public class TzProdRecordController extends BaseController {
|
||||
|
||||
private final ITzProdRecordService tzProdRecordService;
|
||||
|
||||
/**
|
||||
* 查询产品价格记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdRecordVo> list(TzProdRecordBo bo, PageQuery pageQuery) {
|
||||
return tzProdRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出产品价格记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRecord:export")
|
||||
@Log(title = "产品价格记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdRecordBo bo, HttpServletResponse response) {
|
||||
List<TzProdRecordVo> list = tzProdRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "产品价格记录", TzProdRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取产品价格记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzProdRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzProdRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增产品价格记录
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRecord:add")
|
||||
@Log(title = "产品价格记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdRecordBo bo) {
|
||||
return toAjax(tzProdRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改产品价格记录
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRecord:edit")
|
||||
@Log(title = "产品价格记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdRecordBo bo) {
|
||||
return toAjax(tzProdRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除产品价格记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRecord:remove")
|
||||
@Log(title = "产品价格记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzProdRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,136 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.exception.ServiceException;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzProdRelationBo;
|
||||
import org.dromara.mall.domain.vo.TzProdRelationVo;
|
||||
import org.dromara.mall.domain.vo.TzProdVo;
|
||||
import org.dromara.mall.service.ITzProdRelationService;
|
||||
import org.dromara.mall.service.ITzProdService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品推荐关联
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodRelation")
|
||||
public class TzProdRelationController extends BaseController {
|
||||
|
||||
private final ITzProdRelationService tzProdRelationService;
|
||||
|
||||
private final ITzProdService tzProdService;
|
||||
|
||||
/**
|
||||
* 查询商品推荐关联列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRelation:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdVo> list(TzProdRelationBo bo, PageQuery pageQuery) {
|
||||
return tzProdService.getRelatedProducts(bo.getProdId(), pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品推荐关联列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRelation:export")
|
||||
@Log(title = "商品推荐关联", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdRelationBo bo, HttpServletResponse response) {
|
||||
List<TzProdRelationVo> list = tzProdRelationService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品推荐关联", TzProdRelationVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品推荐关联详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRelation:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzProdRelationVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzProdRelationService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品推荐关联
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRelation:add")
|
||||
@Log(title = "商品推荐关联", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdRelationBo bo) {
|
||||
// 查询是否已存在相同的商品关联
|
||||
TzProdRelationBo queryBo = new TzProdRelationBo();
|
||||
queryBo.setProdId(bo.getProdId());
|
||||
queryBo.setGlProdId(bo.getGlProdId());
|
||||
List<TzProdRelationVo> existList = tzProdRelationService.queryList(queryBo);
|
||||
if (!existList.isEmpty()) {
|
||||
throw new ServiceException("该商品已经关联过了");
|
||||
}
|
||||
return toAjax(tzProdRelationService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品推荐关联
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRelation:edit")
|
||||
@Log(title = "商品推荐关联", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdRelationBo bo) {
|
||||
return toAjax(tzProdRelationService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品推荐关联
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodRelation:remove")
|
||||
@Log(title = "商品推荐关联", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzProdRelationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
@SaCheckPermission("mall:prodRelation:remove")
|
||||
@Log(title = "删除关联商品", businessType = BusinessType.DELETE)
|
||||
@PostMapping("/delete")
|
||||
public R<Void> delete(@RequestBody TzProdRelationBo bo) {
|
||||
// 查询是否已存在相同的商品关联
|
||||
TzProdRelationBo queryBo = new TzProdRelationBo();
|
||||
queryBo.setProdId(bo.getProdId());
|
||||
queryBo.setGlProdId(bo.getGlProdId());
|
||||
List<TzProdRelationVo> existList = tzProdRelationService.queryList(queryBo);
|
||||
if (!existList.isEmpty()) {
|
||||
Long[] ids = existList.stream().map(TzProdRelationVo::getId).toArray(Long[]::new);
|
||||
return toAjax(tzProdRelationService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
return R.warn("该商品没有关联");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzProdTagVo;
|
||||
import org.dromara.mall.domain.bo.TzProdTagBo;
|
||||
import org.dromara.mall.service.ITzProdTagService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品分组
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodTag")
|
||||
public class TzProdTagController extends BaseController {
|
||||
|
||||
private final ITzProdTagService tzProdTagService;
|
||||
|
||||
/**
|
||||
* 查询商品分组列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTag:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdTagVo> list(TzProdTagBo bo, PageQuery pageQuery) {
|
||||
return tzProdTagService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品分组列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTag:export")
|
||||
@Log(title = "商品分组", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdTagBo bo, HttpServletResponse response) {
|
||||
List<TzProdTagVo> list = tzProdTagService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "商品分组", TzProdTagVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品分组详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTag:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzProdTagVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzProdTagService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品分组
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTag:add")
|
||||
@Log(title = "商品分组", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdTagBo bo) {
|
||||
return toAjax(tzProdTagService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品分组
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTag:edit")
|
||||
@Log(title = "商品分组", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdTagBo bo) {
|
||||
return toAjax(tzProdTagService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品分组
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTag:remove")
|
||||
@Log(title = "商品分组", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzProdTagService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzProdTagReferenceVo;
|
||||
import org.dromara.mall.domain.bo.TzProdTagReferenceBo;
|
||||
import org.dromara.mall.service.ITzProdTagReferenceService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/prodTagReference")
|
||||
public class TzProdTagReferenceController extends BaseController {
|
||||
|
||||
private final ITzProdTagReferenceService tzProdTagReferenceService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTagReference:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdTagReferenceVo> list(TzProdTagReferenceBo bo, PageQuery pageQuery) {
|
||||
return tzProdTagReferenceService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTagReference:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdTagReferenceBo bo, HttpServletResponse response) {
|
||||
List<TzProdTagReferenceVo> list = tzProdTagReferenceService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzProdTagReferenceVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param referenceId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTagReference:query")
|
||||
@GetMapping("/{referenceId}")
|
||||
public R<TzProdTagReferenceVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long referenceId) {
|
||||
return R.ok(tzProdTagReferenceService.queryById(referenceId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTagReference:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdTagReferenceBo bo) {
|
||||
return toAjax(tzProdTagReferenceService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTagReference:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdTagReferenceBo bo) {
|
||||
return toAjax(tzProdTagReferenceService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param referenceIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:prodTagReference:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{referenceIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] referenceIds) {
|
||||
return toAjax(tzProdTagReferenceService.deleteWithValidByIds(List.of(referenceIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzProdWishlistBo;
|
||||
import org.dromara.mall.domain.vo.TzProdWishlistVo;
|
||||
import org.dromara.mall.service.ITzProdWishlistService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 心愿单管理
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-01-02
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/wishlist")
|
||||
public class TzProdWishlistController extends BaseController {
|
||||
|
||||
private final ITzProdWishlistService wishlistService;
|
||||
|
||||
/**
|
||||
* 查询心愿单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:wishlist:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzProdWishlistVo> list(TzProdWishlistBo bo, PageQuery pageQuery) {
|
||||
return wishlistService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出心愿单列表
|
||||
*/
|
||||
@SaCheckPermission("mall:wishlist:export")
|
||||
@Log(title = "心愿单", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzProdWishlistBo bo, HttpServletResponse response) {
|
||||
List<TzProdWishlistVo> list = wishlistService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "心愿单", TzProdWishlistVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取心愿单详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:wishlist:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzProdWishlistVo> getInfo(@NotNull(message = "主键不能为空") @PathVariable Long id) {
|
||||
return R.ok(wishlistService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增心愿单
|
||||
*/
|
||||
@SaCheckPermission("mall:wishlist:add")
|
||||
@Log(title = "心愿单", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzProdWishlistBo bo) {
|
||||
return toAjax(wishlistService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改心愿单
|
||||
*/
|
||||
@SaCheckPermission("mall:wishlist:edit")
|
||||
@Log(title = "心愿单", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzProdWishlistBo bo) {
|
||||
return toAjax(wishlistService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除心愿单
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:wishlist:remove")
|
||||
@Log(title = "心愿单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空") @PathVariable Long[] ids) {
|
||||
return toAjax(wishlistService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzShopDetailVo;
|
||||
import org.dromara.mall.domain.bo.TzShopDetailBo;
|
||||
import org.dromara.mall.service.ITzShopDetailService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/shopDetail")
|
||||
public class TzShopDetailController extends BaseController {
|
||||
|
||||
private final ITzShopDetailService tzShopDetailService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:shopDetail:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzShopDetailVo> list(TzShopDetailBo bo, PageQuery pageQuery) {
|
||||
return tzShopDetailService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:shopDetail:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzShopDetailBo bo, HttpServletResponse response) {
|
||||
List<TzShopDetailVo> list = tzShopDetailService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzShopDetailVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param shopId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:shopDetail:query")
|
||||
@GetMapping("/{shopId}")
|
||||
public R<TzShopDetailVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long shopId) {
|
||||
return R.ok(tzShopDetailService.queryById(shopId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:shopDetail:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzShopDetailBo bo) {
|
||||
return toAjax(tzShopDetailService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:shopDetail:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzShopDetailBo bo) {
|
||||
return toAjax(tzShopDetailService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param shopIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:shopDetail:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{shopIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] shopIds) {
|
||||
return toAjax(tzShopDetailService.deleteWithValidByIds(List.of(shopIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzSkuVo;
|
||||
import org.dromara.mall.domain.bo.TzSkuBo;
|
||||
import org.dromara.mall.service.ITzSkuService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 单品SKU
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/sku")
|
||||
public class TzSkuController extends BaseController {
|
||||
|
||||
private final ITzSkuService tzSkuService;
|
||||
|
||||
/**
|
||||
* 查询单品SKU列表
|
||||
*/
|
||||
@SaCheckPermission("mall:sku:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzSkuVo> list(TzSkuBo bo, PageQuery pageQuery) {
|
||||
return tzSkuService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出单品SKU列表
|
||||
*/
|
||||
@SaCheckPermission("mall:sku:export")
|
||||
@Log(title = "单品SKU", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzSkuBo bo, HttpServletResponse response) {
|
||||
List<TzSkuVo> list = tzSkuService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "单品SKU", TzSkuVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单品SKU详细信息
|
||||
*
|
||||
* @param skuId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:sku:query")
|
||||
@GetMapping("/{skuId}")
|
||||
public R<TzSkuVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long skuId) {
|
||||
return R.ok(tzSkuService.queryById(skuId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增单品SKU
|
||||
*/
|
||||
@SaCheckPermission("mall:sku:add")
|
||||
@Log(title = "单品SKU", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzSkuBo bo) {
|
||||
return toAjax(tzSkuService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改单品SKU
|
||||
*/
|
||||
@SaCheckPermission("mall:sku:edit")
|
||||
@Log(title = "单品SKU", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzSkuBo bo) {
|
||||
return toAjax(tzSkuService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除单品SKU
|
||||
*
|
||||
* @param skuIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:sku:remove")
|
||||
@Log(title = "单品SKU", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{skuIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] skuIds) {
|
||||
return toAjax(tzSkuService.deleteWithValidByIds(List.of(skuIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzSmsLogVo;
|
||||
import org.dromara.mall.domain.bo.TzSmsLogBo;
|
||||
import org.dromara.mall.service.ITzSmsLogService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 短信记录
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/smsLog")
|
||||
public class TzSmsLogController extends BaseController {
|
||||
|
||||
private final ITzSmsLogService tzSmsLogService;
|
||||
|
||||
/**
|
||||
* 查询短信记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:smsLog:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzSmsLogVo> list(TzSmsLogBo bo, PageQuery pageQuery) {
|
||||
return tzSmsLogService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出短信记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:smsLog:export")
|
||||
@Log(title = "短信记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzSmsLogBo bo, HttpServletResponse response) {
|
||||
List<TzSmsLogVo> list = tzSmsLogService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "短信记录", TzSmsLogVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短信记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:smsLog:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzSmsLogVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzSmsLogService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增短信记录
|
||||
*/
|
||||
@SaCheckPermission("mall:smsLog:add")
|
||||
@Log(title = "短信记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzSmsLogBo bo) {
|
||||
return toAjax(tzSmsLogService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改短信记录
|
||||
*/
|
||||
@SaCheckPermission("mall:smsLog:edit")
|
||||
@Log(title = "短信记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzSmsLogBo bo) {
|
||||
return toAjax(tzSmsLogService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除短信记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:smsLog:remove")
|
||||
@Log(title = "短信记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzSmsLogService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.domain.model.LoginUser;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.satoken.utils.LoginHelper;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzTenantRecordBo;
|
||||
import org.dromara.mall.domain.vo.TzTenantRecordVo;
|
||||
import org.dromara.mall.service.ITzTenantRecordService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 租户资金记录
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/tenantRecord")
|
||||
public class TzTenantRecordController extends BaseController {
|
||||
|
||||
private final ITzTenantRecordService tzTenantRecordService;
|
||||
|
||||
/**
|
||||
* 查询租户资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:tenantRecord:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzTenantRecordVo> list(TzTenantRecordBo bo, PageQuery pageQuery) {
|
||||
if(!LoginHelper.isSuperAdmin()){
|
||||
LoginUser loginUser = LoginHelper.getLoginUser();
|
||||
if ("zh_user".equals(loginUser.getUserType())) {
|
||||
bo.setTenantId(loginUser.getTenantId());
|
||||
}
|
||||
}
|
||||
return tzTenantRecordService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出租户资金记录列表
|
||||
*/
|
||||
@SaCheckPermission("mall:tenantRecord:export")
|
||||
@Log(title = "租户资金记录", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzTenantRecordBo bo, HttpServletResponse response) {
|
||||
List<TzTenantRecordVo> list = tzTenantRecordService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "租户资金记录", TzTenantRecordVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取租户资金记录详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:tenantRecord:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzTenantRecordVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzTenantRecordService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增租户资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:tenantRecord:add")
|
||||
@Log(title = "租户资金记录", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzTenantRecordBo bo) {
|
||||
return toAjax(tzTenantRecordService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改租户资金记录
|
||||
*/
|
||||
@SaCheckPermission("mall:tenantRecord:edit")
|
||||
@Log(title = "租户资金记录", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzTenantRecordBo bo) {
|
||||
return toAjax(tzTenantRecordService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除租户资金记录
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:tenantRecord:remove")
|
||||
@Log(title = "租户资金记录", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzTenantRecordService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzTranscityVo;
|
||||
import org.dromara.mall.domain.bo.TzTranscityBo;
|
||||
import org.dromara.mall.service.ITzTranscityService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/transcity")
|
||||
public class TzTranscityController extends BaseController {
|
||||
|
||||
private final ITzTranscityService tzTranscityService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transcity:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzTranscityVo> list(TzTranscityBo bo, PageQuery pageQuery) {
|
||||
return tzTranscityService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transcity:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzTranscityBo bo, HttpServletResponse response) {
|
||||
List<TzTranscityVo> list = tzTranscityService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzTranscityVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param transcityId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:transcity:query")
|
||||
@GetMapping("/{transcityId}")
|
||||
public R<TzTranscityVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long transcityId) {
|
||||
return R.ok(tzTranscityService.queryById(transcityId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transcity:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzTranscityBo bo) {
|
||||
return toAjax(tzTranscityService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transcity:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzTranscityBo bo) {
|
||||
return toAjax(tzTranscityService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param transcityIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:transcity:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{transcityIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] transcityIds) {
|
||||
return toAjax(tzTranscityService.deleteWithValidByIds(List.of(transcityIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzTranscityFreeVo;
|
||||
import org.dromara.mall.domain.bo.TzTranscityFreeBo;
|
||||
import org.dromara.mall.service.ITzTranscityFreeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/transcityFree")
|
||||
public class TzTranscityFreeController extends BaseController {
|
||||
|
||||
private final ITzTranscityFreeService tzTranscityFreeService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transcityFree:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzTranscityFreeVo> list(TzTranscityFreeBo bo, PageQuery pageQuery) {
|
||||
return tzTranscityFreeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transcityFree:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzTranscityFreeBo bo, HttpServletResponse response) {
|
||||
List<TzTranscityFreeVo> list = tzTranscityFreeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzTranscityFreeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param transcityFreeId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:transcityFree:query")
|
||||
@GetMapping("/{transcityFreeId}")
|
||||
public R<TzTranscityFreeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long transcityFreeId) {
|
||||
return R.ok(tzTranscityFreeService.queryById(transcityFreeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transcityFree:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzTranscityFreeBo bo) {
|
||||
return toAjax(tzTranscityFreeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transcityFree:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzTranscityFreeBo bo) {
|
||||
return toAjax(tzTranscityFreeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param transcityFreeIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:transcityFree:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{transcityFreeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] transcityFreeIds) {
|
||||
return toAjax(tzTranscityFreeService.deleteWithValidByIds(List.of(transcityFreeIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzTransfeeVo;
|
||||
import org.dromara.mall.domain.bo.TzTransfeeBo;
|
||||
import org.dromara.mall.service.ITzTransfeeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/transfee")
|
||||
public class TzTransfeeController extends BaseController {
|
||||
|
||||
private final ITzTransfeeService tzTransfeeService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transfee:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzTransfeeVo> list(TzTransfeeBo bo, PageQuery pageQuery) {
|
||||
return tzTransfeeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transfee:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzTransfeeBo bo, HttpServletResponse response) {
|
||||
List<TzTransfeeVo> list = tzTransfeeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzTransfeeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param transfeeId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:transfee:query")
|
||||
@GetMapping("/{transfeeId}")
|
||||
public R<TzTransfeeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long transfeeId) {
|
||||
return R.ok(tzTransfeeService.queryById(transfeeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transfee:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzTransfeeBo bo) {
|
||||
return toAjax(tzTransfeeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transfee:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzTransfeeBo bo) {
|
||||
return toAjax(tzTransfeeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param transfeeIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:transfee:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{transfeeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] transfeeIds) {
|
||||
return toAjax(tzTransfeeService.deleteWithValidByIds(List.of(transfeeIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzTransfeeFreeVo;
|
||||
import org.dromara.mall.domain.bo.TzTransfeeFreeBo;
|
||||
import org.dromara.mall.service.ITzTransfeeFreeService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/transfeeFree")
|
||||
public class TzTransfeeFreeController extends BaseController {
|
||||
|
||||
private final ITzTransfeeFreeService tzTransfeeFreeService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transfeeFree:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzTransfeeFreeVo> list(TzTransfeeFreeBo bo, PageQuery pageQuery) {
|
||||
return tzTransfeeFreeService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transfeeFree:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzTransfeeFreeBo bo, HttpServletResponse response) {
|
||||
List<TzTransfeeFreeVo> list = tzTransfeeFreeService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzTransfeeFreeVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param transfeeFreeId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:transfeeFree:query")
|
||||
@GetMapping("/{transfeeFreeId}")
|
||||
public R<TzTransfeeFreeVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long transfeeFreeId) {
|
||||
return R.ok(tzTransfeeFreeService.queryById(transfeeFreeId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transfeeFree:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzTransfeeFreeBo bo) {
|
||||
return toAjax(tzTransfeeFreeService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transfeeFree:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzTransfeeFreeBo bo) {
|
||||
return toAjax(tzTransfeeFreeService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param transfeeFreeIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:transfeeFree:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{transfeeFreeIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] transfeeFreeIds) {
|
||||
return toAjax(tzTransfeeFreeService.deleteWithValidByIds(List.of(transfeeFreeIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzTransportVo;
|
||||
import org.dromara.mall.domain.bo.TzTransportBo;
|
||||
import org.dromara.mall.service.ITzTransportService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/transport")
|
||||
public class TzTransportController extends BaseController {
|
||||
|
||||
private final ITzTransportService tzTransportService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transport:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzTransportVo> list(TzTransportBo bo, PageQuery pageQuery) {
|
||||
return tzTransportService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:transport:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzTransportBo bo, HttpServletResponse response) {
|
||||
List<TzTransportVo> list = tzTransportService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzTransportVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param transportId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:transport:query")
|
||||
@GetMapping("/{transportId}")
|
||||
public R<TzTransportVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long transportId) {
|
||||
return R.ok(tzTransportService.queryById(transportId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transport:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzTransportBo bo) {
|
||||
return toAjax(tzTransportService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:transport:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzTransportBo bo) {
|
||||
return toAjax(tzTransportService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param transportIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:transport:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{transportIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] transportIds) {
|
||||
return toAjax(tzTransportService.deleteWithValidByIds(List.of(transportIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzUserAddrVo;
|
||||
import org.dromara.mall.domain.bo.TzUserAddrBo;
|
||||
import org.dromara.mall.service.ITzUserAddrService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户配送地址
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/userAddr")
|
||||
public class TzUserAddrController extends BaseController {
|
||||
|
||||
private final ITzUserAddrService tzUserAddrService;
|
||||
|
||||
/**
|
||||
* 查询用户配送地址列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddr:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzUserAddrVo> list(TzUserAddrBo bo, PageQuery pageQuery) {
|
||||
return tzUserAddrService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户配送地址列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddr:export")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzUserAddrBo bo, HttpServletResponse response) {
|
||||
List<TzUserAddrVo> list = tzUserAddrService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "用户配送地址", TzUserAddrVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户配送地址详细信息
|
||||
*
|
||||
* @param addrId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddr:query")
|
||||
@GetMapping("/{addrId}")
|
||||
public R<TzUserAddrVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long addrId) {
|
||||
return R.ok(tzUserAddrService.queryById(addrId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户配送地址
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddr:add")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzUserAddrBo bo) {
|
||||
return toAjax(tzUserAddrService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户配送地址
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddr:edit")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzUserAddrBo bo) {
|
||||
return toAjax(tzUserAddrService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户配送地址
|
||||
*
|
||||
* @param addrIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddr:remove")
|
||||
@Log(title = "用户配送地址", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{addrIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] addrIds) {
|
||||
return toAjax(tzUserAddrService.deleteWithValidByIds(List.of(addrIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzUserAddrOrderVo;
|
||||
import org.dromara.mall.domain.bo.TzUserAddrOrderBo;
|
||||
import org.dromara.mall.service.ITzUserAddrOrderService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户订单配送地址
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/userAddrOrder")
|
||||
public class TzUserAddrOrderController extends BaseController {
|
||||
|
||||
private final ITzUserAddrOrderService tzUserAddrOrderService;
|
||||
|
||||
/**
|
||||
* 查询用户订单配送地址列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddrOrder:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzUserAddrOrderVo> list(TzUserAddrOrderBo bo, PageQuery pageQuery) {
|
||||
return tzUserAddrOrderService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户订单配送地址列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddrOrder:export")
|
||||
@Log(title = "用户订单配送地址", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzUserAddrOrderBo bo, HttpServletResponse response) {
|
||||
List<TzUserAddrOrderVo> list = tzUserAddrOrderService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "用户订单配送地址", TzUserAddrOrderVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户订单配送地址详细信息
|
||||
*
|
||||
* @param addrOrderId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddrOrder:query")
|
||||
@GetMapping("/{addrOrderId}")
|
||||
public R<TzUserAddrOrderVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long addrOrderId) {
|
||||
return R.ok(tzUserAddrOrderService.queryById(addrOrderId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户订单配送地址
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddrOrder:add")
|
||||
@Log(title = "用户订单配送地址", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzUserAddrOrderBo bo) {
|
||||
return toAjax(tzUserAddrOrderService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户订单配送地址
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddrOrder:edit")
|
||||
@Log(title = "用户订单配送地址", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzUserAddrOrderBo bo) {
|
||||
return toAjax(tzUserAddrOrderService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户订单配送地址
|
||||
*
|
||||
* @param addrOrderIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddrOrder:remove")
|
||||
@Log(title = "用户订单配送地址", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{addrOrderIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] addrOrderIds) {
|
||||
return toAjax(tzUserAddrOrderService.deleteWithValidByIds(List.of(addrOrderIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,101 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzUserAddressBo;
|
||||
import org.dromara.mall.domain.vo.TzUserAddressVo;
|
||||
import org.dromara.mall.service.ITzUserAddressService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 客户地址
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-15
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/userAddress")
|
||||
public class TzUserAddressController extends BaseController {
|
||||
|
||||
private final ITzUserAddressService tzUserAddressService;
|
||||
|
||||
/**
|
||||
* 查询客户地址列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzUserAddressVo> list(TzUserAddressBo bo, PageQuery pageQuery) {
|
||||
return tzUserAddressService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出客户地址列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userAddress:export")
|
||||
@Log(title = "客户地址", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzUserAddressBo bo, HttpServletResponse response) {
|
||||
List<TzUserAddressVo> list = tzUserAddressService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "客户地址", TzUserAddressVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取客户地址详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@GetMapping("/{id}")
|
||||
public R<TzUserAddressVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzUserAddressService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增客户地址
|
||||
*/
|
||||
@Log(title = "客户地址", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzUserAddressBo bo) {
|
||||
return toAjax(tzUserAddressService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改客户地址
|
||||
*/
|
||||
@Log(title = "客户地址", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzUserAddressBo bo) {
|
||||
return toAjax(tzUserAddressService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除客户地址
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@Log(title = "客户地址", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzUserAddressService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzUserCollectionVo;
|
||||
import org.dromara.mall.domain.bo.TzUserCollectionBo;
|
||||
import org.dromara.mall.service.ITzUserCollectionService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/userCollection")
|
||||
public class TzUserCollectionController extends BaseController {
|
||||
|
||||
private final ITzUserCollectionService tzUserCollectionService;
|
||||
|
||||
/**
|
||||
* 查询【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userCollection:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzUserCollectionVo> list(TzUserCollectionBo bo, PageQuery pageQuery) {
|
||||
return tzUserCollectionService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出【请填写功能名称】列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userCollection:export")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzUserCollectionBo bo, HttpServletResponse response) {
|
||||
List<TzUserCollectionVo> list = tzUserCollectionService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "【请填写功能名称】", TzUserCollectionVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取【请填写功能名称】详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:userCollection:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzUserCollectionVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzUserCollectionService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:userCollection:add")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzUserCollectionBo bo) {
|
||||
return toAjax(tzUserCollectionService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改【请填写功能名称】
|
||||
*/
|
||||
@SaCheckPermission("mall:userCollection:edit")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzUserCollectionBo bo) {
|
||||
return toAjax(tzUserCollectionService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除【请填写功能名称】
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:userCollection:remove")
|
||||
@Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzUserCollectionService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Parameters;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzUserBo;
|
||||
import org.dromara.mall.domain.vo.TzUserSumVo;
|
||||
import org.dromara.mall.domain.vo.TzUserVo;
|
||||
import org.dromara.mall.service.ITzUserService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/user")
|
||||
public class TzUserController extends BaseController {
|
||||
|
||||
private final ITzUserService tzUserService;
|
||||
|
||||
/**
|
||||
* 查询用户列表
|
||||
*/
|
||||
@SaCheckPermission("mall:user:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzUserVo> list(TzUserBo bo, PageQuery pageQuery) {
|
||||
return tzUserService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:user:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<TzUserSumVo> listSum(TzUserBo bo) {
|
||||
return R.ok(tzUserService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户下单排行榜列表
|
||||
*/
|
||||
@SaCheckPermission("mall:user:listChart")
|
||||
@GetMapping("/listChart")
|
||||
public TableDataInfo<TzUserVo> listChart(TzUserBo bo, PageQuery pageQuery) {
|
||||
return tzUserService.queryPageListChart(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户列表
|
||||
*/
|
||||
@SaCheckPermission("mall:user:export")
|
||||
@Log(title = "用户", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzUserBo bo, HttpServletResponse response) {
|
||||
List<TzUserVo> list = tzUserService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "用户", TzUserVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户详细信息
|
||||
*
|
||||
* @param userId 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:user:query")
|
||||
@GetMapping("/{userId}")
|
||||
public R<TzUserVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long userId) {
|
||||
return R.ok(tzUserService.queryById(userId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启设计师开关
|
||||
*
|
||||
* @param userPhone 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:user:switch")
|
||||
@PostMapping("/switch")
|
||||
@Parameters({
|
||||
@Parameter(name = "userPhone", description = "手机号码", required = true),
|
||||
@Parameter(name = "status", description = "状态 1-开启 2-关闭", required = true)
|
||||
})
|
||||
public R<Void> getInfo(@RequestParam(value = "userPhone") String userPhone, @RequestParam(value = "status") Integer status) {
|
||||
return toAjax(tzUserService.queryByUserPhone(userPhone,status));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增用户
|
||||
*/
|
||||
@SaCheckPermission("mall:user:add")
|
||||
@Log(title = "用户", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzUserBo bo) {
|
||||
return toAjax(tzUserService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户
|
||||
*/
|
||||
@SaCheckPermission("mall:user:edit")
|
||||
@Log(title = "用户", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzUserBo bo) {
|
||||
return toAjax(tzUserService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户
|
||||
*
|
||||
* @param userIds 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:user:remove")
|
||||
@Log(title = "用户", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{userIds}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable String[] userIds) {
|
||||
return toAjax(tzUserService.deleteWithValidByIds(List.of(userIds), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,105 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.*;
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.mall.domain.vo.TzUserSearchVo;
|
||||
import org.dromara.mall.domain.bo.TzUserSearchBo;
|
||||
import org.dromara.mall.service.ITzUserSearchService;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 用户搜索
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-08-09
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/userSearch")
|
||||
public class TzUserSearchController extends BaseController {
|
||||
|
||||
private final ITzUserSearchService tzUserSearchService;
|
||||
|
||||
/**
|
||||
* 查询用户搜索列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userSearch:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzUserSearchVo> list(TzUserSearchBo bo, PageQuery pageQuery) {
|
||||
return tzUserSearchService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出用户搜索列表
|
||||
*/
|
||||
@SaCheckPermission("mall:userSearch:export")
|
||||
@Log(title = "用户搜索", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzUserSearchBo bo, HttpServletResponse response) {
|
||||
List<TzUserSearchVo> list = tzUserSearchService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "用户搜索", TzUserSearchVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户搜索详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:userSearch:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzUserSearchVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzUserSearchService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增用户搜索
|
||||
*/
|
||||
@SaCheckPermission("mall:userSearch:add")
|
||||
@Log(title = "用户搜索", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzUserSearchBo bo) {
|
||||
return toAjax(tzUserSearchService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改用户搜索
|
||||
*/
|
||||
@SaCheckPermission("mall:userSearch:edit")
|
||||
@Log(title = "用户搜索", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzUserSearchBo bo) {
|
||||
return toAjax(tzUserSearchService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除用户搜索
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:userSearch:remove")
|
||||
@Log(title = "用户搜索", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzUserSearchService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,141 @@
|
||||
package org.dromara.mall.controller;
|
||||
|
||||
import cn.dev33.satoken.annotation.SaCheckPermission;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.dromara.common.core.domain.R;
|
||||
import org.dromara.common.core.validate.AddGroup;
|
||||
import org.dromara.common.core.validate.EditGroup;
|
||||
import org.dromara.common.excel.utils.ExcelUtil;
|
||||
import org.dromara.common.idempotent.annotation.RepeatSubmit;
|
||||
import org.dromara.common.log.annotation.Log;
|
||||
import org.dromara.common.log.enums.BusinessType;
|
||||
import org.dromara.common.mybatis.core.page.PageQuery;
|
||||
import org.dromara.common.mybatis.core.page.TableDataInfo;
|
||||
import org.dromara.common.web.core.BaseController;
|
||||
import org.dromara.mall.domain.bo.TzWithdrawRequestBo;
|
||||
import org.dromara.mall.domain.vo.TzWithdrawRequestVo;
|
||||
import org.dromara.mall.domain.vo.TzWithdrawSumVo;
|
||||
import org.dromara.mall.service.ITzWithdrawRequestService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 提现申请
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-12
|
||||
*/
|
||||
@Validated
|
||||
@RequiredArgsConstructor
|
||||
@RestController
|
||||
@RequestMapping("/mall/withdrawRequest")
|
||||
public class TzWithdrawRequestController extends BaseController {
|
||||
|
||||
private final ITzWithdrawRequestService tzWithdrawRequestService;
|
||||
|
||||
/**
|
||||
* 查询提现申请列表
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo<TzWithdrawRequestVo> list(TzWithdrawRequestBo bo, PageQuery pageQuery) {
|
||||
return tzWithdrawRequestService.queryPageList(bo, pageQuery);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询提现申请统计信息
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:list")
|
||||
@GetMapping("/listSum")
|
||||
public R<TzWithdrawSumVo> listSum(TzWithdrawRequestBo bo) {
|
||||
return R.ok(tzWithdrawRequestService.querySum(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出提现申请列表
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:export")
|
||||
@Log(title = "提现申请", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(TzWithdrawRequestBo bo, HttpServletResponse response) {
|
||||
List<TzWithdrawRequestVo> list = tzWithdrawRequestService.queryList(bo);
|
||||
ExcelUtil.exportExcel(list, "提现申请", TzWithdrawRequestVo.class, response);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取提现申请详细信息
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:query")
|
||||
@GetMapping("/{id}")
|
||||
public R<TzWithdrawRequestVo> getInfo(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) {
|
||||
return R.ok(tzWithdrawRequestService.queryById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增提现申请
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:add")
|
||||
@Log(title = "提现申请", businessType = BusinessType.INSERT)
|
||||
@RepeatSubmit()
|
||||
@PostMapping()
|
||||
public R<Void> add(@Validated(AddGroup.class) @RequestBody TzWithdrawRequestBo bo) {
|
||||
return toAjax(tzWithdrawRequestService.insertByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改提现申请
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:edit")
|
||||
@Log(title = "提现申请", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping()
|
||||
public R<Void> edit(@Validated(EditGroup.class) @RequestBody TzWithdrawRequestBo bo) {
|
||||
return toAjax(tzWithdrawRequestService.updateByBo(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除提现申请
|
||||
*
|
||||
* @param ids 主键串
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:remove")
|
||||
@Log(title = "提现申请", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public R<Void> remove(@NotEmpty(message = "主键不能为空")
|
||||
@PathVariable Long[] ids) {
|
||||
return toAjax(tzWithdrawRequestService.deleteWithValidByIds(List.of(ids), true));
|
||||
}
|
||||
|
||||
/**
|
||||
* 审核提现
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:examine")
|
||||
@Log(title = "审核提现", businessType = BusinessType.UPDATE)
|
||||
@RepeatSubmit()
|
||||
@PutMapping("/examine")
|
||||
public R<Void> examine(@RequestBody TzWithdrawRequestBo bo) throws Exception {
|
||||
return toAjax(tzWithdrawRequestService.examine(bo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询拉卡拉分账结果
|
||||
*
|
||||
* @param id 主键
|
||||
*/
|
||||
@SaCheckPermission("mall:withdrawRequest:query")
|
||||
@GetMapping("/queryPlus/{id}")
|
||||
public R<JSONObject> queryPlus(@NotNull(message = "主键不能为空")
|
||||
@PathVariable Long id) throws Exception {
|
||||
return R.ok(tzWithdrawRequestService.queryPlus(id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 购物车对象 hy_basket
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_basket")
|
||||
public class HyBasket extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long prodId;
|
||||
|
||||
/**
|
||||
* SkuID
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 产品个数
|
||||
*/
|
||||
private Long num;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Long delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员码订单对象 hy_code_order
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_code_order")
|
||||
public class HyCodeOrder extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 设计师ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 邀请人ID
|
||||
*/
|
||||
private Long inviteUserId;
|
||||
|
||||
/**
|
||||
* 购买商户ID
|
||||
*/
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 推广员ID
|
||||
*/
|
||||
private Long promoterId;
|
||||
|
||||
/**
|
||||
* 购买数量
|
||||
*/
|
||||
private Long num;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal orderAmount;
|
||||
|
||||
/**
|
||||
* 订单状态: 1-待支付, 2-已支付, 3-已取消, 4-待结算, 5-已结算
|
||||
*/
|
||||
private Integer orderStatus;
|
||||
|
||||
/**
|
||||
* 支付时间
|
||||
*/
|
||||
private Date paymentTime;
|
||||
|
||||
/**
|
||||
* 购买人员类型:1-商户ID 2-推广员 3-设计师
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Long delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 拉卡拉平台订单号
|
||||
*/
|
||||
private String payOrderNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author admin
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_coupon_record")
|
||||
public class HyCouponRecord extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/** 用户ID */
|
||||
private Long userId;
|
||||
|
||||
/** 购买手机号码 */
|
||||
private String phone;
|
||||
|
||||
/** 变动金额(正数增加,负数减少) */
|
||||
private BigDecimal amount;
|
||||
|
||||
/** 变动后余额 */
|
||||
private BigDecimal balance;
|
||||
|
||||
/** 变动类型: 1-增加, 2-扣除, 3-退回 */
|
||||
private Integer type;
|
||||
|
||||
/** 订单ID */
|
||||
private Long orderId;
|
||||
|
||||
/** 订单编号 */
|
||||
private String orderNum;
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 会员码兑换对象 hy_member_code
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_member_code")
|
||||
public class HyMemberCode extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 设计师ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 购买商户ID
|
||||
*/
|
||||
private Long merchantId;
|
||||
|
||||
/**
|
||||
* 推广员ID
|
||||
*/
|
||||
private Long promoterId;
|
||||
|
||||
/**
|
||||
* 兑换时间
|
||||
*/
|
||||
private Date redeemTime;
|
||||
|
||||
/**
|
||||
* 兑换码有效期开始
|
||||
*/
|
||||
private Date validFrom;
|
||||
|
||||
/**
|
||||
* 兑换码有效期结束
|
||||
*/
|
||||
private Date validTo;
|
||||
|
||||
/**
|
||||
* 购买价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 会员ID
|
||||
*/
|
||||
private Long memberId;
|
||||
|
||||
/**
|
||||
* 会员兑换手机号码
|
||||
*/
|
||||
private String memberPhone;
|
||||
|
||||
/**
|
||||
* 兑换码
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 兑换状态: 1-未兑换, 2-已兑换
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 购买人员类型:1-商户ID 2-推广员 3-设计师
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 是否复制 1-未复制 2-已复制
|
||||
*/
|
||||
private Integer isCopy;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,163 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 总订单对象 hy_order
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_order")
|
||||
public class HyOrder extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNum;
|
||||
|
||||
/**
|
||||
* 销售员ID
|
||||
*/
|
||||
private Long saleId;
|
||||
|
||||
/**
|
||||
* 采购员ID
|
||||
*/
|
||||
private Long buyerId;
|
||||
|
||||
/**
|
||||
* 订购用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 订购用户姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 订单商品总数
|
||||
*/
|
||||
private Long num;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal total;
|
||||
|
||||
/**
|
||||
* 抵扣金额
|
||||
*/
|
||||
private BigDecimal deductionFee;
|
||||
|
||||
/**
|
||||
* 成本金额
|
||||
*/
|
||||
private BigDecimal actualTotal;
|
||||
|
||||
/**
|
||||
* 付款金额
|
||||
*/
|
||||
private BigDecimal payPrice;
|
||||
|
||||
/**
|
||||
* 支付状态 1:待支付 2:未付清 3:已付清
|
||||
*/
|
||||
private Integer payState;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 订单状态 1:待付款 2:待发货 3:待收货 4:待评价 5:已评价 6:已完成 7:已关闭
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 收货人姓名
|
||||
*/
|
||||
private String clientName;
|
||||
|
||||
/**
|
||||
* 收货人电话
|
||||
*/
|
||||
private String clientPhone;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String clientAddress;
|
||||
|
||||
/**
|
||||
* 付款时间
|
||||
*/
|
||||
private Date payTime;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private Date dvyTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date finallyTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 0:默认 1:在处理 2:处理完成
|
||||
*/
|
||||
private Long refundSts;
|
||||
|
||||
/**
|
||||
* 订单关闭原因 1:超时未支付 2:退款关闭 3:填错信息 4:买家取消
|
||||
*/
|
||||
private Long closeType;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Long delFlag;
|
||||
|
||||
/**
|
||||
* 拉卡拉平台订单号
|
||||
*/
|
||||
private String payOrderNo;
|
||||
|
||||
/**
|
||||
* 交易流水号
|
||||
*/
|
||||
private String tradeNo;
|
||||
|
||||
/**
|
||||
* 交易流水号
|
||||
*/
|
||||
private String logNo;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,228 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单详情对象 hy_order_item
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_order_item")
|
||||
public class HyOrderItem extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNum;
|
||||
|
||||
/**
|
||||
* 订单汇总ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long prodId;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String prodCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
|
||||
/**
|
||||
* skuID
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* sku编码
|
||||
*/
|
||||
private String skuCode;
|
||||
|
||||
/**
|
||||
* sku厂家编码
|
||||
*/
|
||||
private String skuFactoryCode;
|
||||
|
||||
/**
|
||||
* sku名称
|
||||
*/
|
||||
private String skuName;
|
||||
|
||||
/**
|
||||
* sku图片路径
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 销售员ID
|
||||
*/
|
||||
private Long saleId;
|
||||
|
||||
/**
|
||||
* 采购员ID
|
||||
*/
|
||||
private Long buyerId;
|
||||
|
||||
/**
|
||||
* 订购用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 订购用户姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 订单商品总数
|
||||
*/
|
||||
private Long num;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal total;
|
||||
|
||||
/**
|
||||
* 抵扣金额
|
||||
*/
|
||||
private BigDecimal deductionFee;
|
||||
|
||||
/**
|
||||
* 成本金额
|
||||
*/
|
||||
private BigDecimal actualTotal;
|
||||
|
||||
/**
|
||||
* 付款金额
|
||||
*/
|
||||
private BigDecimal payPrice;
|
||||
|
||||
/**
|
||||
* 支付状态 1:待支付 2:未付清 3:已付清
|
||||
*/
|
||||
private Integer payState;
|
||||
|
||||
/**
|
||||
* 支付类型 0:手动代付 1: 微信支付 2:支付宝
|
||||
*/
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 订单状态 1:待付款 2:待发货 3:待收货 4:待评价 5:已评价 6:已完成 7:已关闭
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
private String dvyFlowId;
|
||||
|
||||
/**
|
||||
* 订单运费
|
||||
*/
|
||||
private Long dvyPrice;
|
||||
|
||||
/**
|
||||
* 发货地
|
||||
*/
|
||||
private String deliveryLocat;
|
||||
|
||||
/**
|
||||
* 收货人姓名
|
||||
*/
|
||||
private String clientName;
|
||||
|
||||
/**
|
||||
* 收货人电话
|
||||
*/
|
||||
private String clientPhone;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String clientAddress;
|
||||
|
||||
/**
|
||||
* 付款时间
|
||||
*/
|
||||
private Date payTime;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private Date dvyTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date finallyTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 0:默认 1:在处理 2:处理完成
|
||||
*/
|
||||
private Long refundSts;
|
||||
|
||||
/**
|
||||
* 1:未评价 2:已评价
|
||||
*/
|
||||
private Long appraisalFlag;
|
||||
|
||||
/**
|
||||
* 订单关闭原因 1:超时未支付 2:退款关闭 3:填错信息 4:买家取消
|
||||
*/
|
||||
private Long closeType;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 是否开票 1:未开票 2:已开票
|
||||
*/
|
||||
private Integer isSfkp;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单打款对象 hy_order_payment
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-27
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_order_payment")
|
||||
public class HyOrderPayment extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单ID集合
|
||||
*/
|
||||
// private String orderIds;
|
||||
|
||||
/**
|
||||
* 订单编号集合
|
||||
*/
|
||||
// private String orderNums;
|
||||
|
||||
/**
|
||||
* 财务ID
|
||||
*/
|
||||
private Long cwId;
|
||||
|
||||
/**
|
||||
* 财务姓名
|
||||
*/
|
||||
private String cwName;
|
||||
|
||||
/**
|
||||
* 付款金额
|
||||
*/
|
||||
private BigDecimal total;
|
||||
|
||||
/**
|
||||
* 提现前余额
|
||||
*/
|
||||
private BigDecimal currentBalance;
|
||||
|
||||
/**
|
||||
* 状态 1:待付款 2:已付款 3:审核拒绝
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 付款截图
|
||||
*/
|
||||
private String paymentImg;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String depict;
|
||||
|
||||
/**
|
||||
* 收款人姓名
|
||||
*/
|
||||
private String payeeName;
|
||||
|
||||
/**
|
||||
* 收款银行名称
|
||||
*/
|
||||
private String payeeBank;
|
||||
|
||||
/**
|
||||
* 收款银行卡号
|
||||
*/
|
||||
private String payeeBankNum;
|
||||
|
||||
/**
|
||||
* 打款时间
|
||||
*/
|
||||
private Date payTime;
|
||||
|
||||
/**
|
||||
* 1:打款给厂家 2:退款给买家
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 发票链接
|
||||
*/
|
||||
private String invoiceUrl;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,123 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 推广员对象 hy_promoter
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_promoter")
|
||||
public class HyPromoter extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 推广员名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 推广员编号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 登录密码
|
||||
*/
|
||||
private String password;
|
||||
|
||||
/**
|
||||
* 推广人数
|
||||
*/
|
||||
private Long num;
|
||||
|
||||
/**
|
||||
* 标识: 1-企业, 2-个人
|
||||
*/
|
||||
private Integer typeFlag;
|
||||
|
||||
/**
|
||||
* 个人所属企业ID
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 账户余额
|
||||
*/
|
||||
private BigDecimal balance;
|
||||
|
||||
/**
|
||||
* 状态: 1-启用, 2-禁用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 审核状态 1:未认证 2:待审核 3:已通过 4:已拒绝
|
||||
*/
|
||||
private Integer examineFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 实名认证信息
|
||||
*/
|
||||
private String realName;
|
||||
|
||||
/**
|
||||
* 身份证
|
||||
*/
|
||||
private String idCard;
|
||||
|
||||
/**
|
||||
* 身份证正面
|
||||
*/
|
||||
private String frontCard;
|
||||
|
||||
/**
|
||||
* 身份证反面
|
||||
*/
|
||||
private String reverseCard;
|
||||
|
||||
/**
|
||||
* 拉卡拉用户ID
|
||||
*/
|
||||
private String custId;
|
||||
|
||||
/**
|
||||
* 证件起止日期
|
||||
*/
|
||||
private String certExpirationDate;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 推广员资金记录对象 hy_promoter_record
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_promoter_record")
|
||||
public class HyPromoterRecord extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 推广员ID
|
||||
*/
|
||||
private Long promoterId;
|
||||
|
||||
/**
|
||||
* 变动金额(正数增加,负数减少)
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 变动后余额
|
||||
*/
|
||||
private BigDecimal balance;
|
||||
|
||||
/**
|
||||
* 变动类型: 1-增加, 2-扣除, 3-提现, 4-其他
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 用户资金记录对象 hy_user_record
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("hy_user_record")
|
||||
public class HyUserRecord extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 订购用户姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 订购用户手机号
|
||||
*/
|
||||
private String userPhone;
|
||||
|
||||
/**
|
||||
* 变动金额(正数增加,负数减少)
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
/**
|
||||
* 变动后余额
|
||||
*/
|
||||
private BigDecimal balance;
|
||||
|
||||
/**
|
||||
* 变动类型: 1-增加, 2-扣除, 3-提现, 4-其他
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 个税税率
|
||||
*/
|
||||
private BigDecimal taxRate;
|
||||
|
||||
/**
|
||||
* 个税税金
|
||||
*/
|
||||
private BigDecimal taxAmount;
|
||||
|
||||
/**
|
||||
* 增值税税率
|
||||
*/
|
||||
private BigDecimal zhTaxRate;
|
||||
|
||||
/**
|
||||
* 增值税税金
|
||||
*/
|
||||
private BigDecimal zhTaxAmount;
|
||||
|
||||
/**
|
||||
* 手续费费率
|
||||
*/
|
||||
private BigDecimal sxfTaxRate;
|
||||
|
||||
/**
|
||||
* 手续费金额
|
||||
*/
|
||||
private BigDecimal sxfTaxAmount;
|
||||
|
||||
/**
|
||||
* 税后金额
|
||||
*/
|
||||
private BigDecimal afterTaxAmount;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 协议对象 tz_agreement
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-26
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_agreement")
|
||||
public class TzAgreement extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* code值
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 地区对象 tz_area
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_area")
|
||||
public class TzArea extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "area_id")
|
||||
private Long areaId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private String areaName;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private Long level;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 tz_attach_file
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_attach_file")
|
||||
public class TzAttachFile extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "file_id")
|
||||
private Long fileId;
|
||||
|
||||
/**
|
||||
* 文件路径
|
||||
*/
|
||||
private String filePath;
|
||||
|
||||
/**
|
||||
* 文件类型
|
||||
*/
|
||||
private String fileType;
|
||||
|
||||
/**
|
||||
* 文件大小
|
||||
*/
|
||||
private Integer fileSize;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
private Date uploadTime;
|
||||
|
||||
/**
|
||||
* 文件关联的表主键id
|
||||
*/
|
||||
private Long fileJoinId;
|
||||
|
||||
/**
|
||||
* 文件关联表类型:1 商品表 FileJoinType
|
||||
*/
|
||||
private Integer fileJoinType;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 绑定银行卡信息对象 tz_bank_card
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_bank_card")
|
||||
public class TzBankCard extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 银行卡信息ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID(租户/商户/推广员/会员)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 角色类型: 1-租户, 2-商户, 3-推广员, 4-会员
|
||||
*/
|
||||
private Integer roleType;
|
||||
|
||||
/**
|
||||
* 持卡人姓名
|
||||
*/
|
||||
private String cardHolderName;
|
||||
|
||||
/**
|
||||
* 银行名称
|
||||
*/
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 支行名称
|
||||
*/
|
||||
private String branchName;
|
||||
|
||||
/**
|
||||
* 银行卡号
|
||||
*/
|
||||
private String cardNumber;
|
||||
|
||||
/**
|
||||
* 卡类型: 1-借记卡, 2-信用卡
|
||||
*/
|
||||
private Integer cardType;
|
||||
|
||||
/**
|
||||
* 是否默认: 1-是,2-否
|
||||
*/
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 状态: 1-正常, 2-停用
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 拉卡拉订单编号
|
||||
*/
|
||||
private String orderNo;
|
||||
|
||||
/**
|
||||
* 拉卡拉接收方编号
|
||||
*/
|
||||
private String receiverNo;
|
||||
|
||||
/**
|
||||
* 拉卡拉绑定订单编号
|
||||
*/
|
||||
private String bdOrderNo;
|
||||
|
||||
/**
|
||||
* 拉卡拉受理编号
|
||||
*/
|
||||
private String applyId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 购物车对象 tz_basket
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_basket")
|
||||
public class TzBasket extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "basket_id")
|
||||
private Long basketId;
|
||||
|
||||
/**
|
||||
* 店铺ID
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long prodId;
|
||||
|
||||
/**
|
||||
* SkuID
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 购物车产品个数
|
||||
*/
|
||||
private Long basketCount;
|
||||
|
||||
/**
|
||||
* 购物时间
|
||||
*/
|
||||
private Date basketDate;
|
||||
|
||||
/**
|
||||
* 满减活动ID
|
||||
*/
|
||||
private Long discountId;
|
||||
|
||||
/**
|
||||
* 分销推广人卡号
|
||||
*/
|
||||
private String distributionCardNo;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 品牌对象 tz_brand
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_brand")
|
||||
public class TzBrand extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 品牌名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 图片路径
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 顺序
|
||||
*/
|
||||
private Long seq;
|
||||
|
||||
/**
|
||||
* 默认是1,表示正常状态,0为下线状态
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 产品类目对象 tz_category
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_category")
|
||||
public class TzCategory extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 类目ID
|
||||
*/
|
||||
@TableId(value = "category_id")
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 店铺ID
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 父节点
|
||||
*/
|
||||
private Long parentId;
|
||||
|
||||
/**
|
||||
* 产品类目名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
/**
|
||||
* 类目图标
|
||||
*/
|
||||
private String icon;
|
||||
|
||||
/**
|
||||
* 类目的显示图片
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer seq;
|
||||
|
||||
/**
|
||||
* 默认是1,表示正常状态,0为下线状态
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 记录时间
|
||||
*/
|
||||
private Date recTime;
|
||||
|
||||
/**
|
||||
* 分类层级
|
||||
*/
|
||||
private Integer grade;
|
||||
|
||||
/**
|
||||
* 是否有子集 0:没有 1:有
|
||||
*/
|
||||
private Integer subset;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 tz_category_brand
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_category_brand")
|
||||
public class TzCategoryBrand extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分类id
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 品牌id
|
||||
*/
|
||||
private Long brandId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 【请填写功能名称】对象 tz_category_prop
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_category_prop")
|
||||
public class TzCategoryProp extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 分类id
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
/**
|
||||
* 商品属性id即表tz_prod_prop中的prop_id
|
||||
*/
|
||||
private Long propId;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
package org.dromara.mall.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 com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 客户对象 tz_customer
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tz_customer")
|
||||
public class TzCustomer {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客服ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 客服编号
|
||||
*/
|
||||
private String userCode;
|
||||
|
||||
/**
|
||||
* 客服姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 客户编号
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 电话号码
|
||||
*/
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 余额
|
||||
*/
|
||||
private BigDecimal balance;
|
||||
|
||||
/**
|
||||
* 性别 0:女 1:男
|
||||
*/
|
||||
private Integer sex;
|
||||
|
||||
/**
|
||||
* 客户类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 状态(0正常 1禁用)
|
||||
*/
|
||||
private Integer state;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 删除标志(0代表存在 1代表删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
|
||||
/**
|
||||
* 请求参数
|
||||
*/
|
||||
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||
@TableField(exist = false)
|
||||
private Map<String, Object> params = new HashMap<>();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package org.dromara.mall.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.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 客户资金记录对象 tz_customer_record
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-12
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tz_customer_record")
|
||||
public class TzCustomerRecord {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 客户姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 账变类型1:充值 2:支出 3:退款
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 变动金额
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 变动后余额
|
||||
*/
|
||||
private BigDecimal balance;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String depict;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 物流公司对象 tz_delivery
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_delivery")
|
||||
public class TzDelivery extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 物流公司名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Long delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 热搜对象 tz_hot_search
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_hot_search")
|
||||
public class TzHotSearch extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "hot_search_id")
|
||||
private Long hotSearchId;
|
||||
|
||||
/**
|
||||
* 店铺ID 0为全局热搜
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 热搜标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 搜索次数
|
||||
*/
|
||||
private Long num;
|
||||
|
||||
/**
|
||||
* 状态 0下线 1上线
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 顺序
|
||||
*/
|
||||
private Integer seq;
|
||||
|
||||
/**
|
||||
* 录入时间
|
||||
*/
|
||||
private Date recDate;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 主页轮播图对象 tz_index_img
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tz_index_img")
|
||||
public class TzIndexImg {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(value = "img_id")
|
||||
private Long imgId;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String imgUrl;
|
||||
|
||||
/**
|
||||
* 说明文字,描述
|
||||
*/
|
||||
private String des;
|
||||
|
||||
/**
|
||||
* 标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 链接
|
||||
*/
|
||||
private String link;
|
||||
|
||||
/**
|
||||
* 状态 1:未上架 2:已上架
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 顺序
|
||||
*/
|
||||
private Integer seq;
|
||||
|
||||
/**
|
||||
* 上传时间
|
||||
*/
|
||||
private Date uploadTime;
|
||||
|
||||
/**
|
||||
* 关联
|
||||
*/
|
||||
private Long relation;
|
||||
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 发票申请记录对象 tz_invoice_apply
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_invoice_apply")
|
||||
public class TzInvoiceApply extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 发票申请编号
|
||||
*/
|
||||
private String invoiceNo;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 发票抬头id
|
||||
*/
|
||||
private Long invoiceTitleId;
|
||||
|
||||
/**
|
||||
* 发票抬头信息JSON
|
||||
*/
|
||||
private String invoiceTitleJson;
|
||||
|
||||
/**
|
||||
* 发票类型(1-电子普票,2-电子专票)
|
||||
*/
|
||||
private Integer invoiceType;
|
||||
|
||||
/**
|
||||
* 发票内容
|
||||
*/
|
||||
private String invoiceContent;
|
||||
|
||||
/**
|
||||
* 开票金额
|
||||
*/
|
||||
private BigDecimal invoiceAmount;
|
||||
|
||||
/**
|
||||
* 关联订单号(多个逗号分隔)
|
||||
*/
|
||||
private String orderIds;
|
||||
|
||||
/**
|
||||
* 关联订单编号(多个逗号分隔)
|
||||
*/
|
||||
private String orderNos;
|
||||
|
||||
/**
|
||||
* 接收邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 开票状态(1-待开票,2-开票中,3-已开票,4-开票失败,5-已取消)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 电子发票下载地址
|
||||
*/
|
||||
private String invoiceUrl;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
private String failReason;
|
||||
|
||||
/**
|
||||
* 开票时间
|
||||
*/
|
||||
private Date invoiceTime;
|
||||
|
||||
/**
|
||||
* 删除标志(1代表存在 2代表删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,92 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 发票抬头信息对象 tz_invoice_title
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-25
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_invoice_title")
|
||||
public class TzInvoiceTitle extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户id
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 抬头类型(1-个人,2-企业)
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 发票抬头名称
|
||||
*/
|
||||
private String titleName;
|
||||
|
||||
/**
|
||||
* 税号
|
||||
*/
|
||||
private String taxNumber;
|
||||
|
||||
/**
|
||||
* 单位地址
|
||||
*/
|
||||
private String companyAddress;
|
||||
|
||||
/**
|
||||
* 单位电话
|
||||
*/
|
||||
private String companyPhone;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 银行账号
|
||||
*/
|
||||
private String bankAccount;
|
||||
|
||||
/**
|
||||
* 是否默认(1-是,2-否)
|
||||
*/
|
||||
private Integer isDefault;
|
||||
|
||||
/**
|
||||
* 接收邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 删除标志(1代表存在 2代表删除)
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 消息对象 tz_message
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_message")
|
||||
public class TzMessage extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
|
||||
/**
|
||||
* 联系方式
|
||||
*/
|
||||
private String contact;
|
||||
|
||||
/**
|
||||
* 留言内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 留言回复
|
||||
*/
|
||||
private String reply;
|
||||
|
||||
/**
|
||||
* 状态:0:未审核 1审核通过
|
||||
*/
|
||||
private Long status;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 公告对象 tz_notice
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2025-01-13
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_notice")
|
||||
public class TzNotice extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 公告id
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 公告标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 公告内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 状态(0:未发布,1:已发布)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 是否置顶(0:未置顶,1:已置顶)
|
||||
*/
|
||||
private Integer isTop;
|
||||
|
||||
/**
|
||||
* 删除标志: 1-存在, 2-删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,269 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单对象 tz_order
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-08-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_order")
|
||||
public class TzOrder extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
@TableId(value = "order_id")
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 订单汇总ID
|
||||
*/
|
||||
private Long allId;
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long prodId;
|
||||
|
||||
/**
|
||||
* 产品编码
|
||||
*/
|
||||
private String prodCode;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
|
||||
/**
|
||||
* skuID
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* SKU编码
|
||||
*/
|
||||
private String skuCode;
|
||||
|
||||
/**
|
||||
* sku厂家编码
|
||||
*/
|
||||
private String skuFactoryCode;
|
||||
|
||||
/**
|
||||
* SKU名称
|
||||
*/
|
||||
private String skuName;
|
||||
|
||||
/**
|
||||
* sku图片路径
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 销售员ID
|
||||
*/
|
||||
private Long saleId;
|
||||
|
||||
/**
|
||||
* 采购员ID
|
||||
*/
|
||||
private Long buyerId;
|
||||
|
||||
/**
|
||||
* 订购用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNum;
|
||||
|
||||
/**
|
||||
* 单价
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal total;
|
||||
|
||||
/**
|
||||
* 成本金额
|
||||
*/
|
||||
private BigDecimal actualTotal;
|
||||
|
||||
/**
|
||||
*付款金额
|
||||
*/
|
||||
private BigDecimal payPrice;
|
||||
|
||||
/**
|
||||
* 尾款金额
|
||||
*/
|
||||
private BigDecimal endPrice;
|
||||
|
||||
/**
|
||||
* 成本付款金额
|
||||
*/
|
||||
private BigDecimal actualPayPrice;
|
||||
|
||||
/**
|
||||
* 支付状态 1:待支付 2未付清 3:已付清
|
||||
*/
|
||||
private Integer payState;
|
||||
|
||||
/**
|
||||
* 成本支付状态 1:待打款 2未付清 3:已付清
|
||||
*/
|
||||
private Integer actualPayState;
|
||||
|
||||
/**
|
||||
* 支付方式 0 手动代付 1 微信支付 2 支付宝
|
||||
*/
|
||||
private Integer payType;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 订单状态 1:待付款 2:待发货 3:待收货 4:待评价 5:已完成 6:已关闭 7:订单关闭
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 配送ID
|
||||
*/
|
||||
private String dvyId;
|
||||
|
||||
/**
|
||||
* 重量或体积
|
||||
*/
|
||||
private String dvyType;
|
||||
|
||||
/**
|
||||
* 运费金额
|
||||
*/
|
||||
private BigDecimal dvyPrice;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
private String dvyFlowId;
|
||||
|
||||
/**
|
||||
* 订单运费
|
||||
*/
|
||||
private BigDecimal freightAmount;
|
||||
|
||||
/**
|
||||
* 发货地
|
||||
*/
|
||||
private String deliveryLocat;
|
||||
|
||||
/**
|
||||
* 收货人姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 收货人电话
|
||||
*/
|
||||
private String userPhone;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String userAddress;
|
||||
|
||||
/**
|
||||
* 订单商品总数
|
||||
*/
|
||||
private Integer productNums;
|
||||
|
||||
/**
|
||||
* 付款时间
|
||||
*/
|
||||
private Date payTime;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private Date dvyTime;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date finallyTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 是否已经打款给厂家 0:待录入 1:未打款 2:已打款
|
||||
*/
|
||||
private Integer isPayed;
|
||||
|
||||
/**
|
||||
* 0:默认,1:在处理,2:处理完成
|
||||
*/
|
||||
private Integer refundSts;
|
||||
|
||||
/**
|
||||
* 付款截图
|
||||
*/
|
||||
private String paymentImg;
|
||||
|
||||
/**
|
||||
* 拒绝原因
|
||||
*/
|
||||
private String reason;
|
||||
|
||||
/**
|
||||
* 优惠总额
|
||||
*/
|
||||
private BigDecimal reduceAmount;
|
||||
|
||||
/**
|
||||
* 订单类型
|
||||
*/
|
||||
private Integer orderType;
|
||||
|
||||
/**
|
||||
* 订单关闭原因 1-超时未支付 2-退款关闭 3-填错信息 4-买家取消
|
||||
*/
|
||||
private Integer closeType;
|
||||
|
||||
/**
|
||||
* 用户订单删除状态,0:没有删除, 1:回收站, 2:永久删除
|
||||
*/
|
||||
private Integer deleteStatus;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.tenant.core.TenantEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单汇总对象 tz_order_all
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-04
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_order_all")
|
||||
public class TzOrderAll extends TenantEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单编号
|
||||
*/
|
||||
private String orderNum;
|
||||
|
||||
/**
|
||||
* 租户ID
|
||||
*/
|
||||
private String tenantId;
|
||||
|
||||
/**
|
||||
* 销售员ID
|
||||
*/
|
||||
private Long saleId;
|
||||
|
||||
/**
|
||||
* 采购员ID
|
||||
*/
|
||||
private Long buyerId;
|
||||
|
||||
/**
|
||||
* 订购用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 订购用户姓名
|
||||
*/
|
||||
private String cName;
|
||||
|
||||
/**
|
||||
* 订单金额
|
||||
*/
|
||||
private BigDecimal total;
|
||||
|
||||
/**
|
||||
* 成本金额
|
||||
*/
|
||||
private BigDecimal actualTotal;
|
||||
|
||||
/**
|
||||
* 付款金额
|
||||
*/
|
||||
private BigDecimal payPrice;
|
||||
|
||||
/**
|
||||
* 尾款金额
|
||||
*/
|
||||
private BigDecimal endPrice;
|
||||
|
||||
/**
|
||||
* 支付状态 1:待支付 2未付清 3:已付清
|
||||
*/
|
||||
private Integer payState;
|
||||
|
||||
/**
|
||||
* 订单备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 订单状态 1:待付款 2:交易中 3:交易成功 4:订单关闭
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 收货人姓名
|
||||
*/
|
||||
private String userName;
|
||||
|
||||
/**
|
||||
* 收货人电话
|
||||
*/
|
||||
private String userPhone;
|
||||
|
||||
/**
|
||||
* 收货地址
|
||||
*/
|
||||
private String userAddress;
|
||||
|
||||
/**
|
||||
* 订单商品总数
|
||||
*/
|
||||
private Integer productNums;
|
||||
|
||||
/**
|
||||
* 完成时间
|
||||
*/
|
||||
private Date finallyTime;
|
||||
|
||||
/**
|
||||
* 取消时间
|
||||
*/
|
||||
private Date cancelTime;
|
||||
|
||||
/**
|
||||
* 0:默认,1:在处理,2:处理完成
|
||||
*/
|
||||
private Integer refundSts;
|
||||
|
||||
/**
|
||||
* 订单关闭原因 1-超时未支付 2-退款关闭 3-填错信息 4-买家取消
|
||||
*/
|
||||
private Integer closeType;
|
||||
|
||||
/**
|
||||
* 用户订单删除状态,0:没有删除, 1:回收站, 2:永久删除
|
||||
*/
|
||||
private Integer deleteStatus;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serial;
|
||||
|
||||
/**
|
||||
* 订单项对象 tz_order_item
|
||||
*
|
||||
* @author Lion Li
|
||||
* @date 2024-07-30
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_order_item")
|
||||
public class TzOrderItem extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 订单项ID
|
||||
*/
|
||||
@TableId(value = "order_item_id")
|
||||
private Long orderItemId;
|
||||
|
||||
/**
|
||||
* 店铺id
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 订单order_number
|
||||
*/
|
||||
private String orderNumber;
|
||||
|
||||
/**
|
||||
* 产品ID
|
||||
*/
|
||||
private Long prodId;
|
||||
|
||||
/**
|
||||
* 产品SkuID
|
||||
*/
|
||||
private Long skuId;
|
||||
|
||||
/**
|
||||
* 购物车产品个数
|
||||
*/
|
||||
private Long prodCount;
|
||||
|
||||
/**
|
||||
* 产品名称
|
||||
*/
|
||||
private String prodName;
|
||||
|
||||
/**
|
||||
* sku名称
|
||||
*/
|
||||
private String skuName;
|
||||
|
||||
/**
|
||||
* 产品主图片路径
|
||||
*/
|
||||
private String pic;
|
||||
|
||||
/**
|
||||
* 产品价格
|
||||
*/
|
||||
private BigDecimal price;
|
||||
|
||||
/**
|
||||
* 用户Id
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 商品总金额
|
||||
*/
|
||||
private BigDecimal productTotalAmount;
|
||||
|
||||
/**
|
||||
* 购物时间
|
||||
*/
|
||||
private Date recTime;
|
||||
|
||||
/**
|
||||
* 评论状态: 0 未评价 1 已评价
|
||||
*/
|
||||
private Integer commSts;
|
||||
|
||||
/**
|
||||
* 推广员使用的推销卡号
|
||||
*/
|
||||
private String distributionCardNo;
|
||||
|
||||
/**
|
||||
* 加入购物车时间
|
||||
*/
|
||||
private Date basketDate;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
package org.dromara.mall.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.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单汇款对象 tz_order_receive
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-09-03
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tz_order_receive")
|
||||
public class TzOrderReceive {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 客户ID
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long cId;
|
||||
|
||||
/**
|
||||
* 客服ID
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 财务ID
|
||||
*/
|
||||
private Long cwId;
|
||||
|
||||
/**
|
||||
* 汇款金额
|
||||
*/
|
||||
private BigDecimal total;
|
||||
|
||||
/**
|
||||
* 状态 1:待领款 2:已领款
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 描述
|
||||
*/
|
||||
private String depict;
|
||||
|
||||
/**
|
||||
* 付款截图
|
||||
*/
|
||||
private String paymentImg;
|
||||
|
||||
/**
|
||||
* 收款信息
|
||||
*/
|
||||
private String receiveInfo;
|
||||
|
||||
/**
|
||||
* 1:汇款
|
||||
*/
|
||||
private Integer type;
|
||||
|
||||
/**
|
||||
* 删除标志 0:正常 1:删除
|
||||
*/
|
||||
private Integer delFlag;
|
||||
|
||||
/**
|
||||
* 认领时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||
private Date adoptTime;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
package org.dromara.mall.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.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单历史记录对象 tz_order_record
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("tz_order_record")
|
||||
public class TzOrderRecord {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* ID
|
||||
*/
|
||||
@TableId(value = "id")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 订单汇总ID
|
||||
*/
|
||||
private Long allId;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private String orderId;
|
||||
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 操作类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 操作内容
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
* 操作状态 1:记录 2:节点
|
||||
*/
|
||||
private Long state;
|
||||
|
||||
/**
|
||||
* 修改前json
|
||||
*/
|
||||
private String oldJson;
|
||||
|
||||
/**
|
||||
* 修改后json
|
||||
*/
|
||||
private String newJson;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@TableField(fill = FieldFill.INSERT)
|
||||
private Date createTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
package org.dromara.mall.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.dromara.common.mybatis.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 订单资金对象 tz_order_refund
|
||||
*
|
||||
* @author Maosw
|
||||
* @date 2024-12-09
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@TableName("tz_order_refund")
|
||||
public class TzOrderRefund extends BaseEntity {
|
||||
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 记录ID
|
||||
*/
|
||||
@TableId(value = "refund_id")
|
||||
private Long refundId;
|
||||
|
||||
/**
|
||||
* 店铺ID
|
||||
*/
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 订单ID
|
||||
*/
|
||||
private Long orderId;
|
||||
|
||||
/**
|
||||
* 订单流水号
|
||||
*/
|
||||
private String orderNumber;
|
||||
|
||||
/**
|
||||
* 订单总金额
|
||||
*/
|
||||
private Long orderAmount;
|
||||
|
||||
/**
|
||||
* 订单项ID 全部退款是0
|
||||
*/
|
||||
private Long orderItemId;
|
||||
|
||||
/**
|
||||
* 退款编号
|
||||
*/
|
||||
private String refundSn;
|
||||
|
||||
/**
|
||||
* 订单支付流水号
|
||||
*/
|
||||
private String flowTradeNo;
|
||||
|
||||
/**
|
||||
* 第三方退款单号(微信退款单号)
|
||||
*/
|
||||
private String outRefundNo;
|
||||
|
||||
/**
|
||||
* 订单支付方式 1 微信支付 2 支付宝
|
||||
*/
|
||||
private Long payType;
|
||||
|
||||
/**
|
||||
* 订单支付名称
|
||||
*/
|
||||
private String payTypeName;
|
||||
|
||||
/**
|
||||
* 买家ID
|
||||
*/
|
||||
private String userId;
|
||||
|
||||
/**
|
||||
* 退货数量
|
||||
*/
|
||||
private Long goodsNum;
|
||||
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
private Long refundAmount;
|
||||
|
||||
/**
|
||||
* 申请类型:1,仅退款,2退款退货
|
||||
*/
|
||||
private Long applyType;
|
||||
|
||||
/**
|
||||
* 处理状态:1为待审核,2为同意,3为不同意
|
||||
*/
|
||||
private Long refundSts;
|
||||
|
||||
/**
|
||||
* 处理退款状态: 0:退款处理中 1:退款成功 -1:退款失败
|
||||
*/
|
||||
private Long returnMoneySts;
|
||||
|
||||
/**
|
||||
* 申请时间
|
||||
*/
|
||||
private Date applyTime;
|
||||
|
||||
/**
|
||||
* 卖家处理时间
|
||||
*/
|
||||
private Date handelTime;
|
||||
|
||||
/**
|
||||
* 退款时间
|
||||
*/
|
||||
private Date refundTime;
|
||||
|
||||
/**
|
||||
* 文件凭证json
|
||||
*/
|
||||
private String photoFiles;
|
||||
|
||||
/**
|
||||
* 申请原因
|
||||
*/
|
||||
private String buyerMsg;
|
||||
|
||||
/**
|
||||
* 卖家备注
|
||||
*/
|
||||
private String sellerMsg;
|
||||
|
||||
/**
|
||||
* 物流公司名称
|
||||
*/
|
||||
private String expressName;
|
||||
|
||||
/**
|
||||
* 物流单号
|
||||
*/
|
||||
private String expressNo;
|
||||
|
||||
/**
|
||||
* 发货时间
|
||||
*/
|
||||
private Date shipTime;
|
||||
|
||||
/**
|
||||
* 收货时间
|
||||
*/
|
||||
private Date receiveTime;
|
||||
|
||||
/**
|
||||
* 收货备注
|
||||
*/
|
||||
private String receiveMessage;
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user