Compare commits
70 Commits
@ -0,0 +1,59 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "admins")
|
||||||
|
public class Admins implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "username")
|
||||||
|
private String username;
|
||||||
|
@Column(name = "pwd")
|
||||||
|
private String pwd;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username == null ? "" : username.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPwd() {
|
||||||
|
return pwd;
|
||||||
|
}
|
||||||
|
public void setPwd(String pwd) {
|
||||||
|
this.pwd = pwd == null ? "" : pwd.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Admins;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface AdminsMapper extends MapperBase<Admins> {
|
||||||
|
Admins login(Admins admins);
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
package com.spring.service;
|
||||||
|
|
||||||
|
import com.base.IServiceBase;
|
||||||
|
import com.spring.entity.Admins;
|
||||||
|
|
||||||
|
public interface AdminsService extends IServiceBase<Admins> {
|
||||||
|
public Admins login(String username, String password);
|
||||||
|
public boolean updatePassword(int id, String newPassword);
|
||||||
|
}
|
||||||
@ -0,0 +1,255 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON;
|
||||||
|
import com.spring.util.JsonResult;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import javax.servlet.http.HttpSession;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
import java.util.Enumeration;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 控制器基类
|
||||||
|
*/
|
||||||
|
abstract public class BaseController {
|
||||||
|
@Autowired
|
||||||
|
protected HttpServletRequest request; // 注入
|
||||||
|
@Autowired
|
||||||
|
protected HttpServletResponse response; // 注入
|
||||||
|
@Autowired
|
||||||
|
protected HttpSession session; // 注入
|
||||||
|
|
||||||
|
protected ModelAndView mView;
|
||||||
|
|
||||||
|
protected Map<Object,Object> _var;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 控制器
|
||||||
|
*/
|
||||||
|
public BaseController()
|
||||||
|
{
|
||||||
|
//request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
|
||||||
|
//response = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getResponse();
|
||||||
|
mView = new ModelAndView();
|
||||||
|
_var = new LinkedHashMap();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 往模板中写入数据
|
||||||
|
* @param name
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
protected void assign(String name , Object value)
|
||||||
|
{
|
||||||
|
request.setAttribute(name , value);
|
||||||
|
_var.put(name , value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出框
|
||||||
|
* @param message
|
||||||
|
* @param code
|
||||||
|
* @param jumpUrl
|
||||||
|
* @param jumpTime
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showMessage( String message , int code , Object data , String jumpUrl , int jumpTime)
|
||||||
|
{
|
||||||
|
if(isAjax())
|
||||||
|
{
|
||||||
|
JsonResult jsonResult = new JsonResult(code , message , data);
|
||||||
|
return renderString(response , JSON.toJSONString(jsonResult));
|
||||||
|
}
|
||||||
|
|
||||||
|
assign("message" , message == null ? data : message);
|
||||||
|
assign("code" , code);
|
||||||
|
assign("jumpUrl" , jumpUrl);
|
||||||
|
assign("jumpTime" , jumpTime);
|
||||||
|
|
||||||
|
return "message";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将写入json写到前端
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public String json()
|
||||||
|
{
|
||||||
|
return jsonResult(_var);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String jsonReturn(String message , int code , Object data)
|
||||||
|
{
|
||||||
|
JsonResult result = new JsonResult(code , message , data);
|
||||||
|
return renderString(response , JSON.toJSONString(result));
|
||||||
|
}
|
||||||
|
|
||||||
|
public String jsonResult(Object data)
|
||||||
|
{
|
||||||
|
return jsonReturn(null , 0 , data);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String jsonError(String msg)
|
||||||
|
{
|
||||||
|
return jsonReturn(msg , 1 , null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getRequestAttributeMap()
|
||||||
|
{
|
||||||
|
//Map<Object,Object> map = new LinkedHashMap();
|
||||||
|
Enumeration<String> names = request.getAttributeNames();
|
||||||
|
|
||||||
|
while (names.hasMoreElements())
|
||||||
|
{
|
||||||
|
String key = names.nextElement();
|
||||||
|
if(!_var.containsKey(key)){
|
||||||
|
// 没有,则写入
|
||||||
|
_var.put(key , request.getAttribute(key));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return _var;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJson()
|
||||||
|
{
|
||||||
|
Map<Object,Object> map = new LinkedHashMap();
|
||||||
|
Enumeration<String> names = request.getAttributeNames();
|
||||||
|
|
||||||
|
while (names.hasMoreElements())
|
||||||
|
{
|
||||||
|
String key = names.nextElement();
|
||||||
|
Object value = request.getAttribute(key);
|
||||||
|
map.put(key , value);
|
||||||
|
}
|
||||||
|
return renderString(response , JSON.toJSONString(map));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 将字符串渲染到客户端
|
||||||
|
*
|
||||||
|
* @param response 渲染对象
|
||||||
|
* @param string 待渲染的字符串
|
||||||
|
* @return null
|
||||||
|
*/
|
||||||
|
public String renderString(HttpServletResponse response, String string)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
request.getSession();
|
||||||
|
OutputStream stream = response.getOutputStream();
|
||||||
|
response.setContentType("application/json");
|
||||||
|
response.setCharacterEncoding("utf-8");
|
||||||
|
stream.write(string.getBytes());
|
||||||
|
stream.flush();
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return "success";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean isAjax()
|
||||||
|
{
|
||||||
|
String accept = request.getHeader("accept");
|
||||||
|
if (accept != null && accept.indexOf("application/json") != -1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String xRequestedWith = request.getHeader("X-Requested-With");
|
||||||
|
if (xRequestedWith != null && xRequestedWith.indexOf("XMLHttpRequest") != -1)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
String ajax = request.getParameter("format");
|
||||||
|
if ("json".equalsIgnoreCase(ajax))
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 检测是否登录
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected boolean checkLogin()
|
||||||
|
{
|
||||||
|
if(request.getSession().getAttribute("username") == null || "".equals(request.getSession().getAttribute("username")))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出错误信息
|
||||||
|
* @param message
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showError(String message)
|
||||||
|
{
|
||||||
|
return showMessage(message , 1 ,null, "javascript:history(-1);" , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出错误信息
|
||||||
|
* @param message
|
||||||
|
* @param code
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showError(String message , int code)
|
||||||
|
{
|
||||||
|
return showMessage(message , code , null,"javascript:history(-1);" , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出错误信息
|
||||||
|
* @param message
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showError(String message , String url)
|
||||||
|
{
|
||||||
|
return showMessage(message , 1 ,null, url , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出成功信息
|
||||||
|
* @param data
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showSuccess(Object data )
|
||||||
|
{
|
||||||
|
return showMessage(null , 0 ,data, request.getHeader("referer") , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 弹出成功信息
|
||||||
|
* @param data
|
||||||
|
* @param url
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
protected String showSuccess(String data , String url)
|
||||||
|
{
|
||||||
|
return showMessage(null , 0 ,data, url , 2250);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,98 @@
|
|||||||
|
package com.spring.util;
|
||||||
|
|
||||||
|
import net.jntoo.annotation.QueryCollect;
|
||||||
|
import net.jntoo.db.Collect;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据库jntoo-query.jar要求写代码
|
||||||
|
*/
|
||||||
|
@QueryCollect
|
||||||
|
public class CollectList extends Collect {
|
||||||
|
|
||||||
|
protected HttpServletRequest request;
|
||||||
|
|
||||||
|
public CollectList(Long count, Integer pagesize) {
|
||||||
|
super(count , pagesize);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CollectList(Long count, Integer pagesize, Integer page)
|
||||||
|
{
|
||||||
|
super(count, pagesize, page);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取url 规则
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected String getRequestUrlPath() {
|
||||||
|
request = Request.getRequest();
|
||||||
|
String queryString = request.getQueryString();
|
||||||
|
if(queryString == null){
|
||||||
|
queryString = "";
|
||||||
|
}
|
||||||
|
StringBuffer buffer = new StringBuffer(queryString.length()+16);
|
||||||
|
String requestURI = request.getRequestURI();
|
||||||
|
buffer.append(requestURI).append("?");
|
||||||
|
Map<String,String[]> param = request.getParameterMap();
|
||||||
|
String name = "";
|
||||||
|
String value = "";
|
||||||
|
boolean isSearchPage = false;
|
||||||
|
int page = -1;
|
||||||
|
|
||||||
|
for (Map.Entry<String, String[]> entry : param.entrySet()) {
|
||||||
|
try{
|
||||||
|
name = entry.getKey();
|
||||||
|
String[] values = entry.getValue();
|
||||||
|
|
||||||
|
if(name.equals("page")){
|
||||||
|
page = Integer.valueOf(values[0]).intValue();
|
||||||
|
buffer.append(name).append("=").append("{page}").append("&");
|
||||||
|
isSearchPage = true;
|
||||||
|
} else if (null == values) {
|
||||||
|
buffer.append(name).append("=").append("&");
|
||||||
|
} else if (values.length>1) {
|
||||||
|
for (int i = 0; i < values.length; i++) { //用于请求参数中有多个相同名称
|
||||||
|
value = URLEncoder.encode(values[i] , "UTF-8");
|
||||||
|
buffer.append(name).append("=").append(value).append("&");
|
||||||
|
}
|
||||||
|
//value = value.substring(0, value.length() - 1);
|
||||||
|
} else {
|
||||||
|
value = URLEncoder.encode(values[0] , "UTF-8");
|
||||||
|
buffer.append(name).append("=").append(value).append("&");//用于请求参数中请求参数名唯一
|
||||||
|
}
|
||||||
|
}catch (UnsupportedEncodingException e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(this.page == -1){
|
||||||
|
this.page = page;
|
||||||
|
}
|
||||||
|
this.page = Math.max(this.page , 1);
|
||||||
|
|
||||||
|
if(!isSearchPage){
|
||||||
|
buffer.append("page={page}&");
|
||||||
|
}
|
||||||
|
String result = buffer.toString();
|
||||||
|
return result.substring(0 , result.length()-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页渲染完成后处理
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
protected void readerReady() {
|
||||||
|
String info = getInfo();
|
||||||
|
HashMap map = new HashMap();
|
||||||
|
map.put("info" , info);
|
||||||
|
request.setAttribute("page" , map);
|
||||||
|
request.setAttribute("totalCount" , count);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,104 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "difangmeishi")
|
||||||
|
public class Difangmeishi implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "meishibianhao")
|
||||||
|
private String meishibianhao;
|
||||||
|
@Column(name = "mingcheng")
|
||||||
|
private String mingcheng;
|
||||||
|
@Column(name = "fujinjingdian")
|
||||||
|
private String fujinjingdian;
|
||||||
|
@Column(name = "fenlei")
|
||||||
|
private String fenlei;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "jiage")
|
||||||
|
private Double jiage;
|
||||||
|
@Column(name = "meishijianjie")
|
||||||
|
private String meishijianjie;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getMeishibianhao() {
|
||||||
|
return meishibianhao;
|
||||||
|
}
|
||||||
|
public void setMeishibianhao(String meishibianhao) {
|
||||||
|
this.meishibianhao = meishibianhao == null ? "" : meishibianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMingcheng() {
|
||||||
|
return mingcheng;
|
||||||
|
}
|
||||||
|
public void setMingcheng(String mingcheng) {
|
||||||
|
this.mingcheng = mingcheng == null ? "" : mingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFujinjingdian() {
|
||||||
|
return fujinjingdian;
|
||||||
|
}
|
||||||
|
public void setFujinjingdian(String fujinjingdian) {
|
||||||
|
this.fujinjingdian = fujinjingdian == null ? "" : fujinjingdian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFenlei() {
|
||||||
|
return fenlei;
|
||||||
|
}
|
||||||
|
public void setFenlei(String fenlei) {
|
||||||
|
this.fenlei = fenlei == null ? "" : fenlei.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getJiage() {
|
||||||
|
return jiage;
|
||||||
|
}
|
||||||
|
public void setJiage(Double jiage) {
|
||||||
|
this.jiage = jiage == null ? 0.0f : jiage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMeishijianjie() {
|
||||||
|
return meishijianjie;
|
||||||
|
}
|
||||||
|
public void setMeishijianjie(String meishijianjie) {
|
||||||
|
this.meishijianjie = meishijianjie == null ? "" : meishijianjie.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Difangmeishi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface DifangmeishiMapper extends MapperBase<Difangmeishi> {
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "diqu")
|
||||||
|
public class Diqu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "diqumingcheng")
|
||||||
|
private String diqumingcheng;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getDiqumingcheng() {
|
||||||
|
return diqumingcheng;
|
||||||
|
}
|
||||||
|
public void setDiqumingcheng(String diqumingcheng) {
|
||||||
|
this.diqumingcheng = diqumingcheng == null ? "" : diqumingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Diqu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface DiquMapper extends MapperBase<Diqu> {
|
||||||
|
}
|
||||||
@ -0,0 +1,21 @@
|
|||||||
|
package com.base;
|
||||||
|
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Service基本类接口
|
||||||
|
* @param <E>
|
||||||
|
*/
|
||||||
|
public interface IServiceBase<E> {
|
||||||
|
public List<E> select();
|
||||||
|
public List<E> select(E y);
|
||||||
|
public E find(Object id);
|
||||||
|
public E findEntity(E id);
|
||||||
|
public List<E> selectPage(E obj, int page, int pageSize);
|
||||||
|
public List<E> selectPageExample(Example obj , int page , int pageSize);
|
||||||
|
public int delete(Object id);
|
||||||
|
public int insert(E y);
|
||||||
|
public int update(E y);
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import util.*;
|
||||||
|
import java.util.*;
|
||||||
|
import dao.CommDAO;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
import com.alibaba.fastjson.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 首页控制器
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class IndexController extends BaseController{
|
||||||
|
|
||||||
|
// 首页
|
||||||
|
@RequestMapping(value = {"/" , "index"})
|
||||||
|
public String Index()
|
||||||
|
{
|
||||||
|
|
||||||
|
ArrayList<HashMap> bhtList = Query.make("lunbotu").order("id desc").limit(5).select();
|
||||||
|
assign("bhtList" , bhtList);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> jingdianxinxilist1 = Query.make("jingdianxinxi").limit(4).order("liulanliang desc").select();
|
||||||
|
assign("jingdianxinxilist1" , jingdianxinxilist1);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> difangmeishilist2 = Query.make("difangmeishi").limit(4).order("id desc").select();
|
||||||
|
assign("difangmeishilist2" , difangmeishilist2);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> lvyouxianlulist3 = Query.make("lvyouxianlu").limit(4).order("id desc").select();
|
||||||
|
assign("lvyouxianlulist3" , lvyouxianlulist3);
|
||||||
|
|
||||||
|
|
||||||
|
ArrayList<HashMap> xinwenxinxilist4 = Query.make("xinwenxinxi").limit(4).order("id desc").select();
|
||||||
|
assign("xinwenxinxilist4" , xinwenxinxilist4);
|
||||||
|
if(isAjax())
|
||||||
|
{
|
||||||
|
return json();
|
||||||
|
}
|
||||||
|
return "index";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,131 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "jingdianxinxi")
|
||||||
|
public class Jingdianxinxi implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "jingdianbianhao")
|
||||||
|
private String jingdianbianhao;
|
||||||
|
@Column(name = "jingdianmingcheng")
|
||||||
|
private String jingdianmingcheng;
|
||||||
|
@Column(name = "suoshudiqu")
|
||||||
|
private String suoshudiqu;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "kaifangshijian")
|
||||||
|
private String kaifangshijian;
|
||||||
|
@Column(name = "fujinmeishi")
|
||||||
|
private String fujinmeishi;
|
||||||
|
@Column(name = "dizhi")
|
||||||
|
private String dizhi;
|
||||||
|
@Column(name = "piaojia")
|
||||||
|
private Double piaojia;
|
||||||
|
@Column(name = "liulanliang")
|
||||||
|
private Integer liulanliang;
|
||||||
|
@Column(name = "miaoshu")
|
||||||
|
private String miaoshu;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getJingdianbianhao() {
|
||||||
|
return jingdianbianhao;
|
||||||
|
}
|
||||||
|
public void setJingdianbianhao(String jingdianbianhao) {
|
||||||
|
this.jingdianbianhao = jingdianbianhao == null ? "" : jingdianbianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getJingdianmingcheng() {
|
||||||
|
return jingdianmingcheng;
|
||||||
|
}
|
||||||
|
public void setJingdianmingcheng(String jingdianmingcheng) {
|
||||||
|
this.jingdianmingcheng = jingdianmingcheng == null ? "" : jingdianmingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSuoshudiqu() {
|
||||||
|
return suoshudiqu;
|
||||||
|
}
|
||||||
|
public void setSuoshudiqu(String suoshudiqu) {
|
||||||
|
this.suoshudiqu = suoshudiqu == null ? "" : suoshudiqu.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKaifangshijian() {
|
||||||
|
return kaifangshijian;
|
||||||
|
}
|
||||||
|
public void setKaifangshijian(String kaifangshijian) {
|
||||||
|
this.kaifangshijian = kaifangshijian == null ? "" : kaifangshijian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFujinmeishi() {
|
||||||
|
return fujinmeishi;
|
||||||
|
}
|
||||||
|
public void setFujinmeishi(String fujinmeishi) {
|
||||||
|
this.fujinmeishi = fujinmeishi == null ? "" : fujinmeishi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDizhi() {
|
||||||
|
return dizhi;
|
||||||
|
}
|
||||||
|
public void setDizhi(String dizhi) {
|
||||||
|
this.dizhi = dizhi == null ? "" : dizhi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getPiaojia() {
|
||||||
|
return piaojia;
|
||||||
|
}
|
||||||
|
public void setPiaojia(Double piaojia) {
|
||||||
|
this.piaojia = piaojia == null ? 0.0f : piaojia;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLiulanliang() {
|
||||||
|
return liulanliang;
|
||||||
|
}
|
||||||
|
public void setLiulanliang(Integer liulanliang) {
|
||||||
|
this.liulanliang = liulanliang == null ? 0 : liulanliang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMiaoshu() {
|
||||||
|
return miaoshu;
|
||||||
|
}
|
||||||
|
public void setMiaoshu(String miaoshu) {
|
||||||
|
this.miaoshu = miaoshu == null ? "" : miaoshu.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Jingdianxinxi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface JingdianxinxiMapper extends MapperBase<Jingdianxinxi> {
|
||||||
|
}
|
||||||
@ -0,0 +1,55 @@
|
|||||||
|
package com.spring.util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Json 数据返回格式
|
||||||
|
*/
|
||||||
|
public class JsonResult {
|
||||||
|
private Integer code;
|
||||||
|
private String msg;
|
||||||
|
private Object data;
|
||||||
|
|
||||||
|
public JsonResult(Integer code , String msg , Object data)
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
this.msg = msg;
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public JsonResult(Object data)
|
||||||
|
{
|
||||||
|
this.data = data;
|
||||||
|
setCode(0);
|
||||||
|
setMsg("");
|
||||||
|
}
|
||||||
|
|
||||||
|
public JsonResult(String msg)
|
||||||
|
{
|
||||||
|
this.msg = msg;
|
||||||
|
setData(null);
|
||||||
|
setCode(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCode(Integer code) {
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsg() {
|
||||||
|
return msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMsg(String msg) {
|
||||||
|
this.msg = msg;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Object getData() {
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setData(Object data) {
|
||||||
|
this.data = data;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,86 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "liuyanban")
|
||||||
|
public class Liuyanban implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "xingming")
|
||||||
|
private String xingming;
|
||||||
|
@Column(name = "lianxidianhua")
|
||||||
|
private String lianxidianhua;
|
||||||
|
@Column(name = "liuyanneirong")
|
||||||
|
private String liuyanneirong;
|
||||||
|
@Column(name = "liuyanren")
|
||||||
|
private String liuyanren;
|
||||||
|
@Column(name = "huifuneirong")
|
||||||
|
private String huifuneirong;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getXingming() {
|
||||||
|
return xingming;
|
||||||
|
}
|
||||||
|
public void setXingming(String xingming) {
|
||||||
|
this.xingming = xingming == null ? "" : xingming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianxidianhua() {
|
||||||
|
return lianxidianhua;
|
||||||
|
}
|
||||||
|
public void setLianxidianhua(String lianxidianhua) {
|
||||||
|
this.lianxidianhua = lianxidianhua == null ? "" : lianxidianhua.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiuyanneirong() {
|
||||||
|
return liuyanneirong;
|
||||||
|
}
|
||||||
|
public void setLiuyanneirong(String liuyanneirong) {
|
||||||
|
this.liuyanneirong = liuyanneirong == null ? "" : liuyanneirong.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLiuyanren() {
|
||||||
|
return liuyanren;
|
||||||
|
}
|
||||||
|
public void setLiuyanren(String liuyanren) {
|
||||||
|
this.liuyanren = liuyanren == null ? "" : liuyanren.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHuifuneirong() {
|
||||||
|
return huifuneirong;
|
||||||
|
}
|
||||||
|
public void setHuifuneirong(String huifuneirong) {
|
||||||
|
this.huifuneirong = huifuneirong == null ? "" : huifuneirong.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Liuyanban;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface LiuyanbanMapper extends MapperBase<Liuyanban> {
|
||||||
|
}
|
||||||
@ -0,0 +1,68 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "lunbotu")
|
||||||
|
public class Lunbotu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "title")
|
||||||
|
private String title;
|
||||||
|
@Column(name = "image")
|
||||||
|
private String image;
|
||||||
|
@Column(name = "url")
|
||||||
|
private String url;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getTitle() {
|
||||||
|
return title;
|
||||||
|
}
|
||||||
|
public void setTitle(String title) {
|
||||||
|
this.title = title == null ? "" : title.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getImage() {
|
||||||
|
return image;
|
||||||
|
}
|
||||||
|
public void setImage(String image) {
|
||||||
|
this.image = image == null ? "" : image.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url == null ? "" : url.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Lunbotu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface LunbotuMapper extends MapperBase<Lunbotu> {
|
||||||
|
}
|
||||||
@ -0,0 +1,135 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "lvyouxianlu")
|
||||||
|
public class Lvyouxianlu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "xianlubianhao")
|
||||||
|
private String xianlubianhao;
|
||||||
|
@Column(name = "xianlumingcheng")
|
||||||
|
private String xianlumingcheng;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "chufadi")
|
||||||
|
private String chufadi;
|
||||||
|
@Column(name = "tujingdi")
|
||||||
|
private String tujingdi;
|
||||||
|
@Column(name = "zhongdian")
|
||||||
|
private String zhongdian;
|
||||||
|
@Column(name = "jiage")
|
||||||
|
private Double jiage;
|
||||||
|
@Column(name = "liulanliang")
|
||||||
|
private Integer liulanliang;
|
||||||
|
@Column(name = "xianlutese")
|
||||||
|
private String xianlutese;
|
||||||
|
@Column(name = "xianlujianjie")
|
||||||
|
private String xianlujianjie;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getYudingCount()
|
||||||
|
{
|
||||||
|
return Query.make("yuding").where("lvyouxianluid" , id).count();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getXianlubianhao() {
|
||||||
|
return xianlubianhao;
|
||||||
|
}
|
||||||
|
public void setXianlubianhao(String xianlubianhao) {
|
||||||
|
this.xianlubianhao = xianlubianhao == null ? "" : xianlubianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlumingcheng() {
|
||||||
|
return xianlumingcheng;
|
||||||
|
}
|
||||||
|
public void setXianlumingcheng(String xianlumingcheng) {
|
||||||
|
this.xianlumingcheng = xianlumingcheng == null ? "" : xianlumingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChufadi() {
|
||||||
|
return chufadi;
|
||||||
|
}
|
||||||
|
public void setChufadi(String chufadi) {
|
||||||
|
this.chufadi = chufadi == null ? "" : chufadi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTujingdi() {
|
||||||
|
return tujingdi;
|
||||||
|
}
|
||||||
|
public void setTujingdi(String tujingdi) {
|
||||||
|
this.tujingdi = tujingdi == null ? "" : tujingdi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZhongdian() {
|
||||||
|
return zhongdian;
|
||||||
|
}
|
||||||
|
public void setZhongdian(String zhongdian) {
|
||||||
|
this.zhongdian = zhongdian == null ? "" : zhongdian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getJiage() {
|
||||||
|
return jiage;
|
||||||
|
}
|
||||||
|
public void setJiage(Double jiage) {
|
||||||
|
this.jiage = jiage == null ? 0.0f : jiage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getLiulanliang() {
|
||||||
|
return liulanliang;
|
||||||
|
}
|
||||||
|
public void setLiulanliang(Integer liulanliang) {
|
||||||
|
this.liulanliang = liulanliang == null ? 0 : liulanliang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlutese() {
|
||||||
|
return xianlutese;
|
||||||
|
}
|
||||||
|
public void setXianlutese(String xianlutese) {
|
||||||
|
this.xianlutese = xianlutese == null ? "" : xianlutese.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlujianjie() {
|
||||||
|
return xianlujianjie;
|
||||||
|
}
|
||||||
|
public void setXianlujianjie(String xianlujianjie) {
|
||||||
|
this.xianlujianjie = xianlujianjie == null ? "" : xianlujianjie.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Lvyouxianlu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface LvyouxianluMapper extends MapperBase<Lvyouxianlu> {
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "meishifenlei")
|
||||||
|
public class Meishifenlei implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "fenleimingcheng")
|
||||||
|
private String fenleimingcheng;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getFenleimingcheng() {
|
||||||
|
return fenleimingcheng;
|
||||||
|
}
|
||||||
|
public void setFenleimingcheng(String fenleimingcheng) {
|
||||||
|
this.fenleimingcheng = fenleimingcheng == null ? "" : fenleimingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Meishifenlei;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface MeishifenleiMapper extends MapperBase<Meishifenlei> {
|
||||||
|
}
|
||||||
@ -0,0 +1,48 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
import dao.CommDAO;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class PaymentController extends BaseController{
|
||||||
|
/**
|
||||||
|
* 处理支付
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@RequestMapping("/payment")
|
||||||
|
public String payment()
|
||||||
|
{
|
||||||
|
String id,biao;
|
||||||
|
if(request.getParameter("out_trade_no")!=null)
|
||||||
|
{
|
||||||
|
String[] out_trade_no = request.getParameter("out_trade_no").split("\\-");
|
||||||
|
id = out_trade_no[2];
|
||||||
|
biao = out_trade_no[1];
|
||||||
|
|
||||||
|
}else{
|
||||||
|
id =request.getParameter("id");
|
||||||
|
biao =request.getParameter("biao");
|
||||||
|
}
|
||||||
|
|
||||||
|
String sql = "update " + biao + " set iszf='是' where id='" + id + "'";
|
||||||
|
new CommDAO().commOper(sql);
|
||||||
|
HashMap order = Query.make(biao).find(id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if("yuding".equals(biao))
|
||||||
|
{
|
||||||
|
Query.execute("update yuding set zhuangtai='预定成功' where id='"+order.get("id")+"'");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
String referer = Request.get("referer").equals("") ? "sy.do" : Request.get("referer");
|
||||||
|
return showSuccess("支付成功",referer);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,7 @@
|
|||||||
|
package dao;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 继承自库中jntoo-query.jar
|
||||||
|
*/
|
||||||
|
public class Query extends net.jntoo.db.Query {
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.spring.util;
|
||||||
|
|
||||||
|
import com.spring.BootApplication;
|
||||||
|
import net.jntoo.annotation.JdbcConnection;
|
||||||
|
import net.jntoo.annotation.RequestJdbcConnection;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
||||||
|
import javax.sql.DataSource;
|
||||||
|
import java.sql.Connection;
|
||||||
|
|
||||||
|
@JdbcConnection
|
||||||
|
public class QueryConnection {
|
||||||
|
|
||||||
|
static private Connection conn = null;
|
||||||
|
// 让jntoo-query 获取链接
|
||||||
|
@RequestJdbcConnection
|
||||||
|
public Connection getConnect()
|
||||||
|
{
|
||||||
|
try{
|
||||||
|
if(conn == null || conn.isClosed()){
|
||||||
|
DataSource source = BootApplication.content.getBean(DataSource.class);
|
||||||
|
Connection connection = source.getConnection();
|
||||||
|
|
||||||
|
//System.out.println(connection);
|
||||||
|
conn = connection;
|
||||||
|
}
|
||||||
|
}catch (Exception e){
|
||||||
|
System.err.println("链接数据库出错");
|
||||||
|
}
|
||||||
|
return conn;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,52 @@
|
|||||||
|
package util.tld;
|
||||||
|
|
||||||
|
import dao.CommDAO;
|
||||||
|
|
||||||
|
import javax.servlet.jsp.JspException;
|
||||||
|
import javax.servlet.jsp.PageContext;
|
||||||
|
import javax.servlet.jsp.tagext.JspFragment;
|
||||||
|
import javax.servlet.jsp.tagext.SimpleTagSupport;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.StringWriter;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* jsp 页面ssm:sql 执行SQL语句
|
||||||
|
*/
|
||||||
|
public class QuerySql extends SimpleTagSupport {
|
||||||
|
|
||||||
|
private String var;
|
||||||
|
private String type;
|
||||||
|
public String getVar() {
|
||||||
|
return var;
|
||||||
|
}
|
||||||
|
public void setVar(String var) {
|
||||||
|
this.var = var;
|
||||||
|
}
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doTag() throws JspException, IOException {
|
||||||
|
JspFragment jf = this.getJspBody();
|
||||||
|
PageContext context = (PageContext)jf.getJspContext();
|
||||||
|
StringWriter sw = new StringWriter();
|
||||||
|
jf.invoke(sw);
|
||||||
|
String sql = sw.getBuffer().toString();
|
||||||
|
|
||||||
|
|
||||||
|
if(type.equals("select")){
|
||||||
|
List<HashMap> list = new CommDAO().select(sql);
|
||||||
|
context.setAttribute(var , list , PageContext.REQUEST_SCOPE);
|
||||||
|
}else if(type.equals("find")){
|
||||||
|
HashMap list = new CommDAO().find(sql);
|
||||||
|
context.setAttribute(var , list , PageContext.REQUEST_SCOPE);
|
||||||
|
}
|
||||||
|
//jf.invoke(null);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,119 @@
|
|||||||
|
package com.base;
|
||||||
|
|
||||||
|
import com.github.pagehelper.PageHelper;
|
||||||
|
import com.github.pagehelper.PageInfo;
|
||||||
|
import com.spring.util.CollectList;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 抽象Service基本类实现接口
|
||||||
|
* @param <E>
|
||||||
|
*/
|
||||||
|
abstract public class ServiceBase<E> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 虚函数,派生类必须继承
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
abstract protected Mapper<E> getDao();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索数据
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> select() {
|
||||||
|
return getDao().select(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据实体类搜索数据
|
||||||
|
* @param y
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> select(E y) {
|
||||||
|
return getDao().select(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键获取实体类
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public E find(Object id) {
|
||||||
|
return getDao().selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据实体类获取实体类
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public E findEntity(E id)
|
||||||
|
{
|
||||||
|
return getDao().selectOne(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 搜索分页
|
||||||
|
* @param obj
|
||||||
|
* @param page
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> selectPage(E obj, int page, int pageSize) {
|
||||||
|
//int count = dao.selectCount(obj);
|
||||||
|
|
||||||
|
PageHelper.startPage(page , pageSize , true);
|
||||||
|
List<E> list = select(obj);
|
||||||
|
PageInfo<E> pageInfo = new PageInfo<E>(list);
|
||||||
|
new CollectList(pageInfo.getTotal() , pageSize , page);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据Example搜索分页
|
||||||
|
* @param obj
|
||||||
|
* @param page
|
||||||
|
* @param pageSize
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public List<E> selectPageExample(Example obj , int page , int pageSize)
|
||||||
|
{
|
||||||
|
PageHelper.startPage(page , pageSize , true);
|
||||||
|
List<E> list = getDao().selectByExample(obj);
|
||||||
|
PageInfo<E> pageInfo = new PageInfo<E>(list);
|
||||||
|
new CollectList(pageInfo.getTotal() , pageSize , page);
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据主键删除一行数据
|
||||||
|
* @param id
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int delete(Object id)
|
||||||
|
{
|
||||||
|
return getDao().deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 插入实体类
|
||||||
|
* @param y
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int insert(E y) {
|
||||||
|
return getDao().insertSelective(y);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新实体类
|
||||||
|
* @param y
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public int update(E y) {
|
||||||
|
return getDao().updateByPrimaryKeySelective(y);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,127 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Map;
|
||||||
|
import javax.persistence.*;
|
||||||
|
|
||||||
|
@Table(name = "shoucangjilu")
|
||||||
|
public class Shoucangjilu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
private String username;
|
||||||
|
|
||||||
|
private Integer xwid;
|
||||||
|
|
||||||
|
private String biao;
|
||||||
|
|
||||||
|
private String ziduan;
|
||||||
|
private String biaoti;
|
||||||
|
private String url;
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return id
|
||||||
|
*/
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBiaoti() {
|
||||||
|
return biaoti;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBiaoti(String biaoti) {
|
||||||
|
this.biaoti = biaoti;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return username
|
||||||
|
*/
|
||||||
|
public String getUsername() {
|
||||||
|
return username;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param username
|
||||||
|
*/
|
||||||
|
public void setUsername(String username) {
|
||||||
|
this.username = username == null ? null : username.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return xwid
|
||||||
|
*/
|
||||||
|
public Integer getXwid() {
|
||||||
|
return xwid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param xwid
|
||||||
|
*/
|
||||||
|
public void setXwid(Integer xwid) {
|
||||||
|
this.xwid = xwid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return biao
|
||||||
|
*/
|
||||||
|
public String getBiao() {
|
||||||
|
return biao;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param biao
|
||||||
|
*/
|
||||||
|
public void setBiao(String biao) {
|
||||||
|
this.biao = biao == null ? null : biao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return ziduan
|
||||||
|
*/
|
||||||
|
public String getZiduan() {
|
||||||
|
return ziduan;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param ziduan
|
||||||
|
*/
|
||||||
|
public void setZiduan(String ziduan) {
|
||||||
|
this.ziduan = ziduan == null ? null : ziduan.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return addtime
|
||||||
|
*/
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param addtime
|
||||||
|
*/
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,100 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
import com.spring.entity.Shoucangjilu;
|
||||||
|
import com.spring.service.ShoucangjiluService;
|
||||||
|
import dao.Query;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import tk.mybatis.mapper.entity.Example;
|
||||||
|
import util.Info;
|
||||||
|
import util.Request;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收藏控制器
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class ShoucangjiluController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
protected ShoucangjiluService service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 加入收藏
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/collect")
|
||||||
|
public String collect()
|
||||||
|
{
|
||||||
|
if(!checkLogin()){
|
||||||
|
return showError("您尚未登录请登录后在操作");
|
||||||
|
}
|
||||||
|
int id=Request.getInt("id");
|
||||||
|
String biao=request.getParameter("biao");
|
||||||
|
String ziduan=request.getParameter("ziduan");
|
||||||
|
Shoucangjilu scjl = new Shoucangjilu();
|
||||||
|
scjl.setXwid(id);
|
||||||
|
scjl.setBiao(biao);
|
||||||
|
scjl.setBiaoti(Query.make(biao).where("id" , id).value(ziduan));
|
||||||
|
scjl.setUrl(request.getHeader("referer"));
|
||||||
|
scjl.setZiduan(ziduan);
|
||||||
|
scjl.setAddtime(Info.getDateStr());
|
||||||
|
scjl.setUsername(request.getSession().getAttribute("username").toString());
|
||||||
|
service.insert(scjl);
|
||||||
|
return showSuccess("收藏成功" , request.getHeader("referer"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看收藏列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/shoucangjilu_list")
|
||||||
|
public String index()
|
||||||
|
{
|
||||||
|
int page = Math.max(Integer.valueOf(Request.get("page" , "1")) , 1);
|
||||||
|
Example example = new Example(Shoucangjilu.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
|
||||||
|
criteria.andEqualTo("username" , request.getSession().getAttribute("username"));
|
||||||
|
List<Shoucangjilu> list = service.selectPageExample(example , page , 15);
|
||||||
|
if(isAjax()){
|
||||||
|
return json();
|
||||||
|
}
|
||||||
|
return "shoucangjilu_list";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查看我的收藏
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/shoucangjilu_list2")
|
||||||
|
public String index2()
|
||||||
|
{
|
||||||
|
int page = Math.max(Integer.valueOf(Request.get("page" , "1")) , 1);
|
||||||
|
Example example = new Example(Shoucangjilu.class);
|
||||||
|
Example.Criteria criteria = example.createCriteria();
|
||||||
|
criteria.andEqualTo("username" , request.getSession().getAttribute("username"));
|
||||||
|
List<Shoucangjilu> list = service.selectPageExample(example , page , 15);
|
||||||
|
assign("list" , list);
|
||||||
|
if(isAjax()){
|
||||||
|
return json();
|
||||||
|
}
|
||||||
|
return "shoucangjilu_list";
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除收藏
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@RequestMapping("/shoucangjilu_delete")
|
||||||
|
public String delete()
|
||||||
|
{
|
||||||
|
String id = Request.get("id");
|
||||||
|
service.delete(id);
|
||||||
|
return showSuccess("删除成功");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Shoucangjilu;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 表shoucangjilu的mapper
|
||||||
|
*/
|
||||||
|
@Repository
|
||||||
|
public interface ShoucangjiluMapper extends MapperBase<Shoucangjilu> {
|
||||||
|
}
|
||||||
@ -0,0 +1,93 @@
|
|||||||
|
package util;
|
||||||
|
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
|
/**
|
||||||
|
* 日期处理类
|
||||||
|
*/
|
||||||
|
public class Timer {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取某日期的上个月开始日期
|
||||||
|
* @param currentDate
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getPrevMonthStartDate(String currentDate , String format){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(currentDate));
|
||||||
|
c.add(Calendar.MONTH, -1);
|
||||||
|
//设置为1号,当前日期既为本月第一天
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取某日期的上个月结束日期
|
||||||
|
* @param date
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getPrevMonthEndDate(String date , String format){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(date));
|
||||||
|
c.add(Calendar.MONTH , -1);
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
|
c.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
c.set(Calendar.MINUTE, 59);
|
||||||
|
c.set(Calendar.SECOND, 59);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 获取某日期的 当前月开始日期
|
||||||
|
* @param currentDate
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getMonthStartDate(String currentDate , String format){
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(currentDate));
|
||||||
|
c.add(Calendar.MONTH, 0);
|
||||||
|
//设置为1号,当前日期既为本月第一天
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, 1);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取某日期的 当前月结束日期
|
||||||
|
* @param date
|
||||||
|
* @param format
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
public static Date getMonthEndDate(String date , String format)
|
||||||
|
{
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat(format);
|
||||||
|
Calendar c = Calendar.getInstance();
|
||||||
|
try {
|
||||||
|
c.setTime(sdf.parse(date));
|
||||||
|
c.set(Calendar.DAY_OF_MONTH, c.getActualMaximum(Calendar.DAY_OF_MONTH));
|
||||||
|
c.set(Calendar.HOUR_OF_DAY, 23);
|
||||||
|
c.set(Calendar.MINUTE, 59);
|
||||||
|
c.set(Calendar.SECOND, 59);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
return c.getTime();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,18 @@
|
|||||||
|
package com.spring.config;
|
||||||
|
import com.spring.interceptor.TokenInterceptor;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
|
||||||
|
public class TokenConfig implements WebMvcConfigurer {
|
||||||
|
@Override
|
||||||
|
public void addInterceptors(InterceptorRegistry registry) {
|
||||||
|
//注册TokenInterceptor拦截器
|
||||||
|
InterceptorRegistration registration = registry.addInterceptor(new TokenInterceptor());
|
||||||
|
registration.addPathPatterns("/**"); //所有路径都被拦截
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,90 @@
|
|||||||
|
package com.spring.controller;
|
||||||
|
|
||||||
|
import org.apache.commons.io.FileUtils;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传控制器
|
||||||
|
*/
|
||||||
|
@Controller
|
||||||
|
public class UploadController extends BaseController{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 上传文件
|
||||||
|
* @param fujian
|
||||||
|
* @return
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
@RequestMapping(value = "/upload_re")
|
||||||
|
public String Upload(MultipartFile fujian) throws Exception
|
||||||
|
{
|
||||||
|
String fileName = fujian.getOriginalFilename();
|
||||||
|
String suffixName = fileName.substring(fileName.lastIndexOf("."));
|
||||||
|
fileName = UUID.randomUUID()+suffixName;
|
||||||
|
String filePath = getFolder("upload");
|
||||||
|
// String filePath="upload/20210423/";
|
||||||
|
try{
|
||||||
|
|
||||||
|
File file = new File( getPhysicalPath(filePath)+"/"+fileName);
|
||||||
|
//将资源保存到本地文件夹下
|
||||||
|
String localPath ="bysj-server/src/main/webapp/upload/20210423";
|
||||||
|
|
||||||
|
File localFile=new File(localPath);
|
||||||
|
if(!localFile.exists()){
|
||||||
|
localFile.mkdirs();
|
||||||
|
}
|
||||||
|
//获取本地路径
|
||||||
|
File localStaticFile=new File(localFile.getAbsolutePath()+"\\"+fileName);
|
||||||
|
System.out.println("localStaticFile====>"+localStaticFile);
|
||||||
|
System.out.println("本地存储真实位置:"+localFile.getAbsolutePath()+"\\"+fileName);
|
||||||
|
FileUtils.copyInputStreamToFile(fujian.getInputStream(),localStaticFile);
|
||||||
|
fujian.transferTo(file);
|
||||||
|
System.out.println("setAttributefilePath=====fileName:"+filePath+"/"+fileName);
|
||||||
|
request.setAttribute("url",filePath+fileName);
|
||||||
|
if(isAjax())
|
||||||
|
{
|
||||||
|
return jsonResult(request.getAttribute("url"));
|
||||||
|
}
|
||||||
|
return "upload";
|
||||||
|
}catch (Exception e){
|
||||||
|
return showError(e.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String getFolder(String path) {
|
||||||
|
SimpleDateFormat formater = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
path += "/" + "20210423" +"/";
|
||||||
|
File dir = new File(this.getPhysicalPath(path));
|
||||||
|
|
||||||
|
if (!dir.exists()) {
|
||||||
|
try {
|
||||||
|
dir.mkdirs();
|
||||||
|
} catch (Exception e) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据传入的虚拟路径获取物理路径
|
||||||
|
*
|
||||||
|
* @param path
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
private String getPhysicalPath(String path) {
|
||||||
|
String servletPath = this.request.getServletPath();
|
||||||
|
System.out.println("servletPath===>"+servletPath);
|
||||||
|
String realPath = this.request.getSession().getServletContext()
|
||||||
|
.getRealPath(servletPath);
|
||||||
|
System.out.println("realPath===>"+realPath);
|
||||||
|
return new File(realPath).getParent() +"/" +path;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,50 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "xinwenfenlei")
|
||||||
|
public class Xinwenfenlei implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "fenleimingcheng")
|
||||||
|
private String fenleimingcheng;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getFenleimingcheng() {
|
||||||
|
return fenleimingcheng;
|
||||||
|
}
|
||||||
|
public void setFenleimingcheng(String fenleimingcheng) {
|
||||||
|
this.fenleimingcheng = fenleimingcheng == null ? "" : fenleimingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Xinwenfenlei;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface XinwenfenleiMapper extends MapperBase<Xinwenfenlei> {
|
||||||
|
}
|
||||||
@ -0,0 +1,95 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "xinwenxinxi")
|
||||||
|
public class Xinwenxinxi implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "biaoti")
|
||||||
|
private String biaoti;
|
||||||
|
@Column(name = "fenlei")
|
||||||
|
private String fenlei;
|
||||||
|
@Column(name = "tupian")
|
||||||
|
private String tupian;
|
||||||
|
@Column(name = "tianjiaren")
|
||||||
|
private String tianjiaren;
|
||||||
|
@Column(name = "dianjilv")
|
||||||
|
private Integer dianjilv;
|
||||||
|
@Column(name = "neirong")
|
||||||
|
private String neirong;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getBiaoti() {
|
||||||
|
return biaoti;
|
||||||
|
}
|
||||||
|
public void setBiaoti(String biaoti) {
|
||||||
|
this.biaoti = biaoti == null ? "" : biaoti.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFenlei() {
|
||||||
|
return fenlei;
|
||||||
|
}
|
||||||
|
public void setFenlei(String fenlei) {
|
||||||
|
this.fenlei = fenlei == null ? "" : fenlei.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTupian() {
|
||||||
|
return tupian;
|
||||||
|
}
|
||||||
|
public void setTupian(String tupian) {
|
||||||
|
this.tupian = tupian == null ? "" : tupian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTianjiaren() {
|
||||||
|
return tianjiaren;
|
||||||
|
}
|
||||||
|
public void setTianjiaren(String tianjiaren) {
|
||||||
|
this.tianjiaren = tianjiaren == null ? "" : tianjiaren.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDianjilv() {
|
||||||
|
return dianjilv;
|
||||||
|
}
|
||||||
|
public void setDianjilv(Integer dianjilv) {
|
||||||
|
this.dianjilv = dianjilv == null ? 0 : dianjilv;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getNeirong() {
|
||||||
|
return neirong;
|
||||||
|
}
|
||||||
|
public void setNeirong(String neirong) {
|
||||||
|
this.neirong = neirong == null ? "" : neirong.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Xinwenxinxi;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface XinwenxinxiMapper extends MapperBase<Xinwenxinxi> {
|
||||||
|
}
|
||||||
@ -0,0 +1,113 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "yonghu")
|
||||||
|
public class Yonghu implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "yonghuming")
|
||||||
|
private String yonghuming;
|
||||||
|
@Column(name = "mima")
|
||||||
|
private String mima;
|
||||||
|
@Column(name = "xingming")
|
||||||
|
private String xingming;
|
||||||
|
@Column(name = "xingbie")
|
||||||
|
private String xingbie;
|
||||||
|
@Column(name = "shouji")
|
||||||
|
private String shouji;
|
||||||
|
@Column(name = "youxiang")
|
||||||
|
private String youxiang;
|
||||||
|
@Column(name = "shenfenzheng")
|
||||||
|
private String shenfenzheng;
|
||||||
|
@Column(name = "touxiang")
|
||||||
|
private String touxiang;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getYonghuming() {
|
||||||
|
return yonghuming;
|
||||||
|
}
|
||||||
|
public void setYonghuming(String yonghuming) {
|
||||||
|
this.yonghuming = yonghuming == null ? "" : yonghuming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMima() {
|
||||||
|
return mima;
|
||||||
|
}
|
||||||
|
public void setMima(String mima) {
|
||||||
|
this.mima = mima == null ? "" : mima.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXingming() {
|
||||||
|
return xingming;
|
||||||
|
}
|
||||||
|
public void setXingming(String xingming) {
|
||||||
|
this.xingming = xingming == null ? "" : xingming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXingbie() {
|
||||||
|
return xingbie;
|
||||||
|
}
|
||||||
|
public void setXingbie(String xingbie) {
|
||||||
|
this.xingbie = xingbie == null ? "" : xingbie.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShouji() {
|
||||||
|
return shouji;
|
||||||
|
}
|
||||||
|
public void setShouji(String shouji) {
|
||||||
|
this.shouji = shouji == null ? "" : shouji.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYouxiang() {
|
||||||
|
return youxiang;
|
||||||
|
}
|
||||||
|
public void setYouxiang(String youxiang) {
|
||||||
|
this.youxiang = youxiang == null ? "" : youxiang.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getShenfenzheng() {
|
||||||
|
return shenfenzheng;
|
||||||
|
}
|
||||||
|
public void setShenfenzheng(String shenfenzheng) {
|
||||||
|
this.shenfenzheng = shenfenzheng == null ? "" : shenfenzheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTouxiang() {
|
||||||
|
return touxiang;
|
||||||
|
}
|
||||||
|
public void setTouxiang(String touxiang) {
|
||||||
|
this.touxiang = touxiang == null ? "" : touxiang.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Yonghu;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface YonghuMapper extends MapperBase<Yonghu> {
|
||||||
|
Yonghu login(Yonghu yonghu);
|
||||||
|
}
|
||||||
@ -0,0 +1,59 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "youqinglianjie")
|
||||||
|
public class Youqinglianjie implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "wangzhanmingcheng")
|
||||||
|
private String wangzhanmingcheng;
|
||||||
|
@Column(name = "wangzhi")
|
||||||
|
private String wangzhi;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getWangzhanmingcheng() {
|
||||||
|
return wangzhanmingcheng;
|
||||||
|
}
|
||||||
|
public void setWangzhanmingcheng(String wangzhanmingcheng) {
|
||||||
|
this.wangzhanmingcheng = wangzhanmingcheng == null ? "" : wangzhanmingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getWangzhi() {
|
||||||
|
return wangzhi;
|
||||||
|
}
|
||||||
|
public void setWangzhi(String wangzhi) {
|
||||||
|
this.wangzhi = wangzhi == null ? "" : wangzhi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Youqinglianjie;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface YouqinglianjieMapper extends MapperBase<Youqinglianjie> {
|
||||||
|
}
|
||||||
@ -0,0 +1,174 @@
|
|||||||
|
package com.spring.entity;
|
||||||
|
|
||||||
|
import javax.persistence.Column;
|
||||||
|
import javax.persistence.GeneratedValue;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import javax.persistence.Table;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
import net.jntoo.db.Query;
|
||||||
|
|
||||||
|
@Table(name = "yuding")
|
||||||
|
public class Yuding implements Serializable {
|
||||||
|
@GeneratedValue(generator = "JDBC") // 自增的主键映射
|
||||||
|
@Id
|
||||||
|
@Column(name = "id",insertable=false)
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
@Column(name = "lvyouxianluid")
|
||||||
|
private Integer lvyouxianluid;
|
||||||
|
@Column(name = "xianlubianhao")
|
||||||
|
private String xianlubianhao;
|
||||||
|
@Column(name = "xianlumingcheng")
|
||||||
|
private String xianlumingcheng;
|
||||||
|
@Column(name = "chufadi")
|
||||||
|
private String chufadi;
|
||||||
|
@Column(name = "tujingdi")
|
||||||
|
private String tujingdi;
|
||||||
|
@Column(name = "zhongdian")
|
||||||
|
private String zhongdian;
|
||||||
|
@Column(name = "jiage")
|
||||||
|
private Double jiage;
|
||||||
|
@Column(name = "dingdanhao")
|
||||||
|
private String dingdanhao;
|
||||||
|
@Column(name = "yudingshijian")
|
||||||
|
private String yudingshijian;
|
||||||
|
@Column(name = "yudingrenxingming")
|
||||||
|
private String yudingrenxingming;
|
||||||
|
@Column(name = "lianxifangshi")
|
||||||
|
private String lianxifangshi;
|
||||||
|
@Column(name = "zhuangtai")
|
||||||
|
private String zhuangtai;
|
||||||
|
@Column(name = "beizhu")
|
||||||
|
private String beizhu;
|
||||||
|
@Column(name = "yudingren")
|
||||||
|
private String yudingren;
|
||||||
|
@Column(name = "addtime")
|
||||||
|
private String addtime;
|
||||||
|
private String iszf;
|
||||||
|
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
public Integer getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(Integer id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public Integer getLvyouxianluid() {
|
||||||
|
return lvyouxianluid;
|
||||||
|
}
|
||||||
|
public void setLvyouxianluid(Integer lvyouxianluid) {
|
||||||
|
this.lvyouxianluid = lvyouxianluid == null ? 0 : lvyouxianluid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlubianhao() {
|
||||||
|
return xianlubianhao;
|
||||||
|
}
|
||||||
|
public void setXianlubianhao(String xianlubianhao) {
|
||||||
|
this.xianlubianhao = xianlubianhao == null ? "" : xianlubianhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXianlumingcheng() {
|
||||||
|
return xianlumingcheng;
|
||||||
|
}
|
||||||
|
public void setXianlumingcheng(String xianlumingcheng) {
|
||||||
|
this.xianlumingcheng = xianlumingcheng == null ? "" : xianlumingcheng.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getChufadi() {
|
||||||
|
return chufadi;
|
||||||
|
}
|
||||||
|
public void setChufadi(String chufadi) {
|
||||||
|
this.chufadi = chufadi == null ? "" : chufadi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTujingdi() {
|
||||||
|
return tujingdi;
|
||||||
|
}
|
||||||
|
public void setTujingdi(String tujingdi) {
|
||||||
|
this.tujingdi = tujingdi == null ? "" : tujingdi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZhongdian() {
|
||||||
|
return zhongdian;
|
||||||
|
}
|
||||||
|
public void setZhongdian(String zhongdian) {
|
||||||
|
this.zhongdian = zhongdian == null ? "" : zhongdian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Double getJiage() {
|
||||||
|
return jiage;
|
||||||
|
}
|
||||||
|
public void setJiage(Double jiage) {
|
||||||
|
this.jiage = jiage == null ? 0.0f : jiage;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDingdanhao() {
|
||||||
|
return dingdanhao;
|
||||||
|
}
|
||||||
|
public void setDingdanhao(String dingdanhao) {
|
||||||
|
this.dingdanhao = dingdanhao == null ? "" : dingdanhao.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYudingshijian() {
|
||||||
|
return yudingshijian;
|
||||||
|
}
|
||||||
|
public void setYudingshijian(String yudingshijian) {
|
||||||
|
this.yudingshijian = yudingshijian == null ? "" : yudingshijian.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYudingrenxingming() {
|
||||||
|
return yudingrenxingming;
|
||||||
|
}
|
||||||
|
public void setYudingrenxingming(String yudingrenxingming) {
|
||||||
|
this.yudingrenxingming = yudingrenxingming == null ? "" : yudingrenxingming.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getLianxifangshi() {
|
||||||
|
return lianxifangshi;
|
||||||
|
}
|
||||||
|
public void setLianxifangshi(String lianxifangshi) {
|
||||||
|
this.lianxifangshi = lianxifangshi == null ? "" : lianxifangshi.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getZhuangtai() {
|
||||||
|
return zhuangtai;
|
||||||
|
}
|
||||||
|
public void setZhuangtai(String zhuangtai) {
|
||||||
|
this.zhuangtai = zhuangtai == null ? "" : zhuangtai.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBeizhu() {
|
||||||
|
return beizhu;
|
||||||
|
}
|
||||||
|
public void setBeizhu(String beizhu) {
|
||||||
|
this.beizhu = beizhu == null ? "" : beizhu.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getYudingren() {
|
||||||
|
return yudingren;
|
||||||
|
}
|
||||||
|
public void setYudingren(String yudingren) {
|
||||||
|
this.yudingren = yudingren == null ? "" : yudingren.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getAddtime() {
|
||||||
|
return addtime;
|
||||||
|
}
|
||||||
|
public void setAddtime(String addtime) {
|
||||||
|
this.addtime = addtime == null ? "" : addtime.trim();
|
||||||
|
}
|
||||||
|
public String getIszf() {
|
||||||
|
return iszf;
|
||||||
|
}
|
||||||
|
public void setIszf(String iszf) {
|
||||||
|
this.iszf = iszf == null ? "" : iszf.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
package com.spring.dao;
|
||||||
|
|
||||||
|
import com.base.MapperBase;
|
||||||
|
import com.spring.entity.Yuding;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
|
|
||||||
|
@Repository
|
||||||
|
public interface YudingMapper extends MapperBase<Yuding> {
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue