新版
This commit is contained in:
@@ -7,6 +7,7 @@ import com.peanut.modules.book.entity.BookEntity;
|
||||
import com.peanut.modules.book.entity.BookTeachEntity;
|
||||
import com.peanut.modules.book.service.BookService;
|
||||
import com.peanut.modules.book.service.BookTeachService;
|
||||
import com.peanut.modules.book.service.ShopProudictBookService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -23,6 +24,8 @@ public class BookTeachController {
|
||||
private BookTeachService bookTeachService;
|
||||
@Autowired
|
||||
private BookService bookService;
|
||||
@Autowired
|
||||
private ShopProudictBookService shopProudictBookService;
|
||||
|
||||
/**
|
||||
* 获取讲书列表
|
||||
@@ -59,8 +62,9 @@ public class BookTeachController {
|
||||
*/
|
||||
@RequestMapping("/getTeachDetail")
|
||||
public R getTeachDetail(@RequestParam Integer teachId){
|
||||
BookTeachEntity byId = bookTeachService.getById(teachId);
|
||||
return R.ok().put("bookTeach",byId);
|
||||
BookTeachEntity teach_info = bookTeachService.getById(teachId);
|
||||
Integer productByBookId = shopProudictBookService.getProductByBookId(teach_info.getBookId());
|
||||
return R.ok().put("bookTeach",teach_info).put("product",productByBookId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user