|
|
@@ -0,0 +1,55 @@
|
|
|
+package net.mingsoft.tf.www;
|
|
|
+
|
|
|
+import io.swagger.v3.oas.annotations.Operation;
|
|
|
+import io.swagger.v3.oas.annotations.Parameter;
|
|
|
+import io.swagger.v3.oas.annotations.Parameters;
|
|
|
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
|
|
+import jakarta.annotation.Resource;
|
|
|
+import net.mingsoft.base.entity.ResultData;
|
|
|
+import net.mingsoft.tf.entity.EnterpriseProductsEntity;
|
|
|
+import org.springframework.stereotype.Controller;
|
|
|
+import org.springframework.web.bind.annotation.*;
|
|
|
+
|
|
|
+@Controller()
|
|
|
+@RequestMapping("/tf/enterpriseProducts")
|
|
|
+public class EnterpriseProductsAction {
|
|
|
+ @Resource
|
|
|
+ private net.mingsoft.tf.action.EnterpriseProductsAction action;
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询企业产品列表
|
|
|
+ */
|
|
|
+ @Operation(summary = "查询企业产品列表接口")
|
|
|
+ @Parameters({
|
|
|
+ @Parameter(name = "productName", description = "产品名", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productStyle", description = "产品风格", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productHighlights", description = "产品亮点", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productPrice", description = "价格", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productUnit", description = "单位", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productMin", description = "最小起定量", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productVisits", description = "访问量", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productPhone", description = "联系方式", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productEnterpriseId", description = "公司ID", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productInfo", description = "产品信息", in = ParameterIn.QUERY),
|
|
|
+ @Parameter(name = "productText", description = "产品详情", in = ParameterIn.QUERY),
|
|
|
+ })
|
|
|
+ @PostMapping(value = "/list")
|
|
|
+ @ResponseBody
|
|
|
+ public ResultData list(@RequestBody EnterpriseProductsEntity enterpriseProducts) {
|
|
|
+ // TODO 要有企业名和logo
|
|
|
+ return action.list(enterpriseProducts);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取企业产品
|
|
|
+ *
|
|
|
+ * @param enterpriseProducts 企业产品实体
|
|
|
+ */
|
|
|
+ @Operation(summary = "获取企业产品列表接口")
|
|
|
+ @Parameter(name = "id", description = "主键ID", required = true, in = ParameterIn.QUERY)
|
|
|
+ @GetMapping("/get")
|
|
|
+ @ResponseBody
|
|
|
+ public ResultData get(@ModelAttribute @Parameter(hidden = true) EnterpriseProductsEntity enterpriseProducts) {
|
|
|
+ return action.get(enterpriseProducts);
|
|
|
+ }
|
|
|
+}
|