|
@@ -6,9 +6,11 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.cdf.common.PageInfo;
|
|
import com.cdf.common.PageInfo;
|
|
import com.cdf.common.ResultCode;
|
|
import com.cdf.common.ResultCode;
|
|
import com.cdf.common.ResultData;
|
|
import com.cdf.common.ResultData;
|
|
|
|
+import com.cdf.entity.Brand;
|
|
import com.cdf.entity.HotOutline;
|
|
import com.cdf.entity.HotOutline;
|
|
import com.cdf.exception.BusinessException;
|
|
import com.cdf.exception.BusinessException;
|
|
import com.cdf.request.BaseRequest;
|
|
import com.cdf.request.BaseRequest;
|
|
|
|
+import com.cdf.service.IBrandService;
|
|
import com.cdf.service.IHotOutlineService;
|
|
import com.cdf.service.IHotOutlineService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
@@ -17,6 +19,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
+import java.util.List;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* <p>
|
|
* <p>
|
|
* 前端控制器
|
|
* 前端控制器
|
|
@@ -31,6 +35,8 @@ public class HotOutlineController {
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
IHotOutlineService hotOutlineService;
|
|
IHotOutlineService hotOutlineService;
|
|
|
|
+ @Autowired
|
|
|
|
+ IBrandService brandService;
|
|
|
|
|
|
@PostMapping("/list")
|
|
@PostMapping("/list")
|
|
public ResultData list(@RequestBody BaseRequest param){
|
|
public ResultData list(@RequestBody BaseRequest param){
|
|
@@ -54,5 +60,14 @@ public class HotOutlineController {
|
|
hotOutlineService.removeById(hotOutline.getId());
|
|
hotOutlineService.removeById(hotOutline.getId());
|
|
return ResultData.ok();
|
|
return ResultData.ok();
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @PostMapping("/detail")
|
|
|
|
+ public ResultData detail(@RequestBody HotOutline hotOutline){
|
|
|
|
+ if(hotOutline.getId() == null){
|
|
|
|
+ throw new BusinessException(ResultCode.PARAM_MISS);
|
|
|
|
+ }
|
|
|
|
+ List<Brand> brands = brandService.getByHotOutlineId(hotOutline.getId());
|
|
|
|
+ return ResultData.ok(brands);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|