Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
custom-server
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhonghong
custom-server
Commits
315f36e6
Commit
315f36e6
authored
Jun 11, 2026
by
Lizh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
参照ts迁移商品分页查询page接口
parent
43164dcf
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
499 additions
and
351 deletions
+499
-351
custom-server-app/src/main/java/com/jomalls/custom/app/dto/CustomProductInfoSnakeDTO.java
+6
-0
custom-server-app/src/main/java/com/jomalls/custom/app/enums/CustomProductInfoStatusEnum.java
+2
-2
custom-server-app/src/main/java/com/jomalls/custom/app/service/CustomProductInfoService.java
+10
-7
custom-server-app/src/main/java/com/jomalls/custom/app/service/DbDiyService.java
+9
-9
custom-server-app/src/main/java/com/jomalls/custom/app/service/LogCustomProductService.java
+7
-45
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/CustomProductInfoServiceImpl.java
+0
-0
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/DbDiyServiceImpl.java
+13
-13
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/LogCustomProductServiceImpl.java
+11
-63
custom-server-app/src/main/java/com/jomalls/custom/app/vo/CraftCenterVO.java
+68
-0
custom-server-app/src/main/java/com/jomalls/custom/app/vo/DbDiySnakeVO.java
+70
-72
custom-server-app/src/main/java/com/jomalls/custom/app/vo/DbDiyXiaoguotuSnakeVO.java
+5
-5
custom-server-app/src/main/java/com/jomalls/custom/app/vo/LogCustomProductSnakeVO.java
+5
-5
custom-server-domain/src/main/java/com/jomalls/custom/dal/entity/CraftCenterEntity.java
+78
-0
custom-server-domain/src/main/java/com/jomalls/custom/dal/mapper/CraftCenterMapper.java
+15
-0
custom-server-domain/src/main/java/com/jomalls/custom/dal/mapper/CustomProductInfoMapper.java
+11
-0
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/CraftCenterDomainService.java
+13
-0
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/CustomProductInfoDomainService.java
+9
-0
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/impl/CraftCenterDomainServiceImpl.java
+26
-0
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/impl/CustomProductInfoDomainServiceImpl.java
+6
-0
custom-server-domain/src/main/resources/mapper/CraftCenterMapper.xml
+45
-0
custom-server-domain/src/main/resources/mapper/CustomProductInfoMapper.xml
+11
-0
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/CategoryInfoModel.java
+5
-1
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/PropertyModel.java
+2
-2
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/PropertyValueModel.java
+1
-1
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/service/SaasAdminService.java
+29
-25
custom-server-starter/src/main/java/com/jomalls/custom/config/SecurityInterceptor.java
+1
-1
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/CustomProductInfoController.java
+13
-13
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/DbDiyController.java
+12
-12
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/LogCustomProductController.java
+16
-75
No files found.
custom-server-app/src/main/java/com/jomalls/custom/app/dto/CustomProductInfoSnakeDTO.java
View file @
315f36e6
...
...
@@ -311,6 +311,12 @@ public class CustomProductInfoSnakeDTO extends PageRequest {
@Schema
(
description
=
"工厂 ID 列表"
)
private
List
<
Integer
>
factoryIds
;
/**
* 工厂 ID(单值,用于分页查询过滤 — 通过 product_factory_rel 表查询,对齐 TS factory_id)
*/
@Schema
(
description
=
"工厂 ID(分页过滤用,通过关联表过滤)"
)
private
Integer
factory_id
;
/** 以下为ERP 专用查询字段 */
@Schema
(
description
=
"DIY 模板 SKU 筛选(ERP)"
)
private
String
diySku
;
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/enums/CustomProductInfoStatusEnum.java
View file @
315f36e6
...
...
@@ -65,8 +65,8 @@ public enum CustomProductInfoStatusEnum {
return
Arrays
.
stream
(
values
())
.
map
(
e
->
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"
code
"
,
e
.
code
);
map
.
put
(
"
label
"
,
e
.
label
);
map
.
put
(
"
status
"
,
e
.
code
);
map
.
put
(
"
remark
"
,
e
.
label
);
return
map
;
})
.
collect
(
Collectors
.
toList
());
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/service/CustomProductInfoService.java
View file @
315f36e6
...
...
@@ -5,9 +5,10 @@ import com.jomalls.custom.app.dto.AddBlackListDTO;
import
com.jomalls.custom.app.dto.BindDiyUserDTO
;
import
com.jomalls.custom.app.dto.CustomProductInfoSnakeDTO
;
import
com.jomalls.custom.app.dto.CustomProductInfoUpdateSnakeDTO
;
import
com.jomalls.custom.app.vo.CraftCenterVO
;
import
com.jomalls.custom.app.vo.CustomProductInfoSnakeVO
;
import
com.jomalls.custom.app.vo.CustomProductInfoVO
;
import
com.jomalls.custom.app.vo.DbDiyVO
;
import
com.jomalls.custom.app.vo.DbDiy
Snake
VO
;
import
java.util.List
;
...
...
@@ -19,7 +20,7 @@ import java.util.List;
*/
public
interface
CustomProductInfoService
{
IPage
<
CustomProductInfoVO
>
pageList
(
CustomProductInfoSnakeDTO
param
);
IPage
<
CustomProductInfo
Snake
VO
>
pageList
(
CustomProductInfoSnakeDTO
param
);
/**
* 组合创建商品(SKU 生成 + 事务内写入主表及所有子表)
...
...
@@ -74,7 +75,7 @@ public interface CustomProductInfoService {
* @param id 商品 ID
* @return DIY 模板列表
*/
List
<
DbDiyVO
>
getBindsDiyById
(
Integer
id
);
List
<
DbDiy
Snake
VO
>
getBindsDiyById
(
Integer
id
);
/**
* 获取商品绑定的 DIY 用户 ID 列表
...
...
@@ -93,12 +94,14 @@ public interface CustomProductInfoService {
List
<
Integer
>
getBlackListById
(
Integer
id
);
/**
* 获取商品绑定的工艺 ID 列表
* 获取商品绑定的工艺列表
* <p>
* 对齐 TS getCraftById → getCraftByProductId,返回完整工艺实体而非仅 ID。
*
* @param id 商品 ID
* @return 工艺
ID
列表
* @return 工艺
实体
列表
*/
List
<
Long
>
getCraftById
(
Integer
id
);
List
<
CraftCenterVO
>
getCraftById
(
Integer
id
);
// ==================== ERP 专用接口(对齐 TS) ====================
...
...
@@ -112,5 +115,5 @@ public interface CustomProductInfoService {
/**
* ERP 获取绑定 DIY(对齐 TS getBindsDiyByIdAndUserMark)
*/
List
<
DbDiy
VO
>
getErpBindsDiyById
(
Integer
id
,
String
userMark
,
String
namespace
);
List
<
DbDiy
SnakeVO
>
getBindsDiyByIdAndUserMark
(
Integer
id
,
String
userMark
,
String
namespace
);
}
custom-server-app/src/main/java/com/jomalls/custom/app/service/DbDiyService.java
View file @
315f36e6
...
...
@@ -2,7 +2,7 @@ package com.jomalls.custom.app.service;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jomalls.custom.app.vo.DbDiyPageVO
;
import
com.jomalls.custom.app.vo.DbDiyVO
;
import
com.jomalls.custom.app.vo.DbDiy
Snake
VO
;
import
java.util.List
;
...
...
@@ -17,10 +17,10 @@ public interface DbDiyService {
/**
* 列表查询接口
*
* @param dbDiyVO 条件model
* @param dbDiy
Snake
VO 条件model
* @return list集合
*/
List
<
DbDiy
VO
>
list
(
DbDiyVO
dbDiy
VO
);
List
<
DbDiy
SnakeVO
>
list
(
DbDiySnakeVO
dbDiySnake
VO
);
/**
* 根据条件查询分页列表接口
...
...
@@ -28,7 +28,7 @@ public interface DbDiyService {
* @param dbDiyPageVO 分页入参model
* @return 分页对象
*/
IPage
<
DbDiyVO
>
pageList
(
DbDiyPageVO
dbDiyPageVO
);
IPage
<
DbDiy
Snake
VO
>
pageList
(
DbDiyPageVO
dbDiyPageVO
);
/**
* 根据id查询详情
...
...
@@ -36,21 +36,21 @@ public interface DbDiyService {
* @param id 主键
* @return 实体model
*/
DbDiyVO
info
(
Integer
id
);
DbDiy
Snake
VO
info
(
Integer
id
);
/**
* 保存对象
*
* @param dbDiyVO 保存对象
* @param dbDiy
Snake
VO 保存对象
*/
void
save
(
DbDiy
VO
dbDiy
VO
);
void
save
(
DbDiy
SnakeVO
dbDiySnake
VO
);
/**
* 根据id修改对象
*
* @param dbDiyVO 修改对象
* @param dbDiy
Snake
VO 修改对象
*/
void
updateById
(
DbDiy
VO
dbDiy
VO
);
void
updateById
(
DbDiy
SnakeVO
dbDiySnake
VO
);
/**
* 根据主键ID进行删除
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/service/LogCustomProductService.java
View file @
315f36e6
package
com
.
jomalls
.
custom
.
app
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jomalls.custom.app.vo.LogCustomProductPageVO
;
import
com.jomalls.custom.app.vo.LogCustomProductVO
;
import
com.jomalls.custom.app.vo.LogCustomProductSnakeVO
;
import
java.util.List
;
...
...
@@ -15,49 +13,13 @@ import java.util.List;
public
interface
LogCustomProductService
{
/**
* 列表查询接口
* 根据商品 ID 查询日志列表(对齐 TS list 方法)
* <p>
* 按 product_id 查询所有日志记录,按 id 降序排序。
*
* @param
logCustomProductVO 条件model
* @return
list集合
* @param
productId 商品 ID
* @return
日志列表
*/
List
<
LogCustomProductVO
>
list
(
LogCustomProductVO
logCustomProductVO
);
/**
* 根据条件查询分页列表接口
*
* @param logCustomProductPageVO 分页入参model
* @return 分页对象
*/
IPage
<
LogCustomProductVO
>
pageList
(
LogCustomProductPageVO
logCustomProductPageVO
);
/**
* 根据id查询详情
*
* @param id 主键
* @return 实体model
*/
LogCustomProductVO
info
(
Integer
id
);
/**
* 保存对象
*
* @param logCustomProductVO 保存对象
*/
void
save
(
LogCustomProductVO
logCustomProductVO
);
/**
* 根据id修改对象
*
* @param logCustomProductVO 修改对象
*/
void
updateById
(
LogCustomProductVO
logCustomProductVO
);
/**
* 根据主键ID进行删除
*
* @param id 主键
*/
void
deleteById
(
Integer
id
);
List
<
LogCustomProductSnakeVO
>
getListByProductId
(
Integer
productId
);
}
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/CustomProductInfoServiceImpl.java
View file @
315f36e6
This diff is collapsed.
Click to expand it.
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/DbDiyServiceImpl.java
View file @
315f36e6
...
...
@@ -7,7 +7,7 @@ import com.jomalls.custom.app.service.DbDiyService;
import
com.jomalls.custom.app.utils.BeanMapper
;
import
com.jomalls.custom.app.utils.CustomAsserts
;
import
com.jomalls.custom.app.vo.DbDiyPageVO
;
import
com.jomalls.custom.app.vo.DbDiyVO
;
import
com.jomalls.custom.app.vo.DbDiy
Snake
VO
;
import
com.jomalls.custom.dal.entity.DbDiyEntity
;
import
com.jomalls.custom.domain.service.DbDiyDomainService
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -37,34 +37,34 @@ public class DbDiyServiceImpl implements DbDiyService {
}
@Override
public
List
<
DbDiy
VO
>
list
(
DbDiyVO
dbDiy
VO
)
{
public
List
<
DbDiy
SnakeVO
>
list
(
DbDiySnakeVO
dbDiySnake
VO
)
{
QueryWrapper
<
DbDiyEntity
>
queryWrapper
=
new
QueryWrapper
<>();
// TODO 根据业务条件组装入参
List
<
DbDiyEntity
>
list
=
dbDiyDomainService
.
list
(
queryWrapper
);
return
list
.
stream
().
map
(
e
->
BeanMapper
.
mapper
().
convert
(
e
,
DbDiyVO
.
class
)).
collect
(
Collectors
.
toList
());
return
list
.
stream
().
map
(
e
->
BeanMapper
.
mapper
().
convert
(
e
,
DbDiy
Snake
VO
.
class
)).
collect
(
Collectors
.
toList
());
}
@Override
public
IPage
<
DbDiyVO
>
pageList
(
DbDiyPageVO
dbDiyPageVO
)
{
public
IPage
<
DbDiy
Snake
VO
>
pageList
(
DbDiyPageVO
dbDiyPageVO
)
{
CustomAsserts
.
nonNull
(
dbDiyPageVO
,
"分页查询参数不能为空"
);
QueryWrapper
<
DbDiyEntity
>
queryWrapper
=
new
QueryWrapper
<>();
// TODO 根据业务条件组装入参
IPage
<
DbDiyEntity
>
page
=
dbDiyDomainService
.
selectPage
(
queryWrapper
,
dbDiyPageVO
);
return
page
.
convert
(
e
->
BeanMapper
.
mapper
().
convert
(
e
,
DbDiyVO
.
class
));
return
page
.
convert
(
e
->
BeanMapper
.
mapper
().
convert
(
e
,
DbDiy
Snake
VO
.
class
));
}
@Override
public
DbDiyVO
info
(
Integer
id
)
{
public
DbDiy
Snake
VO
info
(
Integer
id
)
{
CustomAsserts
.
nonNull
(
id
,
"主键id不能为空"
);
DbDiyEntity
dbDiy
=
dbDiyDomainService
.
getById
(
id
);
return
BeanMapper
.
mapper
().
convert
(
dbDiy
,
DbDiyVO
.
class
);
return
BeanMapper
.
mapper
().
convert
(
dbDiy
,
DbDiy
Snake
VO
.
class
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
save
(
DbDiy
VO
dbDiy
VO
)
{
CustomAsserts
.
nonNull
(
dbDiyVO
,
"实体对象不能为空"
);
DbDiyEntity
dbDiyEntity
=
BeanMapper
.
mapper
().
convert
(
dbDiyVO
,
DbDiyEntity
.
class
);
public
void
save
(
DbDiy
SnakeVO
dbDiySnake
VO
)
{
CustomAsserts
.
nonNull
(
dbDiy
Snake
VO
,
"实体对象不能为空"
);
DbDiyEntity
dbDiyEntity
=
BeanMapper
.
mapper
().
convert
(
dbDiy
Snake
VO
,
DbDiyEntity
.
class
);
try
{
dbDiyDomainService
.
save
(
dbDiyEntity
);
}
catch
(
DuplicateKeyException
e
)
{
...
...
@@ -75,9 +75,9 @@ public class DbDiyServiceImpl implements DbDiyService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
updateById
(
DbDiy
VO
dbDiy
VO
)
{
CustomAsserts
.
nonNull
(
dbDiyVO
,
"实体对象不能为空"
);
DbDiyEntity
dbDiy
=
BeanMapper
.
mapper
().
convert
(
dbDiyVO
,
DbDiyEntity
.
class
);
public
void
updateById
(
DbDiy
SnakeVO
dbDiySnake
VO
)
{
CustomAsserts
.
nonNull
(
dbDiy
Snake
VO
,
"实体对象不能为空"
);
DbDiyEntity
dbDiy
=
BeanMapper
.
mapper
().
convert
(
dbDiy
Snake
VO
,
DbDiyEntity
.
class
);
try
{
dbDiyDomainService
.
updateById
(
dbDiy
);
}
catch
(
DuplicateKeyException
e
)
{
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/service/impl/LogCustomProductServiceImpl.java
View file @
315f36e6
package
com
.
jomalls
.
custom
.
app
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jomalls.custom.app.exception.ServiceException
;
import
com.jomalls.custom.app.vo.LogCustomProductPageVO
;
import
com.jomalls.custom.app.vo.LogCustomProductVO
;
import
com.jomalls.custom.app.vo.LogCustomProductSnakeVO
;
import
com.jomalls.custom.app.service.LogCustomProductService
;
import
com.jomalls.custom.app.utils.BeanMapper
;
import
com.jomalls.custom.app.utils.CustomAsserts
;
import
com.jomalls.custom.dal.entity.LogCustomProductEntity
;
import
com.jomalls.custom.domain.service.LogCustomProductDomainService
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
java.util.stream.Collectors
;
...
...
@@ -31,66 +25,20 @@ public class LogCustomProductServiceImpl implements LogCustomProductService {
private
final
LogCustomProductDomainService
logCustomProductDomainService
;
@Autowired
public
LogCustomProductServiceImpl
(
LogCustomProductDomainService
logCustomProductDomainService
)
{
this
.
logCustomProductDomainService
=
logCustomProductDomainService
;
}
@Override
public
List
<
LogCustomProductVO
>
list
(
LogCustomProductVO
logCustomProductVO
)
{
QueryWrapper
<
LogCustomProductEntity
>
queryWrapper
=
new
QueryWrapper
<>();
// TODO 根据业务条件组装入参
List
<
LogCustomProductEntity
>
list
=
logCustomProductDomainService
.
list
(
queryWrapper
);
return
list
.
stream
().
map
(
e
->
BeanMapper
.
mapper
().
convert
(
e
,
LogCustomProductVO
.
class
)).
collect
(
Collectors
.
toList
());
public
List
<
LogCustomProductSnakeVO
>
getListByProductId
(
Integer
productId
)
{
CustomAsserts
.
nonNull
(
productId
,
"商品 ID 不能为空"
);
// 按 product_id 查询所有日志,按 id 降序排列
List
<
LogCustomProductEntity
>
logs
=
logCustomProductDomainService
.
list
(
new
QueryWrapper
<
LogCustomProductEntity
>()
.
eq
(
"product_id"
,
productId
)
.
orderByDesc
(
"id"
));
return
logs
.
stream
()
.
map
(
e
->
BeanMapper
.
snakeCase
().
convert
(
e
,
LogCustomProductSnakeVO
.
class
))
.
collect
(
Collectors
.
toList
());
}
@Override
public
IPage
<
LogCustomProductVO
>
pageList
(
LogCustomProductPageVO
logCustomProductPageVO
)
{
CustomAsserts
.
nonNull
(
logCustomProductPageVO
,
"分页查询参数不能为空"
);
QueryWrapper
<
LogCustomProductEntity
>
queryWrapper
=
new
QueryWrapper
<>();
// TODO 根据业务条件组装入参
IPage
<
LogCustomProductEntity
>
page
=
logCustomProductDomainService
.
selectPage
(
queryWrapper
,
logCustomProductPageVO
);
return
page
.
convert
(
e
->
BeanMapper
.
mapper
().
convert
(
e
,
LogCustomProductVO
.
class
));
}
@Override
public
LogCustomProductVO
info
(
Integer
id
)
{
CustomAsserts
.
nonNull
(
id
,
"主键id不能为空"
);
LogCustomProductEntity
logCustomProduct
=
logCustomProductDomainService
.
getById
(
id
);
return
BeanMapper
.
mapper
().
convert
(
logCustomProduct
,
LogCustomProductVO
.
class
);
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
save
(
LogCustomProductVO
logCustomProductVO
)
{
CustomAsserts
.
nonNull
(
logCustomProductVO
,
"实体对象不能为空"
);
LogCustomProductEntity
logCustomProductEntity
=
BeanMapper
.
mapper
().
convert
(
logCustomProductVO
,
LogCustomProductEntity
.
class
);
try
{
logCustomProductDomainService
.
save
(
logCustomProductEntity
);
}
catch
(
DuplicateKeyException
e
)
{
log
.
info
(
"[ LogCustomProductServiceImpl save ] 实体对象唯一约束重复,请调整后再试!"
,
e
);
throw
new
ServiceException
(
"实体对象唯一约束重复,请调整后再试!"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
updateById
(
LogCustomProductVO
logCustomProductVO
)
{
CustomAsserts
.
nonNull
(
logCustomProductVO
,
"实体对象不能为空"
);
LogCustomProductEntity
logCustomProduct
=
BeanMapper
.
mapper
().
convert
(
logCustomProductVO
,
LogCustomProductEntity
.
class
);
try
{
logCustomProductDomainService
.
updateById
(
logCustomProduct
);
}
catch
(
DuplicateKeyException
e
)
{
log
.
info
(
"[ LogCustomProductServiceImpl updateById ] 实体对象唯一约束重复,请调整后再试!"
,
e
);
throw
new
ServiceException
(
"实体对象唯一约束重复,请调整后再试!"
);
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
void
deleteById
(
Integer
id
)
{
CustomAsserts
.
nonNull
(
id
,
"主键id不能为空"
);
logCustomProductDomainService
.
removeById
(
id
);
}
}
custom-server-app/src/main/java/com/jomalls/custom/app/vo/CraftCenterVO.java
0 → 100644
View file @
315f36e6
package
com
.
jomalls
.
custom
.
app
.
vo
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 工艺中心 VO
* <p>
* 对齐 TS 项目 {@code CraftCenter} 实体字段。
*
* @author Lizh
* @date 2026-06-11
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"工艺中心"
)
public
class
CraftCenterVO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
@Schema
(
description
=
"工艺编号"
)
private
Long
id
;
@Schema
(
description
=
"工艺名称"
)
private
String
craftName
;
@Schema
(
description
=
"工艺英文名称"
)
private
String
craftEnName
;
@Schema
(
description
=
"工艺类型"
)
private
String
craftType
;
@Schema
(
description
=
"工艺编码"
)
private
String
craftCode
;
@Schema
(
description
=
"币种"
)
private
String
currencyCode
;
@Schema
(
description
=
"工艺成本"
)
private
String
craftCost
;
@Schema
(
description
=
"其他面的价格"
)
private
String
otherSideCost
;
@Schema
(
description
=
"是否启用"
)
private
Boolean
craftEnable
;
@Schema
(
description
=
"是否在ERP显示"
)
private
Boolean
erpDisplay
;
@Schema
(
description
=
"国家代码"
)
private
String
countryCode
;
@Schema
(
description
=
"创建时间"
)
private
Date
createTime
;
@Schema
(
description
=
"修改时间"
)
private
Date
updateTime
;
}
custom-server-app/src/main/java/com/jomalls/custom/app/vo/DbDiyVO.java
→
custom-server-app/src/main/java/com/jomalls/custom/app/vo/DbDiy
Snake
VO.java
View file @
315f36e6
package
com
.
jomalls
.
custom
.
app
.
vo
;
import
com.jomalls.custom.page.PageRequest
;
import
io.swagger.v3.core.util.Json
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.*
;
...
...
@@ -22,7 +21,7 @@ import java.util.List;
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"VO"
)
public
class
DbDiyVO
implements
Serializable
{
public
class
DbDiy
Snake
VO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -48,7 +47,7 @@ public class DbDiyVO implements Serializable {
* 英文名称
*/
@Schema
(
description
=
"英文名称"
)
private
String
en
N
ame
;
private
String
en
_n
ame
;
/**
* 排序
...
...
@@ -60,13 +59,13 @@ public class DbDiyVO implements Serializable {
* diy主图
*/
@Schema
(
description
=
"diy主图"
)
private
String
img
U
rl
;
private
String
img
_u
rl
;
/**
* 图片集合,逗号分割
*/
@Schema
(
description
=
"图片集合,逗号分割"
)
private
String
img
A
rr
;
private
String
img
_a
rr
;
/**
* 编码
...
...
@@ -90,13 +89,13 @@ public class DbDiyVO implements Serializable {
* 1 svgToJpg 2 svgToSvg 3 svgToTiff 4 svgToPng 4 5 psdToJpg
*/
@Schema
(
description
=
"1 svgToJpg 2 svgToSvg 3 svgToTiff 4 svgToPng 4 5 psdToJpg"
)
private
Integer
sc
ImgT
ype
;
private
Integer
sc
_img_t
ype
;
/**
* 是否立即生成尺码 0 不生成 1 立即生成全部尺码
*/
@Schema
(
description
=
"是否立即生成尺码 0 不生成 1 立即生成全部尺码"
)
private
Integer
chima
NowR
ender
;
private
Integer
chima
_now_r
ender
;
/**
* 状态 1 服务器渲染 2 前台渲染
...
...
@@ -108,25 +107,37 @@ public class DbDiyVO implements Serializable {
* DbDiy 父级值 可以用于绑定
*/
@Schema
(
description
=
"DbDiy 父级值 可以用于绑定"
)
private
Integer
parentId
;
private
Integer
parent_id
;
/**
* 默认值 选择的产品
*/
@Schema
(
description
=
"默认值 选择的产品"
)
private
Integer
default_diy_id
;
/**
* 存放的user ids
*/
@Schema
(
description
=
"存放的user ids"
)
private
String
user
I
ds
;
private
String
user
_i
ds
;
/**
* 不允许查看的用户
*/
@Schema
(
description
=
"不允许查看的用户"
)
private
String
ban
UserI
ds
;
private
String
ban
_user_i
ds
;
/**
* diy分类ID
*/
@Schema
(
description
=
"diy分类ID"
)
private
Integer
typeId
;
private
Integer
type_id
;
/**
* 工厂/供应商id
*/
@Schema
(
description
=
"工厂/供应商id"
)
private
Integer
factory_id
;
/**
* 状态 0 已下架 1 已上架 20 待上架 40 建模完成 50 多变体完善 60 产前测试 70 建模中 75 待确认 80 待分派 85 打板中 90 待审核 9 软删除
...
...
@@ -138,25 +149,7 @@ public class DbDiyVO implements Serializable {
*
*/
@Schema
(
description
=
""
)
private
Date
createDate
;
/**
* 默认值 选择的产品
*/
@Schema
(
description
=
"默认值 选择的产品"
)
private
Integer
defaultDiyId
;
/**
* 工厂/供应商id
*/
@Schema
(
description
=
"工厂/供应商id"
)
private
Integer
factoryId
;
/**
* 印花类型 0满印 1局部印
*/
@Schema
(
description
=
"印花类型 0满印 1局部印"
)
private
Integer
printType
;
private
Date
create_date
;
/**
* 材质
...
...
@@ -165,28 +158,10 @@ public class DbDiyVO implements Serializable {
private
String
material
;
/**
* 工艺id
*/
@Schema
(
description
=
"工艺id"
)
private
Long
craftId
;
/**
* 最低价格
*/
@Schema
(
description
=
"最低价格"
)
private
BigDecimal
minPrice
;
/**
* 最高价格
*/
@Schema
(
description
=
"最高价格"
)
private
BigDecimal
maxPrice
;
/**
* 图片是否创建缩略图 1已创建 0未创建(临时字段)
*/
@Schema
(
description
=
"图片是否创建缩略图 1已创建 0未创建(临时字段)"
)
private
Boolean
picture
S
tatus
;
private
Boolean
picture
_s
tatus
;
/**
* 备注信息
...
...
@@ -204,49 +179,49 @@ public class DbDiyVO implements Serializable {
* 审核人id
*/
@Schema
(
description
=
"审核人id"
)
private
Integer
audit
I
d
;
private
Integer
audit
_i
d
;
/**
* 审核人名称
*/
@Schema
(
description
=
"审核人名称"
)
private
String
audit
N
ame
;
private
String
audit
_n
ame
;
/**
* 审核时间
*/
@Schema
(
description
=
"审核时间"
)
private
Date
audit
D
ate
;
private
Date
audit
_d
ate
;
/**
* 上架时间
*/
@Schema
(
description
=
"上架时间"
)
private
Date
shelf
D
ate
;
private
Date
shelf
_d
ate
;
/**
* 关联信息模板ID
*/
@Schema
(
description
=
"关联信息模板ID"
)
private
Integer
template
I
d
;
private
Integer
template
_i
d
;
/**
* 关联信息模板类别ID
*/
@Schema
(
description
=
"关联信息模板类别ID"
)
private
Integer
category
I
d
;
private
Integer
category
_i
d
;
/**
* 分派人ID
*/
@Schema
(
description
=
"分派人ID"
)
private
Integer
allocation
I
d
;
private
Integer
allocation
_i
d
;
/**
* 分派人名称
*/
@Schema
(
description
=
"分派人名称"
)
private
String
allocation
N
ame
;
private
String
allocation
_n
ame
;
/**
* 是否加急处理 0否 1是
...
...
@@ -258,19 +233,31 @@ public class DbDiyVO implements Serializable {
* 绑定模型id集合
*/
@Schema
(
description
=
"绑定模型id集合"
)
private
String
bind
DiyI
ds
;
private
String
bind
_diy_i
ds
;
/**
* 是否被绑定
*/
@Schema
(
description
=
"是否被绑定"
)
private
Boolean
isBind
;
private
Boolean
is_bind
;
/**
* 模备注
*/
@Schema
(
description
=
"模备注"
)
private
String
diy_remark
;
/**
* 是否新版模
*/
@Schema
(
description
=
"是否新版模"
)
private
Boolean
new_standard
;
/**
* 是否由美国生产 默认为false
*/
@Schema
(
description
=
"是否由美国生产 默认为false"
)
private
Boolean
usa
M
ade
;
private
Boolean
usa
_m
ade
;
/**
* 厂商
...
...
@@ -282,7 +269,13 @@ public class DbDiyVO implements Serializable {
* 款号
*/
@Schema
(
description
=
"款号"
)
private
String
styleNum
;
private
String
style_num
;
/**
* 印花类型 0满印 1局部印
*/
@Schema
(
description
=
"印花类型 0满印 1局部印"
)
private
Integer
printType
;
/**
* 模类型 0公模 1私模
...
...
@@ -294,34 +287,39 @@ public class DbDiyVO implements Serializable {
* 生产终端
*/
@Schema
(
description
=
"生产终端"
)
private
String
production
C
lient
;
private
String
production
_c
lient
;
/**
* erp的颜色尺码
*/
@Schema
(
description
=
"erp的颜色尺码"
)
private
Json
erp
SkuP
roperties
;
private
Json
erp
_sku_p
roperties
;
/**
* 推送需求的人
*/
@Schema
(
description
=
"推送需求的人"
)
private
String
push
U
ser
;
private
String
push
_u
ser
;
/**
*
是否新版模
*
最低价格
*/
@Schema
(
description
=
"
是否新版模
"
)
private
B
oolean
newStandard
;
@Schema
(
description
=
"
最低价格
"
)
private
B
igDecimal
min_price
;
/**
*
模备注
*
最高价格
*/
@Schema
(
description
=
"
模备注
"
)
private
String
diyRemark
;
@Schema
(
description
=
"
最高价格
"
)
private
BigDecimal
max_price
;
@Schema
(
description
=
"效果图列表"
)
private
List
<
DbDiyXiaoguotuVO
>
xiaoguotuList
;
/**
* 工艺id
*/
@Schema
(
description
=
"工艺id"
)
private
Long
craft_id
;
@Schema
(
description
=
"效果图列表"
)
private
List
<
DbDiyXiaoguotuSnakeVO
>
xiaoguotuList
;
}
custom-server-app/src/main/java/com/jomalls/custom/app/vo/DbDiyXiaoguotuVO.java
→
custom-server-app/src/main/java/com/jomalls/custom/app/vo/DbDiyXiaoguotu
Snake
VO.java
View file @
315f36e6
...
...
@@ -20,7 +20,7 @@ import java.io.Serializable;
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"DIY 效果图"
)
public
class
DbDiyXiaoguotuVO
implements
Serializable
{
public
class
DbDiyXiaoguotu
Snake
VO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -35,13 +35,13 @@ public class DbDiyXiaoguotuVO implements Serializable {
private
Integer
idx
;
@Schema
(
description
=
"效果图主图"
)
private
String
img
U
rl
;
private
String
img
_u
rl
;
@Schema
(
description
=
"PSD 链接"
)
private
String
psd
U
rl
;
private
String
psd
_u
rl
;
@Schema
(
description
=
"颜色 ID"
)
private
Integer
color
I
d
;
private
Integer
color
_i
d
;
@Schema
(
description
=
"宽度"
)
private
Float
width
;
...
...
@@ -53,7 +53,7 @@ public class DbDiyXiaoguotuVO implements Serializable {
private
Integer
dpi
;
@Schema
(
description
=
"关联的 DIY 模板 ID"
)
private
Integer
diy
I
d
;
private
Integer
diy
_i
d
;
@Schema
(
description
=
"状态:1 正常 0 禁用"
)
private
Integer
status
;
...
...
custom-server-app/src/main/java/com/jomalls/custom/app/vo/LogCustomProductVO.java
→
custom-server-app/src/main/java/com/jomalls/custom/app/vo/LogCustomProduct
Snake
VO.java
View file @
315f36e6
...
...
@@ -21,7 +21,7 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"VO"
)
public
class
LogCustomProductVO
implements
Serializable
{
public
class
LogCustomProduct
Snake
VO
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -35,19 +35,19 @@ public class LogCustomProductVO implements Serializable {
* 商品id(custom_product_info表id)
*/
@Schema
(
description
=
"商品id(custom_product_info表id)"
)
private
Integer
product
I
d
;
private
Integer
product
_i
d
;
/**
* 操作人id
*/
@Schema
(
description
=
"操作人id"
)
private
Integer
employee
I
d
;
private
Integer
employee
_i
d
;
/**
* 操作人账号
*/
@Schema
(
description
=
"操作人账号"
)
private
String
employee
A
ccount
;
private
String
employee
_a
ccount
;
/**
* 操作描述
...
...
@@ -59,7 +59,7 @@ public class LogCustomProductVO implements Serializable {
* 创建时间
*/
@Schema
(
description
=
"创建时间"
)
private
Date
create
T
ime
;
private
Date
create
_t
ime
;
}
custom-server-domain/src/main/java/com/jomalls/custom/dal/entity/CraftCenterEntity.java
0 → 100644
View file @
315f36e6
package
com
.
jomalls
.
custom
.
dal
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
lombok.Data
;
import
java.io.Serial
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 工艺中心实体
* <p>
* 对齐 TS 项目 {@code CraftCenter} 实体(craft_center 表)。
*
* @author Lizh
* @date 2026-06-11
*/
@Data
@TableName
(
"craft_center"
)
public
class
CraftCenterEntity
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
/** 工艺编号 */
@TableId
(
value
=
"id"
,
type
=
IdType
.
AUTO
)
private
Long
id
;
/** 工艺名称 */
@TableField
(
"craft_name"
)
private
String
craftName
;
/** 工艺英文名称 */
@TableField
(
"craft_en_name"
)
private
String
craftEnName
;
/** 工艺类型 */
@TableField
(
"craft_type"
)
private
String
craftType
;
/** 工艺编码 */
@TableField
(
"craft_code"
)
private
String
craftCode
;
/** 币种 */
@TableField
(
"currency_code"
)
private
String
currencyCode
;
/** 工艺成本 */
@TableField
(
"craft_cost"
)
private
String
craftCost
;
/** 其他面的价格 */
@TableField
(
"other_side_cost"
)
private
String
otherSideCost
;
/** 是否启用(1启用,0未启用) */
@TableField
(
"craft_enable"
)
private
Boolean
craftEnable
;
/** 是否在ERP显示 */
@TableField
(
"erp_display"
)
private
Boolean
erpDisplay
;
/** 国家代码 */
@TableField
(
"country_code"
)
private
String
countryCode
;
/** 创建时间 */
@TableField
(
"create_time"
)
private
Date
createTime
;
/** 修改时间 */
@TableField
(
"update_time"
)
private
Date
updateTime
;
}
custom-server-domain/src/main/java/com/jomalls/custom/dal/mapper/CraftCenterMapper.java
0 → 100644
View file @
315f36e6
package
com
.
jomalls
.
custom
.
dal
.
mapper
;
import
com.jomalls.custom.dal.entity.CraftCenterEntity
;
import
com.jomalls.custom.mapper.BaseMapper
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* 工艺中心 Mapper
*
* @author Lizh
* @date 2026-06-11
*/
@Mapper
public
interface
CraftCenterMapper
extends
BaseMapper
<
CraftCenterEntity
>
{
}
custom-server-domain/src/main/java/com/jomalls/custom/dal/mapper/CustomProductInfoMapper.java
View file @
315f36e6
...
...
@@ -35,4 +35,15 @@ public interface CustomProductInfoMapper extends BaseMapper<CustomProductInfoEnt
* @return 符合条件的商品 ID 列表(已去重)
*/
List
<
Integer
>
selectIdsByErpPermission
(
@Param
(
"userId"
)
Integer
userId
);
/**
* 查询无任何 diy_user 绑定的商品 ID 列表
* <p>
* 对齐 TS page diyUserId=-1 时的原生 SQL(TS:287-295)。
* 使用 LEFT JOIN + WHERE IS NULL 语义:
* 找到所有在 custom_product_diy_user_rel 表中无关联记录的商品。
*
* @return 无绑定的商品 ID 列表(已去重)
*/
List
<
Integer
>
selectIdsWithoutDiyUserBind
();
}
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/CraftCenterDomainService.java
0 → 100644
View file @
315f36e6
package
com
.
jomalls
.
custom
.
domain
.
service
;
import
com.jomalls.custom.dal.entity.CraftCenterEntity
;
import
com.jomalls.custom.service.IBaseService
;
/**
* 工艺中心 Domain Service 接口
*
* @author Lizh
* @date 2026-06-11
*/
public
interface
CraftCenterDomainService
extends
IBaseService
<
CraftCenterEntity
>
{
}
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/CustomProductInfoDomainService.java
View file @
315f36e6
...
...
@@ -28,5 +28,14 @@ public interface CustomProductInfoDomainService extends IBaseService<CustomProdu
* @return 符合条件的商品 ID 列表(已去重)
*/
List
<
Integer
>
selectIdsByErpPermission
(
Integer
userId
);
/**
* 查询无任何 diy_user 绑定的商品 ID 列表
* <p>
* LEFT JOIN + WHERE IS NULL,对齐 TS page diyUserId=-1 逻辑。
*
* @return 无绑定的商品 ID 列表(已去重)
*/
List
<
Integer
>
selectIdsWithoutDiyUserBind
();
}
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/impl/CraftCenterDomainServiceImpl.java
0 → 100644
View file @
315f36e6
package
com
.
jomalls
.
custom
.
domain
.
service
.
impl
;
import
com.jomalls.custom.dal.mapper.CraftCenterMapper
;
import
com.jomalls.custom.dal.entity.CraftCenterEntity
;
import
com.jomalls.custom.domain.service.CraftCenterDomainService
;
import
com.jomalls.custom.service.impl.BaseServiceImpl
;
import
org.apache.ibatis.session.SqlSessionFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* 工艺中心 Domain Service 实现
*
* @author Lizh
* @date 2026-06-11
*/
@Service
public
class
CraftCenterDomainServiceImpl
extends
BaseServiceImpl
<
CraftCenterMapper
,
CraftCenterEntity
>
implements
CraftCenterDomainService
{
@Autowired
public
CraftCenterDomainServiceImpl
(
SqlSessionFactory
sqlSessionFactory
)
{
super
(
sqlSessionFactory
);
}
}
custom-server-domain/src/main/java/com/jomalls/custom/domain/service/impl/CustomProductInfoDomainServiceImpl.java
View file @
315f36e6
...
...
@@ -35,4 +35,9 @@ public class CustomProductInfoDomainServiceImpl extends BaseServiceImpl<CustomPr
public
List
<
Integer
>
selectIdsByErpPermission
(
Integer
userId
)
{
return
baseMapper
.
selectIdsByErpPermission
(
userId
);
}
@Override
public
List
<
Integer
>
selectIdsWithoutDiyUserBind
()
{
return
baseMapper
.
selectIdsWithoutDiyUserBind
();
}
}
\ No newline at end of file
custom-server-domain/src/main/resources/mapper/CraftCenterMapper.xml
0 → 100644
View file @
315f36e6
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.jomalls.custom.dal.mapper.CraftCenterMapper"
>
<resultMap
type=
"com.jomalls.custom.dal.entity.CraftCenterEntity"
id=
"craftCenterMap"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"craftName"
column=
"craft_name"
/>
<result
property=
"craftEnName"
column=
"craft_en_name"
/>
<result
property=
"craftType"
column=
"craft_type"
/>
<result
property=
"craftCode"
column=
"craft_code"
/>
<result
property=
"currencyCode"
column=
"currency_code"
/>
<result
property=
"craftCost"
column=
"craft_cost"
/>
<result
property=
"otherSideCost"
column=
"other_side_cost"
/>
<result
property=
"craftEnable"
column=
"craft_enable"
/>
<result
property=
"erpDisplay"
column=
"erp_display"
/>
<result
property=
"countryCode"
column=
"country_code"
/>
<result
property=
"createTime"
column=
"create_time"
/>
<result
property=
"updateTime"
column=
"update_time"
/>
</resultMap>
<sql
id=
"tableColumns"
>
id,
craft_name,
craft_en_name,
craft_type,
craft_code,
currency_code,
craft_cost,
other_side_cost,
craft_enable,
erp_display,
country_code,
create_time,
update_time
</sql>
<!-- 批量插入 -->
<insert
id=
"insertBatchSomeColumn"
>
INSERT INTO craft_center (craft_name, craft_en_name, craft_type, craft_code, currency_code, craft_cost, other_side_cost, craft_enable, erp_display, country_code, create_time, update_time) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(#{item.craftName}, #{item.craftEnName}, #{item.craftType}, #{item.craftCode}, #{item.currencyCode}, #{item.craftCost}, #{item.otherSideCost}, #{item.craftEnable}, #{item.erpDisplay}, #{item.countryCode}, #{item.createTime}, #{item.updateTime})
</foreach>
</insert>
</mapper>
custom-server-domain/src/main/resources/mapper/CustomProductInfoMapper.xml
View file @
315f36e6
...
...
@@ -105,6 +105,17 @@
AND (rel.diy_user_id = #{userId} OR rel.diy_user_id IS NULL)
</select>
<!-- 查询无任何 diy_user 绑定的商品 ID 列表 -->
<!-- 对齐 TS page 中的原生 SQL(TS:287-295)
LEFT JOIN + WHERE IS NULL 语义:
找到所有 custom_product_diy_user_rel 表中无关联记录的商品 -->
<select
id=
"selectIdsWithoutDiyUserBind"
resultType=
"java.lang.Integer"
>
SELECT DISTINCT info.id
FROM custom_product_info info
LEFT JOIN custom_product_diy_user_rel rel ON rel.product_id = info.id
WHERE rel.diy_user_id IS NULL
</select>
<!-- 批量插入 -->
<insert
id=
"insertBatchSomeColumn"
>
INSERT INTO custom_product_info (sku, title, name, img_url, category_id, weight, purchasing_min, factory_price, sales_price, sales_price_max, status, property1_cate_id, property2_cate_id, property3_cate_id, property1_enname, property2_enname, property3_enname, color_images, material, print_type, product_no, origin_code, origin_name_cn, origin_name_en, currency_code, currency_name, product_type, factory_id, factory_code, processing, create_time, update_time, sort, diy_id, diy_sku) VALUES
...
...
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/
Base
CategoryInfoModel.java
→
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/CategoryInfoModel.java
View file @
315f36e6
package
com
.
jomalls
.
custom
.
integrate
.
model
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
...
...
@@ -20,7 +21,7 @@ import java.util.Date;
@NoArgsConstructor
@AllArgsConstructor
@Schema
(
description
=
"商品分类"
)
public
class
Base
CategoryInfoModel
implements
Serializable
{
public
class
CategoryInfoModel
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -53,6 +54,9 @@ public class BaseCategoryInfoModel implements Serializable {
private
Boolean
leaf
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
createTime
;
private
Boolean
publicData
;
}
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/
Base
PropertyModel.java
→
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/PropertyModel.java
View file @
315f36e6
...
...
@@ -16,7 +16,7 @@ import java.util.List;
* @date 2026-06-08
*/
@Data
public
class
Base
PropertyModel
implements
Serializable
{
public
class
PropertyModel
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
...
...
@@ -47,7 +47,7 @@ public class BasePropertyModel implements Serializable {
/** 属性值列表 */
@JsonProperty
(
"valueList"
)
private
List
<
Base
PropertyValueModel
>
valueList
;
private
List
<
PropertyValueModel
>
valueList
;
/** 是否公共数据 */
private
Boolean
publicData
;
...
...
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/
Base
PropertyValueModel.java
→
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/model/PropertyValueModel.java
View file @
315f36e6
...
...
@@ -12,7 +12,7 @@ import java.io.Serializable;
* @date 2026-06-08
*/
@Data
public
class
Base
PropertyValueModel
implements
Serializable
{
public
class
PropertyValueModel
implements
Serializable
{
@Serial
private
static
final
long
serialVersionUID
=
1L
;
...
...
custom-server-integrate/src/main/java/com/jomalls/custom/integrate/service/SaasAdminService.java
View file @
315f36e6
...
...
@@ -2,8 +2,8 @@ package com.jomalls.custom.integrate.service;
import
com.jomalls.custom.enums.CodeEnum
;
import
com.jomalls.custom.integrate.client.RemoteApiClient
;
import
com.jomalls.custom.integrate.model.
Base
CategoryInfoModel
;
import
com.jomalls.custom.integrate.model.
Base
PropertyModel
;
import
com.jomalls.custom.integrate.model.CategoryInfoModel
;
import
com.jomalls.custom.integrate.model.PropertyModel
;
import
com.jomalls.custom.integrate.model.SaasAdminApiResponseModel
;
import
com.jomalls.custom.security.LoginUser
;
import
com.jomalls.custom.security.SecurityUtils
;
...
...
@@ -67,27 +67,27 @@ public class SaasAdminService {
* @param ids 属性 ID,逗号分隔(如 "1,2,3")
* @return 属性列表,包含 valueList 和 skuProperty 等字段
*/
public
List
<
Base
PropertyModel
>
getPropertyByIds
(
String
ids
)
{
public
List
<
PropertyModel
>
getPropertyByIds
(
String
ids
)
{
if
(!
StringUtils
.
hasText
(
ids
))
{
return
Collections
.
emptyList
();
}
try
{
String
url
=
adminBaseUrl
+
GET_PROPERTY_BY_IDS_URL
+
"?ids="
+
ids
;
ResponseEntity
<
SaasAdminApiResponseModel
<
List
<
Base
PropertyModel
>>>
response
=
remoteApiClient
.
get
(
ResponseEntity
<
SaasAdminApiResponseModel
<
List
<
PropertyModel
>>>
response
=
remoteApiClient
.
get
(
url
,
new
ParameterizedTypeReference
<>()
{},
getHeader
());
if
(
response
!=
null
&&
response
.
getBody
()
!=
null
)
{
log
.
debug
(
"[
BasePropertyService ] getByIds 成功, ids={}, 返回 {} 条
"
,
ids
,
response
.
toString
());
SaasAdminApiResponseModel
<
List
<
Base
PropertyModel
>>
responseBody
=
response
.
getBody
();
log
.
debug
(
"[
SaasAdminService ] getByIds 成功, ids={}, 返回: {}
"
,
ids
,
response
.
toString
());
SaasAdminApiResponseModel
<
List
<
PropertyModel
>>
responseBody
=
response
.
getBody
();
if
(
responseBody
.
getCode
()
==
CodeEnum
.
SUCCESS
.
getCode
())
{
return
responseBody
.
getData
();
}
}
log
.
warn
(
"[
BaseProperty
Service ] getByIds 返回空, ids={}"
,
ids
);
log
.
warn
(
"[
SaasAdmin
Service ] getByIds 返回空, ids={}"
,
ids
);
return
Collections
.
emptyList
();
}
catch
(
Exception
e
)
{
log
.
error
(
"[
BaseProperty
Service ] getByIds 调用失败, ids={}"
,
ids
,
e
);
log
.
error
(
"[
SaasAdmin
Service ] getByIds 调用失败, ids={}"
,
ids
,
e
);
return
Collections
.
emptyList
();
}
}
...
...
@@ -96,9 +96,9 @@ public class SaasAdminService {
* <p>
* 对齐 TS {@code getTree()}
*/
public
List
<
Base
CategoryInfoModel
>
getTree
()
{
public
List
<
CategoryInfoModel
>
getTree
()
{
try
{
ResponseEntity
<
List
<
Base
CategoryInfoModel
>>
response
=
remoteApiClient
.
get
(
ResponseEntity
<
List
<
CategoryInfoModel
>>
response
=
remoteApiClient
.
get
(
adminBaseUrl
+
GET_TREE_URL
,
new
ParameterizedTypeReference
<>()
{},
getHeader
());
...
...
@@ -106,7 +106,7 @@ public class SaasAdminService {
return
response
.
getBody
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"[
BaseCategoryInfo
Service ] getTree 调用失败"
,
e
);
log
.
error
(
"[
SaasAdmin
Service ] getTree 调用失败"
,
e
);
}
return
Collections
.
emptyList
();
}
...
...
@@ -116,13 +116,13 @@ public class SaasAdminService {
* <p>
* 对齐 TS {@code getByIds(ids)}
*/
public
List
<
Base
CategoryInfoModel
>
getByIds
(
String
ids
)
{
public
List
<
CategoryInfoModel
>
getByIds
(
String
ids
)
{
if
(
ids
==
null
||
ids
.
isEmpty
())
{
return
Collections
.
emptyList
();
}
try
{
String
url
=
adminBaseUrl
+
GET_BY_IDS_URL
+
"?ids="
+
ids
;
ResponseEntity
<
List
<
Base
CategoryInfoModel
>>
response
=
remoteApiClient
.
get
(
ResponseEntity
<
List
<
CategoryInfoModel
>>
response
=
remoteApiClient
.
get
(
url
,
new
ParameterizedTypeReference
<>()
{},
getHeader
());
...
...
@@ -130,7 +130,7 @@ public class SaasAdminService {
return
response
.
getBody
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"[
BaseCategoryInfo
Service ] getByIds 调用失败, ids={}"
,
ids
,
e
);
log
.
error
(
"[
SaasAdmin
Service ] getByIds 调用失败, ids={}"
,
ids
,
e
);
}
return
Collections
.
emptyList
();
}
...
...
@@ -140,9 +140,9 @@ public class SaasAdminService {
* <p>
* 对齐 TS {@code treeList()}
*/
public
List
<
Base
CategoryInfoModel
>
treeList
()
{
public
List
<
CategoryInfoModel
>
treeList
()
{
try
{
ResponseEntity
<
List
<
Base
CategoryInfoModel
>>
response
=
remoteApiClient
.
get
(
ResponseEntity
<
List
<
CategoryInfoModel
>>
response
=
remoteApiClient
.
get
(
adminBaseUrl
+
GET_TREE_URL
,
new
ParameterizedTypeReference
<>()
{},
getHeader
());
...
...
@@ -150,7 +150,7 @@ public class SaasAdminService {
return
response
.
getBody
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"[
BaseCategoryInfo
Service ] treeList 调用失败"
,
e
);
log
.
error
(
"[
SaasAdmin
Service ] treeList 调用失败"
,
e
);
}
return
Collections
.
emptyList
();
}
...
...
@@ -160,19 +160,19 @@ public class SaasAdminService {
* <p>
* 对齐 TS {@code getById(id)}
*/
public
Base
CategoryInfoModel
getById
(
Integer
id
)
{
public
CategoryInfoModel
getById
(
Integer
id
)
{
if
(
id
==
null
)
{
return
null
;
}
try
{
String
url
=
adminBaseUrl
+
GET_BY_ID_URL
+
"?id="
+
id
;
ResponseEntity
<
Base
CategoryInfoModel
>
response
=
remoteApiClient
.
get
(
url
,
Base
CategoryInfoModel
.
class
,
null
);
ResponseEntity
<
CategoryInfoModel
>
response
=
remoteApiClient
.
get
(
url
,
CategoryInfoModel
.
class
,
null
);
if
(
response
!=
null
)
{
return
response
.
getBody
();
}
}
catch
(
Exception
e
)
{
log
.
error
(
"[
BaseCategoryInfo
Service ] getById 调用失败, id={}"
,
id
,
e
);
log
.
error
(
"[
SaasAdmin
Service ] getById 调用失败, id={}"
,
id
,
e
);
}
return
null
;
}
...
...
@@ -182,17 +182,21 @@ public class SaasAdminService {
* <p>
* 对齐 TS {@code allList()}
*/
public
List
<
Base
CategoryInfoModel
>
getAllList
()
{
public
List
<
CategoryInfoModel
>
getAllList
()
{
try
{
ResponseEntity
<
List
<
BaseCategoryInfoModel
>>
response
=
remoteApiClient
.
get
(
ResponseEntity
<
SaasAdminApiResponseModel
<
List
<
CategoryInfoModel
>
>>
response
=
remoteApiClient
.
get
(
adminBaseUrl
+
GET_ALL_LIST_URL
,
new
ParameterizedTypeReference
<>()
{},
getHeader
());
if
(
response
!=
null
&&
response
.
getBody
()
!=
null
)
{
return
response
.
getBody
();
log
.
debug
(
"[ SaasAdminService ] getAllList 成功, 返回: {}"
,
response
.
toString
());
SaasAdminApiResponseModel
<
List
<
CategoryInfoModel
>>
responseBody
=
response
.
getBody
();
if
(
responseBody
.
getCode
()
==
CodeEnum
.
SUCCESS
.
getCode
())
{
return
responseBody
.
getData
();
}
}
}
catch
(
Exception
e
)
{
log
.
error
(
"[
BaseCategoryInfo
Service ] getAllList 调用失败"
,
e
);
log
.
error
(
"[
SaasAdmin
Service ] getAllList 调用失败"
,
e
);
}
return
Collections
.
emptyList
();
}
...
...
custom-server-starter/src/main/java/com/jomalls/custom/config/SecurityInterceptor.java
View file @
315f36e6
...
...
@@ -59,8 +59,8 @@ public class SecurityInterceptor implements HandlerInterceptor {
return
true
;
}
else
{
log
.
warn
(
"用户[{}]token已过期,请求URI: {}"
,
loginUser
.
getUsername
(),
request
.
getRequestURI
());
throw
new
InvalidTokenException
(
CodeEnum
.
UNAUTHORIZED
.
getCode
(),
"未登录或登录已过期"
);
}
return
false
;
}
/**
...
...
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/CustomProductInfoController.java
View file @
315f36e6
...
...
@@ -9,7 +9,8 @@ import com.jomalls.custom.app.enums.CustomProductInfoStatusEnum;
import
com.jomalls.custom.app.service.CustomProductInfoService
;
import
com.jomalls.custom.app.vo.CustomProductInfoSnakeVO
;
import
com.jomalls.custom.app.vo.CustomProductInfoVO
;
import
com.jomalls.custom.app.vo.DbDiyVO
;
import
com.jomalls.custom.app.vo.CraftCenterVO
;
import
com.jomalls.custom.app.vo.DbDiySnakeVO
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -37,12 +38,6 @@ public class CustomProductInfoController {
@Autowired
private
CustomProductInfoService
customProductInfoService
;
@Operation
(
summary
=
"分页列表接口"
,
description
=
"根据条件查询分页列表接口"
)
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
POST
)
public
IPage
<
CustomProductInfoVO
>
pageList
(
@RequestBody
CustomProductInfoSnakeDTO
param
)
{
return
customProductInfoService
.
pageList
(
param
);
}
@Operation
(
summary
=
"创建商品"
,
description
=
"创建商品"
)
@PostMapping
(
"/create"
)
public
void
create
(
@RequestBody
@Valid
CustomProductInfoSnakeDTO
dto
)
{
...
...
@@ -64,6 +59,12 @@ public class CustomProductInfoController {
return
customProductInfoService
.
getByIdOrSku
(
id
,
sku
,
namespace
);
}
@Operation
(
summary
=
"分页列表接口"
,
description
=
"根据条件查询分页列表接口"
)
@RequestMapping
(
value
=
"/page"
,
method
=
RequestMethod
.
POST
)
public
IPage
<
CustomProductInfoSnakeVO
>
pageList
(
@RequestBody
CustomProductInfoSnakeDTO
param
)
{
return
customProductInfoService
.
pageList
(
param
);
}
@Operation
(
summary
=
"获取状态列表"
,
description
=
"返回所有商品状态枚举"
)
@GetMapping
(
"/getStatusList"
)
public
List
<
Map
<
String
,
Object
>>
getStatusList
()
{
...
...
@@ -81,7 +82,7 @@ public class CustomProductInfoController {
@Operation
(
summary
=
"获取绑定的模型"
,
description
=
"获取商品绑定的 DIY 模板列表"
)
@GetMapping
(
"/getBindsDiyById"
)
public
List
<
DbDiyVO
>
getBindsDiyById
(
@Parameter
(
description
=
"商品 ID"
)
@RequestParam
Integer
id
)
{
public
List
<
DbDiy
Snake
VO
>
getBindsDiyById
(
@Parameter
(
description
=
"商品 ID"
)
@RequestParam
Integer
id
)
{
return
customProductInfoService
.
getBindsDiyById
(
id
);
}
...
...
@@ -109,13 +110,12 @@ public class CustomProductInfoController {
customProductInfoService
.
addBlackList
(
dto
);
}
@Operation
(
summary
=
"获取绑定的工艺"
,
description
=
"获取商品绑定的工艺
ID
列表"
)
@Operation
(
summary
=
"获取绑定的工艺"
,
description
=
"获取商品绑定的工艺
实体
列表"
)
@GetMapping
(
"/getCraftById"
)
public
List
<
Long
>
getCraftById
(
@Parameter
(
description
=
"商品 ID"
)
@RequestParam
Integer
id
)
{
public
List
<
CraftCenterVO
>
getCraftById
(
@Parameter
(
description
=
"商品 ID"
)
@RequestParam
Integer
id
)
{
return
customProductInfoService
.
getCraftById
(
id
);
}
// ==================== ERP 专用端点(对齐 TS ApiCustomProductInfoController) ====================
@Operation
(
summary
=
"ERP 分页查询"
,
description
=
"包含黑名单过滤、用户折扣等 ERP 特定逻辑"
)
@PostMapping
(
"/erpPage"
)
...
...
@@ -125,10 +125,10 @@ public class CustomProductInfoController {
@Operation
(
summary
=
"ERP 获取绑定 DIY"
,
description
=
"获取商品绑定的 DIY 模板(含效果图),支持按 userMark/namespace 过滤"
)
@GetMapping
(
"/getErpBindsDiyById"
)
public
List
<
DbDiy
VO
>
getErpBindsDiyById
(
public
List
<
DbDiy
SnakeVO
>
getBindsDiyByIdAndUserMark
(
@Parameter
(
description
=
"商品 ID"
)
@RequestParam
Integer
id
,
@Parameter
(
description
=
"用户标识"
)
@RequestParam
(
required
=
false
)
String
userMark
,
@Parameter
(
description
=
"命名空间"
)
@RequestParam
(
required
=
false
)
String
namespace
)
{
return
customProductInfoService
.
get
ErpBindsDiyById
(
id
,
userMark
,
namespace
);
return
customProductInfoService
.
get
BindsDiyByIdAndUserMark
(
id
,
userMark
,
namespace
);
}
}
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/DbDiyController.java
View file @
315f36e6
...
...
@@ -3,7 +3,7 @@ package com.jomalls.custom.webapp.controller;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jomalls.custom.app.service.DbDiyService
;
import
com.jomalls.custom.app.vo.DbDiyPageVO
;
import
com.jomalls.custom.app.vo.DbDiyVO
;
import
com.jomalls.custom.app.vo.DbDiy
Snake
VO
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
...
@@ -33,13 +33,13 @@ public class DbDiyController {
/**
* 列表查询接口
*
* @param dbDiyVO 条件model
* @param dbDiy
Snake
VO 条件model
* @return list集合
*/
@Operation
(
summary
=
"列表查询接口"
,
description
=
"根据条件查询列表接口(不分页)"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
POST
)
public
List
<
DbDiy
VO
>
list
(
@RequestBody
DbDiyVO
dbDiy
VO
)
{
return
dbDiyService
.
list
(
dbDiyVO
);
public
List
<
DbDiy
SnakeVO
>
list
(
@RequestBody
DbDiySnakeVO
dbDiySnake
VO
)
{
return
dbDiyService
.
list
(
dbDiy
Snake
VO
);
}
/**
...
...
@@ -50,7 +50,7 @@ public class DbDiyController {
*/
@Operation
(
summary
=
"分页列表接口"
,
description
=
"根据条件查询分页列表接口"
)
@RequestMapping
(
value
=
"/pageList"
,
method
=
RequestMethod
.
POST
)
public
IPage
<
DbDiyVO
>
pageList
(
@RequestBody
DbDiyPageVO
dbDiyPageVO
)
{
public
IPage
<
DbDiy
Snake
VO
>
pageList
(
@RequestBody
DbDiyPageVO
dbDiyPageVO
)
{
return
dbDiyService
.
pageList
(
dbDiyPageVO
);
}
...
...
@@ -63,31 +63,31 @@ public class DbDiyController {
*/
@Operation
(
summary
=
"根据主键id查询详情"
,
description
=
"根据主键id查询详情"
)
@RequestMapping
(
value
=
"/info/{id}"
,
method
=
RequestMethod
.
GET
)
public
DbDiyVO
info
(
@Parameter
(
description
=
"主键id"
,
required
=
true
)
@PathVariable
(
"id"
)
Integer
id
)
{
public
DbDiy
Snake
VO
info
(
@Parameter
(
description
=
"主键id"
,
required
=
true
)
@PathVariable
(
"id"
)
Integer
id
)
{
return
dbDiyService
.
info
(
id
);
}
/**
* 保存对象
*
* @param dbDiyVO 保存对象
* @param dbDiy
Snake
VO 保存对象
*/
@Operation
(
summary
=
"保存对象"
,
description
=
"保存对象"
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
public
void
save
(
@RequestBody
@Valid
DbDiy
VO
dbDiy
VO
)
{
dbDiyService
.
save
(
dbDiyVO
);
public
void
save
(
@RequestBody
@Valid
DbDiy
SnakeVO
dbDiySnake
VO
)
{
dbDiyService
.
save
(
dbDiy
Snake
VO
);
}
/**
* 根据id修改对象
*
* @param dbDiyVO 修改对象
* @param dbDiy
Snake
VO 修改对象
*/
@Operation
(
summary
=
"根据id修改对象"
,
description
=
"根据id修改对象"
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
public
void
updateById
(
@RequestBody
DbDiy
VO
dbDiy
VO
)
{
dbDiyService
.
updateById
(
dbDiyVO
);
public
void
updateById
(
@RequestBody
DbDiy
SnakeVO
dbDiySnake
VO
)
{
dbDiyService
.
updateById
(
dbDiy
Snake
VO
);
}
/**
...
...
custom-server-webapp/src/main/java/com/jomalls/custom/webapp/controller/LogCustomProductController.java
View file @
315f36e6
package
com
.
jomalls
.
custom
.
webapp
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.jomalls.custom.app.vo.LogCustomProductPageVO
;
import
com.jomalls.custom.app.vo.LogCustomProductVO
;
import
com.jomalls.custom.app.service.LogCustomProductService
;
import
com.jomalls.custom.app.vo.LogCustomProductSnakeVO
;
import
io.swagger.v3.oas.annotations.Operation
;
import
io.swagger.v3.oas.annotations.Parameter
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
jakarta.validation.Valid
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.List
;
/**
* @author Lizh
* @version 0.0
1
* @description:
Controller
* @version 0.0
2
* @description:
商品日志 Controller(对齐 TS ApiProductLogController)
* @date 2026-05-29 11:43:04
*/
@Slf4j
@RestController
@Tag
(
name
=
"/
logCustomProduct"
,
description
=
"Controller
"
)
@RequestMapping
(
"/
logCustomProduct
"
)
@Tag
(
name
=
"/
api/v2/product/log"
,
description
=
"商品日志接口
"
)
@RequestMapping
(
"/
api/v2/product/log
"
)
public
class
LogCustomProductController
{
@Autowired
private
LogCustomProductService
logCustomProductService
;
/**
*
列表查询接口
*
根据商品 ID 获取日志列表(对齐 TS getListByProductId)
*
* @param
logCustomProductVO 条件model
* @return
list集合
* @param
id 商品 ID
* @return
日志列表,按创建时间降序
*/
@Operation
(
summary
=
"列表查询接口"
,
description
=
"根据条件查询列表接口(不分页)"
)
@RequestMapping
(
value
=
"/list"
,
method
=
RequestMethod
.
POST
)
public
List
<
LogCustomProductVO
>
list
(
@RequestBody
LogCustomProductVO
logCustomProductVO
)
{
return
logCustomProductService
.
list
(
logCustomProductVO
);
}
/**
* 根据条件查询分页列表接口
*
* @param logCustomProductPageVO 分页入参model
* @return 分页对象
*/
@Operation
(
summary
=
"分页列表接口"
,
description
=
"根据条件查询分页列表接口"
)
@RequestMapping
(
value
=
"/pageList"
,
method
=
RequestMethod
.
POST
)
public
IPage
<
LogCustomProductVO
>
pageList
(
@RequestBody
LogCustomProductPageVO
logCustomProductPageVO
)
{
return
logCustomProductService
.
pageList
(
logCustomProductPageVO
);
}
/**
* 根据主键id查询详情
*
* @param id 主键
* @return 实体model
*/
@Operation
(
summary
=
"根据主键id查询详情"
,
description
=
"根据主键id查询详情"
)
@RequestMapping
(
value
=
"/info/{id}"
,
method
=
RequestMethod
.
GET
)
public
LogCustomProductVO
info
(
@Parameter
(
description
=
"主键id"
,
required
=
true
)
@PathVariable
(
"id"
)
Integer
id
)
{
return
logCustomProductService
.
info
(
id
);
}
/**
* 保存对象
*
* @param logCustomProductVO 保存对象
*/
@Operation
(
summary
=
"保存对象"
,
description
=
"保存对象"
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
public
void
save
(
@RequestBody
@Valid
LogCustomProductVO
logCustomProductVO
)
{
logCustomProductService
.
save
(
logCustomProductVO
);
}
/**
* 根据id修改对象
*
* @param logCustomProductVO 修改对象
*/
@Operation
(
summary
=
"根据id修改对象"
,
description
=
"根据id修改对象"
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
public
void
updateById
(
@RequestBody
LogCustomProductVO
logCustomProductVO
)
{
logCustomProductService
.
updateById
(
logCustomProductVO
);
}
/**
* 根据主键id进行删除
*
* @param id 主键
*/
@Operation
(
summary
=
"根据主键id进行删除"
,
description
=
"根据主键id进行删除"
)
@RequestMapping
(
value
=
"/deleteById/{id}"
,
method
=
RequestMethod
.
DELETE
)
public
void
deleteById
(
@Parameter
(
description
=
"主键id"
,
required
=
true
)
@PathVariable
(
"id"
)
Integer
id
)
{
logCustomProductService
.
deleteById
(
id
);
@Operation
(
summary
=
"根据商品 ID 获取日志列表"
,
description
=
"根据商品 ID 查询所有操作日志,按时间降序排列"
)
@GetMapping
(
"/getByProductId"
)
public
List
<
LogCustomProductSnakeVO
>
getListByProductId
(
@Parameter
(
description
=
"商品 ID"
)
@RequestParam
Integer
id
)
{
return
logCustomProductService
.
getListByProductId
(
id
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment