|
@@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.diagbot.annotation.SysLogger;
|
|
|
import com.diagbot.dto.RespDTO;
|
|
|
import com.diagbot.entity.LantoneProduct;
|
|
|
-import com.diagbot.facade.DiagLantoneProductFacade;
|
|
|
+import com.diagbot.facade.LantoneProductFacade;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -15,6 +15,9 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
+import java.util.HashMap;
|
|
|
+import java.util.Map;
|
|
|
+
|
|
|
/**
|
|
|
* @Description: 朗通产品 前端控制器
|
|
|
* @Author: wangyu
|
|
@@ -24,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RequestMapping("/diagLantoneProduct")
|
|
|
public class DiagLantoneProductController {
|
|
|
@Autowired
|
|
|
- private DiagLantoneProductFacade diagLantoneProductFacade;
|
|
|
+ private LantoneProductFacade lantoneProductFacade;
|
|
|
|
|
|
@ApiOperation(value = "添加产品线",
|
|
|
notes = "name:产品名,必填<br>" +
|
|
@@ -35,7 +38,7 @@ public class DiagLantoneProductController {
|
|
|
@SysLogger("addProducts")
|
|
|
@Transactional
|
|
|
public RespDTO<LantoneProduct> addProducts(LantoneProduct lantoneProduct){
|
|
|
- return RespDTO.onSuc(diagLantoneProductFacade.addProducts(lantoneProduct));
|
|
|
+ return RespDTO.onSuc(lantoneProductFacade.addProducts(lantoneProduct));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "分页查询查询产品线",
|
|
@@ -44,7 +47,7 @@ public class DiagLantoneProductController {
|
|
|
@GetMapping("/selectProduct")
|
|
|
@SysLogger("selectProduct")
|
|
|
public RespDTO<LantoneProduct> selectProduct(Page page , String name){
|
|
|
- IPage<LantoneProduct> pages = diagLantoneProductFacade.selectProduct(page,name);
|
|
|
+ IPage<LantoneProduct> pages = lantoneProductFacade.selectProduct(page,name);
|
|
|
return RespDTO.onSuc(pages);
|
|
|
}
|
|
|
|
|
@@ -53,7 +56,7 @@ public class DiagLantoneProductController {
|
|
|
@PostMapping("/updateProduct")
|
|
|
@SysLogger("updateProduct")
|
|
|
public RespDTO<LantoneProduct> updateProduct(LantoneProduct lantoneProduct){
|
|
|
- return RespDTO.onSuc(diagLantoneProductFacade.updateProduct(lantoneProduct));
|
|
|
+ return RespDTO.onSuc(lantoneProductFacade.updateProduct(lantoneProduct));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "删除产品",
|
|
@@ -61,7 +64,7 @@ public class DiagLantoneProductController {
|
|
|
@PostMapping("/deleteProduct")
|
|
|
@SysLogger("deleteProduct")
|
|
|
public RespDTO<LantoneProduct> deleteProduct(LantoneProduct lantoneProduct){
|
|
|
- return RespDTO.onSuc(diagLantoneProductFacade.deleteProduct(lantoneProduct));
|
|
|
+ return RespDTO.onSuc(lantoneProductFacade.deleteProduct(lantoneProduct));
|
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "更改产品状态(启用/停用)",
|
|
@@ -69,15 +72,19 @@ public class DiagLantoneProductController {
|
|
|
@PostMapping("/productStatus")
|
|
|
@SysLogger("productStatus")
|
|
|
public RespDTO<LantoneProduct> productStatus(LantoneProduct lantoneProduct){
|
|
|
- return RespDTO.onSuc(diagLantoneProductFacade.productStatus(lantoneProduct));
|
|
|
+ return RespDTO.onSuc(lantoneProductFacade.productStatus(lantoneProduct));
|
|
|
}
|
|
|
|
|
|
- /* @ApiOperation(value = "查询当条产品线所有已开通用户",
|
|
|
+ @ApiOperation(value = "查询当条产品线所有已开通用户",
|
|
|
notes = "id:根据产品id查询所有已开通本产品用户,必填<br>")
|
|
|
- @PostMapping("/opendedProduct")
|
|
|
+ @GetMapping("/opendedProduct")
|
|
|
@SysLogger("opendedProduct")
|
|
|
- public RespDTO<DiagLantoneProduct> opendedProduct(DiagLantoneProduct diagLantoneProduct){
|
|
|
- return RespDTO.onSuc(diagLantoneProductFacade.productStatus(diagLantoneProduct));
|
|
|
- }*/
|
|
|
+ public RespDTO<LantoneProduct> opendedProduct(Page page,LantoneProduct lantoneProduct){
|
|
|
+ Map map =new HashMap();
|
|
|
+ map.put("lantoneProduct",lantoneProduct);
|
|
|
+ System.out.println(map);
|
|
|
+ System.out.println(lantoneProductFacade.opendedProduct(page,map));
|
|
|
+ return RespDTO.onSuc(lantoneProductFacade.opendedProduct(page,map));
|
|
|
+ }
|
|
|
}
|
|
|
|