我真想和偷卖源码的人打一架

简介: 1,系统的演示;2,系统的核心代码;3,系统源码获取

1,系统的演示


微信图片_20221009211602.jpg


微信图片_20221009211612.jpg


微信图片_20221009211616.jpg


微信图片_20221009211619.jpg


微信图片_20221009211622.jpg


微信图片_20221009211626.jpg


微信图片_20221009211630.jpg


2,系统的核心代码


public class BaseController {
  public static final Long EXPIRES_IN = 1000 * 3600 * 24 * 1L;// 1天
  /**
  * 小孟开发,微交流:kaifazixun
  */
  public String getHostUrl(HttpServletRequest request) {
  String hostName = request.getServerName();
  Integer hostPort = request.getServerPort();
  String path = request.getContextPath();
  if (hostPort == 80) {
    return "http://" + hostName + path + "/";
  } else {
    return "http://" + hostName + ":" + hostPort + path + "/";
  }
  }
  /***
  * 获取当前的website路径 String
  */
  public static String getWebSite(HttpServletRequest request) {
  String returnUrl = request.getScheme() + "://"
    + request.getServerName();
  if (request.getServerPort() != 80) {
    returnUrl += ":" + request.getServerPort();
  }
  returnUrl += request.getContextPath();
  return returnUrl;
  }
  /**
  * 初始化HTTP头.
  * 
  * @return HttpHeaders
  */
  public HttpHeaders initHttpHeaders() {
  HttpHeaders headers = new HttpHeaders();
  MediaType mediaType = new MediaType("text", "html",
    Charset.forName("utf-8"));
  headers.setContentType(mediaType);
  return headers;
  }
  /**
  * 返回 信息数据
  * 
  * @param status
  * @param msg
  * @return
  */
  public ResponseEntity<String> renderMsg(Boolean status, String msg) {
  if (StringUtils.isEmpty(msg)) {
    msg = "";
  }
  String str = "{\"status\":\"" + status + "\",\"msg\":\"" + msg + "\"}";
  ResponseEntity<String> responseEntity = new ResponseEntity<String>(str,
    initHttpHeaders(), HttpStatus.OK);
  return responseEntity;
  }
  /**
  * 返回obj数据
  * 
  * @param status
  * @param msg
  * @param obj
  * @return
  */
  public ResponseEntity<String> renderData(Boolean status, String msg,
    Object obj) {
  if (StringUtils.isEmpty(msg)) {
    msg = "";
  }
  StringBuffer sb = new StringBuffer();
  sb.append("{");
  sb.append("\"status\":\"" + status + "\",\"msg\":\"" + msg + "\",");
  sb.append("\"data\":" + JacksonJsonUtil.toJson(obj) + "");
  sb.append("}");
  ResponseEntity<String> responseEntity = new ResponseEntity<String>(
    sb.toString(), initHttpHeaders(), HttpStatus.OK);
  return responseEntity;
  }
  /***
  * 获取IP(如果是多级代理,则得到的是一串IP值)
  */
  public static String getIpAddr(HttpServletRequest request) {
  String ip = request.getHeader("x-forwarded-for");
  if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
    ip = request.getHeader("Proxy-Client-IP");
  }
  if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
    ip = request.getHeader("WL-Proxy-Client-IP");
  }
  if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
    ip = request.getRemoteAddr();
  }
  if (ip != null && ip.length() > 0) {
    String[] ips = ip.split(",");
    for (int i = 0; i < ips.length; i++) {
    if (!"unknown".equalsIgnoreCase(ips[i])) {
      ip = ips[i];
      break;
    }
    }
  }
  return ip;
  }


public class MyController extends BaseController {
/***
小孟开发,微交流:kaifazixun
*/
  @Autowired
  public DBHelper db;
  public Map getAdmin(HttpServletRequest request){
  Map customerBean = (Map)request.getSession().getAttribute("adminBean");
  return customerBean;
  }
  public Map getPtadmin(HttpServletRequest request){
  Map bean = (Map)request.getSession().getAttribute("ptadminBean");
  return bean;
  }
  public Map getStudent(HttpServletRequest request){
  Map bean = (Map)request.getSession().getAttribute("studentBean");
  return bean;
  }
  public ResponseEntity<String> renderMsg(Boolean status, String msg) {
  if (StringUtils.isEmpty(msg)) {
    msg = "";
  }
  StringBuffer sb = new StringBuffer();
  sb.append("{");
  sb.append("\"status\":\"" + status + "\",\"msg\":\"" + msg + "\"");
  sb.append("}");
  ResponseEntity<String> responseEntity = new ResponseEntity<String>(
    sb.toString(), initHttpHeaders(), HttpStatus.OK);
  return responseEntity;
  }
  public void writeToExcel(HSSFWorkbook wb, String fileName,HttpServletResponse response)
    throws IOException {
  fileName = (fileName == null || fileName.equals("")) ? "result"
    : fileName;
  fileName = java.net.URLEncoder.encode(fileName, "UTF-8").replace('+',
    ' ');
  response.reset();
  response.setContentType("application/vnd.ms-excel");
  response.setHeader("Content-Disposition", "attachment;filename="
    + fileName + ".xls");
  wb.write(response.getOutputStream());
  response.getOutputStream().flush();
  response.getOutputStream().close();
  }
  public ResponseEntity<String> renderData(Boolean status, String msg,
    Object obj) {
  if (StringUtils.isEmpty(msg)) {
    msg = "";
  }
  StringBuffer sb = new StringBuffer();
  sb.append("{");
  sb.append("\"status\":\"" + status + "\",\"msg\":\"" + msg + "\",");
  sb.append("\"data\":" + JacksonJsonUtil.toJson(obj) + "");
  sb.append("}");
  ResponseEntity<String> responseEntity = new ResponseEntity<String>(
    sb.toString(), initHttpHeaders(), HttpStatus.OK);
  return responseEntity;
  }
  public ResponseEntity<String> renderDataEasyUi(HttpServletRequest request,Object obj) {
  StringBuffer sb = new StringBuffer();
  PageTool page = (PageTool)request.getAttribute("page");
  sb.append("{");
  sb.append("\"total\":\"" + page.getSize() + "\",");
  sb.append("\"rows\":" + JacksonJsonUtil.toJson(obj) + "");
  sb.append("}");
  ResponseEntity<String> responseEntity = new ResponseEntity<String>(
    sb.toString(), initHttpHeaders(), HttpStatus.OK);
  return responseEntity;
  }
  public ResponseEntity<String> renderComboBoxAjax(Object obj) {
  ResponseEntity<String> responseEntity = new ResponseEntity<String>(
    JacksonJsonUtil.toJson(obj), initHttpHeaders(), HttpStatus.OK);
  return responseEntity;
  }
}


3,系统源码获取


还是那句话,仅限制学习使用!

若发现偷盗者,以后我开源的就少了!而且会追究你的责任!


目录
相关文章
|
算法 C++
【每日算法Day 65】你能顺利救出地下城里的公主吗?
【每日算法Day 65】你能顺利救出地下城里的公主吗?
L1-072 刮刮彩票 (20 分)
L1-072 刮刮彩票 (20 分)
231 0
L1-072 刮刮彩票 (20 分)
|
存储 算法 安全
听说小卖部在卖盲盒??
听说小卖部在卖盲盒??
161 0
爬梯子&&卖卖股份的最佳时期(跑路人笔记)
爬梯子&&卖卖股份的最佳时期(跑路人笔记)
爬梯子&&卖卖股份的最佳时期(跑路人笔记)
|
设计模式 程序员
手里拿着锤子,看啥都像钉子
手里拿着锤子,看啥都像钉子
312 0
|
Java Spring
别纠结你的年终奖啦,开年红包让你满血复活!
在经过年前的互联网公司裁员大潮下,重多的互联网公司年会、年终奖也跟着缩水,有的按完成绩效的百分比发、有的直接减半,甚至有些互联网公司就干脆不发!
1804 0
解救被困传销女演员 助人减肥找老婆 蚂蚁森林又现神功能
近日,一篇《女演员被传销组织拘禁30多天 竟因蚂蚁森林幸运逃离》的报道引发了全网热议。网友纷纷表示:蚂蚁森林功能强大,不仅能帮人减肥、找老婆,还能在关键时刻保命!
5437 0