时长信息转到video主体 增加多线程获取时间方法

This commit is contained in:
wangjinlei
2024-04-26 16:34:59 +08:00
parent 5c7d424f5e
commit 3980da2fb1
9 changed files with 72 additions and 17 deletions

View File

@@ -40,4 +40,16 @@ public class ShopProductController {
return R.ok().put("result", res);
}
@RequestMapping("/getProductDetail")
public R getProductDetail(@RequestBody Map<String,Integer> map){
Map<String, Object> detail = shopProductService.getProductDetail(map.get("productId"));
return R.ok().put("detail",detail);
}
@RequestMapping("/editProductDetail")
public R editProductDetail(@RequestBody ShopProduct shopProduct){
shopProductService.updateById(shopProduct);
return R.ok();
}
}

View File

@@ -3,5 +3,9 @@ package com.peanut.modules.master.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.common.entity.ShopProduct;
import java.util.Map;
public interface ShopProductService extends IService<ShopProduct> {
Map<String,Object> getProductDetail(Integer productId);
}

View File

@@ -7,7 +7,18 @@ import com.peanut.modules.master.service.ShopProductService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@Service("masterShopProductService")
public class ShopProductServiceImpl extends ServiceImpl<ShopProductDao, ShopProduct> implements ShopProductService {
@Override
public Map<String, Object> getProductDetail(Integer productId) {
ShopProduct detail = this.getById(productId);
HashMap<String, Object> flag = new HashMap<>();
flag.put("detail",detail);
return flag;
}
}