商品模块代码提交
This commit is contained in:
@@ -90,11 +90,9 @@ public class OperationLogAspect {
|
||||
}
|
||||
|
||||
//登录用户信息
|
||||
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
Long createUserId = StpKit.USER.getLoginIdAsLong();
|
||||
//TODO SA-TOKEN 暂未整合当前登录人信息,此处仅为临时账号
|
||||
String createUserName = "temp-account";
|
||||
String createUserName = StpKit.USER.getAccount();
|
||||
|
||||
log.set("createUserId", createUserId);
|
||||
log.set("createUserName", createUserName);
|
||||
|
||||
@@ -30,4 +30,26 @@ public interface ShopProdSpecService extends IService<ShopProdSpec> {
|
||||
|
||||
boolean enableShopProdSpec(Long id);
|
||||
|
||||
/**
|
||||
* 快速添加商品规格
|
||||
*
|
||||
* @param dto 商品规格DTO(树形数据结构)
|
||||
*/
|
||||
void quickAddShopProdSpec(ShopProdSpecDTO dto);
|
||||
|
||||
/**
|
||||
* 获取树状结构规格详情数据
|
||||
*
|
||||
* @param id 规格id
|
||||
* @return ShopProdSpecDTO 规格详情数据
|
||||
*/
|
||||
ShopProdSpecDTO getShopProdSpecTreeById(Long id);
|
||||
|
||||
/**
|
||||
* 快速更新商品规格
|
||||
*
|
||||
* @param dto 商品规格DTO(树形数据结构)
|
||||
*/
|
||||
void quickUpdateShopProdSpec(ShopProdSpecDTO dto);
|
||||
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public class TreeUtils {
|
||||
/**
|
||||
* 根据pid,构建树节点
|
||||
*/
|
||||
public static <T extends TreeNode> List<T> build(List<T> treeNodes, Long pid) {
|
||||
public static <T extends TreeNode<T>> List<T> build(List<T> treeNodes, Long pid) {
|
||||
//pid不能为空
|
||||
AssertUtil.isNull(pid, "pid不能为空");
|
||||
|
||||
@@ -35,7 +35,7 @@ public class TreeUtils {
|
||||
/**
|
||||
* 查找子节点
|
||||
*/
|
||||
private static <T extends TreeNode> T findChildren(List<T> treeNodes, T rootNode) {
|
||||
private static <T extends TreeNode<T>> T findChildren(List<T> treeNodes, T rootNode) {
|
||||
for(T treeNode : treeNodes) {
|
||||
if(rootNode.getId().equals(treeNode.getPid())) {
|
||||
rootNode.getChildren().add(findChildren(treeNodes, treeNode));
|
||||
@@ -47,7 +47,7 @@ public class TreeUtils {
|
||||
/**
|
||||
* 构建树节点
|
||||
*/
|
||||
public static <T extends TreeNode> List<T> build(List<T> treeNodes) {
|
||||
public static <T extends TreeNode<T>> List<T> build(List<T> treeNodes) {
|
||||
List<T> result = new ArrayList<>();
|
||||
|
||||
//list转map
|
||||
|
||||
Reference in New Issue
Block a user