Merge pull request '整体合并到master' (#1) from develop into master
commit
f784654b2d
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,547 @@
|
||||
##### 03、获取分类属性分组
|
||||
|
||||
```http
|
||||
GET /product/attrggroup/list/{catelogId}
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
page: 1, //当前页码
|
||||
limit: 10, //每页记录数
|
||||
sidx: "id", //排序字段
|
||||
order: "asc/desc", //排序方式
|
||||
key: "华为" //检索关键字
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
##### 07、查询属性详情
|
||||
|
||||
```http
|
||||
GET /product/attr/info/{catelogId}
|
||||
```
|
||||
|
||||
```json
|
||||
响应数据
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"attr": {
|
||||
"attrId": 8,
|
||||
"attrName": "上市年份",
|
||||
"searchType": 0,
|
||||
"valueType": 0,
|
||||
"icon": "xxx",
|
||||
"valueSelect": "2018;2019",
|
||||
"attrType": 1,
|
||||
"enable": 1,
|
||||
"catelogId": 225,
|
||||
"showDesc": 0,
|
||||
"attrGroupId": null,
|
||||
"catelogId": 225,
|
||||
"catelogPath": [2, 34, 225] //分类完整路径
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
##### 10、获取属性分组的关联的所有属性
|
||||
|
||||
```http
|
||||
GET /product/attrgroup/{attrgroupId}/attr/relation
|
||||
```
|
||||
|
||||
```json
|
||||
响应数据
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"attr": {
|
||||
"attrId": 8,
|
||||
"attrName": "上市年份",
|
||||
"searchType": 0,
|
||||
"valueType": 0,
|
||||
"icon": "xxx",
|
||||
"valueSelect": "2018;2019",
|
||||
"attrType": 1,
|
||||
"enable": 1,
|
||||
"catelogId": 225,
|
||||
"showDesc": 0,
|
||||
"attrGroupId": null,
|
||||
"catelogId": 225,
|
||||
"catelogPath": [2, 34, 225] //分类完整路径
|
||||
},
|
||||
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
#####
|
||||
|
||||
##### 11、添加属性与分组的关联关系
|
||||
|
||||
```http
|
||||
POST /product/attrgroup/attr/relation
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
[{"attrId": 1, "attrGroupId": 2}]
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0
|
||||
}
|
||||
```
|
||||
|
||||
#####
|
||||
|
||||
##### 12、删除属性与分组的关联关系
|
||||
|
||||
```http
|
||||
POST /product/attrgroup/attr/relation/delete
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
[{"attrId": 1, "attrGroupId": 2}]
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0
|
||||
}
|
||||
```
|
||||
|
||||
#####
|
||||
|
||||
##### 13、获取属性分组的没有关联的其他属性
|
||||
|
||||
```http
|
||||
POST /product/attrgroup/{catelogId}/noattr/relation?t=1755934087977&page=1&limit=10&key={key}
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
page: 1, //当前页码
|
||||
limit: 10, //每页记录数
|
||||
sidx: "id", //排序字段
|
||||
order: "asc/desc", //排序方式
|
||||
key: "华为" //检索关键字
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"page": {
|
||||
"totalCount": 3,
|
||||
"pageSize": 10,
|
||||
"totalPage": 1,
|
||||
"currPage": 1,
|
||||
"list":[{
|
||||
"attrId": 8,
|
||||
"attrName": "上市年份",
|
||||
"searchType": 0,
|
||||
"valueType": 0,
|
||||
"icon": "xxx",
|
||||
"valueSelect": "2018;2019",
|
||||
"attrType": 1,
|
||||
"enable": 1,
|
||||
"catelogId": 225,
|
||||
"showDesc": 0,
|
||||
"catelogId": 225,
|
||||
|
||||
}]
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
##### 14、获取分类关联所有品牌
|
||||
|
||||
```http
|
||||
GET /product/categorybrandrelation/brands/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
catId
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"data": [{
|
||||
"brandId": 0,
|
||||
"brandName": "string"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### 15、获取品牌关联的分类
|
||||
|
||||
```http
|
||||
GET /product/categorybrandrelation/catelog/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```
|
||||
brandId
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"data": [{
|
||||
"catelogId": 0,
|
||||
"catelogName": "string"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
##### 17、获取分类下所有分组和关联属性
|
||||
|
||||
```http
|
||||
GET /product/categroup/{catelogId}/withatrr
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"data": [
|
||||
{
|
||||
"attrGroupId": 1,
|
||||
"attrGroupName": "主体",
|
||||
"sort": 0,
|
||||
"descript": "主体",
|
||||
"icon": "dd",
|
||||
"catelogId": 225,
|
||||
"catelogPath": null,
|
||||
"attrs": [
|
||||
{
|
||||
"attrId": 19,
|
||||
"attrName": "入网型号",
|
||||
"searchType": 0,
|
||||
"valueType": 1,
|
||||
"icon": "xxx",
|
||||
"valueSelect": "AAA",
|
||||
"attrType": 1,
|
||||
"enable": 1,
|
||||
"catelogId": 225,
|
||||
"showDesc": 0
|
||||
},
|
||||
]
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
##### 18、spu检索
|
||||
|
||||
```http
|
||||
GET /product/spuinfo/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
page: 1,
|
||||
limit: 10,
|
||||
sidx: 0,
|
||||
order: "asc/desc", //检索方式
|
||||
status: 0,
|
||||
key: "华为",
|
||||
brandId: 9,
|
||||
catelogId: 225
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"page": {
|
||||
"totalCount": 21,
|
||||
"pageSize": 10,
|
||||
"totalPage": 3,
|
||||
"currPage": 1,
|
||||
"list": [
|
||||
{
|
||||
"id": 11,
|
||||
"spuName": "华为 HUAWEI Mate 30 Pro",
|
||||
"spuDescription": "华为 HUAWEI Mate 30 Pro",
|
||||
"catalogId": 225,
|
||||
"brandId": 9,
|
||||
"weight": 0.1980,
|
||||
"publishStatus": 1,
|
||||
"createTime": "2019-11-26 02:10:57",
|
||||
"updateTime": "2019-12-15 15:04:16"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### 19、新增商品
|
||||
|
||||
```http
|
||||
GET /product/spuinfo/save
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"spuName": "aaa",
|
||||
"spuDescription": "aaa",
|
||||
"catalogId": 225,
|
||||
"brandId": 10,
|
||||
"weight": 0,
|
||||
"publishStatus": 0,
|
||||
"decript": [
|
||||
"https://huishuohuademao-mall.oss-cn-wuhan-lr.aliyuncs.com/2025-08-25/f62af013-ce09-42b6-8e88-bf5b81ebda55_baole.jpg"
|
||||
],
|
||||
"images": [
|
||||
"https://huishuohuademao-mall.oss-cn-wuhan-lr.aliyuncs.com/2025-08-25/4a0fabce-7d73-4e86-8088-346457d79ee3_hello.jpg"
|
||||
],
|
||||
"bounds": {
|
||||
"buyBounds": 0,
|
||||
"growBounds": 0
|
||||
},
|
||||
"baseAttrs": [
|
||||
{
|
||||
"attrId": 19,
|
||||
"attrValues": "bbb",
|
||||
"showDesc": 0
|
||||
},
|
||||
],
|
||||
"skus": [
|
||||
{
|
||||
"attr": [
|
||||
{
|
||||
"attrId": 12,
|
||||
"attrName": "版本",
|
||||
"attrValue": "bbb"
|
||||
},
|
||||
],
|
||||
"skuName": "aaa bbb bbbb",
|
||||
"price": "666",
|
||||
"skuTitle": "aaa bbb bbbb",
|
||||
"skuSubtitle": "",
|
||||
"images": [
|
||||
{
|
||||
"imgUrl": "",
|
||||
"defaultImg": 0
|
||||
}
|
||||
],
|
||||
"descar": [
|
||||
"bbb",
|
||||
"bbbb"
|
||||
],
|
||||
"fullCount": 330,
|
||||
"discount": 1,
|
||||
"countStatus": 0,
|
||||
"fullPrice": 330,
|
||||
"reducePrice": 30,
|
||||
"priceStatus": 0,
|
||||
"memberPrice": [
|
||||
{
|
||||
"id": 2,
|
||||
"name": "铜牌会员",
|
||||
"price": 30
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "银牌会员",
|
||||
"price": 30
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0
|
||||
}
|
||||
```
|
||||
|
||||
##### 20、添加属性与分组的关联关系
|
||||
|
||||
```http
|
||||
POST /product/spuinfo/{spuId}/up
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### 21、获取品牌关联的分类
|
||||
|
||||
```http
|
||||
GET /product/skuinfo/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```
|
||||
{
|
||||
page: 1,
|
||||
limit: 10,
|
||||
sidx: 0,
|
||||
order: "asc/desc", //检索方式
|
||||
status: 0,
|
||||
key: "华为",
|
||||
brandId: 9,
|
||||
catelogId: 225,
|
||||
min: 0,
|
||||
max: 0
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"data": [{
|
||||
"catelogId": 0,
|
||||
"catelogName": "string"
|
||||
}]
|
||||
}
|
||||
```
|
||||
|
||||
##### 22、获取spu规格
|
||||
|
||||
```http
|
||||
GET /product/attr/base/listforspu/{spuId}
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```
|
||||
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"data": [
|
||||
{
|
||||
"id": 61,
|
||||
"spuId": 11,
|
||||
"attrId": 7,
|
||||
"attrName": "入网型号",
|
||||
"attrValue": "LIO-AL00",
|
||||
"attrSort": null,
|
||||
"quickShow": 1
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
##### 23 、修改spu规格
|
||||
|
||||
```http
|
||||
POST /product/attr/update/19
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"attrId": 19,
|
||||
"attrName": "入网型号",
|
||||
"attrValue": "AAA",
|
||||
"quickShow": 0
|
||||
},
|
||||
]
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"data": [
|
||||
{
|
||||
"id": 61,
|
||||
"spuId": 11,
|
||||
"attrId": 7,
|
||||
"attrName": "入网型号",
|
||||
"attrValue": "LIO-AL00",
|
||||
"attrSort": null,
|
||||
"quickShow": 1
|
||||
},
|
||||
|
||||
]
|
||||
}
|
||||
```
|
||||
|
@ -0,0 +1,175 @@
|
||||
##### 1、获取库存信息
|
||||
|
||||
```http
|
||||
GET ware/waresku/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
page: 1, //当前页码
|
||||
limit: 10, //每页记录数
|
||||
sidx: "id", //排序字段
|
||||
order: "asc/desc", //排序方式
|
||||
skuId: ,//商品id
|
||||
wareId: ,//仓库id
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"page": {
|
||||
"totalCount": 3,
|
||||
"pageSize": 10,
|
||||
"totalPage": 1,
|
||||
"currPage": 1,
|
||||
"list": [{
|
||||
"id": 1,
|
||||
"skuId": 1,
|
||||
"wareId": 1,
|
||||
"stock": 10,
|
||||
"skuName": "会说话的猫",
|
||||
"stockLocked": 0
|
||||
}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### 2、查询采购需求
|
||||
|
||||
```http
|
||||
POST /ware/purchasedetail/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
page: 1, //当前页码
|
||||
limit: 10, //每页记录数
|
||||
sidx: "id", //排序字段
|
||||
order: "asc/desc", //排序方式
|
||||
key: "华为" //检索关键字
|
||||
status: 1,
|
||||
wareId: 2,
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"page": {
|
||||
"totalCount": 0,
|
||||
"pageSize": 10,
|
||||
"totalPage": 0,
|
||||
"currPage": 1,
|
||||
"list": [
|
||||
{
|
||||
"id": 1,
|
||||
"purchaseId": null,
|
||||
"skuId": 1,
|
||||
"skuNum": 10,
|
||||
"skuPrice": null,
|
||||
"wareId": 1,
|
||||
"status": 0
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### 3、查询采购单
|
||||
|
||||
```http
|
||||
POST ware/purchase/unreceive/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"page": {
|
||||
"totalCount": 3,
|
||||
"pageSize": 10,
|
||||
"totalPage": 1,
|
||||
"currPage": 1,
|
||||
"list": [{
|
||||
|
||||
}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
##### 4、合并采购需求
|
||||
|
||||
```http
|
||||
POST /ware/purchase/merge
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
"purchaseId": 1, //采购单id
|
||||
"items": [
|
||||
1,
|
||||
2
|
||||
] //合并项集合
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"page": {
|
||||
"totalCount": 3,
|
||||
"pageSize": 10,
|
||||
"totalPage": 1,
|
||||
"currPage": 1,
|
||||
"list": [{
|
||||
|
||||
}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,37 @@
|
||||
##### 1、获取所有会员等级
|
||||
|
||||
```http
|
||||
POST /member/memberlevel/list
|
||||
```
|
||||
|
||||
请求参数
|
||||
|
||||
```json
|
||||
{
|
||||
page: 1, //当前页码
|
||||
limit: 10, //每页记录数
|
||||
sidx: "id", //排序字段
|
||||
order: "asc/desc", //排序方式
|
||||
key: "华为" //检索关键字
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
响应数据
|
||||
|
||||
```json
|
||||
{
|
||||
"msg": "success",
|
||||
"code": 0,
|
||||
"page": {
|
||||
"totalCount": 3,
|
||||
"pageSize": 10,
|
||||
"totalPage": 1,
|
||||
"currPage": 1,
|
||||
"list": [{
|
||||
|
||||
}]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
@ -0,0 +1,90 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Spring" name="Spring">
|
||||
<configuration />
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-boot-starter:3.5.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus:3.5.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-extension:3.5.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-core:3.5.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.baomidou:mybatis-plus-annotation:3.5.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:4.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.5.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:2.0.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:4.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.26" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.16" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.6" level="project" />
|
||||
<orderEntry type="library" scope="PROVIDED" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.79" level="project" />
|
||||
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:8.0.17" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-discovery:2021.0.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-alibaba-commons:2021.0.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:2.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.15" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.13.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.13.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.13.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.15" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.13" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.google.guava:guava:20.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.javassist:javassist:3.21.0-GA" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.15.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient_tracer_otel:0.15.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient_tracer_common:0.15.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.prometheus:simpleclient_tracer_otel_agent:0.15.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:3.1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.7.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:3.1.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.alibaba.cloud:spring-cloud-starter-alibaba-nacos-config:2021.0.4.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-bootstrap:3.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:3.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.10.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.68" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.68" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-validation:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.21" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:9.0.64" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.2.3.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.validation:jakarta.validation-api:2.0.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.4.3.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.5.1" level="project" />
|
||||
</component>
|
||||
</module>
|
@ -0,0 +1,44 @@
|
||||
package com.bookstore.common.constant;
|
||||
|
||||
public class ProductConstant {
|
||||
public enum AttrEnum{
|
||||
ATTR_TYPE_SALE(0, "销售属性"), ATTR_TYPE_BASE(1,"基本属性");
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
AttrEnum(int code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public enum StatusEnum{
|
||||
SPU_NEW(0, "新建"), SPU_UP(1,"商品上架"), SPU_DOWN(2,"商品下架");
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
StatusEnum(int code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.bookstore.common.constant;
|
||||
|
||||
|
||||
public class WareConstant {
|
||||
public enum PurchaseStatusEnum{
|
||||
CREATED(0, "新建"), ASSIGNED(1,"已分配"),
|
||||
RECEIVE(2, "已领取"),FINISH(3, "已完成"),
|
||||
HASERROR(4, "异常");
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
PurchaseStatusEnum(int code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public enum PurchaseDetailStatusEnum{
|
||||
CREATED(0, "新建"), ASSIGNED(1,"已分配"),
|
||||
BUYING(2, "正在采购"),FINISH(3, "已完成"),
|
||||
HASERROR(4, "采购失败");
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
PurchaseDetailStatusEnum(int code, String msg) {
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
/**
|
||||
* Copyright 2019 bejson.com
|
||||
*/
|
||||
package com.bookstore.common.to;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* Auto-generated: 2019-11-26 10:50:34
|
||||
*
|
||||
* @author bejson.com (i@bejson.com)
|
||||
* @website http://www.bejson.com/java2pojo/
|
||||
*/
|
||||
@Data
|
||||
public class MemberPrice {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private BigDecimal price;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.common.to;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SkuReductionTo {
|
||||
|
||||
private Long skuId;
|
||||
private int fullCount;
|
||||
private BigDecimal discount;
|
||||
private int countStatus;
|
||||
private BigDecimal fullPrice;
|
||||
private BigDecimal reducePrice;
|
||||
private int priceStatus;
|
||||
private List<MemberPrice> memberPrice;
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.bookstore.common.to;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
@Data
|
||||
public class SpuBoundsTo {
|
||||
private Long spuId;
|
||||
private BigDecimal buyBounds;
|
||||
private BigDecimal growBounds;
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.bookstore.common.to.es;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SkuEsModel {
|
||||
|
||||
private Long skuId;
|
||||
|
||||
private Long spuId;
|
||||
|
||||
private String skuTitle;
|
||||
|
||||
private BigDecimal skuPrice;
|
||||
|
||||
private String skuImg;
|
||||
|
||||
private Long saleCount;
|
||||
|
||||
private Boolean hasStock;
|
||||
|
||||
private Long hotScore;
|
||||
|
||||
private Long brandId;
|
||||
|
||||
private Long catalogId;
|
||||
|
||||
private String brandName;
|
||||
|
||||
private String brandImg;
|
||||
|
||||
private String catalogName;
|
||||
|
||||
private List<Attrs> attrs;
|
||||
|
||||
@Data
|
||||
public static class Attrs {
|
||||
|
||||
private Long attrId;
|
||||
|
||||
private String attrName;
|
||||
|
||||
private String attrValue;
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
package com.bookstore.common.valid;
|
||||
|
||||
public interface AddGroup {
|
||||
}
|
||||
|
@ -0,0 +1,4 @@
|
||||
package com.bookstore.common.valid;
|
||||
|
||||
public interface AddShowStatusGroup {
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.bookstore.common.valid;
|
||||
|
||||
import org.hibernate.validator.internal.util.annotation.ConstraintAnnotationDescriptor;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public class ListValueConstraintValidator implements ConstraintValidator<ListValue, Integer>/*第一个泛型是校验注解,第二个泛型是校验类型*/ {
|
||||
|
||||
private Set<Integer> set = new HashSet<>();
|
||||
|
||||
//初始化方法,会将详细信息给我门
|
||||
@Override
|
||||
public void initialize(ListValue constraintAnnotation) {
|
||||
ConstraintValidator.super.initialize(constraintAnnotation);
|
||||
|
||||
int[] vals = constraintAnnotation.vals(); //获取数据
|
||||
for (int i =0; i < vals.length; i++) {
|
||||
set.add(vals[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
|
||||
/*
|
||||
@param value 第一个value是用户提交用于校验的数据
|
||||
@param context
|
||||
@return
|
||||
* */
|
||||
public boolean isValid(Integer value, ConstraintValidatorContext constraintValidatorContext) {
|
||||
|
||||
return value == null || set.contains(value);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
package com.bookstore.common.valid;
|
||||
|
||||
public interface UpdataGroup {
|
||||
}
|
@ -0,0 +1,530 @@
|
||||
package com.bookstore.common.xss;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.ConcurrentMap;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
*
|
||||
* HTML filtering utility for protecting against XSS (Cross Site Scripting).
|
||||
*
|
||||
* This code is licensed LGPLv3
|
||||
*
|
||||
* This code is a Java port of the original work in PHP by Cal Hendersen.
|
||||
* http://code.iamcal.com/php/lib_filter/
|
||||
*
|
||||
* The trickiest part of the translation was handling the differences in regex handling
|
||||
* between PHP and Java. These resources were helpful in the process:
|
||||
*
|
||||
* http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
|
||||
* http://us2.php.net/manual/en/reference.pcre.pattern.modifiers.php
|
||||
* http://www.regular-expressions.info/modifiers.html
|
||||
*
|
||||
* A note on naming conventions: instance variables are prefixed with a "v"; global
|
||||
* constants are in all caps.
|
||||
*
|
||||
* Sample use:
|
||||
* String input = ...
|
||||
* String clean = new HTMLFilter().filter( input );
|
||||
*
|
||||
* The class is not thread safe. Create a new instance if in doubt.
|
||||
*
|
||||
* If you find bugs or have suggestions on improvement (especially regarding
|
||||
* performance), please contact us. The latest version of this
|
||||
* source, and our contact details, can be found at http://xss-html-filter.sf.net
|
||||
*
|
||||
* @author Joseph O'Connell
|
||||
* @author Cal Hendersen
|
||||
* @author Michael Semb Wever
|
||||
*/
|
||||
public final class HTMLFilter {
|
||||
|
||||
/** regex flag union representing /si modifiers in php **/
|
||||
private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL;
|
||||
private static final Pattern P_COMMENTS = Pattern.compile("<!--(.*?)-->", Pattern.DOTALL);
|
||||
private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI);
|
||||
private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL);
|
||||
private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI);
|
||||
private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI);
|
||||
private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI);
|
||||
private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI);
|
||||
private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI);
|
||||
private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?");
|
||||
private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?");
|
||||
private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?");
|
||||
private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))");
|
||||
private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL);
|
||||
private static final Pattern P_END_ARROW = Pattern.compile("^>");
|
||||
private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)");
|
||||
private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)");
|
||||
private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)");
|
||||
private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)");
|
||||
private static final Pattern P_AMP = Pattern.compile("&");
|
||||
private static final Pattern P_QUOTE = Pattern.compile("<");
|
||||
private static final Pattern P_LEFT_ARROW = Pattern.compile("<");
|
||||
private static final Pattern P_RIGHT_ARROW = Pattern.compile(">");
|
||||
private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>");
|
||||
|
||||
// @xxx could grow large... maybe use sesat's ReferenceMap
|
||||
private static final ConcurrentMap<String,Pattern> P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<String, Pattern>();
|
||||
private static final ConcurrentMap<String,Pattern> P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<String, Pattern>();
|
||||
|
||||
/** set of allowed html elements, along with allowed attributes for each element **/
|
||||
private final Map<String, List<String>> vAllowed;
|
||||
/** counts of open tags for each (allowable) html element **/
|
||||
private final Map<String, Integer> vTagCounts = new HashMap<String, Integer>();
|
||||
|
||||
/** html elements which must always be self-closing (e.g. "<img />") **/
|
||||
private final String[] vSelfClosingTags;
|
||||
/** html elements which must always have separate opening and closing tags (e.g. "<b></b>") **/
|
||||
private final String[] vNeedClosingTags;
|
||||
/** set of disallowed html elements **/
|
||||
private final String[] vDisallowed;
|
||||
/** attributes which should be checked for valid protocols **/
|
||||
private final String[] vProtocolAtts;
|
||||
/** allowed protocols **/
|
||||
private final String[] vAllowedProtocols;
|
||||
/** tags which should be removed if they contain no content (e.g. "<b></b>" or "<b />") **/
|
||||
private final String[] vRemoveBlanks;
|
||||
/** entities allowed within html markup **/
|
||||
private final String[] vAllowedEntities;
|
||||
/** flag determining whether comments are allowed in input String. */
|
||||
private final boolean stripComment;
|
||||
private final boolean encodeQuotes;
|
||||
private boolean vDebug = false;
|
||||
/**
|
||||
* flag determining whether to try to make tags when presented with "unbalanced"
|
||||
* angle brackets (e.g. "<b text </b>" becomes "<b> text </b>"). If set to false,
|
||||
* unbalanced angle brackets will be html escaped.
|
||||
*/
|
||||
private final boolean alwaysMakeTags;
|
||||
|
||||
/** Default constructor.
|
||||
*
|
||||
*/
|
||||
public HTMLFilter() {
|
||||
vAllowed = new HashMap<>();
|
||||
|
||||
final ArrayList<String> a_atts = new ArrayList<String>();
|
||||
a_atts.add("href");
|
||||
a_atts.add("target");
|
||||
vAllowed.put("a", a_atts);
|
||||
|
||||
final ArrayList<String> img_atts = new ArrayList<String>();
|
||||
img_atts.add("src");
|
||||
img_atts.add("width");
|
||||
img_atts.add("height");
|
||||
img_atts.add("alt");
|
||||
vAllowed.put("img", img_atts);
|
||||
|
||||
final ArrayList<String> no_atts = new ArrayList<String>();
|
||||
vAllowed.put("b", no_atts);
|
||||
vAllowed.put("strong", no_atts);
|
||||
vAllowed.put("i", no_atts);
|
||||
vAllowed.put("em", no_atts);
|
||||
|
||||
vSelfClosingTags = new String[]{"img"};
|
||||
vNeedClosingTags = new String[]{"a", "b", "strong", "i", "em"};
|
||||
vDisallowed = new String[]{};
|
||||
vAllowedProtocols = new String[]{"http", "mailto", "https"}; // no ftp.
|
||||
vProtocolAtts = new String[]{"src", "href"};
|
||||
vRemoveBlanks = new String[]{"a", "b", "strong", "i", "em"};
|
||||
vAllowedEntities = new String[]{"amp", "gt", "lt", "quot"};
|
||||
stripComment = true;
|
||||
encodeQuotes = true;
|
||||
alwaysMakeTags = true;
|
||||
}
|
||||
|
||||
/** Set debug flag to true. Otherwise use default settings. See the default constructor.
|
||||
*
|
||||
* @param debug turn debug on with a true argument
|
||||
*/
|
||||
public HTMLFilter(final boolean debug) {
|
||||
this();
|
||||
vDebug = debug;
|
||||
|
||||
}
|
||||
|
||||
/** Map-parameter configurable constructor.
|
||||
*
|
||||
* @param conf map containing configuration. keys match field names.
|
||||
*/
|
||||
public HTMLFilter(final Map<String,Object> conf) {
|
||||
|
||||
assert conf.containsKey("vAllowed") : "configuration requires vAllowed";
|
||||
assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags";
|
||||
assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags";
|
||||
assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed";
|
||||
assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols";
|
||||
assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts";
|
||||
assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks";
|
||||
assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities";
|
||||
|
||||
vAllowed = Collections.unmodifiableMap((HashMap<String, List<String>>) conf.get("vAllowed"));
|
||||
vSelfClosingTags = (String[]) conf.get("vSelfClosingTags");
|
||||
vNeedClosingTags = (String[]) conf.get("vNeedClosingTags");
|
||||
vDisallowed = (String[]) conf.get("vDisallowed");
|
||||
vAllowedProtocols = (String[]) conf.get("vAllowedProtocols");
|
||||
vProtocolAtts = (String[]) conf.get("vProtocolAtts");
|
||||
vRemoveBlanks = (String[]) conf.get("vRemoveBlanks");
|
||||
vAllowedEntities = (String[]) conf.get("vAllowedEntities");
|
||||
stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true;
|
||||
encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true;
|
||||
alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true;
|
||||
}
|
||||
|
||||
private void reset() {
|
||||
vTagCounts.clear();
|
||||
}
|
||||
|
||||
private void debug(final String msg) {
|
||||
if (vDebug) {
|
||||
Logger.getAnonymousLogger().info(msg);
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
// my versions of some PHP library functions
|
||||
public static String chr(final int decimal) {
|
||||
return String.valueOf((char) decimal);
|
||||
}
|
||||
|
||||
public static String htmlSpecialChars(final String s) {
|
||||
String result = s;
|
||||
result = regexReplace(P_AMP, "&", result);
|
||||
result = regexReplace(P_QUOTE, """, result);
|
||||
result = regexReplace(P_LEFT_ARROW, "<", result);
|
||||
result = regexReplace(P_RIGHT_ARROW, ">", result);
|
||||
return result;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------
|
||||
/**
|
||||
* given a user submitted input String, filter out any invalid or restricted
|
||||
* html.
|
||||
*
|
||||
* @param input text (i.e. submitted by a user) than may contain html
|
||||
* @return "clean" version of input, with only valid, whitelisted html elements allowed
|
||||
*/
|
||||
public String filter(final String input) {
|
||||
reset();
|
||||
String s = input;
|
||||
|
||||
debug("************************************************");
|
||||
debug(" INPUT: " + input);
|
||||
|
||||
s = escapeComments(s);
|
||||
debug(" escapeComments: " + s);
|
||||
|
||||
s = balanceHTML(s);
|
||||
debug(" balanceHTML: " + s);
|
||||
|
||||
s = checkTags(s);
|
||||
debug(" checkTags: " + s);
|
||||
|
||||
s = processRemoveBlanks(s);
|
||||
debug("processRemoveBlanks: " + s);
|
||||
|
||||
s = validateEntities(s);
|
||||
debug(" validateEntites: " + s);
|
||||
|
||||
debug("************************************************\n\n");
|
||||
return s;
|
||||
}
|
||||
|
||||
public boolean isAlwaysMakeTags(){
|
||||
return alwaysMakeTags;
|
||||
}
|
||||
|
||||
public boolean isStripComments(){
|
||||
return stripComment;
|
||||
}
|
||||
|
||||
private String escapeComments(final String s) {
|
||||
final Matcher m = P_COMMENTS.matcher(s);
|
||||
final StringBuffer buf = new StringBuffer();
|
||||
if (m.find()) {
|
||||
final String match = m.group(1); //(.*?)
|
||||
m.appendReplacement(buf, Matcher.quoteReplacement("<!--" + htmlSpecialChars(match) + "-->"));
|
||||
}
|
||||
m.appendTail(buf);
|
||||
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
private String balanceHTML(String s) {
|
||||
if (alwaysMakeTags) {
|
||||
//
|
||||
// try and form html
|
||||
//
|
||||
s = regexReplace(P_END_ARROW, "", s);
|
||||
s = regexReplace(P_BODY_TO_END, "<$1>", s);
|
||||
s = regexReplace(P_XML_CONTENT, "$1<$2", s);
|
||||
|
||||
} else {
|
||||
//
|
||||
// escape stray brackets
|
||||
//
|
||||
s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s);
|
||||
s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s);
|
||||
|
||||
//
|
||||
// the last regexp causes '<>' entities to appear
|
||||
// (we need to do a lookahead assertion so that the last bracket can
|
||||
// be used in the next pass of the regexp)
|
||||
//
|
||||
s = regexReplace(P_BOTH_ARROWS, "", s);
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
private String checkTags(String s) {
|
||||
Matcher m = P_TAGS.matcher(s);
|
||||
|
||||
final StringBuffer buf = new StringBuffer();
|
||||
while (m.find()) {
|
||||
String replaceStr = m.group(1);
|
||||
replaceStr = processTag(replaceStr);
|
||||
m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr));
|
||||
}
|
||||
m.appendTail(buf);
|
||||
|
||||
s = buf.toString();
|
||||
|
||||
// these get tallied in processTag
|
||||
// (remember to reset before subsequent calls to filter method)
|
||||
for (String key : vTagCounts.keySet()) {
|
||||
for (int ii = 0; ii < vTagCounts.get(key); ii++) {
|
||||
s += "</" + key + ">";
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
private String processRemoveBlanks(final String s) {
|
||||
String result = s;
|
||||
for (String tag : vRemoveBlanks) {
|
||||
if(!P_REMOVE_PAIR_BLANKS.containsKey(tag)){
|
||||
P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?></" + tag + ">"));
|
||||
}
|
||||
result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result);
|
||||
if(!P_REMOVE_SELF_BLANKS.containsKey(tag)){
|
||||
P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>"));
|
||||
}
|
||||
result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) {
|
||||
Matcher m = regex_pattern.matcher(s);
|
||||
return m.replaceAll(replacement);
|
||||
}
|
||||
|
||||
private String processTag(final String s) {
|
||||
// ending tags
|
||||
Matcher m = P_END_TAG.matcher(s);
|
||||
if (m.find()) {
|
||||
final String name = m.group(1).toLowerCase();
|
||||
if (allowed(name)) {
|
||||
if (!inArray(name, vSelfClosingTags)) {
|
||||
if (vTagCounts.containsKey(name)) {
|
||||
vTagCounts.put(name, vTagCounts.get(name) - 1);
|
||||
return "</" + name + ">";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// starting tags
|
||||
m = P_START_TAG.matcher(s);
|
||||
if (m.find()) {
|
||||
final String name = m.group(1).toLowerCase();
|
||||
final String body = m.group(2);
|
||||
String ending = m.group(3);
|
||||
|
||||
//debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" );
|
||||
if (allowed(name)) {
|
||||
String params = "";
|
||||
|
||||
final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body);
|
||||
final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body);
|
||||
final List<String> paramNames = new ArrayList<String>();
|
||||
final List<String> paramValues = new ArrayList<String>();
|
||||
while (m2.find()) {
|
||||
paramNames.add(m2.group(1)); //([a-z0-9]+)
|
||||
paramValues.add(m2.group(3)); //(.*?)
|
||||
}
|
||||
while (m3.find()) {
|
||||
paramNames.add(m3.group(1)); //([a-z0-9]+)
|
||||
paramValues.add(m3.group(3)); //([^\"\\s']+)
|
||||
}
|
||||
|
||||
String paramName, paramValue;
|
||||
for (int ii = 0; ii < paramNames.size(); ii++) {
|
||||
paramName = paramNames.get(ii).toLowerCase();
|
||||
paramValue = paramValues.get(ii);
|
||||
|
||||
// debug( "paramName='" + paramName + "'" );
|
||||
// debug( "paramValue='" + paramValue + "'" );
|
||||
// debug( "allowed? " + vAllowed.get( name ).contains( paramName ) );
|
||||
|
||||
if (allowedAttribute(name, paramName)) {
|
||||
if (inArray(paramName, vProtocolAtts)) {
|
||||
paramValue = processParamProtocol(paramValue);
|
||||
}
|
||||
params += " " + paramName + "=\"" + paramValue + "\"";
|
||||
}
|
||||
}
|
||||
|
||||
if (inArray(name, vSelfClosingTags)) {
|
||||
ending = " /";
|
||||
}
|
||||
|
||||
if (inArray(name, vNeedClosingTags)) {
|
||||
ending = "";
|
||||
}
|
||||
|
||||
if (ending == null || ending.length() < 1) {
|
||||
if (vTagCounts.containsKey(name)) {
|
||||
vTagCounts.put(name, vTagCounts.get(name) + 1);
|
||||
} else {
|
||||
vTagCounts.put(name, 1);
|
||||
}
|
||||
} else {
|
||||
ending = " /";
|
||||
}
|
||||
return "<" + name + params + ending + ">";
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
// comments
|
||||
m = P_COMMENT.matcher(s);
|
||||
if (!stripComment && m.find()) {
|
||||
return "<" + m.group() + ">";
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
private String processParamProtocol(String s) {
|
||||
s = decodeEntities(s);
|
||||
final Matcher m = P_PROTOCOL.matcher(s);
|
||||
if (m.find()) {
|
||||
final String protocol = m.group(1);
|
||||
if (!inArray(protocol, vAllowedProtocols)) {
|
||||
// bad protocol, turn into local anchor link instead
|
||||
s = "#" + s.substring(protocol.length() + 1, s.length());
|
||||
if (s.startsWith("#//")) {
|
||||
s = "#" + s.substring(3, s.length());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
private String decodeEntities(String s) {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
|
||||
Matcher m = P_ENTITY.matcher(s);
|
||||
while (m.find()) {
|
||||
final String match = m.group(1);
|
||||
final int decimal = Integer.decode(match).intValue();
|
||||
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
|
||||
}
|
||||
m.appendTail(buf);
|
||||
s = buf.toString();
|
||||
|
||||
buf = new StringBuffer();
|
||||
m = P_ENTITY_UNICODE.matcher(s);
|
||||
while (m.find()) {
|
||||
final String match = m.group(1);
|
||||
final int decimal = Integer.valueOf(match, 16).intValue();
|
||||
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
|
||||
}
|
||||
m.appendTail(buf);
|
||||
s = buf.toString();
|
||||
|
||||
buf = new StringBuffer();
|
||||
m = P_ENCODE.matcher(s);
|
||||
while (m.find()) {
|
||||
final String match = m.group(1);
|
||||
final int decimal = Integer.valueOf(match, 16).intValue();
|
||||
m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal)));
|
||||
}
|
||||
m.appendTail(buf);
|
||||
s = buf.toString();
|
||||
|
||||
s = validateEntities(s);
|
||||
return s;
|
||||
}
|
||||
|
||||
private String validateEntities(final String s) {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
|
||||
// validate entities throughout the string
|
||||
Matcher m = P_VALID_ENTITIES.matcher(s);
|
||||
while (m.find()) {
|
||||
final String one = m.group(1); //([^&;]*)
|
||||
final String two = m.group(2); //(?=(;|&|$))
|
||||
m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two)));
|
||||
}
|
||||
m.appendTail(buf);
|
||||
|
||||
return encodeQuotes(buf.toString());
|
||||
}
|
||||
|
||||
private String encodeQuotes(final String s){
|
||||
if(encodeQuotes){
|
||||
StringBuffer buf = new StringBuffer();
|
||||
Matcher m = P_VALID_QUOTES.matcher(s);
|
||||
while (m.find()) {
|
||||
final String one = m.group(1); //(>|^)
|
||||
final String two = m.group(2); //([^<]+?)
|
||||
final String three = m.group(3); //(<|$)
|
||||
m.appendReplacement(buf, Matcher.quoteReplacement(one + regexReplace(P_QUOTE, """, two) + three));
|
||||
}
|
||||
m.appendTail(buf);
|
||||
return buf.toString();
|
||||
}else{
|
||||
return s;
|
||||
}
|
||||
}
|
||||
|
||||
private String checkEntity(final String preamble, final String term) {
|
||||
|
||||
return ";".equals(term) && isValidEntity(preamble)
|
||||
? '&' + preamble
|
||||
: "&" + preamble;
|
||||
}
|
||||
|
||||
private boolean isValidEntity(final String entity) {
|
||||
return inArray(entity, vAllowedEntities);
|
||||
}
|
||||
|
||||
private static boolean inArray(final String s, final String[] array) {
|
||||
for (String item : array) {
|
||||
if (item != null && item.equals(s)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private boolean allowed(final String name) {
|
||||
return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed);
|
||||
}
|
||||
|
||||
private boolean allowedAttribute(final String name, final String paramName) {
|
||||
return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName));
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
com.bookstore.common.valid.ListValue.message=必须提交的值
|
@ -0,0 +1,2 @@
|
||||
/mvnw text eol=lf
|
||||
*.cmd text eol=crlf
|
@ -0,0 +1,76 @@
|
||||
<?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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.7.1</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
<groupId>com.bookstore.bookmall</groupId>
|
||||
<artifactId>book-coupon</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<name>book-coupon</name>
|
||||
<description>Demo project for Spring Boot</description>
|
||||
<url/>
|
||||
<licenses>
|
||||
<license/>
|
||||
</licenses>
|
||||
<developers>
|
||||
<developer/>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection/>
|
||||
<developerConnection/>
|
||||
<tag/>
|
||||
<url/>
|
||||
</scm>
|
||||
<properties>
|
||||
<java.version>1.8</java.version>
|
||||
<spring-cloud.version>2021.0.8</spring-cloud.version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.bookstore.bookmall</groupId>
|
||||
<artifactId>mall-common</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring-cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
@ -0,0 +1,107 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import com.alibaba.nacos.shaded.org.checkerframework.checker.units.qual.C;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponEntity;
|
||||
import com.bookstore.bookmall.coupon.service.CouponService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/coupon")
|
||||
public class CouponController {
|
||||
@Autowired
|
||||
private CouponService couponService;
|
||||
|
||||
@Value("${coupon.user.name}")
|
||||
String name;
|
||||
@Value("${coupon.user.age}")
|
||||
Integer age;
|
||||
|
||||
@RequestMapping("/config")
|
||||
public R test() {
|
||||
return R.ok().put("name", name).put("age", age);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@RequestMapping("/member/list")
|
||||
public R membercoupons() {
|
||||
CouponEntity couponEntity = new CouponEntity();
|
||||
couponEntity.setCouponName("满100减10");
|
||||
return R.ok().put("coupons", Arrays.asList(couponEntity));
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:coupon:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:coupon:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponEntity coupon = couponService.getById(id);
|
||||
|
||||
return R.ok().put("coupon", coupon);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:coupon:save")
|
||||
public R save(@RequestBody CouponEntity coupon){
|
||||
couponService.save(coupon);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:coupon:update")
|
||||
public R update(@RequestBody CouponEntity coupon){
|
||||
couponService.updateById(coupon);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:coupon:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponHistoryEntity;
|
||||
import com.bookstore.bookmall.coupon.service.CouponHistoryService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券领取历史记录
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/couponhistory")
|
||||
public class CouponHistoryController {
|
||||
@Autowired
|
||||
private CouponHistoryService couponHistoryService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:couponhistory:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponHistoryService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:couponhistory:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponHistoryEntity couponHistory = couponHistoryService.getById(id);
|
||||
|
||||
return R.ok().put("couponHistory", couponHistory);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:couponhistory:save")
|
||||
public R save(@RequestBody CouponHistoryEntity couponHistory){
|
||||
couponHistoryService.save(couponHistory);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:couponhistory:update")
|
||||
public R update(@RequestBody CouponHistoryEntity couponHistory){
|
||||
couponHistoryService.updateById(couponHistory);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:couponhistory:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponHistoryService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponSpuCategoryRelationEntity;
|
||||
import com.bookstore.bookmall.coupon.service.CouponSpuCategoryRelationService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/couponspucategoryrelation")
|
||||
public class CouponSpuCategoryRelationController {
|
||||
@Autowired
|
||||
private CouponSpuCategoryRelationService couponSpuCategoryRelationService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:couponspucategoryrelation:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponSpuCategoryRelationService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:couponspucategoryrelation:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponSpuCategoryRelationEntity couponSpuCategoryRelation = couponSpuCategoryRelationService.getById(id);
|
||||
|
||||
return R.ok().put("couponSpuCategoryRelation", couponSpuCategoryRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:couponspucategoryrelation:save")
|
||||
public R save(@RequestBody CouponSpuCategoryRelationEntity couponSpuCategoryRelation){
|
||||
couponSpuCategoryRelationService.save(couponSpuCategoryRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:couponspucategoryrelation:update")
|
||||
public R update(@RequestBody CouponSpuCategoryRelationEntity couponSpuCategoryRelation){
|
||||
couponSpuCategoryRelationService.updateById(couponSpuCategoryRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:couponspucategoryrelation:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponSpuCategoryRelationService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponSpuRelationEntity;
|
||||
import com.bookstore.bookmall.coupon.service.CouponSpuRelationService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/couponspurelation")
|
||||
public class CouponSpuRelationController {
|
||||
@Autowired
|
||||
private CouponSpuRelationService couponSpuRelationService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:couponspurelation:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = couponSpuRelationService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:couponspurelation:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
CouponSpuRelationEntity couponSpuRelation = couponSpuRelationService.getById(id);
|
||||
|
||||
return R.ok().put("couponSpuRelation", couponSpuRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:couponspurelation:save")
|
||||
public R save(@RequestBody CouponSpuRelationEntity couponSpuRelation){
|
||||
couponSpuRelationService.save(couponSpuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:couponspurelation:update")
|
||||
public R update(@RequestBody CouponSpuRelationEntity couponSpuRelation){
|
||||
couponSpuRelationService.updateById(couponSpuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:couponspurelation:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
couponSpuRelationService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.HomeAdvEntity;
|
||||
import com.bookstore.bookmall.coupon.service.HomeAdvService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/homeadv")
|
||||
public class HomeAdvController {
|
||||
@Autowired
|
||||
private HomeAdvService homeAdvService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:homeadv:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = homeAdvService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:homeadv:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
HomeAdvEntity homeAdv = homeAdvService.getById(id);
|
||||
|
||||
return R.ok().put("homeAdv", homeAdv);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:homeadv:save")
|
||||
public R save(@RequestBody HomeAdvEntity homeAdv){
|
||||
homeAdvService.save(homeAdv);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:homeadv:update")
|
||||
public R update(@RequestBody HomeAdvEntity homeAdv){
|
||||
homeAdvService.updateById(homeAdv);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:homeadv:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
homeAdvService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.HomeSubjectSpuEntity;
|
||||
import com.bookstore.bookmall.coupon.service.HomeSubjectSpuService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/homesubjectspu")
|
||||
public class HomeSubjectSpuController {
|
||||
@Autowired
|
||||
private HomeSubjectSpuService homeSubjectSpuService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:homesubjectspu:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = homeSubjectSpuService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:homesubjectspu:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
HomeSubjectSpuEntity homeSubjectSpu = homeSubjectSpuService.getById(id);
|
||||
|
||||
return R.ok().put("homeSubjectSpu", homeSubjectSpu);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:homesubjectspu:save")
|
||||
public R save(@RequestBody HomeSubjectSpuEntity homeSubjectSpu){
|
||||
homeSubjectSpuService.save(homeSubjectSpu);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:homesubjectspu:update")
|
||||
public R update(@RequestBody HomeSubjectSpuEntity homeSubjectSpu){
|
||||
homeSubjectSpuService.updateById(homeSubjectSpu);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:homesubjectspu:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
homeSubjectSpuService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.MemberPriceEntity;
|
||||
import com.bookstore.bookmall.coupon.service.MemberPriceService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品会员价格
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/memberprice")
|
||||
public class MemberPriceController {
|
||||
@Autowired
|
||||
private MemberPriceService memberPriceService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:memberprice:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = memberPriceService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:memberprice:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
MemberPriceEntity memberPrice = memberPriceService.getById(id);
|
||||
|
||||
return R.ok().put("memberPrice", memberPrice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:memberprice:save")
|
||||
public R save(@RequestBody MemberPriceEntity memberPrice){
|
||||
memberPriceService.save(memberPrice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:memberprice:update")
|
||||
public R update(@RequestBody MemberPriceEntity memberPrice){
|
||||
memberPriceService.updateById(memberPrice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:memberprice:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
memberPriceService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillPromotionEntity;
|
||||
import com.bookstore.bookmall.coupon.service.SeckillPromotionService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillpromotion")
|
||||
public class SeckillPromotionController {
|
||||
@Autowired
|
||||
private SeckillPromotionService seckillPromotionService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:seckillpromotion:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillPromotionService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:seckillpromotion:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillPromotionEntity seckillPromotion = seckillPromotionService.getById(id);
|
||||
|
||||
return R.ok().put("seckillPromotion", seckillPromotion);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:seckillpromotion:save")
|
||||
public R save(@RequestBody SeckillPromotionEntity seckillPromotion){
|
||||
seckillPromotionService.save(seckillPromotion);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:seckillpromotion:update")
|
||||
public R update(@RequestBody SeckillPromotionEntity seckillPromotion){
|
||||
seckillPromotionService.updateById(seckillPromotion);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:seckillpromotion:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillPromotionService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSessionEntity;
|
||||
import com.bookstore.bookmall.coupon.service.SeckillSessionService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillsession")
|
||||
public class SeckillSessionController {
|
||||
@Autowired
|
||||
private SeckillSessionService seckillSessionService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:seckillsession:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillSessionService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:seckillsession:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillSessionEntity seckillSession = seckillSessionService.getById(id);
|
||||
|
||||
return R.ok().put("seckillSession", seckillSession);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:seckillsession:save")
|
||||
public R save(@RequestBody SeckillSessionEntity seckillSession){
|
||||
seckillSessionService.save(seckillSession);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:seckillsession:update")
|
||||
public R update(@RequestBody SeckillSessionEntity seckillSession){
|
||||
seckillSessionService.updateById(seckillSession);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:seckillsession:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillSessionService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSkuNoticeEntity;
|
||||
import com.bookstore.bookmall.coupon.service.SeckillSkuNoticeService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀商品通知订阅
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillskunotice")
|
||||
public class SeckillSkuNoticeController {
|
||||
@Autowired
|
||||
private SeckillSkuNoticeService seckillSkuNoticeService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:seckillskunotice:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillSkuNoticeService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:seckillskunotice:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillSkuNoticeEntity seckillSkuNotice = seckillSkuNoticeService.getById(id);
|
||||
|
||||
return R.ok().put("seckillSkuNotice", seckillSkuNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:seckillskunotice:save")
|
||||
public R save(@RequestBody SeckillSkuNoticeEntity seckillSkuNotice){
|
||||
seckillSkuNoticeService.save(seckillSkuNotice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:seckillskunotice:update")
|
||||
public R update(@RequestBody SeckillSkuNoticeEntity seckillSkuNotice){
|
||||
seckillSkuNoticeService.updateById(seckillSkuNotice);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:seckillskunotice:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillSkuNoticeService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSkuRelationEntity;
|
||||
import com.bookstore.bookmall.coupon.service.SeckillSkuRelationService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/seckillskurelation")
|
||||
public class SeckillSkuRelationController {
|
||||
@Autowired
|
||||
private SeckillSkuRelationService seckillSkuRelationService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:seckillskurelation:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = seckillSkuRelationService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:seckillskurelation:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SeckillSkuRelationEntity seckillSkuRelation = seckillSkuRelationService.getById(id);
|
||||
|
||||
return R.ok().put("seckillSkuRelation", seckillSkuRelation);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:seckillskurelation:save")
|
||||
public R save(@RequestBody SeckillSkuRelationEntity seckillSkuRelation){
|
||||
seckillSkuRelationService.save(seckillSkuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:seckillskurelation:update")
|
||||
public R update(@RequestBody SeckillSkuRelationEntity seckillSkuRelation){
|
||||
seckillSkuRelationService.updateById(seckillSkuRelation);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:seckillskurelation:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
seckillSkuRelationService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,101 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import com.bookstore.common.to.SkuReductionTo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SkuFullReductionEntity;
|
||||
import com.bookstore.bookmall.coupon.service.SkuFullReductionService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("coupon/skufullreduction")
|
||||
public class SkuFullReductionController {
|
||||
@Autowired
|
||||
private SkuFullReductionService skuFullReductionService;
|
||||
|
||||
|
||||
@PostMapping("/saveinfo")
|
||||
public R saveInfo(@RequestBody SkuReductionTo to){
|
||||
log.info("Received saveInfo request: {}", to);
|
||||
try {
|
||||
skuFullReductionService.saveSkuReduction(to);
|
||||
return R.ok();
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to save SKU reduction: {}", e.getMessage(), e);
|
||||
return R.error(500, "保存优惠信息失败: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:skufullreduction:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = skuFullReductionService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:skufullreduction:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SkuFullReductionEntity skuFullReduction = skuFullReductionService.getById(id);
|
||||
|
||||
return R.ok().put("skuFullReduction", skuFullReduction);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:skufullreduction:save")
|
||||
public R save(@RequestBody SkuFullReductionEntity skuFullReduction){
|
||||
skuFullReductionService.save(skuFullReduction);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:skufullreduction:update")
|
||||
public R update(@RequestBody SkuFullReductionEntity skuFullReduction){
|
||||
skuFullReductionService.updateById(skuFullReduction);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:skufullreduction:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
skuFullReductionService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,90 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SkuLadderEntity;
|
||||
import com.bookstore.bookmall.coupon.service.SkuLadderService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品阶梯价格
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/skuladder")
|
||||
public class SkuLadderController {
|
||||
@Autowired
|
||||
private SkuLadderService skuLadderService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:skuladder:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = skuLadderService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:skuladder:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SkuLadderEntity skuLadder = skuLadderService.getById(id);
|
||||
|
||||
return R.ok().put("skuLadder", skuLadder);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@RequestMapping("/save")
|
||||
//@RequiresPermissions("coupon:skuladder:save")
|
||||
public R save(@RequestBody SkuLadderEntity skuLadder){
|
||||
skuLadderService.save(skuLadder);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:skuladder:update")
|
||||
public R update(@RequestBody SkuLadderEntity skuLadder){
|
||||
skuLadderService.updateById(skuLadder);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:skuladder:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
skuLadderService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,86 @@
|
||||
package com.bookstore.bookmall.coupon.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SpuBoundsEntity;
|
||||
import com.bookstore.bookmall.coupon.service.SpuBoundsService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.common.utils.R;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品spu积分设置
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("coupon/spubounds")
|
||||
public class SpuBoundsController {
|
||||
@Autowired
|
||||
private SpuBoundsService spuBoundsService;
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
//@RequiresPermissions("coupon:spubounds:list")
|
||||
public R list(@RequestParam Map<String, Object> params){
|
||||
PageUtils page = spuBoundsService.queryPage(params);
|
||||
|
||||
return R.ok().put("page", page);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 信息
|
||||
*/
|
||||
@RequestMapping("/info/{id}")
|
||||
//@RequiresPermissions("coupon:spubounds:info")
|
||||
public R info(@PathVariable("id") Long id){
|
||||
SpuBoundsEntity spuBounds = spuBoundsService.getById(id);
|
||||
|
||||
return R.ok().put("spuBounds", spuBounds);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*/
|
||||
@PostMapping("/save")
|
||||
//@RequiresPermissions("coupon:spubounds:save")
|
||||
public R save(@RequestBody SpuBoundsEntity spuBounds){
|
||||
spuBoundsService.save(spuBounds);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
*/
|
||||
@RequestMapping("/update")
|
||||
//@RequiresPermissions("coupon:spubounds:update")
|
||||
public R update(@RequestBody SpuBoundsEntity spuBounds){
|
||||
spuBoundsService.updateById(spuBounds);
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
@RequestMapping("/delete")
|
||||
//@RequiresPermissions("coupon:spubounds:delete")
|
||||
public R delete(@RequestBody Long[] ids){
|
||||
spuBoundsService.removeByIds(Arrays.asList(ids));
|
||||
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponDao extends BaseMapper<CouponEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponHistoryEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券领取历史记录
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponHistoryDao extends BaseMapper<CouponHistoryEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponSpuCategoryRelationEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponSpuCategoryRelationDao extends BaseMapper<CouponSpuCategoryRelationEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.CouponSpuRelationEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface CouponSpuRelationDao extends BaseMapper<CouponSpuRelationEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.HomeAdvEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface HomeAdvDao extends BaseMapper<HomeAdvEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.HomeSubjectSpuEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface HomeSubjectSpuDao extends BaseMapper<HomeSubjectSpuEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.MemberPriceEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品会员价格
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface MemberPriceDao extends BaseMapper<MemberPriceEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillPromotionEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface SeckillPromotionDao extends BaseMapper<SeckillPromotionEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSessionEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface SeckillSessionDao extends BaseMapper<SeckillSessionEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSkuNoticeEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀商品通知订阅
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface SeckillSkuNoticeDao extends BaseMapper<SeckillSkuNoticeEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSkuRelationEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface SeckillSkuRelationDao extends BaseMapper<SeckillSkuRelationEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SkuFullReductionEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface SkuFullReductionDao extends BaseMapper<SkuFullReductionEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SkuLadderEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品阶梯价格
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface SkuLadderDao extends BaseMapper<SkuLadderEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.bookstore.bookmall.coupon.dao;
|
||||
|
||||
import com.bookstore.bookmall.coupon.entity.SpuBoundsEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品spu积分设置
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Mapper
|
||||
public interface SpuBoundsDao extends BaseMapper<SpuBoundsEntity> {
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_coupon_spu_category_relation")
|
||||
public class CouponSpuCategoryRelationEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
/**
|
||||
* 产品分类id
|
||||
*/
|
||||
private Long categoryId;
|
||||
/**
|
||||
* 产品分类名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_coupon_spu_relation")
|
||||
public class CouponSpuRelationEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 优惠券id
|
||||
*/
|
||||
private Long couponId;
|
||||
/**
|
||||
* spu_id
|
||||
*/
|
||||
private Long spuId;
|
||||
/**
|
||||
* spu_name
|
||||
*/
|
||||
private String spuName;
|
||||
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_home_adv")
|
||||
public class HomeAdvEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 图片地址
|
||||
*/
|
||||
private String pic;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 点击数
|
||||
*/
|
||||
private Integer clickCount;
|
||||
/**
|
||||
* 广告详情连接地址
|
||||
*/
|
||||
private String url;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String note;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 发布者
|
||||
*/
|
||||
private Long publisherId;
|
||||
/**
|
||||
* 审核者
|
||||
*/
|
||||
private Long authId;
|
||||
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_home_subject_spu")
|
||||
public class HomeSubjectSpuEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 专题名字
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 专题id
|
||||
*/
|
||||
private Long subjectId;
|
||||
/**
|
||||
* spu_id
|
||||
*/
|
||||
private Long spuId;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_seckill_promotion")
|
||||
public class SeckillPromotionEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 活动标题
|
||||
*/
|
||||
private String title;
|
||||
/**
|
||||
* 开始日期
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 结束日期
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 上下线状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
}
|
@ -0,0 +1,48 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_seckill_session")
|
||||
public class SeckillSessionEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 场次名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 每日开始时间
|
||||
*/
|
||||
private Date startTime;
|
||||
/**
|
||||
* 每日结束时间
|
||||
*/
|
||||
private Date endTime;
|
||||
/**
|
||||
* 启用状态
|
||||
*/
|
||||
private Integer status;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_seckill_sku_relation")
|
||||
public class SeckillSkuRelationEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 活动id
|
||||
*/
|
||||
private Long promotionId;
|
||||
/**
|
||||
* 活动场次id
|
||||
*/
|
||||
private Long promotionSessionId;
|
||||
/**
|
||||
* 商品id
|
||||
*/
|
||||
private Long skuId;
|
||||
/**
|
||||
* 秒杀价格
|
||||
*/
|
||||
private BigDecimal seckillPrice;
|
||||
/**
|
||||
* 秒杀总量
|
||||
*/
|
||||
private BigDecimal seckillCount;
|
||||
/**
|
||||
* 每人限购数量
|
||||
*/
|
||||
private BigDecimal seckillLimit;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer seckillSort;
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.bookstore.bookmall.coupon.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
@Data
|
||||
@TableName("sms_sku_full_reduction")
|
||||
public class SkuFullReductionEntity implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* spu_id
|
||||
*/
|
||||
private Long skuId;
|
||||
/**
|
||||
* 满多少
|
||||
*/
|
||||
private BigDecimal fullPrice;
|
||||
/**
|
||||
* 减多少
|
||||
*/
|
||||
private BigDecimal reducePrice;
|
||||
/**
|
||||
* 是否参与其他优惠
|
||||
*/
|
||||
private Integer addOther;
|
||||
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.CouponHistoryEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券领取历史记录
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface CouponHistoryService extends IService<CouponHistoryEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.CouponEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券信息
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface CouponService extends IService<CouponEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.CouponSpuCategoryRelationEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券分类关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface CouponSpuCategoryRelationService extends IService<CouponSpuCategoryRelationEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.CouponSpuRelationEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 优惠券与产品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface CouponSpuRelationService extends IService<CouponSpuRelationEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.HomeAdvEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 首页轮播广告
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface HomeAdvService extends IService<HomeAdvEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.HomeSubjectSpuEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 专题商品
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface HomeSubjectSpuService extends IService<HomeSubjectSpuEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.MemberPriceEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品会员价格
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface MemberPriceService extends IService<MemberPriceEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillPromotionEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀活动
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface SeckillPromotionService extends IService<SeckillPromotionEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSessionEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀活动场次
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface SeckillSessionService extends IService<SeckillSessionEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSkuNoticeEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀商品通知订阅
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface SeckillSkuNoticeService extends IService<SeckillSkuNoticeEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.SeckillSkuRelationEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 秒杀活动商品关联
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface SeckillSkuRelationService extends IService<SeckillSkuRelationEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,23 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.to.SkuReductionTo;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.SkuFullReductionEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品满减信息
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface SkuFullReductionService extends IService<SkuFullReductionEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
|
||||
void saveSkuReduction(SkuReductionTo to);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.SkuLadderEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品阶梯价格
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface SkuLadderService extends IService<SkuLadderEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
package com.bookstore.bookmall.coupon.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.bookstore.common.utils.PageUtils;
|
||||
import com.bookstore.bookmall.coupon.entity.SpuBoundsEntity;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 商品spu积分设置
|
||||
*
|
||||
* @author dy
|
||||
* @email 2073699128@qq.com
|
||||
* @date 2025-07-10 22:58:13
|
||||
*/
|
||||
public interface SpuBoundsService extends IService<SpuBoundsEntity> {
|
||||
|
||||
PageUtils queryPage(Map<String, Object> params);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue