src/main/java/com/nathan/crm/controller/CustomerOrderController.java
(完整代码) 1KBpackage com.nathan.crm.controller;
import com.nathan.base.BaseController;
import com.nathan.base.ResultInfo;
import com.nathan.crm.query.CustomerOrderQuery;
import com.nathan.crm.service.CustomerOrderService;
import com.nathan.crm.vo.CustomerOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.Map;
@Controller
@RequestMapping("order")
public class CustomerOrderController extends BaseController {
@Autowired
private CustomerOrderService customerOrderService;
/**
* 显示所有客户订单
* @param customerOrderQuery
* @return
*/
@RequestMapping("list")
@ResponseBody
public Map<String,Object> queryACustomerOrderByParams(CustomerOrderQuery customerOrderQuery){
return customerOrderService.queryByParamsForTable(customerOrderQuery);
}
/**
* 打开添加客户订单页面
* @param cusId
* @return
*/
@RequestMapping("addCustomerOrderPage")
public String addCustomerOrderPage(Integer cusId, Model model){
model.addAttribute("cusId",cusId);
return "customer/order_add";
}
/**
* 添加客户订单
* @param customerOrder
* @return
*/
@RequestMapping("add")
@ResponseBody
public ResultInfo addOrder(CustomerOrder customerOrder){
customerOrderService.addCustomerOrder(customerOrder);
return success("订单添加成功!");
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。