过滤供应商,供应商的代号是1,供应商在客户表中,则在客户表遍历的下方编写。
"*******"中间的是主要代码
@GetMapping("/add")
public String add(BdCustomer customer,Model model,BdCompany company,Model model1) {
***List<BdCustomer> csList = customerService.selectCustomerList(customer);
List<BdCustomer> newList = new ArrayList<>();
for (BdCustomer c : csList) {
if (!c.getCustomerType().equals("1")) {
newList.add(c);
}
}
model.addAttribute("csList", newList);***
List<BdCompany> cpList = companyService.selectCompanyList(company);
model1.addAttribute("cpList",cpList);
return prefix + "/add";
}