src/com/java1234/controller/CustomerLossController.java
(开头部分) 3KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
package com.java1234.controller;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import net.sf.json.JsonConfig;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.java1234.entity.Customer;
import com.java1234.entity.CustomerLoss;
import com.java1234.entity.PageBean;
import com.java1234.service.CustomerLossService;
import com.java1234.util.ResponseUtil;
import com.java1234.util.StringUtil;
/**
* 客户流失Controller类
* @author Administrator
*
*/
@Controller
@RequestMapping("/customerLoss")
public class CustomerLossController {
@Resource
private CustomerLossService customerLossService;
/**
* 查询客户流失集合
* @param page
* @param rows
* @param s_customerLoss
* @param response
* @return
* @throws Exception
*/
@RequestMapping("/list")
public String list(@RequestParam(value="page",required=false)String page,@RequestParam(value="rows",required=false)String rows,CustomerLoss s_customerLoss,HttpServletResponse response)throws Exception{
PageBean pageBean=new PageBean(Integer.parseInt(page),Integer.parseInt(rows));
Map<String,Object> map=new HashMap<String,Object>();
map.put("cusName", StringUtil.formatLike(s_customerLoss.getCusName()));
map.put("cusManager", StringUtil.formatLike(s_customerLoss.getCusManager()));
map.put("state", s_customerLoss.getState());
map.put("start", pageBean.getStart());
map.put("size", pageBean.getPageSize());
List<CustomerLoss> customerLossList=customerLossService.findCustomerLoss(map);
Long total=customerLossService.getTotalCutomerLoss(map);
JSONObject result=new JSONObject();
JsonConfig jsonConfig=new JsonConfig();
jsonConfig.registerJsonValueProcessor(java.util.Date.class, new DateJsonValueProcessor("yyyy-MM-dd"));
JSONArray jsonArray=JSONArray.fromObject(customerLossList,jsonConfig);
后面还有 41 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
