├── .gitignore ├── pom.xml └── src ├── main ├── java │ └── com │ │ └── xuwei │ │ ├── SzxyApplication.java │ │ ├── common │ │ ├── ActionResult.java │ │ ├── GlobalExceptionHandler.java │ │ └── ReturnEnum.java │ │ ├── config │ │ ├── ImgConfig.java │ │ ├── mybatis │ │ │ ├── MapWrapperFactory.java │ │ │ ├── MyBatisConfig.java │ │ │ └── MyMapWrapper.java │ │ └── swagger │ │ │ └── Swagger.java │ │ ├── entity │ │ ├── LyEntity.java │ │ ├── ProductEntity.java │ │ ├── ReplyEntity.java │ │ ├── SearchEntity.java │ │ ├── TopicEntity.java │ │ └── UserEntity.java │ │ ├── home │ │ ├── controller │ │ │ └── HomeController.java │ │ ├── dao │ │ │ ├── HomeDao.java │ │ │ └── provider │ │ │ │ └── HomeDaoProvider.java │ │ └── service │ │ │ ├── HomeService.java │ │ │ └── impl │ │ │ └── HomeServiceImpl.java │ │ ├── index │ │ ├── controller │ │ │ └── IndexController.java │ │ ├── dao │ │ │ ├── IndexDao.java │ │ │ └── provider │ │ │ │ └── IndexDaoProvider.java │ │ └── service │ │ │ ├── IndexService.java │ │ │ └── impl │ │ │ └── IndexServiceImpl.java │ │ ├── page │ │ └── controller │ │ │ └── PageController.java │ │ ├── topic │ │ ├── controller │ │ │ └── TopicController.java │ │ ├── dao │ │ │ ├── TopicDao.java │ │ │ └── provider │ │ │ │ └── TopicDaoProvider.java │ │ └── service │ │ │ ├── TopicService.java │ │ │ └── impl │ │ │ └── TopicServiceImpl.java │ │ ├── user │ │ ├── controller │ │ │ └── UserController.java │ │ ├── dao │ │ │ ├── UserDao.java │ │ │ └── provider │ │ │ │ └── UserDaoProvider.java │ │ └── service │ │ │ ├── UserService.java │ │ │ └── impl │ │ │ └── UserServiceImpl.java │ │ └── util │ │ ├── CommUtils.java │ │ ├── FastJsonUtils.java │ │ └── ResultUtils.java └── resources │ ├── application-dev.yaml │ ├── application.yaml │ ├── banner.txt │ ├── static │ ├── echarts │ │ └── echarts.min.js │ ├── home.html │ ├── home │ │ ├── css │ │ │ └── home.css │ │ ├── img │ │ │ ├── bg.jpg │ │ │ ├── button.png │ │ │ ├── clock.png │ │ │ ├── clock2.png │ │ │ ├── edit.png │ │ │ ├── excel.png │ │ │ ├── ok.png │ │ │ ├── ok1.png │ │ │ ├── sky.jpg │ │ │ └── upload.png │ │ └── js │ │ │ └── home.js │ ├── index.html │ ├── index │ │ ├── css │ │ │ ├── bootstrap.css │ │ │ ├── index.css │ │ │ ├── jquery-ui-1.9.2.custom.css │ │ │ ├── overcast │ │ │ │ └── images │ │ │ │ │ ├── ui-icons_3383bb_256x240.png │ │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ │ ├── ui-icons_70b2e1_256x240.png │ │ │ │ │ ├── ui-icons_999999_256x240.png │ │ │ │ │ ├── ui-icons_fbc856_256x240.png │ │ │ │ │ └── xiala_jt01.png │ │ │ ├── paging.css │ │ │ └── style.css │ │ ├── img │ │ │ ├── bg.jpg │ │ │ ├── button.png │ │ │ ├── buy.png │ │ │ ├── ck.jpg │ │ │ ├── demo_1.jpg │ │ │ ├── demo_2.jpg │ │ │ ├── demo_3.jpg │ │ │ ├── demo_4.jpg │ │ │ ├── demo_5.jpg │ │ │ ├── head.gif │ │ │ ├── jiaoyi.png │ │ │ ├── kefu.png │ │ │ ├── laba.gif │ │ │ ├── lb_bg.png │ │ │ ├── logo.png │ │ │ ├── ly.png │ │ │ ├── next.gif │ │ │ ├── paobu.jpg │ │ │ ├── phone.jpg │ │ │ ├── prev.gif │ │ │ ├── school.png │ │ │ └── sun.jpg │ │ ├── js │ │ │ ├── custom.js │ │ │ ├── data.js │ │ │ ├── index.js │ │ │ ├── jquery-1.11.3.min.js │ │ │ ├── jquery-3.2.1.min.js │ │ │ ├── jquery-ui-1.9.2.custom.js │ │ │ ├── jquery.min.js │ │ │ ├── paging.js │ │ │ ├── scroll.js │ │ │ ├── share.js │ │ │ └── vmc.slider.full.min.js │ │ └── layer │ │ │ ├── layer.js │ │ │ ├── mobile │ │ │ ├── layer.js │ │ │ └── need │ │ │ │ └── layer.css │ │ │ └── theme │ │ │ └── default │ │ │ ├── icon-ext.png │ │ │ ├── icon.png │ │ │ ├── layer.css │ │ │ ├── loading-0.gif │ │ │ ├── loading-1.gif │ │ │ └── loading-2.gif │ ├── login.html │ ├── login │ │ ├── css │ │ │ └── login.css │ │ ├── img │ │ │ ├── bg.png │ │ │ └── button.png │ │ └── js │ │ │ └── login.js │ ├── my.html │ ├── myInfo.html │ ├── myLy.html │ ├── myReply.html │ ├── myTopic.html │ ├── myWp.html │ ├── top.html │ ├── top │ │ ├── css │ │ │ └── top.css │ │ └── js │ │ │ └── top.js │ ├── tribune.html │ └── tribune │ │ ├── css │ │ └── tribune.css │ │ ├── img │ │ ├── bg.jpg │ │ ├── delete.png │ │ ├── school.png │ │ ├── sky.jpg │ │ ├── sky.png │ │ └── title.png │ │ └── js │ │ └── tribune.js │ └── templates │ ├── echarts │ └── echarts.min.js │ ├── home.html │ ├── home │ ├── css │ │ └── home.css │ ├── img │ │ ├── bg.jpg │ │ ├── button.png │ │ ├── clock.png │ │ ├── clock2.png │ │ ├── edit.png │ │ ├── excel.png │ │ ├── ok.png │ │ ├── ok1.png │ │ ├── sky.jpg │ │ └── upload.png │ └── js │ │ └── home.js │ ├── hqj.html │ ├── hqj │ ├── hqj.css │ ├── hqj.js │ ├── jquery-1.11.3.min.js │ └── jquery-3.2.1.min.js │ ├── index.html │ ├── index │ ├── css │ │ ├── bootstrap.css │ │ ├── index.css │ │ ├── jquery-ui-1.9.2.custom.css │ │ ├── overcast │ │ │ └── images │ │ │ │ ├── ui-icons_3383bb_256x240.png │ │ │ │ ├── ui-icons_454545_256x240.png │ │ │ │ ├── ui-icons_70b2e1_256x240.png │ │ │ │ ├── ui-icons_999999_256x240.png │ │ │ │ ├── ui-icons_fbc856_256x240.png │ │ │ │ └── xiala_jt01.png │ │ ├── paging.css │ │ └── style.css │ ├── img │ │ ├── bg.jpg │ │ ├── button.png │ │ ├── buy.png │ │ ├── ck.jpg │ │ ├── demo_1.jpg │ │ ├── demo_2.jpg │ │ ├── demo_3.jpg │ │ ├── demo_4.jpg │ │ ├── demo_5.jpg │ │ ├── head.gif │ │ ├── jiaoyi.png │ │ ├── kefu.png │ │ ├── laba.gif │ │ ├── lb_bg.png │ │ ├── logo.png │ │ ├── ly.png │ │ ├── next.gif │ │ ├── paobu.jpg │ │ ├── phone.jpg │ │ ├── prev.gif │ │ ├── school.png │ │ └── sun.jpg │ ├── js │ │ ├── custom.js │ │ ├── data.js │ │ ├── index.js │ │ ├── jquery-1.11.3.min.js │ │ ├── jquery-3.2.1.min.js │ │ ├── jquery-ui-1.9.2.custom.js │ │ ├── jquery.min.js │ │ ├── paging.js │ │ ├── scroll.js │ │ ├── share.js │ │ └── vmc.slider.full.min.js │ └── layer │ │ ├── layer.js │ │ ├── mobile │ │ ├── layer.js │ │ └── need │ │ │ └── layer.css │ │ └── theme │ │ └── default │ │ ├── icon-ext.png │ │ ├── icon.png │ │ ├── layer.css │ │ ├── loading-0.gif │ │ ├── loading-1.gif │ │ └── loading-2.gif │ ├── login.html │ ├── login │ ├── css │ │ └── login.css │ ├── img │ │ ├── bg.png │ │ └── button.png │ └── js │ │ └── login.js │ ├── main.html │ ├── my.html │ ├── myInfo.html │ ├── myLy.html │ ├── myReply.html │ ├── myTopic.html │ ├── myWp.html │ ├── top.html │ ├── top │ ├── css │ │ └── top.css │ └── js │ │ └── top.js │ ├── tribune.html │ └── tribune │ ├── css │ └── tribune.css │ ├── img │ ├── bg.jpg │ ├── delete.png │ ├── school.png │ ├── sky.jpg │ ├── sky.png │ └── title.png │ └── js │ └── tribune.js └── test └── java └── com └── xuwei └── SzxyApplicationTests.java /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled class file 2 | *.class 3 | 4 | # Log file 5 | *.log 6 | 7 | # BlueJ files 8 | *.ctxt 9 | 10 | # Mobile Tools for Java (J2ME) 11 | .mtj.tmp/ 12 | 13 | # Package Files # 14 | *.jar 15 | *.war 16 | *.nar 17 | *.ear 18 | *.zip 19 | *.tar.gz 20 | *.rar 21 | 22 | # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml 23 | hs_err_pid* 24 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | com.xuwei 7 | szxy 8 | 0.0.1-SNAPSHOT 9 | jar 10 | 11 | szxy 12 | Demo project for Spring Boot 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.5.10.RELEASE 18 | 19 | 20 | 21 | 22 | UTF-8 23 | UTF-8 24 | 1.8 25 | 26 | 27 | 28 | 29 | org.springframework.boot 30 | spring-boot-starter-web 31 | 32 | 33 | 34 | org.projectlombok 35 | lombok 36 | 37 | 38 | org.springframework.boot 39 | spring-boot-starter-test 40 | test 41 | 42 | 43 | 44 | com.alibaba 45 | fastjson 46 | 1.2.31 47 | 48 | 49 | org.mybatis.spring.boot 50 | mybatis-spring-boot-starter 51 | 1.3.1 52 | 53 | 54 | com.oracle 55 | ojdbc6 56 | 11.2.0.3 57 | 58 | 59 | 60 | net.sourceforge.nekohtml 61 | nekohtml 62 | 63 | 64 | com.github.pagehelper 65 | pagehelper-spring-boot-starter 66 | 1.2.3 67 | 68 | 69 | 70 | org.apache.poi 71 | poi 72 | 3.17 73 | 74 | 75 | 76 | org.apache.commons 77 | commons-lang3 78 | 3.7 79 | 80 | 81 | 82 | 83 | org.springframework.boot 84 | spring-boot-configuration-processor 85 | 86 | 87 | 88 | org.springframework.boot 89 | spring-boot-starter-thymeleaf 90 | 91 | 92 | 93 | io.springfox 94 | springfox-swagger2 95 | 2.8.0 96 | 97 | 98 | 99 | io.springfox 100 | springfox-swagger-ui 101 | 2.8.0 102 | 103 | 104 | 105 | 106 | 107 | 108 | org.springframework.boot 109 | spring-boot-maven-plugin 110 | 111 | 112 | 113 | 114 | 115 | 116 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/SzxyApplication.java: -------------------------------------------------------------------------------- 1 | package com.xuwei; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SzxyApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SzxyApplication.class, args); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/common/ActionResult.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.common; 2 | 3 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 4 | 5 | /** 6 | * Created by 许伟 on 2018/1/28. 7 | */ 8 | @JsonIgnoreProperties(ignoreUnknown = true) 9 | public class ActionResult { 10 | private static final long serialVersionUID=1L; 11 | 12 | private int responseCode; 13 | private String message; 14 | private Object content; 15 | private Object tag; 16 | 17 | public int getResponseCode() { 18 | return responseCode; 19 | } 20 | 21 | public void setResponseCode(int responseCode) { 22 | this.responseCode = responseCode; 23 | } 24 | 25 | public String getMessage() { 26 | return message; 27 | } 28 | 29 | public void setMessage(String message) { 30 | this.message = message; 31 | } 32 | 33 | public Object getContent() { 34 | return content; 35 | } 36 | 37 | public void setContent(Object content) { 38 | this.content = content; 39 | } 40 | 41 | public Object getTag() { 42 | return tag; 43 | } 44 | 45 | public void setTag(Object tag) { 46 | this.tag = tag; 47 | } 48 | 49 | /** 50 | * 构造函数 51 | * @param responseCode 返回值代码 52 | * @param message 返回信息 53 | * @param content 返回内容 54 | * @param tag 附加内容 55 | */ 56 | public ActionResult(int responseCode, String message, Object content, Object tag) { 57 | this.responseCode = responseCode; 58 | this.message = message; 59 | this.content = content; 60 | this.tag = tag; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/common/GlobalExceptionHandler.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.common; 2 | 3 | import com.xuwei.util.ResultUtils; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.web.bind.annotation.ControllerAdvice; 7 | import org.springframework.web.bind.annotation.ExceptionHandler; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | 12 | /** 13 | * Created by 许伟 on 2018/1/29. 14 | */ 15 | @ControllerAdvice 16 | @ResponseBody 17 | public class GlobalExceptionHandler { 18 | 19 | private Logger logger = LoggerFactory.getLogger(GlobalExceptionHandler.class); 20 | 21 | @ExceptionHandler(value = Exception.class) 22 | public ActionResult customerErrorHandler(HttpServletRequest req, Exception e) { 23 | e.printStackTrace(); 24 | // 记录日志信息 25 | logger.error(String.format("系统错误,%s,%s", e.getMessage(), req.getServletPath())); 26 | // 返回通用数据结构 27 | return ResultUtils.systemError(ReturnEnum.SYSTEMERROR); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/common/ReturnEnum.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.common; 2 | 3 | /** 4 | * Created by 许伟 on 2018/1/29. 5 | */ 6 | public enum ReturnEnum { 7 | 8 | SUCCESS(1000, "成功"), 9 | SYSTEMERROR(9999, "系统异常"), 10 | CUSTOMERROR(2001, "服务异常"); 11 | 12 | ReturnEnum(int code, String message) { 13 | this.code = code; 14 | this.message = message; 15 | } 16 | 17 | //返回代码 18 | private int code; 19 | //返回信息 20 | private String message; 21 | 22 | public int getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(int code) { 27 | this.code = code; 28 | } 29 | 30 | public String getMessage() { 31 | return message; 32 | } 33 | 34 | public void setMessage(String message) { 35 | this.message = message; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/config/ImgConfig.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.config; 2 | 3 | import org.springframework.boot.context.properties.ConfigurationProperties; 4 | import org.springframework.context.annotation.Configuration; 5 | 6 | /** 7 | * Created by 许伟 on 2018/3/17 0017. 8 | */ 9 | @Configuration 10 | @ConfigurationProperties(prefix = "pathconfig") 11 | public class ImgConfig { 12 | public static String PATH; 13 | public static String URL; 14 | 15 | public static String getPath(){ 16 | return PATH; 17 | } 18 | 19 | public static void setPath(String path){ 20 | PATH=path; 21 | } 22 | 23 | public static String getUrl(){ 24 | return URL; 25 | } 26 | 27 | public static void setUrl(String url){ 28 | URL=url; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/config/mybatis/MapWrapperFactory.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.config.mybatis; 2 | 3 | import org.apache.ibatis.reflection.MetaObject; 4 | import org.apache.ibatis.reflection.wrapper.*; 5 | 6 | import java.util.Map; 7 | 8 | /** 9 | * Map类型转驼峰 10 | * @author 许伟 11 | * @date 2017/10/24 12 | */ 13 | public class MapWrapperFactory implements ObjectWrapperFactory { 14 | 15 | @Override 16 | public boolean hasWrapperFor(Object o) { 17 | return o != null && o instanceof Map; 18 | } 19 | 20 | @Override 21 | public ObjectWrapper getWrapperFor(MetaObject metaObject, Object o) { 22 | return new MyMapWrapper(metaObject, (Map) o); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/config/mybatis/MyBatisConfig.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.config.mybatis; 2 | 3 | import org.mybatis.spring.boot.autoconfigure.ConfigurationCustomizer; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | 7 | /** 8 | * @author LiuWang 9 | * @date 2017/10/24 10 | */ 11 | @Configuration 12 | public class MyBatisConfig { 13 | 14 | /** 15 | * 定制mybatis配置(加载Map结果驼峰配置) 16 | * @author LiuWang 17 | * @date 2017/10/24 15:21 18 | */ 19 | @Bean 20 | public ConfigurationCustomizer mybatisConfigurationCustomizer() { 21 | return config -> { 22 | config.getTypeAliasRegistry().registerAliases("com.sailing.zunyi.entity"); 23 | config.setMapUnderscoreToCamelCase(true); 24 | config.setObjectWrapperFactory(new MapWrapperFactory()); 25 | }; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/config/mybatis/MyMapWrapper.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.config.mybatis; 2 | 3 | import org.apache.ibatis.reflection.MetaObject; 4 | import org.apache.ibatis.reflection.wrapper.MapWrapper; 5 | 6 | import java.util.Map; 7 | 8 | /** 9 | * 驼峰处理 10 | * @author 许伟 11 | * @date 2017/10/24 12 | */ 13 | public class MyMapWrapper extends MapWrapper { 14 | public MyMapWrapper(MetaObject metaObject, Map map) { 15 | super(metaObject, map); 16 | } 17 | 18 | @Override 19 | public String findProperty(String name, boolean useCamelCaseMapping) { 20 | if (useCamelCaseMapping && (name.charAt(0) >= 'A' && name.charAt(0) <= 'Z' || name.indexOf("_") >= 0)) { 21 | return underlineToCamelCase(name); 22 | } 23 | return name; 24 | } 25 | 26 | /** 27 | * 将下划线转化为驼峰风格 28 | * 29 | * @param inputString 30 | * @author LiuWang 31 | * @date 2017/10/23 15:20 32 | */ 33 | public String underlineToCamelCase(String inputString) { 34 | StringBuilder sb = new StringBuilder(); 35 | boolean nextUpperCase = false; 36 | for (int i = 0; i < inputString.length(); i++) { 37 | char c = inputString.charAt(i); 38 | if (c == '_') { 39 | if (sb.length() > 0) { 40 | nextUpperCase = true; 41 | } 42 | } else { 43 | if (nextUpperCase) { 44 | sb.append(Character.toUpperCase(c)); 45 | nextUpperCase = false; 46 | } else { 47 | sb.append(Character.toLowerCase(c)); 48 | } 49 | } 50 | } 51 | return sb.toString(); 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/config/swagger/Swagger.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.config.swagger; 2 | 3 | import io.swagger.annotations.ApiOperation; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import springfox.documentation.builders.ApiInfoBuilder; 7 | import springfox.documentation.builders.PathSelectors; 8 | import springfox.documentation.builders.RequestHandlerSelectors; 9 | import springfox.documentation.service.ApiInfo; 10 | import springfox.documentation.spi.DocumentationType; 11 | import springfox.documentation.spring.web.plugins.Docket; 12 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 13 | 14 | /** 15 | * Created by 许伟 on 2018/4/2 0002. 16 | */ 17 | @Configuration 18 | @EnableSwagger2 19 | public class Swagger { 20 | @Bean 21 | public Docket createRestApi() { 22 | return new Docket(DocumentationType.SWAGGER_2) 23 | .apiInfo(apiInfo()) 24 | .select() 25 | .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) 26 | .paths(PathSelectors.any()) 27 | .build(); 28 | } 29 | 30 | private ApiInfo apiInfo() { 31 | return new ApiInfoBuilder() 32 | .title("宿州学院闲置物品") 33 | .version("1.0") 34 | .build(); 35 | } 36 | } -------------------------------------------------------------------------------- /src/main/java/com/xuwei/entity/LyEntity.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.entity; 2 | 3 | import io.swagger.annotations.Api; 4 | import io.swagger.annotations.ApiModel; 5 | import io.swagger.annotations.ApiParam; 6 | import lombok.Data; 7 | 8 | import javax.validation.Valid; 9 | 10 | /** 11 | * Created by 许伟 on 2018/3/28 0028. 12 | */ 13 | @Data 14 | @ApiModel(value = "留言的实体",reference = "ly") 15 | public class LyEntity { 16 | 17 | @ApiParam(value = "序号",required = true) 18 | private int xh; 19 | @ApiParam(value = "留言内容") 20 | private String lynr; 21 | @ApiParam(value = "留言时间") 22 | private String lysj; 23 | @ApiParam(value = "用户序号",required = true) 24 | private int user_xh; 25 | @ApiParam(value = "物品序号",required = true) 26 | private int wp_xh; 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/entity/ProductEntity.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.entity; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiParam; 5 | import lombok.Data; 6 | 7 | /** 8 | * Created by 许伟 on 2018/3/26 0026. 9 | */ 10 | @Data 11 | @ApiModel(value = "闲置物品的实体",reference = "闲置物品") 12 | public class ProductEntity { 13 | @ApiParam(value = "闲置物品序号",required = true) 14 | private int xh; 15 | @ApiParam(value = "上传物品名") 16 | private String scwp; 17 | @ApiParam(value = "物品描述") 18 | private String wpms; 19 | @ApiParam(value = "物品类型") 20 | private String wplx; 21 | @ApiParam(value = "意向交换物品") 22 | private String yxjhwp; 23 | @ApiParam(value = "上传时间") 24 | private String scsj; 25 | @ApiParam(value = "用户序号",required = true) 26 | private int user_xh; 27 | @ApiParam(value = "发布路径") 28 | private String url; 29 | @ApiParam(value = "上传地点") 30 | private String scdd; 31 | @ApiParam(value = "备注") 32 | private String bz; 33 | @ApiParam(value = "交易状态") 34 | private String jyzt; 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/entity/ReplyEntity.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.entity; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiParam; 5 | import lombok.Data; 6 | 7 | /** 8 | * Created by 许伟 on 2018/3/16 0016. 9 | */ 10 | @Data 11 | @ApiModel(value = "回帖的实体",reference = "回帖") 12 | public class ReplyEntity { 13 | @ApiParam(value = "回帖序号",required = true) 14 | private int xh; 15 | @ApiParam(value = "回帖内容") 16 | private String htnr; 17 | @ApiParam(value = "回帖时间") 18 | private String htsj; 19 | @ApiParam(value = "用户序号",required = true) 20 | private int user_xh; 21 | @ApiParam(value = "主题帖序号",required = true) 22 | private int topic_xh; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/entity/SearchEntity.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.entity; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiParam; 5 | import lombok.Data; 6 | 7 | /** 8 | * Created by 许伟 on 2018/3/15 0015. 9 | */ 10 | @Data 11 | @ApiModel(value = "查询条件的实体",reference = "查询") 12 | public class SearchEntity { 13 | @ApiParam(value = "分页首页") 14 | private int pageIndex=1; 15 | @ApiParam(value = "分页大小") 16 | private int pageSize=7; 17 | @ApiParam(value = "开始时间") 18 | private String beginTime; 19 | @ApiParam(value = "结束时间") 20 | private String endTime; 21 | @ApiParam(value = "物品类型") 22 | private String wplx; 23 | @ApiParam(value = "关键字") 24 | private String keys; 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/entity/TopicEntity.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.entity; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiParam; 5 | import lombok.Data; 6 | 7 | /** 8 | * Created by 许伟 on 2018/3/16 0016. 9 | */ 10 | @Data 11 | @ApiModel(value = "主题帖的实体",reference = "主题帖") 12 | public class TopicEntity { 13 | @ApiParam(value = "主题帖序号",required = true) 14 | private int xh; 15 | @ApiParam(value = "发帖内容") 16 | private String ftnr; 17 | @ApiParam(value = "发帖时间") 18 | private String ftsj; 19 | @ApiParam(value = "用户序号",required = true) 20 | private int user_xh; 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/entity/UserEntity.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.entity; 2 | 3 | import io.swagger.annotations.ApiModel; 4 | import io.swagger.annotations.ApiParam; 5 | import lombok.Data; 6 | 7 | /** 8 | * Created by 许伟 on 2018/3/21 0021. 9 | */ 10 | @Data 11 | @ApiModel(value = "User的实体",reference = "user") 12 | public class UserEntity { 13 | 14 | @ApiParam(value = "序号",required = true) 15 | private int xh; 16 | @ApiParam(value = "姓名") 17 | private String name; 18 | @ApiParam(value = "密码") 19 | private String password; 20 | @ApiParam(value = "邮箱") 21 | private String email; 22 | @ApiParam(value = "生日") 23 | private String birthday; 24 | @ApiParam(value = "昵称") 25 | private String nc; 26 | @ApiParam(value = "发布路径") 27 | private String url; 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/home/controller/HomeController.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.home.controller; 2 | 3 | import com.xuwei.common.ActionResult; 4 | import com.xuwei.entity.ProductEntity; 5 | import com.xuwei.entity.UserEntity; 6 | import com.xuwei.home.service.HomeService; 7 | import com.xuwei.util.ResultUtils; 8 | import io.swagger.annotations.Api; 9 | import io.swagger.annotations.ApiOperation; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.web.bind.annotation.*; 12 | import org.springframework.web.multipart.MultipartFile; 13 | 14 | import javax.servlet.http.HttpServletResponse; 15 | import java.util.HashMap; 16 | import java.util.Map; 17 | 18 | /** 19 | * Created by 许伟 on 2018/3/26 0026. 20 | */ 21 | @Api(tags = "我的用户模块") 22 | @RequestMapping("home") 23 | @RestController 24 | @CrossOrigin(origins = "*", methods = {RequestMethod.GET, RequestMethod.OPTIONS,RequestMethod.POST}) 25 | public class HomeController { 26 | 27 | @Autowired 28 | private HomeService homeService; 29 | 30 | /** 31 | * @Description: 头部数量统计 32 | * @author: 许伟 33 | * @date: 2018/3/27 0027 15:54 34 | */ 35 | @GetMapping("headNum") 36 | @ApiOperation(value = "查询头部数字") 37 | public ActionResult headNum(Integer xh){ 38 | return ResultUtils.success(homeService.headNum(xh)); 39 | } 40 | 41 | /** 42 | * @Description: 上传物品 43 | * @author: 许伟 44 | * @date: 2018/3/26 0026 18:03 45 | */ 46 | @PostMapping("upload") 47 | @ApiOperation(value = "上传闲置物品") 48 | public ActionResult upload(MultipartFile file, ProductEntity productEntity){ 49 | return ResultUtils.success(homeService.upload(file,productEntity)); 50 | } 51 | /** 52 | * @Description: 查询我上传的闲置物品信息 53 | * @author: 许伟 54 | * @date: 2018/3/26 0026 14:41 55 | */ 56 | @GetMapping("myWp") 57 | @ApiOperation(value = "查询我上传的全部闲置物品信息") 58 | public ActionResult Mywp(int xh){ 59 | return ResultUtils.success(homeService.myWp(xh)); 60 | } 61 | 62 | 63 | /** 64 | * @Description: 我的个人信息 65 | * @author: 许伟 66 | * @date: 2018/3/27 0027 10:14 67 | */ 68 | @GetMapping("myInfo") 69 | @ApiOperation(value = "查询我的个人信息") 70 | public ActionResult myInfo(int xh){ 71 | return ResultUtils.success(homeService.myInfo(xh)); 72 | } 73 | 74 | /** 75 | * @Description: 编辑个人信息 76 | * @author: 许伟 77 | * @date: 2018/3/27 0027 16:30 78 | */ 79 | @PostMapping("editMyInfo") 80 | @ApiOperation(value = "编辑我的个人信息") 81 | public ActionResult editMyInfo(MultipartFile file,UserEntity userEntity){ 82 | return ResultUtils.success(homeService.editMyInfo(file,userEntity)); 83 | } 84 | /** 85 | * @Description: 导入我的物品 86 | * @author: 许伟 87 | * @date: 2018/3/26 0026 15:32 88 | */ 89 | @GetMapping("excelMyWp") 90 | @ApiOperation(value = "将我的闲置物品导入excel表") 91 | public ActionResult excelMyWp(int xh,HttpServletResponse response){ 92 | return ResultUtils.success(homeService.excelMyWp(xh,response)); 93 | } 94 | /** 95 | * @Description: 查询我的主题 96 | * @author: 许伟 97 | * @date: 2018/3/26 0026 14:41 98 | */ 99 | @GetMapping("myTopic") 100 | @ApiOperation(value = "我所有的主题帖") 101 | public ActionResult myTopic(int xh){ 102 | return ResultUtils.success(homeService.myTopic(xh)); 103 | } 104 | 105 | /** 106 | * @Description: 查询我的回帖 107 | * @author: 许伟 108 | * @date: 2018/3/27 0027 15:22 109 | */ 110 | @ApiOperation(value = "我所有的回帖信息") 111 | @GetMapping("myReply") 112 | public ActionResult myReply(int xh){ 113 | return ResultUtils.success(homeService.myReply(xh)); 114 | } 115 | /** 116 | * @Description: 我的留言 117 | * @author: 许伟 118 | * @date: 2018/3/27 0027 13:35 119 | */ 120 | @GetMapping("myLy") 121 | @ApiOperation(value = "我的留言信息") 122 | public ActionResult myLy(int xh){ 123 | Map result=new HashMap(); 124 | result.put("to",homeService.myLyToOther(xh)); 125 | result.put("from",homeService.myLyFromMe(xh)); 126 | return ResultUtils.success(result); 127 | } 128 | 129 | /** 130 | * @Description: 修改交易状态 131 | * @author: 许伟 132 | * @date: 2018/3/28 0028 16:35 133 | */ 134 | @GetMapping("updateState") 135 | @ApiOperation(value = "修改交易状态") 136 | public ActionResult updateState(int topic_xh){ 137 | return ResultUtils.success(homeService.updateState(topic_xh)); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/home/dao/HomeDao.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.home.dao; 2 | 3 | import com.xuwei.entity.ProductEntity; 4 | import com.xuwei.entity.UserEntity; 5 | import com.xuwei.home.dao.provider.HomeDaoProvider; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Select; 8 | import org.apache.ibatis.annotations.SelectProvider; 9 | 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * Created by 许伟 on 2018/3/26 0026. 15 | */ 16 | @Mapper 17 | public interface HomeDao { 18 | 19 | @SelectProvider(type = HomeDaoProvider.class,method = "myWp") 20 | List myWp(Integer xh); 21 | 22 | @Select("SELECT * FROM XW_USER WHERE XH=#{xh}") 23 | Map myInfo(Integer xh); 24 | 25 | @SelectProvider(type = HomeDaoProvider.class,method = "myTopic") 26 | List myTopic(Integer xh); 27 | 28 | @SelectProvider(type = HomeDaoProvider.class,method = "myReply") 29 | List myReply(Integer xh); 30 | 31 | @SelectProvider(type = HomeDaoProvider.class,method = "myLyFromMe") 32 | List myLyFromMe(Integer xh); 33 | 34 | @SelectProvider(type = HomeDaoProvider.class,method = "myLyToOther") 35 | List myLyToOther(int xh); 36 | 37 | @SelectProvider(type = HomeDaoProvider.class,method = "insert") 38 | void insert(ProductEntity productEntity); 39 | 40 | @SelectProvider(type = HomeDaoProvider.class,method = "headNum") 41 | Map headNum(Integer xh); 42 | 43 | @SelectProvider(type = HomeDaoProvider.class,method = "editMyInfo") 44 | void editMyInfo(UserEntity userEntity); 45 | 46 | @Select("UPDATE XW_SCWP SET JYZT='2' WHERE XH=#{topic_xh}") 47 | void updateState(int topic_xh); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/home/service/HomeService.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.home.service; 2 | 3 | import com.xuwei.entity.ProductEntity; 4 | import com.xuwei.entity.UserEntity; 5 | import org.springframework.web.multipart.MultipartFile; 6 | 7 | import javax.servlet.http.HttpServletResponse; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | * Created by 许伟 on 2018/3/26 0026. 13 | */ 14 | public interface HomeService { 15 | 16 | List myWp(int xh); 17 | 18 | List myTopic(int xh); 19 | 20 | String excelMyWp(int xh,HttpServletResponse response); 21 | 22 | int upload(MultipartFile file, ProductEntity productEntity); 23 | 24 | Map myInfo(int xh); 25 | 26 | List myLyFromMe(int xh); 27 | 28 | List myLyToOther(int xh); 29 | 30 | List myReply(int xh); 31 | 32 | Map headNum(Integer xh); 33 | 34 | int editMyInfo(MultipartFile file,UserEntity userEntity); 35 | 36 | int updateState(int topic_xh); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/index/controller/IndexController.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.index.controller; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.xuwei.common.ActionResult; 5 | import com.xuwei.entity.LyEntity; 6 | import com.xuwei.entity.SearchEntity; 7 | import com.xuwei.index.service.IndexService; 8 | import com.xuwei.util.ResultUtils; 9 | import io.swagger.annotations.Api; 10 | import io.swagger.annotations.ApiOperation; 11 | import org.apache.commons.lang3.StringUtils; 12 | import org.springframework.beans.factory.annotation.Autowired; 13 | import org.springframework.web.bind.annotation.*; 14 | 15 | import java.text.SimpleDateFormat; 16 | import java.util.*; 17 | 18 | /** 19 | * Created by 许伟 on 2018/3/15 0015. 20 | */ 21 | @Api(tags = "首页模块") 22 | @RequestMapping("index") 23 | @RestController 24 | @CrossOrigin(origins = "*", methods = {RequestMethod.GET, RequestMethod.OPTIONS,RequestMethod.POST}) 25 | public class IndexController { 26 | 27 | @Autowired 28 | private IndexService indexService; 29 | 30 | /** 31 | * @Description:查询所有的闲置物品 32 | * @author: 许伟 33 | * @date: 2018/3/15 0015 14:31 34 | */ 35 | @GetMapping("findAll") 36 | @ApiOperation(value = "查询所有的闲置物品") 37 | public ActionResult findAll(SearchEntity searchEntity){ 38 | String time=searchEntity.getBeginTime(); 39 | if(StringUtils.isNotBlank(searchEntity.getBeginTime())){ 40 | String t[]=time.split("-"); 41 | searchEntity.setBeginTime(dealTime(t[0])+" 00:00:00"); 42 | searchEntity.setEndTime(dealTime(t[1])+" 23:59:59"); 43 | } 44 | PageInfo result=indexService.findAll(searchEntity); 45 | return ResultUtils.success(result); 46 | } 47 | 48 | /** 49 | * @Description: 首页接口合并(饼图,轮播图,热点话题) 50 | * @author: 许伟 51 | * @date: 2018/3/15 0015 20:00 52 | */ 53 | @GetMapping("indexAll") 54 | @ApiOperation(value = "查询闲置物品信息,公告及图片") 55 | public ActionResult indexAll(){ 56 | Map result =new HashMap(); 57 | result.put("photo",indexService.photoList()); 58 | result.put("title",indexService.titleList()); 59 | return ResultUtils.success(result); 60 | } 61 | /** 62 | * @Description: 饼图,统计交易状态 63 | * @author: 许伟 64 | * @date: 2018/3/15 0015 20:45 65 | */ 66 | @GetMapping("complete") 67 | @ApiOperation(value = "饼图统计") 68 | public ActionResult complete(){ 69 | return ResultUtils.success(indexService.complete()); 70 | } 71 | 72 | /** 73 | * @Description: 折现周统计 74 | * @author: 许伟 75 | * @date: 2018/3/16 0016 9:17 76 | */ 77 | @PostMapping("totalPercent") 78 | @ApiOperation(value = "折线图统计") 79 | public ActionResult totalPercent(){ 80 | SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd 00:00:00"); 81 | Calendar calendar=Calendar.getInstance(); 82 | calendar.set(Calendar.DAY_OF_WEEK,Calendar.MONDAY); 83 | String weekTime=format.format(calendar.getTime()); 84 | return ResultUtils.success(indexService.totalPercent(weekTime)); 85 | } 86 | 87 | /** 88 | * @Description: 根据物品xh查询物品详细信息 89 | * @author: 许伟 90 | * @date: 2018/3/19 0019 13:30 91 | */ 92 | @GetMapping("findByXh") 93 | @ApiOperation(value = "查询物品详细信息") 94 | public ActionResult findByXh(int user_xh,int topic_xh){ 95 | return ResultUtils.success(indexService.findByXh(user_xh,topic_xh)); 96 | } 97 | 98 | /** 99 | * @Description: 增加留言 100 | * @author: 许伟 101 | * @date: 2018/3/28 0028 14:23 102 | */ 103 | @GetMapping("addLy") 104 | @ApiOperation(value = "添加留言") 105 | public ActionResult addLy(LyEntity lyEntity){ 106 | return ResultUtils.success(indexService.addLy(lyEntity)); 107 | } 108 | /** 109 | * @Description: 处理时间 110 | * @author: 许伟 111 | * @date: 2018/3/15 0015 19:51 112 | */ 113 | private String dealTime(String time){ 114 | String s1=""; 115 | String s2=""; 116 | String[] str=time.split("/"); 117 | if(Integer.parseInt(str[1])<10 ){ 118 | s1="0"+str[1]; 119 | }else { 120 | s1=str[1]; 121 | } 122 | if(Integer.parseInt(str[2])<10){ 123 | s2="0"+str[2]; 124 | }else{ 125 | s2=str[2]; 126 | } 127 | return str[0]+"-"+s1+"-"+s2; 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/index/dao/IndexDao.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.index.dao; 2 | 3 | import com.xuwei.entity.LyEntity; 4 | import com.xuwei.entity.SearchEntity; 5 | import com.xuwei.index.dao.provider.IndexDaoProvider; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.Select; 8 | import org.apache.ibatis.annotations.SelectProvider; 9 | 10 | import java.util.List; 11 | import java.util.Map; 12 | 13 | /** 14 | * Created by 许伟 on 2018/3/15 0015. 15 | */ 16 | @Mapper 17 | public interface IndexDao { 18 | String photoSql="SELECT * FROM (SELECT W.URL,W.WPMS FROM XW_SCWP W INNER JOIN XW_USER U ON U.XH=W.USER_XH ORDER BY W.SCSJ DESC)WHERE ROWNUM<5"; 19 | String titleSql="SELECT * FROM (SELECT W.WPLX,W.WPMS FROM XW_SCWP W INNER JOIN XW_USER U ON U.XH=W.USER_XH ORDER BY W.SCSJ DESC)WHERE ROWNUM<6"; 20 | /** 21 | * @Description: 根据条件查询所有的上传物品 22 | * @author: 许伟 23 | * @date: 2018/3/15 0015 14:47 24 | */ 25 | @SelectProvider(type = IndexDaoProvider.class,method = "findAll") 26 | List findAll(SearchEntity searchEntity); 27 | 28 | /** 29 | * @Description: 图片轮播的接口 30 | * @author: 许伟 31 | * @date: 2018/3/15 0015 20:18 32 | */ 33 | @Select(photoSql) 34 | List photoList(); 35 | 36 | /** 37 | * @Description: 公告的接口 38 | * @author: 许伟 39 | * @date: 2018/3/15 0015 20:18 40 | */ 41 | @Select(titleSql) 42 | List titleList(); 43 | 44 | /** 45 | * @Description: 饼图统计的接口 46 | * @author: 许伟 47 | * @date: 2018/3/16 0016 9:18 48 | */ 49 | @SelectProvider(type = IndexDaoProvider.class,method = "complete") 50 | List complete(); 51 | 52 | /** 53 | * @Description: 折线图统计的接口 54 | * @author: 许伟 55 | * @date: 2018/3/16 0016 9:18 56 | */ 57 | @SelectProvider(type = IndexDaoProvider.class,method = "totalPercent") 58 | List totalPercent(String weekTime); 59 | 60 | /** 61 | * @Description: 根据物品xh查询详细信息 62 | * @author: 许伟 63 | * @date: 2018/3/19 0019 13:32 64 | */ 65 | @SelectProvider(type = IndexDaoProvider.class,method = "findByXh") 66 | Map findByXh(int user_xh,int xh); 67 | 68 | @SelectProvider(type = IndexDaoProvider.class,method = "addLy") 69 | void addLy(LyEntity lyEntity); 70 | 71 | @Select("update xw_scwp set jyzt='1' where xh=#{wp_xh}") 72 | void updateState(int wp_xh); 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/index/dao/provider/IndexDaoProvider.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.index.dao.provider; 2 | 3 | import com.xuwei.entity.LyEntity; 4 | import com.xuwei.entity.SearchEntity; 5 | import org.apache.commons.lang3.StringUtils; 6 | import org.apache.ibatis.jdbc.SQL; 7 | 8 | /** 9 | * Created by 许伟 on 2018/3/15 0015. 10 | */ 11 | public class IndexDaoProvider { 12 | 13 | public String findAll(SearchEntity searchEntity){ 14 | String string= new SQL(){ 15 | { 16 | SELECT("W.XH WP_XH,U.NAME,W.USER_XH,W.SCWP,W.YXJHWP,W.WPLX"); 17 | FROM("XW_SCWP W"); 18 | INNER_JOIN("XW_USER U ON U.XH=W.USER_XH"); 19 | if(StringUtils.isNotBlank(searchEntity.getWplx())){ 20 | WHERE("W.WPLX='"+searchEntity.getWplx()+"'"); 21 | } 22 | if(StringUtils.isNotBlank(searchEntity.getKeys())){ 23 | WHERE("W.SCWP LIKE '%"+searchEntity.getKeys()+"%' OR" + 24 | " W.WPMS LIKE '%"+searchEntity.getKeys()+"%' OR" + 25 | " W.YXJHWP LIKE '%"+searchEntity.getKeys()+"%'"); 26 | } 27 | if(StringUtils.isNotBlank(searchEntity.getBeginTime())){ 28 | WHERE("W.SCSJ>='"+searchEntity.getBeginTime()+"'"); 29 | } 30 | if(StringUtils.isNotBlank(searchEntity.getEndTime())){ 31 | WHERE("W.SCSJ<='"+searchEntity.getEndTime()+"'"); 32 | } 33 | ORDER_BY("W.SCSJ DESC"); 34 | } 35 | }.toString(); 36 | return string; 37 | } 38 | 39 | public String complete(){ 40 | StringBuilder sql=new StringBuilder(); 41 | sql.append( 42 | " SELECT COUNT(*) AMOUNT, '未交易' as state FROM XW_SCWP WHERE JYZT=0 GROUP BY JYZT" + 43 | " union all" + 44 | " SELECT COUNT(*) AMOUNT, '交易中' as state FROM XW_SCWP WHERE JYZT=1 " + 45 | " union all" + 46 | " SELECT COUNT(*) AMOUNT, '交易完' as state FROM XW_SCWP WHERE JYZT=2 "); 47 | return sql.toString(); 48 | } 49 | 50 | public String totalPercent(String weekTime){ 51 | StringBuilder sb=new StringBuilder(); 52 | sb.append(" SELECT NVL(COUNT(*),0)AMOUNT,WPLX,SUBSTR(SCSJ,0,10)SCSJ FROM XW_SCWP"); 53 | sb.append(" WHERE SCSJ>='"+weekTime+"' GROUP BY SUBSTR(SCSJ,0,10),WPLX ORDER BY SCSJ"); 54 | return sb.toString(); 55 | } 56 | 57 | public String findByXh(int user_xh,int xh){ 58 | return new SQL(){ 59 | { 60 | SELECT("W.SCWP,W.WPMS,W.WPLX,W.YXJHWP,SUBSTR(W.SCSJ,0,10)SCSJ,W.URL,W.SCDD,U.NAME,W.XH WP_XH,U.XH USER_XH"); 61 | SELECT("CASE W.JYZT WHEN '0' then '未交易' when '1' then '交易中' when '2' then '交易完' END AS JYZT"); 62 | FROM("XW_SCWP W"); 63 | INNER_JOIN("XW_USER U ON U.XH=W.USER_XH"); 64 | WHERE("W.XH='"+xh+"' AND U.XH='"+user_xh+"'"); 65 | } 66 | }.toString(); 67 | } 68 | 69 | public String addLy(LyEntity lyEntity){ 70 | return new SQL(){ 71 | { 72 | INSERT_INTO("XW_LYB"); 73 | VALUES("XH","SEQ_XH.NEXTVAL"); 74 | VALUES("USER_XH","'"+lyEntity.getUser_xh()+"'"); 75 | VALUES("WP_XH","'"+lyEntity.getWp_xh()+"'"); 76 | VALUES("LYSJ","'"+lyEntity.getLysj()+"'"); 77 | if(StringUtils.isNotBlank(lyEntity.getLynr())){ 78 | VALUES("LYNR","'"+lyEntity.getLynr()+"'"); 79 | } 80 | } 81 | }.toString(); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/index/service/IndexService.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.index.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.xuwei.entity.LyEntity; 5 | import com.xuwei.entity.SearchEntity; 6 | 7 | import java.util.List; 8 | import java.util.Map; 9 | 10 | /** 11 | * Created by 许伟 on 2018/3/15 0015. 12 | */ 13 | public interface IndexService { 14 | /** 15 | * @Description: 查询所有的物品(按照条件查找实现分页) 16 | * @author: 许伟 17 | * @date: 2018/3/15 0015 14:34 18 | */ 19 | PageInfo findAll(SearchEntity searchEntity); 20 | 21 | /** 22 | * 图片轮播的接口 23 | * @return 24 | */ 25 | List photoList(); 26 | 27 | /** 28 | * @Description: 热点公告的接口 29 | * @author: 许伟 30 | * @date: 2018/3/15 0015 20:17 31 | */ 32 | List titleList(); 33 | 34 | /** 35 | * @Description: 饼图,交易状态 36 | * @author: 许伟 37 | * @date: 2018/3/15 0015 20:45 38 | */ 39 | List complete(); 40 | 41 | /** 42 | * @Description: 折线图统计 43 | * @author: 许伟 44 | * @date: 2018/3/16 0016 9:17 45 | */ 46 | Map totalPercent(String weekTime); 47 | 48 | /** 49 | * @Description: 根据物品xh查询详细信息 50 | * @author: 许伟 51 | * @date: 2018/3/19 0019 13:31 52 | */ 53 | Map findByXh(int user_xh,int xh); 54 | 55 | /** 56 | * @Description: 添加留言 57 | * @author: 许伟 58 | * @date: 2018/3/28 0028 14:32 59 | */ 60 | int addLy(LyEntity lyEntity); 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/index/service/impl/IndexServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.index.service.impl; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.xuwei.entity.LyEntity; 6 | import com.xuwei.entity.SearchEntity; 7 | import com.xuwei.index.dao.IndexDao; 8 | import com.xuwei.index.service.IndexService; 9 | import com.xuwei.util.CommUtils; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import java.util.*; 14 | 15 | /** 16 | * Created by 许伟 on 2018/3/15 0015. 17 | */ 18 | @Service 19 | public class IndexServiceImpl implements IndexService { 20 | 21 | @Autowired 22 | private IndexDao indexMapper; 23 | @Override 24 | public PageInfo findAll(SearchEntity searchEntity) { 25 | PageHelper.startPage(searchEntity.getPageIndex(),searchEntity.getPageSize()); 26 | Listlist=indexMapper.findAll(searchEntity); 27 | PageInfo result=new PageInfo(list); 28 | return result; 29 | } 30 | 31 | @Override 32 | public List photoList() { 33 | return indexMapper.photoList(); 34 | } 35 | 36 | @Override 37 | public List titleList() { 38 | return indexMapper.titleList(); 39 | } 40 | 41 | @Override 42 | public List complete() { 43 | return indexMapper.complete(); 44 | } 45 | 46 | @Override 47 | public Map totalPercent(String weekTime) { 48 | int j=1; 49 | Listlist=indexMapper.totalPercent(weekTime); 50 | Set allList = new HashSet<>(); 51 | List list1 = null; 52 | Map result = new HashMap(); 53 | for (int i = 0; i < list.size(); i++) { 54 | Map data = list.get(i); 55 | if (allList.add(data.get("scsj"))) { 56 | list1 = new ArrayList<>(); 57 | result.put("day_"+j, list1); 58 | list1.add(data); 59 | j++; 60 | } else { 61 | list1.add(data); 62 | } 63 | } 64 | return result; 65 | } 66 | 67 | @Override 68 | public Map findByXh(int user_xh,int xh) { 69 | return indexMapper.findByXh(user_xh,xh); 70 | } 71 | 72 | @Override 73 | public int addLy(LyEntity lyEntity) { 74 | lyEntity.setLysj(CommUtils.dateToStr(new Date(),"yyyy-MM-dd HH:mm:ss")); 75 | indexMapper.addLy(lyEntity); 76 | indexMapper.updateState(lyEntity.getWp_xh()); 77 | return 1; 78 | } 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/page/controller/PageController.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.page.controller; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.CrossOrigin; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | 7 | /** 8 | * Created by 许伟 on 2018/3/15 0015. 9 | */ 10 | @Controller 11 | @CrossOrigin(origins = "*") 12 | public class PageController { 13 | 14 | /** 15 | * @Description: 跳转到页面 16 | * @author: 许伟 17 | * @date: 2018/3/15 0015 14:24 18 | */ 19 | @RequestMapping("index") 20 | public String loginPage(){ 21 | return "index"; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/topic/controller/TopicController.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.topic.controller; 2 | 3 | import com.xuwei.common.ActionResult; 4 | import com.xuwei.entity.ReplyEntity; 5 | import com.xuwei.entity.TopicEntity; 6 | import com.xuwei.topic.service.TopicService; 7 | import com.xuwei.util.CommUtils; 8 | import com.xuwei.util.ResultUtils; 9 | import io.swagger.annotations.Api; 10 | import io.swagger.annotations.ApiOperation; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.web.bind.annotation.*; 13 | 14 | import java.text.SimpleDateFormat; 15 | import java.util.Calendar; 16 | import java.util.Date; 17 | 18 | /** 19 | * Created by 许伟 on 2018/3/16 0016. 20 | */ 21 | @Api(tags = "论坛模块") 22 | @RequestMapping("topic") 23 | @RestController 24 | @CrossOrigin(origins = "*", methods = {RequestMethod.GET, RequestMethod.OPTIONS}) 25 | public class TopicController { 26 | 27 | @Autowired 28 | private TopicService topicService; 29 | 30 | /** 31 | * @Description: 查询所有的主贴 32 | * @author: 许伟 33 | * @date: 2018/3/16 0016 16:44 34 | */ 35 | @GetMapping("allTopic") 36 | @ApiOperation(value = "所有的主题帖") 37 | public ActionResult findAllTopic(@RequestParam(value = "pageIndex",defaultValue = "1") int pageIndex, 38 | @RequestParam(value = "pageSize",defaultValue = "15") int pageSize, 39 | String key){ 40 | return ResultUtils.success(topicService.findAllTopic(pageIndex,pageSize,key)); 41 | } 42 | 43 | /** 44 | * @Description: 发帖 45 | * @author: 许伟 46 | * @date: 2018/3/16 0016 17:03 47 | */ 48 | @GetMapping("startTopic") 49 | @ApiOperation(value = "发帖") 50 | public ActionResult startTopic(TopicEntity topic){ 51 | return ResultUtils.success(topicService.startTopic(topic)); 52 | } 53 | /** 54 | * @Description: 回帖 55 | * @author: 许伟 56 | * @date: 2018/3/16 0016 19:47 57 | */ 58 | @GetMapping("reply") 59 | @ApiOperation(value = "回帖") 60 | public ActionResult reply(ReplyEntity reply){ 61 | return ResultUtils.success(topicService.reply(reply)); 62 | } 63 | /** 64 | * @Description: 统计头表数字 65 | * @author: 许伟 66 | * @date: 2018/3/16 0016 17:35 67 | */ 68 | @GetMapping("num") 69 | @ApiOperation(value = "统计头部数字") 70 | public ActionResult num(){ 71 | SimpleDateFormat format=new SimpleDateFormat("yyyy-MM-dd 00:00:00"); 72 | Date time1= new Date(); 73 | Date time=new Date(time1.getTime()-1000*60*60*24); 74 | String yesterday=format.format(time); 75 | String today=CommUtils.dateToStr(time1,"yyyy-MM-dd 00:00:00"); 76 | return ResultUtils.success(topicService.num(yesterday,today)); 77 | } 78 | 79 | 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/topic/dao/TopicDao.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.topic.dao; 2 | 3 | import com.xuwei.entity.ReplyEntity; 4 | import com.xuwei.entity.TopicEntity; 5 | import com.xuwei.topic.dao.provider.TopicDaoProvider; 6 | import org.apache.ibatis.annotations.Mapper; 7 | import org.apache.ibatis.annotations.SelectProvider; 8 | 9 | import java.util.List; 10 | import java.util.Map; 11 | 12 | /** 13 | * Created by 许伟 on 2018/3/16 0016. 14 | */ 15 | @Mapper 16 | public interface TopicDao { 17 | 18 | /** 19 | * @Description: 查询所有主贴 20 | * @author: 许伟 21 | * @date: 2018/3/16 0016 16:47 22 | */ 23 | @SelectProvider(type = TopicDaoProvider.class,method = "findAllTopic") 24 | List findAllTopic(String key); 25 | /** 26 | * @Description: 发帖 27 | * @author: 许伟 28 | * @date: 2018/3/16 0016 17:06 29 | */ 30 | @SelectProvider(type = TopicDaoProvider.class,method = "startTopic") 31 | void startTopic(TopicEntity topic); 32 | 33 | /** 34 | * @Description: 统计 35 | * @author: 许伟 36 | * @date: 2018/3/16 0016 18:01 37 | */ 38 | @SelectProvider(type = TopicDaoProvider.class,method = "num") 39 | Map num(String yesterday, String today); 40 | 41 | /** 42 | * @Description: 回帖 43 | * @author: 许伟 44 | * @date: 2018/3/16 0016 19:50 45 | */ 46 | @SelectProvider(type = TopicDaoProvider.class,method = "reply") 47 | void reply(ReplyEntity reply); 48 | 49 | @SelectProvider(type = TopicDaoProvider.class,method = "findHtl") 50 | Map findHtl(Integer xh); 51 | 52 | @SelectProvider(type = TopicDaoProvider.class,method = "findZhhtr") 53 | Map findZhhtr(Integer xh); 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/topic/dao/provider/TopicDaoProvider.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.topic.dao.provider; 2 | 3 | import com.xuwei.entity.ReplyEntity; 4 | import com.xuwei.entity.TopicEntity; 5 | import org.apache.ibatis.jdbc.SQL; 6 | 7 | /** 8 | * Created by 许伟 on 2018/3/16 0016. 9 | */ 10 | public class TopicDaoProvider { 11 | public String findAllTopic(String key){ 12 | return new SQL(){ 13 | { 14 | SELECT("u.name,t.ftnr,t.xh,t.user_xh"); 15 | FROM("xw_topic t"); 16 | INNER_JOIN("xw_user u on u.xh=t.user_xh"); 17 | WHERE("T.FTNR LIKE '%"+key+"%'"); 18 | ORDER_BY("t.ftsj desc"); 19 | } 20 | }.toString(); 21 | } 22 | 23 | public String findHtl(Integer xh){ 24 | StringBuilder sb=new StringBuilder(); 25 | sb.append(" SELECT nvl(COUNT(*),0)htl FROM XW_REPLY R"); 26 | sb.append(" WHERE R.TOPIC_XH="+xh); 27 | return sb.toString(); 28 | } 29 | 30 | public String findZhhtr(Integer xh){ 31 | StringBuilder sb=new StringBuilder(); 32 | sb.append(" select nvl(t1.name,'无')zhhtr from(select u.name,r.htsj from xw_reply r inner join xw_user u on u.xh=r.user_xh where r.topic_xh='"+xh+"'order by r.htsj desc)t1 where rownum<2"); 33 | return sb.toString(); 34 | } 35 | 36 | public String startTopic(TopicEntity topic){ 37 | return new SQL(){ 38 | { 39 | INSERT_INTO("XW_TOPIC"); 40 | VALUES("XH","SEQ_XH.NEXTVAL"); 41 | VALUES("FTNR","'"+topic.getFtnr()+"'"); 42 | VALUES("FTSJ","'"+topic.getFtsj()+"'"); 43 | VALUES("USER_XH","'"+topic.getUser_xh()+"'"); 44 | } 45 | }.toString(); 46 | } 47 | 48 | public String reply(ReplyEntity reply){ 49 | return new SQL(){ 50 | { 51 | INSERT_INTO("XW_REPLY"); 52 | VALUES("XH","SEQ_XH.NEXTVAL"); 53 | VALUES("HTNR","'"+reply.getHtnr()+"'"); 54 | VALUES("HTSJ","'"+reply.getHtsj()+"'"); 55 | VALUES("USER_XH","'"+reply.getUser_xh()+"'"); 56 | VALUES("TOPIC_XH","'"+reply.getTopic_xh()+"'"); 57 | } 58 | }.toString(); 59 | } 60 | 61 | public String num(String yesterday,String today){ 62 | StringBuilder sb=new StringBuilder(); 63 | sb.append(" select * from(select sum(today)today from (select count(*)today from xw_topic where ftsj>='"+today+"'"); 64 | sb.append(" union all"); 65 | sb.append(" select count(*)today from xw_reply where htsj>='"+today+"')),"); 66 | sb.append(" (select sum(yesterday)yesterday from(select count(*)yesterday from xw_topic where ftsj>='"+yesterday+"' and ftsj<'"+today+"'"); 67 | sb.append(" union all"); 68 | sb.append(" select count(*)yesterday from xw_reply where htsj>='"+yesterday+"' and htsj<'"+today+"')),"); 69 | sb.append(" ( select sum(total)total from(select count(*)total from xw_topic "); 70 | sb.append(" union all"); 71 | sb.append(" select count(*)total from xw_reply))"); 72 | return sb.toString(); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/topic/service/TopicService.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.topic.service; 2 | 3 | import com.github.pagehelper.PageInfo; 4 | import com.xuwei.common.ActionResult; 5 | import com.xuwei.entity.ReplyEntity; 6 | import com.xuwei.entity.TopicEntity; 7 | 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | /** 12 | * Created by 许伟 on 2018/3/16 0016. 13 | */ 14 | public interface TopicService { 15 | /** 16 | * @Description: 查询所有主贴 17 | * @author: 许伟 18 | * @date: 2018/3/16 0016 16:46 19 | */ 20 | PageInfo findAllTopic(int pageIndex,int pageSize,String key); 21 | 22 | /** 23 | * @Description: 发帖 24 | * @author: 许伟 25 | * @date: 2018/3/16 0016 17:05 26 | */ 27 | int startTopic(TopicEntity topic); 28 | 29 | /** 30 | * @Description: 统计贴总量 31 | * @author: 许伟 32 | * @date: 2018/3/16 0016 18:00 33 | */ 34 | Map num(String yesterday, String today); 35 | 36 | /** 37 | * @Description: 回帖 38 | * @author: 许伟 39 | * @date: 2018/3/16 0016 19:48 40 | */ 41 | int reply(ReplyEntity reply); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/topic/service/impl/TopicServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.topic.service.impl; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | import com.xuwei.entity.ReplyEntity; 6 | import com.xuwei.entity.TopicEntity; 7 | import com.xuwei.topic.dao.TopicDao; 8 | import com.xuwei.topic.service.TopicService; 9 | import com.xuwei.util.CommUtils; 10 | import org.apache.commons.lang3.StringUtils; 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Service; 13 | 14 | import java.math.BigDecimal; 15 | import java.util.Date; 16 | import java.util.List; 17 | import java.util.Map; 18 | 19 | 20 | /** 21 | * Created by 许伟 on 2018/3/16 0016. 22 | */ 23 | @Service 24 | public class TopicServiceImpl implements TopicService { 25 | 26 | @Autowired 27 | private TopicDao topicDao; 28 | 29 | @Override 30 | public PageInfo findAllTopic(int pageIndex,int pageSize,String key) { 31 | PageHelper.startPage(pageIndex,pageSize); 32 | List list=topicDao.findAllTopic(key); 33 | for(int i=0;i T[] listToArray(List source){ 83 | T[] result = (T[]) new Object[source.size()]; 84 | result = source.toArray(result); 85 | return result; 86 | } 87 | 88 | public static String nullDeal(Object o){ 89 | return o == null ? "" : String.valueOf(o); 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/util/FastJsonUtils.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.util; 2 | 3 | import com.alibaba.fastjson.serializer.NameFilter; 4 | 5 | /** 6 | * Created by 许伟 on 2018/1/28. 7 | */ 8 | public class FastJsonUtils { 9 | public static NameFilter nameFilter = new NameFilter() { 10 | @Override 11 | public String process(Object o, String s, Object o1) { 12 | // 属性名转小写 13 | String firstChar = s.substring(0, 1); 14 | String result = firstChar.equals(firstChar.toUpperCase()) ? s.toLowerCase() : s; 15 | return result; 16 | } 17 | }; 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/xuwei/util/ResultUtils.java: -------------------------------------------------------------------------------- 1 | package com.xuwei.util; 2 | 3 | 4 | import com.xuwei.common.ActionResult; 5 | import com.xuwei.common.ReturnEnum; 6 | 7 | /** 8 | * Created by 许伟 on 2018/1/29. 9 | * 返回结果工具类 10 | */ 11 | public class ResultUtils { 12 | 13 | /* 14 | * 返回成功 15 | */ 16 | public static ActionResult success() { 17 | return new ActionResult( 18 | ReturnEnum.SUCCESS.getCode(), 19 | ReturnEnum.SUCCESS.getMessage(), 20 | null, 21 | null 22 | ); 23 | } 24 | 25 | public static ActionResult success(Object content) { 26 | return new ActionResult( 27 | ReturnEnum.SUCCESS.getCode(), 28 | ReturnEnum.SUCCESS.getMessage(), 29 | content, 30 | null 31 | ); 32 | } 33 | 34 | public static ActionResult success(Object content, Object tag) { 35 | return new ActionResult( 36 | ReturnEnum.SUCCESS.getCode(), 37 | ReturnEnum.SUCCESS.getMessage(), 38 | content, 39 | tag); 40 | } 41 | 42 | /* 43 | * 系统异常 44 | */ 45 | public static ActionResult systemError(ReturnEnum systemError) { 46 | return new ActionResult( 47 | ReturnEnum.SYSTEMERROR.getCode(), 48 | ReturnEnum.SYSTEMERROR.getMessage(), 49 | null, 50 | null); 51 | } 52 | 53 | /* 54 | * 用户异常 55 | */ 56 | public static ActionResult customError(String message) { 57 | return new ActionResult( 58 | ReturnEnum.CUSTOMERROR.getCode(), 59 | message, 60 | null, 61 | null); 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /src/main/resources/application-dev.yaml: -------------------------------------------------------------------------------- 1 | spring: 2 | datasource: 3 | username: szxy 4 | password: szxy 5 | url: jdbc:oracle:thin:@localhost:1521:XE 6 | driver-class-name: oracle.jdbc.driver.OracleDriver 7 | pathconfig: 8 | PATH: d:/addSoft/apache-tomcat-7.0.65-windows-x64/apache-tomcat-7.0.65/webapps/ROOT/photo/szxy/ 9 | URL: http://127.0.0.1:8888/photo/szxy/ -------------------------------------------------------------------------------- /src/main/resources/application.yaml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9999 3 | spring: 4 | profiles: 5 | active: dev 6 | http: 7 | multipart: 8 | enabled: true 9 | max-file-size: 2048MB 10 | max-request-size: 102400MB 11 | thymeleaf: 12 | mode: LEGACYHTML5 -------------------------------------------------------------------------------- /src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 |  ${AnsiColor.BRIGHT_YELLOW} 2 | //////////////////////////////////////////////////////////////////// 3 | // _ooOoo_ // 4 | // o8888888o // 5 | // 88" . "88 // 6 | // (| ^_^ |) // 7 | // O\ = /O // 8 | // ____/`---'\____ // 9 | // .' \\| |// `. // 10 | // / \\||| : |||// \ // 11 | // / _||||| -:- |||||- \ // 12 | // | | \\\ - /// | | // 13 | // | \_| ''\---/'' | | // 14 | // \ .-\__ `-` ___/-. / // 15 | // ___`. .' /--.--\ `. . ___ // 16 | // ."" '< `.___\_<|>_/___.' >'"". // 17 | // | | : `- \`.;`\ _ /`;.`/ - ` : | | // 18 | // \ \ `-. \_ __\ /__ _/ .-` / / // 19 | // ========`-.____`-.___\_____/___.-`____.-'======== // 20 | // `=---=' // 21 | // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ // 22 | // BUDDHA BLESS NEVER BUG // 23 | //////////////////////////////////////////////////////////////////// -------------------------------------------------------------------------------- /src/main/resources/static/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿州学院闲置物品交易商城 6 | 7 | 8 | 9 | 22 | 23 |
24 |
25 |
26 | 27 |
28 | 29 |
30 |
31 |
32 |
用户: | 我发的帖子: | 我回的帖子:
33 |
34 |
35 |
36 |
37 |
基本信息
38 |
我上传的闲置物品
39 |
我发的主题
40 |
我回的帖子
41 |
我的留言
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | 50 | 51 | 52 |
序号闲置物品物品描述物品类型意向交换物品上传地点交易状态上传时间
53 |
54 |
55 |
56 | 57 |
58 | 59 | 60 | 61 |
62 |
63 |
64 |
65 | 66 |
上传物品:
67 |
物品类型:
68 |
意向交换物品:
69 |
上传地点:
70 |
上传物品描述:
71 |
72 |
73 | 74 |
75 |
76 |
77 | 备注: 78 | 79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 87 | 88 | 89 | 90 | 93 | -------------------------------------------------------------------------------- /src/main/resources/static/home/css/home.css: -------------------------------------------------------------------------------- 1 | html,body{ 2 | width: 100%; 3 | height: 100%; 4 | min-width: 1366px; 5 | min-height: 768px; 6 | 7 | } 8 | body{ 9 | margin: 0; 10 | background: url(../img/bg.jpg) left top no-repeat; 11 | background-size: cover; 12 | font-family: "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo; 13 | } 14 | .container{ 15 | width: 1500px; 16 | margin: 0 auto; 17 | border:1px silver solid; 18 | } 19 | .middle{ 20 | width: 100%; 21 | height: 215px; 22 | } 23 | .top_3{ 24 | width: 100%; 25 | height: 150px; 26 | background: #D1EAF4; 27 | border:1px silver solid; 28 | } 29 | .top_4{ 30 | width: 100%; 31 | height: 60px; 32 | border: 1px silver solid; 33 | float: left; 34 | } 35 | .test{ 36 | margin-left: 20px; 37 | margin-top: 20px; 38 | width:600px; 39 | height: 50px; 40 | float: left; 41 | } 42 | .top_5{ 43 | height:50px; 44 | float: right; 45 | width: 500px; 46 | } 47 | .clock{ 48 | height: 30px; 49 | margin-top: 20px; 50 | } 51 | .content{ 52 | width: 100%; 53 | height: 600px; 54 | } 55 | .left{ 56 | width:150px; 57 | height: 600px; 58 | border: 1px silver solid; 59 | float: left; 60 | } 61 | .info{ 62 | width:160px; 63 | margin-top: 20px; 64 | } 65 | .right{ 66 | width:1340px; 67 | height: 600px; 68 | float: right; 69 | border: 1px silver solid; 70 | } 71 | .right_top{ 72 | width:1340px; 73 | height: 50px; 74 | } 75 | td{ 76 | text-align: center; 77 | height: 40px; 78 | } 79 | .wp_detail{ 80 | display: none; 81 | position: absolute; 82 | top:200px; 83 | left: 600px; 84 | z-index: 1000; 85 | width: 800px; 86 | height: 600px; 87 | border:1px silver solid; 88 | background: silver; 89 | // background-image: url("../img/sky.jpg"); 90 | } 91 | .ck_wp{ 92 | cursor: pointer; 93 | } 94 | .wp_detail_top{ 95 | width: 660px; 96 | height: 300px; 97 | } 98 | .list_name{ 99 | width: 420px; 100 | height: 55px; 101 | color: black; 102 | font-size: 20px; 103 | font-weight: bold; 104 | } 105 | .list_name input{ 106 | width:250px; 107 | height: 35px; 108 | } 109 | .list_name select{ 110 | width:250px; 111 | height: 35px; 112 | } 113 | 114 | .wp_detail_left{ 115 | width: 500px; 116 | height: 300px; 117 | border: 1px white solid; 118 | } 119 | .wp_detail_right{ 120 | float: right; 121 | width: 150px; 122 | height: 10px; 123 | margin-top: 240px; 124 | } 125 | .wp_detail_button{ 126 | width: 795px; 127 | height: 240px; 128 | border: 1px white solid; 129 | } 130 | .wp_detail_button span{ 131 | width: 660px; 132 | height: 90px; 133 | margin-top: 5px; 134 | text-align: left; 135 | } 136 | .wp_button{ 137 | float: right; 138 | } 139 | 140 | /*我的信息配置*/ 141 | .allInfo{ 142 | width:100%; 143 | height: 400px; 144 | border:1px solid silver; 145 | border-bottom: none; 146 | } 147 | .infoGs{ 148 | width: 800px; 149 | height: 60px; 150 | } 151 | .infoGs input{ 152 | margin-left: 100px; 153 | width: 400px; 154 | height: 40px; 155 | } 156 | .myInfo{ 157 | width: 800px; 158 | height: 350px; 159 | float: left; 160 | } 161 | .myPhoto{ 162 | float: left; 163 | width:300px; 164 | height: 350px; 165 | } 166 | .button{ 167 | //margin-top: 200px; 168 | width: 100%; 169 | height: 100px; 170 | } 171 | -------------------------------------------------------------------------------- /src/main/resources/static/home/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/home/img/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/button.png -------------------------------------------------------------------------------- /src/main/resources/static/home/img/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/clock.png -------------------------------------------------------------------------------- /src/main/resources/static/home/img/clock2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/clock2.png -------------------------------------------------------------------------------- /src/main/resources/static/home/img/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/edit.png -------------------------------------------------------------------------------- /src/main/resources/static/home/img/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/excel.png -------------------------------------------------------------------------------- /src/main/resources/static/home/img/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/ok.png -------------------------------------------------------------------------------- /src/main/resources/static/home/img/ok1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/ok1.png -------------------------------------------------------------------------------- /src/main/resources/static/home/img/sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/sky.jpg -------------------------------------------------------------------------------- /src/main/resources/static/home/img/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/home/img/upload.png -------------------------------------------------------------------------------- /src/main/resources/static/index/css/overcast/images/ui-icons_3383bb_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/css/overcast/images/ui-icons_3383bb_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/index/css/overcast/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/css/overcast/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/index/css/overcast/images/ui-icons_70b2e1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/css/overcast/images/ui-icons_70b2e1_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/index/css/overcast/images/ui-icons_999999_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/css/overcast/images/ui-icons_999999_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/index/css/overcast/images/ui-icons_fbc856_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/css/overcast/images/ui-icons_fbc856_256x240.png -------------------------------------------------------------------------------- /src/main/resources/static/index/css/overcast/images/xiala_jt01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/css/overcast/images/xiala_jt01.png -------------------------------------------------------------------------------- /src/main/resources/static/index/css/paging.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | /* 6 | * 外面盒子样式---自己定义 7 | */ 8 | 9 | .page_div { 10 | margin-top: 20px; 11 | margin-bottom: 20px; 12 | font-size: 15px; 13 | font-family: "microsoft yahei"; 14 | color: #666666; 15 | margin-right: 10px; 16 | padding-left: 20px; 17 | box-sizing: border-box; 18 | } 19 | /* 20 | * 页数按钮样式 21 | */ 22 | 23 | .page_div a { 24 | min-width: 30px; 25 | height: 28px; 26 | border: 1px solid #dce0e0!important; 27 | text-align: center; 28 | margin: 0 4px; 29 | cursor: pointer; 30 | line-height: 28px; 31 | color: #666666; 32 | font-size: 13px; 33 | display: inline-block; 34 | } 35 | 36 | #firstPage, 37 | #lastPage { 38 | width: 50px; 39 | color: #0073A9; 40 | border: 1px solid #0073A9!important; 41 | } 42 | 43 | #prePage, 44 | #nextPage { 45 | width: 70px; 46 | color: #0073A9; 47 | border: 1px solid #0073A9!important; 48 | } 49 | 50 | .page_div .current { 51 | background-color: #0073A9; 52 | border-color: #0073A9; 53 | color: #FFFFFF; 54 | } 55 | 56 | .totalPages { 57 | margin: 0 10px; 58 | } 59 | 60 | .totalPages span, 61 | .totalSize span { 62 | color: #0073A9; 63 | margin: 0 5px; 64 | } -------------------------------------------------------------------------------- /src/main/resources/static/index/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | .vui-slider { 3 | position:relative; 4 | overflow:hidden; 5 | } 6 | .vui-slider .vui-items { 7 | overflow:hidden; 8 | width:100%; 9 | height:100%; 10 | } 11 | .vui-slider .vui-item { 12 | display:none; 13 | position:absolute; 14 | top:0; 15 | left:0; 16 | width:100%; 17 | height:100%; 18 | } 19 | .faceImgDiv{ 20 | display: table; 21 | position: relative; 22 | height: 100%; 23 | margin: 0 auto; 24 | } 25 | .faceImgDiv span{ 26 | display: table-cell; 27 | vertical-align: middle; 28 | } 29 | .faceImgDiv img{ 30 | width: auto; 31 | max-width: 100%; 32 | height: auto; 33 | max-height: 100%; 34 | vertical-align: middle; 35 | } 36 | .vui-slider .vui-item a { 37 | display:block; 38 | max-width: 100%; 39 | height: auto; 40 | padding:0; 41 | margin:0; 42 | border:none; 43 | } 44 | .vui-slider .vui-buttons { 45 | position:absolute; 46 | z-index:5; 47 | bottom:10px; 48 | left:50%; 49 | float:left; 50 | display:inline; 51 | filter:alpha(Opacity=80); 52 | -moz-opacity:0.8; 53 | opacity: 0.8; 54 | } 55 | .vui-slider .vui-button { 56 | float:left; 57 | display:inline; 58 | overflow:hidden; 59 | height:12px; 60 | width:12px; 61 | margin:0 10px; 62 | padding:0; 63 | border:none; 64 | border-radius:6px; 65 | background:#278f8a; 66 | cursor:pointer; 67 | } 68 | .vui-slider .vui-button-cur { 69 | background-color:#C00; 70 | } 71 | .vui-slider .vui-transfer { 72 | display:none; 73 | position:absolute; 74 | top:0; 75 | left:0; 76 | width:100%; 77 | height:100%; 78 | z-index:3; 79 | } 80 | .vui-slider .vui-prev { 81 | display: none; 82 | position:absolute; 83 | top:50%; 84 | left:0; 85 | z-index:5; 86 | width:60px; 87 | height:150px; 88 | margin-top:-75px; 89 | border-radius:0 10px 10px 0; 90 | background:url(../img/prev.gif) no-repeat; 91 | cursor:pointer; 92 | filter:alpha(opacity=30); 93 | -moz-opacity:0.3; 94 | -khtml-opacity:0.3; 95 | opacity:0.3; 96 | transition:0.5s ease; 97 | -o-transition:0.5s ease; 98 | -webkit-transition:0.5s ease; 99 | } 100 | .vui-slider .vui-next { 101 | display: none; 102 | position:absolute; 103 | top:50%; 104 | right:0; 105 | z-index:5; 106 | width:60px; 107 | height:150px; 108 | margin-top:-75px; 109 | border-radius:10px 0 0 10px; 110 | background:url(../img/next.gif) no-repeat; 111 | cursor:pointer; 112 | filter:alpha(opacity=30); 113 | -moz-opacity:0.3; 114 | -khtml-opacity:0.3; 115 | opacity:0.3; 116 | transition:0.5s ease; 117 | -o-transition:0.5s ease; 118 | -webkit-transition:0.5s ease; 119 | } 120 | .vui-slider .vui-sidebutton-hover { 121 | filter:alpha(opacity=40); 122 | -moz-opacity:0.4; 123 | -khtml-opacity:0.4; 124 | opacity:0.4; 125 | background-color:#000; 126 | } 127 | .vui-slider:hover .vui-next,.vui-slider:hover .vui-prev{ 128 | display: block !important; 129 | } 130 | .imgDescribtion{ 131 | position: absolute; 132 | bottom: 30px; 133 | left: 0; 134 | padding-left: 20px; 135 | color: #98a9d9; 136 | } -------------------------------------------------------------------------------- /src/main/resources/static/index/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/button.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/buy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/buy.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/ck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/ck.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/demo_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/demo_1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/demo_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/demo_2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/demo_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/demo_3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/demo_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/demo_4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/demo_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/demo_5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/head.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/head.gif -------------------------------------------------------------------------------- /src/main/resources/static/index/img/jiaoyi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/jiaoyi.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/kefu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/kefu.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/laba.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/laba.gif -------------------------------------------------------------------------------- /src/main/resources/static/index/img/lb_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/lb_bg.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/logo.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/ly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/ly.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/next.gif -------------------------------------------------------------------------------- /src/main/resources/static/index/img/paobu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/paobu.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/phone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/phone.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/img/prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/prev.gif -------------------------------------------------------------------------------- /src/main/resources/static/index/img/school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/school.png -------------------------------------------------------------------------------- /src/main/resources/static/index/img/sun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/img/sun.jpg -------------------------------------------------------------------------------- /src/main/resources/static/index/js/custom.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/js/custom.js -------------------------------------------------------------------------------- /src/main/resources/static/index/js/paging.js: -------------------------------------------------------------------------------- 1 | (function($, window, document, undefined) { 2 | //定义分页类 3 | function Paging(element, options) { 4 | this.element = element; 5 | //传入形参 6 | this.options = { 7 | pageNo: options.pageNo||1, 8 | totalPage: options.totalPage, 9 | totalSize:options.totalSize, 10 | callback:options.callback 11 | }; 12 | //根据形参初始化分页html和css代码 13 | this.init(); 14 | } 15 | //对Paging的实例对象添加公共的属性和方法 16 | Paging.prototype = { 17 | constructor: Paging, 18 | init: function() { 19 | this.creatHtml(); 20 | this.bindEvent(); 21 | }, 22 | creatHtml: function() { 23 | var me = this; 24 | var content = ""; 25 | var current = me.options.pageNo; 26 | var total = me.options.totalPage; 27 | var totalNum = me.options.totalSize; 28 | content += "首页上一页"; 29 | //总页数大于6时候 30 | if(total > 6) { 31 | //当前页数小于5时显示省略号 32 | if(current < 5) { 33 | for(var i = 1; i < 6; i++) { 34 | if(current == i) { 35 | content += "" + i + ""; 36 | } else { 37 | content += "" + i + ""; 38 | } 39 | } 40 | content += ". . ."; 41 | content += ""+total+""; 42 | } else { 43 | //判断页码在末尾的时候 44 | if(current < total - 3) { 45 | for(var i = current - 2; i < current + 3; i++) { 46 | if(current == i) { 47 | content += "" + i + ""; 48 | } else { 49 | content += "" + i + ""; 50 | } 51 | } 52 | content += ". . ."; 53 | content += ""+total+""; 54 | //页码在中间部分时候 55 | } else { 56 | content += "1"; 57 | content += ". . ."; 58 | for(var i = total - 4; i < total + 1; i++) { 59 | if(current == i) { 60 | content += "" + i + ""; 61 | } else { 62 | content += "" + i + ""; 63 | } 64 | } 65 | } 66 | } 67 | //页面总数小于6的时候 68 | } else { 69 | for(var i = 1; i < total + 1; i++) { 70 | if(current == i) { 71 | content += "" + i + ""; 72 | } else { 73 | content += "" + i + ""; 74 | } 75 | } 76 | } 77 | content += "下一页"; 78 | content += "尾页"; 79 | content += ""+total+""; 80 | content += ""+totalNum+"条记录 "; 81 | me.element.html(content); 82 | }, 83 | //添加页面操作事件 84 | bindEvent: function() { 85 | var me = this; 86 | me.element.off('click', 'a'); 87 | me.element.on('click', 'a', function() { 88 | var num = $(this).html(); 89 | var id=$(this).attr("id"); 90 | if(id == "prePage") { 91 | if(me.options.pageNo == 1) { 92 | me.options.pageNo = 1; 93 | } else { 94 | me.options.pageNo = +me.options.pageNo - 1; 95 | } 96 | } else if(id == "nextPage") { 97 | if(me.options.pageNo == me.options.totalPage) { 98 | me.options.pageNo = me.options.totalPage 99 | } else { 100 | me.options.pageNo = +me.options.pageNo + 1; 101 | } 102 | 103 | } else if(id =="firstPage") { 104 | me.options.pageNo = 1; 105 | } else if(id =="lastPage") { 106 | me.options.pageNo = me.options.totalPage; 107 | }else{ 108 | me.options.pageNo = +num; 109 | } 110 | me.creatHtml(); 111 | if(me.options.callback) { 112 | me.options.callback(me.options.pageNo); 113 | } 114 | }); 115 | } 116 | }; 117 | //通过jQuery对象初始化分页对象 118 | $.fn.paging = function(options) { 119 | return new Paging($(this), options); 120 | } 121 | })(jQuery, window, document); -------------------------------------------------------------------------------- /src/main/resources/static/index/js/scroll.js: -------------------------------------------------------------------------------- 1 | // JavaScript Document 2 | (function($){ 3 | $.fn.myScroll = function(options){ 4 | //默认配置 5 | var defaults = { 6 | speed:40, //滚动速度,值越大速度越慢 7 | rowHeight:24 //每行的高度 8 | }; 9 | 10 | var opts = $.extend({}, defaults, options),intId = []; 11 | 12 | function marquee(obj, step){ 13 | 14 | obj.find("ul").animate({ 15 | marginTop: '-=1' 16 | },0,function(){ 17 | var s = Math.abs(parseInt($(this).css("margin-top"))); 18 | if(s >= step){ 19 | $(this).find("li").slice(0, 1).appendTo($(this)); 20 | $(this).css("margin-top", 0); 21 | } 22 | }); 23 | } 24 | 25 | this.each(function(i){ 26 | var sh = opts["rowHeight"],speed = opts["speed"],_this = $(this); 27 | intId[i] = setInterval(function(){ 28 | if(_this.find("ul").height()<=_this.height()){ 29 | clearInterval(intId[i]); 30 | }else{ 31 | marquee(_this, sh); 32 | } 33 | }, speed); 34 | 35 | _this.hover(function(){ 36 | clearInterval(intId[i]); 37 | },function(){ 38 | intId[i] = setInterval(function(){ 39 | if(_this.find("ul").height()<=_this.height()){ 40 | clearInterval(intId[i]); 41 | }else{ 42 | marquee(_this, sh); 43 | } 44 | }, speed); 45 | }); 46 | 47 | }); 48 | 49 | } 50 | 51 | })(jQuery); -------------------------------------------------------------------------------- /src/main/resources/static/index/js/share.js: -------------------------------------------------------------------------------- 1 | 2 | (function($){ 3 | $.setStartTime = function(){ 4 | $('.startDate').datepicker({ 5 | dateFormat: "yy/mm/dd", 6 | maxDate: "+d", 7 | onClose : function(dateText, inst) { 8 | $( "#endDate" ).datepicker( "show" ); 9 | }, 10 | onSelect:function(dateText, inst) { 11 | $( "#endDate" ).datepicker( "option","minDate",dateText ); 12 | }, 13 | 14 | }); 15 | }; 16 | $.setEndTime = function(){ 17 | $(".endDate").datepicker({ 18 | dateFormat: "yy/mm/dd", 19 | maxDate: "+d", 20 | defaultDate : new Date(), 21 | onClose : function(dateText, inst) { 22 | if (dateText < $("input[name=startDate]").val()){ 23 | $( "#endDate" ).datepicker( "show" ); 24 | alert("结束日期不能小于开始日期!"); 25 | //$("#endDate").val(newdate) 26 | } 27 | } 28 | }); 29 | }; 30 | $.date = function(){ 31 | $('.date').datepicker( 32 | $.extend({showMonthAfterYear:true}, $.datepicker.regional['zh-CN'], 33 | {'showAnim':'','dateFormat':'yy/mm/dd','changeMonth':'true','changeYear':'true', 34 | 'showButtonPanel':'true'} 35 | )); 36 | }; 37 | $.datepickerjQ = function(){ 38 | $(".ui-datepicker-time").on("click",function(){ 39 | $(".ui-datepicker-css").css("display","block") 40 | }); 41 | $(".ui-kydtype li").on("click",function(){ 42 | $(".ui-kydtype li").removeClass("on").filter($(this)).addClass("on"); 43 | }); 44 | $(".ui-datepicker-quick input").on("click",function(){ 45 | var thisAlt = $(this).attr("alt"); 46 | var dateList = timeConfig(thisAlt); 47 | $(".ui-datepicker-time").val(dateList); 48 | $(".ui-datepicker-css").css("display","none"); 49 | $("#ui-datepicker-div").css("display","none") 50 | // getAppCondtion() 51 | }); 52 | $(".ui-close-date").on("click",function(){ 53 | $(".ui-datepicker-css").css("display","none") 54 | $("#ui-datepicker-div").css("display","none") 55 | }); 56 | $(".startDate").on("click",function(){ 57 | $(".endDate").attr("disabled",false); 58 | }); 59 | 60 | } 61 | 62 | })(jQuery); 63 | 64 | $(function(){ 65 | $.setStartTime(); 66 | $.setEndTime(); 67 | $.datepickerjQ(); 68 | 69 | var nowDate = new Date(); 70 | timeStr = nowDate.getFullYear() + '/' + (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 71 | nowDate.setDate(nowDate.getDate()+parseInt(-1)); 72 | var endDateStr = nowDate.getFullYear() + '/'+ (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 73 | $(".ui-datepicker-time").attr("value",endDateStr +"-"+ timeStr) 74 | $("#startDate").attr("value",endDateStr) 75 | $("#endDate").attr("value",timeStr) 76 | }); 77 | 78 | 79 | function timeConfig(time){ 80 | var nowDate = new Date(); 81 | timeStr = '-' + nowDate.getFullYear() + '/' + (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 82 | nowDate.setDate(nowDate.getDate()+parseInt(time)); 83 | var endDateStr = nowDate.getFullYear() + '/'+ (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 84 | if(time == -1){ 85 | endDateStr += '-' + endDateStr; 86 | }else{ 87 | endDateStr += timeStr; 88 | } 89 | return endDateStr; 90 | } 91 | 92 | function datePickers(){ 93 | var startDate = $("#startDate").val(); 94 | var endDate = $("#endDate").val(); 95 | var dateList = startDate +'-'+ endDate; 96 | $(".ui-datepicker-time").val(dateList); 97 | $(".ui-datepicker-css").css("display","none"); 98 | // getAppCondtion() 99 | } -------------------------------------------------------------------------------- /src/main/resources/static/index/layer/mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ 2 | ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

'+(e?n.title[0]:n.title)+"

":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
'+e+"
"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

'+(n.content||"")+"

"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
':"")+'
"+l+'
'+n.content+"
"+c+"
",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;odiv{line-height:22px;padding-top:7px;margin-bottom:20px;font-size:14px}.layui-m-layerbtn{display:box;display:-moz-box;display:-webkit-box;width:100%;height:50px;line-height:50px;font-size:0;border-top:1px solid #D0D0D0;background-color:#F2F2F2}.layui-m-layerbtn span{display:block;-moz-box-flex:1;box-flex:1;-webkit-box-flex:1;font-size:14px;cursor:pointer}.layui-m-layerbtn span[yes]{color:#40AFFE}.layui-m-layerbtn span[no]{border-right:1px solid #D0D0D0;border-radius:0 0 0 5px}.layui-m-layerbtn span:active{background-color:#F6F6F6}.layui-m-layerend{position:absolute;right:7px;top:10px;width:30px;height:30px;border:0;font-weight:400;background:0 0;cursor:pointer;-webkit-appearance:none;font-size:30px}.layui-m-layerend::after,.layui-m-layerend::before{position:absolute;left:5px;top:15px;content:'';width:18px;height:1px;background-color:#999;transform:rotate(45deg);-webkit-transform:rotate(45deg);border-radius:3px}.layui-m-layerend::after{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}body .layui-m-layer .layui-m-layer-footer{position:fixed;width:95%;max-width:100%;margin:0 auto;left:0;right:0;bottom:10px;background:0 0}.layui-m-layer-footer .layui-m-layercont{padding:20px;border-radius:5px 5px 0 0;background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn{display:block;height:auto;background:0 0;border-top:none}.layui-m-layer-footer .layui-m-layerbtn span{background-color:rgba(255,255,255,.8)}.layui-m-layer-footer .layui-m-layerbtn span[no]{color:#FD482C;border-top:1px solid #c2c2c2;border-radius:0 0 5px 5px}.layui-m-layer-footer .layui-m-layerbtn span[yes]{margin-top:10px;border-radius:5px}body .layui-m-layer .layui-m-layer-msg{width:auto;max-width:90%;margin:0 auto;bottom:-150px;background-color:rgba(0,0,0,.7);color:#fff}.layui-m-layer-msg .layui-m-layercont{padding:10px 20px} -------------------------------------------------------------------------------- /src/main/resources/static/index/layer/theme/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/layer/theme/default/icon-ext.png -------------------------------------------------------------------------------- /src/main/resources/static/index/layer/theme/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/layer/theme/default/icon.png -------------------------------------------------------------------------------- /src/main/resources/static/index/layer/theme/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/layer/theme/default/loading-0.gif -------------------------------------------------------------------------------- /src/main/resources/static/index/layer/theme/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/layer/theme/default/loading-1.gif -------------------------------------------------------------------------------- /src/main/resources/static/index/layer/theme/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/index/layer/theme/default/loading-2.gif -------------------------------------------------------------------------------- /src/main/resources/static/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 宿州学院闲置物品交易商城 8 | 9 | 10 | 11 |
12 | 13 |
14 | 15 |
16 | 34 |
35 |
36 | 37 | 38 | 39 | 40 | 43 | 100 | 101 | -------------------------------------------------------------------------------- /src/main/resources/static/login/css/login.css: -------------------------------------------------------------------------------- 1 | .head{ 2 | width: 1500px; 3 | margin: 0 auto; 4 | border: 1px solid silver; 5 | } 6 | #wrapper{ 7 | width: 1500px; 8 | margin: 0 auto; 9 | height: 700px; 10 | } 11 | .htmleaf-container{ 12 | width: 1500px; 13 | height: 900px; 14 | margin: 0 auto; 15 | border: 1px solid silver; 16 | border-bottom: none; 17 | } 18 | .center{text-align: center;} 19 | .login-page { 20 | width: 360px; 21 | padding: 8% 0 0; 22 | margin: auto; 23 | } 24 | .form { 25 | position: relative; 26 | z-index: 1; 27 | background: #FFFFFF; 28 | max-width: 360px; 29 | margin: 0 auto 100px; 30 | padding: 45px; 31 | text-align: center; 32 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24); 33 | } 34 | .form input { 35 | font-family: "Roboto", sans-serif; 36 | outline: 0; 37 | background: #f2f2f2; 38 | width: 100%; 39 | border: 0; 40 | margin: 0 0 15px; 41 | padding: 15px; 42 | box-sizing: border-box; 43 | font-size: 14px; 44 | } 45 | .form button { 46 | font-family: "Microsoft YaHei","Roboto", sans-serif; 47 | text-transform: uppercase; 48 | outline: 0; 49 | background: #4CAF50; 50 | width: 100%; 51 | border: 0; 52 | padding: 15px; 53 | color: #FFFFFF; 54 | font-size: 14px; 55 | -webkit-transition: all 0.3 ease; 56 | transition: all 0.3 ease; 57 | cursor: pointer; 58 | } 59 | .form button:hover,.form button:active,.form button:focus { 60 | background: #43A047; 61 | } 62 | .form .message { 63 | margin: 15px 0 0; 64 | color: #b3b3b3; 65 | font-size: 12px; 66 | } 67 | .form .message a { 68 | color: #4CAF50; 69 | text-decoration: none; 70 | } 71 | .form .register-form { 72 | display: none; 73 | } 74 | .container { 75 | position: relative; 76 | z-index: 1; 77 | max-width: 300px; 78 | margin: 0 auto; 79 | } 80 | .container:before, .container:after { 81 | content: ""; 82 | display: block; 83 | clear: both; 84 | } 85 | .container .info { 86 | margin: 50px auto; 87 | text-align: center; 88 | } 89 | .container .info h1 { 90 | margin: 0 0 15px; 91 | padding: 0; 92 | font-size: 36px; 93 | font-weight: 300; 94 | color: #1a1a1a; 95 | } 96 | .container .info span { 97 | color: #4d4d4d; 98 | font-size: 12px; 99 | } 100 | .container .info span a { 101 | color: #000000; 102 | text-decoration: none; 103 | } 104 | .container .info span .fa { 105 | color: #EF3B3A; 106 | } 107 | body { 108 | background: url(../img/bg.png) left top no-repeat; 109 | font-family: "Roboto", sans-serif; 110 | -webkit-font-smoothing: antialiased; 111 | -moz-osx-font-smoothing: grayscale; 112 | } 113 | .shake_effect{ 114 | -webkit-animation-name: shake; 115 | animation-name: shake; 116 | -webkit-animation-duration: 1s; 117 | animation-duration: 1s; 118 | } 119 | @-webkit-keyframes shake { 120 | from, to { 121 | -webkit-transform: translate3d(0, 0, 0); 122 | transform: translate3d(0, 0, 0); 123 | } 124 | 125 | 10%, 30%, 50%, 70%, 90% { 126 | -webkit-transform: translate3d(-10px, 0, 0); 127 | transform: translate3d(-10px, 0, 0); 128 | } 129 | 130 | 20%, 40%, 60%, 80% { 131 | -webkit-transform: translate3d(10px, 0, 0); 132 | transform: translate3d(10px, 0, 0); 133 | } 134 | } 135 | 136 | @keyframes shake { 137 | from, to { 138 | -webkit-transform: translate3d(0, 0, 0); 139 | transform: translate3d(0, 0, 0); 140 | } 141 | 142 | 10%, 30%, 50%, 70%, 90% { 143 | -webkit-transform: translate3d(-10px, 0, 0); 144 | transform: translate3d(-10px, 0, 0); 145 | } 146 | 147 | 20%, 40%, 60%, 80% { 148 | -webkit-transform: translate3d(10px, 0, 0); 149 | transform: translate3d(10px, 0, 0); 150 | } 151 | } 152 | p.center{ 153 | color: #fff;font-family: "Microsoft YaHei"; 154 | } 155 | .button{ 156 | width: 100%; 157 | height: 100px; 158 | } -------------------------------------------------------------------------------- /src/main/resources/static/login/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/login/img/bg.png -------------------------------------------------------------------------------- /src/main/resources/static/login/img/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/login/img/button.png -------------------------------------------------------------------------------- /src/main/resources/static/login/js/login.js: -------------------------------------------------------------------------------- 1 | //注册 2 | $('#create').on('click',function () { 3 | var name=$('#r_user_name').val(); 4 | var password=$('#r_password').val(); 5 | var email=$('#r_emial').val(); 6 | $.ajax({ 7 | method:'GET', 8 | data:{ 9 | name:name, 10 | password:password, 11 | email:email, 12 | }, 13 | url:'http://127.0.0.1:9999/user/register', 14 | success:function (response) { 15 | $.ajax({ 16 | method: 'GET', 17 | data:{ 18 | name:name, 19 | password:password 20 | }, 21 | url: 'http://127.0.0.1:9999/user/login', 22 | success:function (response) { 23 | var xh=response.content.xh; 24 | var name=response.content.name; 25 | localStorage.setItem("xh",xh); 26 | localStorage.setItem("name",name); 27 | window.location.href = "index.html"; 28 | } 29 | }) 30 | } 31 | }) 32 | }) 33 | //登陆 34 | $('#login').on('click',function () { 35 | var name=$('#user_name').val(); 36 | var password=$('#password').val(); 37 | $.ajax({ 38 | method: 'GET', 39 | data:{ 40 | name:name, 41 | password:password 42 | }, 43 | url: 'http://127.0.0.1:9999/user/login', 44 | success:function (response) { 45 | if(response.content!=null){ 46 | var xh=response.content.xh; 47 | var name=response.content.name; 48 | localStorage.setItem("xh",xh); 49 | localStorage.setItem("name",name); 50 | window.location.href = "index.html"; 51 | }else { 52 | $('#user_name').val(""); 53 | $('#password').val(""); 54 | localStorage.setItem("name",""); 55 | $('.msg').text('用户名或密码错误,请重新登陆') 56 | } 57 | } 58 | }) 59 | }) -------------------------------------------------------------------------------- /src/main/resources/static/my.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | ahsdasdhj 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/static/myInfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 |
12 |
13 |
14 |
15 |
姓名:
16 |
密码:
17 |
昵称:
18 |
邮箱:
19 |
生日:
20 |
我的:
21 |
22 |
23 |
24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/static/myLy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 |
20 |
21 |
22 |
23 |
24 | 我收到的留言: 25 |
26 | 27 | 28 | 29 |
序号发布人发布物品意向交换物品留言人留言时间确定交易
30 |
31 |
32 | 我发布的留言: 33 |
34 | 35 | 36 | 37 |
序号发布人发布物品意向交换物品留言人留言时间
38 |
39 |
40 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/main/resources/static/myReply.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 |
序号发帖人发帖内容发帖时间回帖人回帖内容回帖时间
27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/static/myTopic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 |
序号主题最后回帖人回帖量发帖时间
27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/static/myWp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 |
序号闲置物品物品描述物品类型意向交换物品上传地点上传时间
27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/static/top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿州学院闲置物品交易商城 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 |
19 |
20 | 29 | 30 |
31 |
32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | 42 | -------------------------------------------------------------------------------- /src/main/resources/static/top/css/top.css: -------------------------------------------------------------------------------- 1 | body{ 2 | margin: 0; 3 | background-size: cover; 4 | font-family: "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo; 5 | } 6 | .top{ 7 | margin: 0 auto; 8 | height:85px; 9 | } 10 | .title{ 11 | width:500px; 12 | height:85px; 13 | float: left; 14 | } 15 | .dtu{ 16 | width:500px; 17 | height:85px; 18 | float: left; 19 | //background: url(../img/head.gif) left top no-repeat; 20 | } 21 | .time{ 22 | height: 85px; 23 | width: 500px; 24 | float: left; 25 | } 26 | .time1{ 27 | height: 40px; 28 | width: 240px; 29 | margin-left: 200px; 30 | margin-top: 10px; 31 | } 32 | .time2{ 33 | height: 25px; 34 | width: 550px; 35 | font-size: 20px; 36 | margin-left: 80px; 37 | margin-top: 5px; 38 | } 39 | .time2 a{ 40 | color: #999; 41 | text-decoration: none; 42 | } -------------------------------------------------------------------------------- /src/main/resources/static/top/js/top.js: -------------------------------------------------------------------------------- 1 | setInterval(function () { 2 | time(); 3 | },1000); 4 | //获取时间 5 | function time(){ 6 | var myDate = new Date(); 7 | var year = myDate.getFullYear();//获取当前年 8 | var yue = myDate.getMonth()+1;//获取当前月 9 | var date = myDate.getDate();//获取当前日 10 | var h = myDate.getHours();//获取当前小时数(0-23) 11 | var m = myDate.getMinutes();//获取当前分钟数(0-59) 12 | var s = myDate.getSeconds();//获取当前秒 13 | if(yue<10){ 14 | yue = "0"+yue; 15 | } 16 | if(date<10){ 17 | date= "0"+ date; 18 | } 19 | if(h<10){ 20 | h="0"+h; 21 | } 22 | if(s<10){ 23 | s="0"+s; 24 | } 25 | if(m<10){ 26 | m="0"+m; 27 | } 28 | $(".topTime").html(h + ":" + m + ":" + s); 29 | $(".topYear").html(year + "年" + yue + "月" + date + "日"); 30 | return year+"-"+yue+"-"+date; 31 | }; 32 | 33 | //用户退出 34 | $('.exit').on("click",function () { 35 | localStorage.clear(); 36 | window.location.href="login.html"; 37 | }) -------------------------------------------------------------------------------- /src/main/resources/static/tribune.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿州学院闲置物品交易商城 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 |
今日: | 昨日: | 帖子: | 用户:lisi
28 |
29 |
30 | 31 |
32 |
33 | 34 | 35 | 36 |
序号内容作者回帖量最后回帖人回帖
37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 | 47 | 48 |
49 | 50 |
愉快的发帖吧-_-
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | 63 | 66 | -------------------------------------------------------------------------------- /src/main/resources/static/tribune/css/tribune.css: -------------------------------------------------------------------------------- 1 | html,body{ 2 | width: 100%; 3 | height: 100%; 4 | min-width: 1366px; 5 | min-height: 768px; 6 | 7 | } 8 | body{ 9 | margin: 0; 10 | background-size: cover; 11 | font-family: "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo; 12 | } 13 | .container{ 14 | width: 1500px; 15 | margin: 0 auto; 16 | } 17 | .head{ 18 | height:100%; 19 | } 20 | .middle{ 21 | width: 100%; 22 | } 23 | .top_2{ 24 | margin-top: 10px; 25 | width: 100%; 26 | height: 54px; 27 | background: #E3F1F9; 28 | } 29 | .top_3{ 30 | width: 100%; 31 | height: 150px; 32 | background: #D1EAF4; 33 | } 34 | .top_4{ 35 | width: 100%; 36 | height: 60px; 37 | border: 1px silver solid; 38 | float: left; 39 | } 40 | .test{ 41 | margin-left: 20px; 42 | margin-top: 20px; 43 | width:600px; 44 | height: 50px; 45 | float: left; 46 | } 47 | .topic{ 48 | width: 100%; 49 | height: 800px; 50 | border: 1px solid silver; 51 | } 52 | tr{ 53 | width:100%; 54 | height:40px 55 | } 56 | td{ 57 | text-align: center; 58 | } 59 | .page1{ 60 | width: 100%; 61 | height: 80px; 62 | border: 1px solid silver; 63 | border-top: none; 64 | } 65 | .htk{ 66 | display: none; 67 | position: absolute; 68 | top:200px; 69 | left: 600px; 70 | z-index: 1000; 71 | width: 600px; 72 | height: 400px; 73 | border:1px silver solid; 74 | background-image: url("../img/sky.png"); 75 | } 76 | .reply{ 77 | cursor: pointer; 78 | } 79 | .ht_div{ 80 | width:400px; 81 | height:200px; 82 | margin-left: 100px; 83 | } 84 | .ht_al{ 85 | margin-top: 50px; 86 | margin-left: 350px; 87 | } 88 | 89 | -------------------------------------------------------------------------------- /src/main/resources/static/tribune/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/tribune/img/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/static/tribune/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/tribune/img/delete.png -------------------------------------------------------------------------------- /src/main/resources/static/tribune/img/school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/tribune/img/school.png -------------------------------------------------------------------------------- /src/main/resources/static/tribune/img/sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/tribune/img/sky.jpg -------------------------------------------------------------------------------- /src/main/resources/static/tribune/img/sky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/tribune/img/sky.png -------------------------------------------------------------------------------- /src/main/resources/static/tribune/img/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/static/tribune/img/title.png -------------------------------------------------------------------------------- /src/main/resources/static/tribune/js/tribune.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | num() 3 | allTopic('') 4 | $('.head').load("top.html") 5 | }) 6 | //头部数字统计 7 | var num=function () { 8 | $.getJSON('http://127.0.0.1:9999/topic/num',function (response) { 9 | if(response.responseCode=='1000'){ 10 | $('.num1').text(response.content.today) 11 | $('.num2').text(response.content.yesterday) 12 | $('.num3').text(response.content.total) 13 | } 14 | }) 15 | } 16 | //发帖的接口 17 | $('.topic').on('click',function () { 18 | var xh=localStorage.getItem("xh"); 19 | if(xh!=null){ 20 | var ftnr = $('.area').val(); 21 | var user_xh= localStorage.getItem("xh"); 22 | if(ftnr !=null && ftnr !=''){ 23 | $.ajax({ 24 | method:'GET', 25 | data:{ 26 | ftnr:ftnr, 27 | user_xh:user_xh 28 | }, 29 | url : 'http://127.0.0.1:9999/topic/startTopic', 30 | success:function () { 31 | num(); 32 | allTopic(''); 33 | } 34 | }) 35 | $('.area').val('') 36 | } 37 | }else{ 38 | alert("亲,您还没登陆呢"); 39 | } 40 | }) 41 | //回帖的接口 42 | $('.ht').on('click',function () { 43 | var htnr=$('.htnr').val(); 44 | var user_xh=localStorage.getItem("xh"); 45 | var topic_xh=$('.ycxh').text(); 46 | if(htnr !=null && htnr !=''){ 47 | $.ajax({ 48 | method:'GET', 49 | data:{ 50 | htnr:htnr, 51 | user_xh:user_xh, 52 | topic_xh:topic_xh 53 | }, 54 | url : 'http://127.0.0.1:9999/topic/reply', 55 | success:function () { 56 | $('.htk').slideUp(); 57 | num(); 58 | allTopic(''); 59 | } 60 | }) 61 | $('.htnr').val('') 62 | } 63 | }) 64 | //弹出回帖框 65 | function ht(data) { 66 | var xh=localStorage.getItem("xh"); 67 | if(xh!=null){ 68 | $('.htk').slideDown(); 69 | $('.ycxh').text($(data).children().text()); 70 | }else{ 71 | //alert("亲,请先登录!!!!") 72 | } 73 | } 74 | 75 | //删除回帖框 76 | $('.del').on('click',function () { 77 | $('.htk').slideUp(); 78 | }) 79 | 80 | $('.searchReply').on('click',function () { 81 | var key= $('.topicKey').val(); 82 | allTopic(key,1,15); 83 | }) 84 | 85 | //全部主题帖的接口 86 | var allTopic=function (key,pageIndex,pageSize) { 87 | pageSize=15; 88 | $('.list').empty(); 89 | var data = { 90 | key : key, 91 | pageIndex : pageIndex, 92 | pageSize :pageSize, 93 | }; 94 | $.ajax({ 95 | method: 'GET', 96 | data: data, 97 | url: 'http://127.0.0.1:9999/topic/allTopic', 98 | success:function (response) { 99 | if(response.responseCode == '1000') { 100 | $('.num').text(response.content.total) 101 | if (response.content.list.length > 0) { 102 | for(var i = 0;i < response.content.list.length;i++){ 103 | var newTr = '' 104 | + '' + response.content.list[i].rowId +'' 105 | + '' + response.content.list[i].ftnr + '' 106 | + '' + response.content.list[i].name + '' 107 | + '' + response.content.list[i].htl + '' 108 | + '' + response.content.list[i].zhhtr + '' 109 | + '回帖' 110 | + '' 111 | $('.list').append(newTr) 112 | } 113 | } 114 | $("#page").paging({ 115 | pageNo: response.content.pageNum, 116 | totalPage: response.content.pages, 117 | totalSize: response.content.total, 118 | callback: function(num) { 119 | var key= $('.topicKey').val(); 120 | allTopic(key,num,7) 121 | } 122 | }) 123 | } 124 | } 125 | }) 126 | num() 127 | } 128 | 129 | -------------------------------------------------------------------------------- /src/main/resources/templates/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿州学院闲置物品交易商城 6 | 7 | 8 | 9 | 22 | 23 |
24 |
25 |
26 | 27 |
28 | 29 |
30 |
31 |
32 |
用户: | 我发的帖子: | 我回的帖子:
33 |
34 |
35 |
36 |
37 |
基本信息
38 |
我上传的闲置物品
39 |
我发的主题
40 |
我回的帖子
41 |
我的留言
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | 50 | 51 | 52 |
序号闲置物品物品描述物品类型意向交换物品上传地点交易状态上传时间
53 |
54 |
55 |
56 | 57 |
58 | 59 | 60 | 61 |
62 |
63 |
64 |
65 | 66 |
上传物品:
67 |
物品类型:
68 |
意向交换物品:
69 |
上传地点:
70 |
上传物品描述:
71 |
72 |
73 | 74 |
75 |
76 |
77 | 备注: 78 | 79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 | 87 | 88 | 89 | 90 | 93 | -------------------------------------------------------------------------------- /src/main/resources/templates/home/css/home.css: -------------------------------------------------------------------------------- 1 | html,body{ 2 | width: 100%; 3 | height: 100%; 4 | min-width: 1366px; 5 | min-height: 768px; 6 | 7 | } 8 | body{ 9 | margin: 0; 10 | background: url(../img/bg.jpg) left top no-repeat; 11 | background-size: cover; 12 | font-family: "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo; 13 | } 14 | .container{ 15 | width: 1500px; 16 | margin: 0 auto; 17 | border:1px silver solid; 18 | } 19 | .middle{ 20 | width: 100%; 21 | height: 215px; 22 | } 23 | .top_3{ 24 | width: 100%; 25 | height: 150px; 26 | background: #D1EAF4; 27 | border:1px silver solid; 28 | } 29 | .top_4{ 30 | width: 100%; 31 | height: 60px; 32 | border: 1px silver solid; 33 | float: left; 34 | } 35 | .test{ 36 | margin-left: 20px; 37 | margin-top: 20px; 38 | width:600px; 39 | height: 50px; 40 | float: left; 41 | } 42 | .top_5{ 43 | height:50px; 44 | float: right; 45 | width: 500px; 46 | } 47 | .clock{ 48 | height: 30px; 49 | margin-top: 20px; 50 | } 51 | .content{ 52 | width: 100%; 53 | height: 600px; 54 | } 55 | .left{ 56 | width:150px; 57 | height: 600px; 58 | border: 1px silver solid; 59 | float: left; 60 | } 61 | .info{ 62 | width:160px; 63 | margin-top: 20px; 64 | } 65 | .right{ 66 | width:1340px; 67 | height: 600px; 68 | float: right; 69 | border: 1px silver solid; 70 | } 71 | .right_top{ 72 | width:1340px; 73 | height: 50px; 74 | } 75 | td{ 76 | text-align: center; 77 | height: 40px; 78 | } 79 | .wp_detail{ 80 | display: none; 81 | position: absolute; 82 | top:200px; 83 | left: 600px; 84 | z-index: 1000; 85 | width: 800px; 86 | height: 600px; 87 | border:1px silver solid; 88 | background: silver; 89 | // background-image: url("../img/sky.jpg"); 90 | } 91 | .ck_wp{ 92 | cursor: pointer; 93 | } 94 | .wp_detail_top{ 95 | width: 660px; 96 | height: 300px; 97 | } 98 | .list_name{ 99 | width: 420px; 100 | height: 55px; 101 | color: black; 102 | font-size: 20px; 103 | font-weight: bold; 104 | } 105 | .list_name input{ 106 | width:250px; 107 | height: 35px; 108 | } 109 | .list_name select{ 110 | width:250px; 111 | height: 35px; 112 | } 113 | 114 | .wp_detail_left{ 115 | width: 500px; 116 | height: 300px; 117 | border: 1px white solid; 118 | } 119 | .wp_detail_right{ 120 | float: right; 121 | width: 150px; 122 | height: 10px; 123 | margin-top: 240px; 124 | } 125 | .wp_detail_button{ 126 | width: 795px; 127 | height: 240px; 128 | border: 1px white solid; 129 | } 130 | .wp_detail_button span{ 131 | width: 660px; 132 | height: 90px; 133 | margin-top: 5px; 134 | text-align: left; 135 | } 136 | .wp_button{ 137 | float: right; 138 | } 139 | 140 | /*我的信息配置*/ 141 | .allInfo{ 142 | width:100%; 143 | height: 400px; 144 | border:1px solid silver; 145 | border-bottom: none; 146 | } 147 | .infoGs{ 148 | width: 800px; 149 | height: 60px; 150 | } 151 | .infoGs input{ 152 | margin-left: 100px; 153 | width: 400px; 154 | height: 40px; 155 | } 156 | .myInfo{ 157 | width: 800px; 158 | height: 350px; 159 | float: left; 160 | } 161 | .myPhoto{ 162 | float: left; 163 | width:300px; 164 | height: 350px; 165 | } 166 | .button{ 167 | //margin-top: 200px; 168 | width: 100%; 169 | height: 100px; 170 | } 171 | -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/button.png -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/clock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/clock.png -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/clock2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/clock2.png -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/edit.png -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/excel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/excel.png -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/ok.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/ok.png -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/ok1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/ok1.png -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/sky.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/home/img/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/home/img/upload.png -------------------------------------------------------------------------------- /src/main/resources/templates/hqj.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/templates/hqj/hqj.css: -------------------------------------------------------------------------------- 1 | .top{ 2 | width: 100%; 3 | height: 200px; 4 | } -------------------------------------------------------------------------------- /src/main/resources/templates/hqj/hqj.js: -------------------------------------------------------------------------------- 1 | function zt(item) { 2 | var Index = item.selectedIndex; 3 | var value= item.options[Index].value 4 | 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/overcast/images/ui-icons_3383bb_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/css/overcast/images/ui-icons_3383bb_256x240.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/overcast/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/css/overcast/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/overcast/images/ui-icons_70b2e1_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/css/overcast/images/ui-icons_70b2e1_256x240.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/overcast/images/ui-icons_999999_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/css/overcast/images/ui-icons_999999_256x240.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/overcast/images/ui-icons_fbc856_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/css/overcast/images/ui-icons_fbc856_256x240.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/overcast/images/xiala_jt01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/css/overcast/images/xiala_jt01.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/paging.css: -------------------------------------------------------------------------------- 1 | * { 2 | padding: 0; 3 | margin: 0; 4 | } 5 | /* 6 | * 外面盒子样式---自己定义 7 | */ 8 | 9 | .page_div { 10 | margin-top: 20px; 11 | margin-bottom: 20px; 12 | font-size: 15px; 13 | font-family: "microsoft yahei"; 14 | color: #666666; 15 | margin-right: 10px; 16 | padding-left: 20px; 17 | box-sizing: border-box; 18 | } 19 | /* 20 | * 页数按钮样式 21 | */ 22 | 23 | .page_div a { 24 | min-width: 30px; 25 | height: 28px; 26 | border: 1px solid #dce0e0!important; 27 | text-align: center; 28 | margin: 0 4px; 29 | cursor: pointer; 30 | line-height: 28px; 31 | color: #666666; 32 | font-size: 13px; 33 | display: inline-block; 34 | } 35 | 36 | #firstPage, 37 | #lastPage { 38 | width: 50px; 39 | color: #0073A9; 40 | border: 1px solid #0073A9!important; 41 | } 42 | 43 | #prePage, 44 | #nextPage { 45 | width: 70px; 46 | color: #0073A9; 47 | border: 1px solid #0073A9!important; 48 | } 49 | 50 | .page_div .current { 51 | background-color: #0073A9; 52 | border-color: #0073A9; 53 | color: #FFFFFF; 54 | } 55 | 56 | .totalPages { 57 | margin: 0 10px; 58 | } 59 | 60 | .totalPages span, 61 | .totalSize span { 62 | color: #0073A9; 63 | margin: 0 5px; 64 | } -------------------------------------------------------------------------------- /src/main/resources/templates/index/css/style.css: -------------------------------------------------------------------------------- 1 | 2 | .vui-slider { 3 | position:relative; 4 | overflow:hidden; 5 | } 6 | .vui-slider .vui-items { 7 | overflow:hidden; 8 | width:100%; 9 | height:100%; 10 | } 11 | .vui-slider .vui-item { 12 | display:none; 13 | position:absolute; 14 | top:0; 15 | left:0; 16 | width:100%; 17 | height:100%; 18 | } 19 | .faceImgDiv{ 20 | display: table; 21 | position: relative; 22 | height: 100%; 23 | margin: 0 auto; 24 | } 25 | .faceImgDiv span{ 26 | display: table-cell; 27 | vertical-align: middle; 28 | } 29 | .faceImgDiv img{ 30 | width: auto; 31 | max-width: 100%; 32 | height: auto; 33 | max-height: 100%; 34 | vertical-align: middle; 35 | } 36 | .vui-slider .vui-item a { 37 | display:block; 38 | max-width: 100%; 39 | height: auto; 40 | padding:0; 41 | margin:0; 42 | border:none; 43 | } 44 | .vui-slider .vui-buttons { 45 | position:absolute; 46 | z-index:5; 47 | bottom:10px; 48 | left:50%; 49 | float:left; 50 | display:inline; 51 | filter:alpha(Opacity=80); 52 | -moz-opacity:0.8; 53 | opacity: 0.8; 54 | } 55 | .vui-slider .vui-button { 56 | float:left; 57 | display:inline; 58 | overflow:hidden; 59 | height:12px; 60 | width:12px; 61 | margin:0 10px; 62 | padding:0; 63 | border:none; 64 | border-radius:6px; 65 | background:#278f8a; 66 | cursor:pointer; 67 | } 68 | .vui-slider .vui-button-cur { 69 | background-color:#C00; 70 | } 71 | .vui-slider .vui-transfer { 72 | display:none; 73 | position:absolute; 74 | top:0; 75 | left:0; 76 | width:100%; 77 | height:100%; 78 | z-index:3; 79 | } 80 | .vui-slider .vui-prev { 81 | display: none; 82 | position:absolute; 83 | top:50%; 84 | left:0; 85 | z-index:5; 86 | width:60px; 87 | height:150px; 88 | margin-top:-75px; 89 | border-radius:0 10px 10px 0; 90 | background:url(../img/prev.gif) no-repeat; 91 | cursor:pointer; 92 | filter:alpha(opacity=30); 93 | -moz-opacity:0.3; 94 | -khtml-opacity:0.3; 95 | opacity:0.3; 96 | transition:0.5s ease; 97 | -o-transition:0.5s ease; 98 | -webkit-transition:0.5s ease; 99 | } 100 | .vui-slider .vui-next { 101 | display: none; 102 | position:absolute; 103 | top:50%; 104 | right:0; 105 | z-index:5; 106 | width:60px; 107 | height:150px; 108 | margin-top:-75px; 109 | border-radius:10px 0 0 10px; 110 | background:url(../img/next.gif) no-repeat; 111 | cursor:pointer; 112 | filter:alpha(opacity=30); 113 | -moz-opacity:0.3; 114 | -khtml-opacity:0.3; 115 | opacity:0.3; 116 | transition:0.5s ease; 117 | -o-transition:0.5s ease; 118 | -webkit-transition:0.5s ease; 119 | } 120 | .vui-slider .vui-sidebutton-hover { 121 | filter:alpha(opacity=40); 122 | -moz-opacity:0.4; 123 | -khtml-opacity:0.4; 124 | opacity:0.4; 125 | background-color:#000; 126 | } 127 | .vui-slider:hover .vui-next,.vui-slider:hover .vui-prev{ 128 | display: block !important; 129 | } 130 | .imgDescribtion{ 131 | position: absolute; 132 | bottom: 30px; 133 | left: 0; 134 | padding-left: 20px; 135 | color: #98a9d9; 136 | } -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/button.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/buy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/buy.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/ck.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/ck.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/demo_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/demo_1.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/demo_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/demo_2.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/demo_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/demo_3.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/demo_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/demo_4.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/demo_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/demo_5.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/head.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/head.gif -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/jiaoyi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/jiaoyi.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/kefu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/kefu.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/laba.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/laba.gif -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/lb_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/lb_bg.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/logo.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/ly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/ly.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/next.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/next.gif -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/paobu.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/paobu.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/phone.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/phone.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/prev.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/prev.gif -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/school.png -------------------------------------------------------------------------------- /src/main/resources/templates/index/img/sun.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/img/sun.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/index/js/custom.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/index/js/custom.js -------------------------------------------------------------------------------- /src/main/resources/templates/index/js/paging.js: -------------------------------------------------------------------------------- 1 | (function($, window, document, undefined) { 2 | //定义分页类 3 | function Paging(element, options) { 4 | this.element = element; 5 | //传入形参 6 | this.options = { 7 | pageNo: options.pageNo||1, 8 | totalPage: options.totalPage, 9 | totalSize:options.totalSize, 10 | callback:options.callback 11 | }; 12 | //根据形参初始化分页html和css代码 13 | this.init(); 14 | } 15 | //对Paging的实例对象添加公共的属性和方法 16 | Paging.prototype = { 17 | constructor: Paging, 18 | init: function() { 19 | this.creatHtml(); 20 | this.bindEvent(); 21 | }, 22 | creatHtml: function() { 23 | var me = this; 24 | var content = ""; 25 | var current = me.options.pageNo; 26 | var total = me.options.totalPage; 27 | var totalNum = me.options.totalSize; 28 | content += "首页上一页"; 29 | //总页数大于6时候 30 | if(total > 6) { 31 | //当前页数小于5时显示省略号 32 | if(current < 5) { 33 | for(var i = 1; i < 6; i++) { 34 | if(current == i) { 35 | content += "" + i + ""; 36 | } else { 37 | content += "" + i + ""; 38 | } 39 | } 40 | content += ". . ."; 41 | content += ""+total+""; 42 | } else { 43 | //判断页码在末尾的时候 44 | if(current < total - 3) { 45 | for(var i = current - 2; i < current + 3; i++) { 46 | if(current == i) { 47 | content += "" + i + ""; 48 | } else { 49 | content += "" + i + ""; 50 | } 51 | } 52 | content += ". . ."; 53 | content += ""+total+""; 54 | //页码在中间部分时候 55 | } else { 56 | content += "1"; 57 | content += ". . ."; 58 | for(var i = total - 4; i < total + 1; i++) { 59 | if(current == i) { 60 | content += "" + i + ""; 61 | } else { 62 | content += "" + i + ""; 63 | } 64 | } 65 | } 66 | } 67 | //页面总数小于6的时候 68 | } else { 69 | for(var i = 1; i < total + 1; i++) { 70 | if(current == i) { 71 | content += "" + i + ""; 72 | } else { 73 | content += "" + i + ""; 74 | } 75 | } 76 | } 77 | content += "下一页"; 78 | content += "尾页"; 79 | content += ""+total+""; 80 | content += ""+totalNum+"条记录 "; 81 | me.element.html(content); 82 | }, 83 | //添加页面操作事件 84 | bindEvent: function() { 85 | var me = this; 86 | me.element.off('click', 'a'); 87 | me.element.on('click', 'a', function() { 88 | var num = $(this).html(); 89 | var id=$(this).attr("id"); 90 | if(id == "prePage") { 91 | if(me.options.pageNo == 1) { 92 | me.options.pageNo = 1; 93 | } else { 94 | me.options.pageNo = +me.options.pageNo - 1; 95 | } 96 | } else if(id == "nextPage") { 97 | if(me.options.pageNo == me.options.totalPage) { 98 | me.options.pageNo = me.options.totalPage 99 | } else { 100 | me.options.pageNo = +me.options.pageNo + 1; 101 | } 102 | 103 | } else if(id =="firstPage") { 104 | me.options.pageNo = 1; 105 | } else if(id =="lastPage") { 106 | me.options.pageNo = me.options.totalPage; 107 | }else{ 108 | me.options.pageNo = +num; 109 | } 110 | me.creatHtml(); 111 | if(me.options.callback) { 112 | me.options.callback(me.options.pageNo); 113 | } 114 | }); 115 | } 116 | }; 117 | //通过jQuery对象初始化分页对象 118 | $.fn.paging = function(options) { 119 | return new Paging($(this), options); 120 | } 121 | })(jQuery, window, document); -------------------------------------------------------------------------------- /src/main/resources/templates/index/js/scroll.js: -------------------------------------------------------------------------------- 1 | // JavaScript Document 2 | (function($){ 3 | $.fn.myScroll = function(options){ 4 | //默认配置 5 | var defaults = { 6 | speed:40, //滚动速度,值越大速度越慢 7 | rowHeight:24 //每行的高度 8 | }; 9 | 10 | var opts = $.extend({}, defaults, options),intId = []; 11 | 12 | function marquee(obj, step){ 13 | 14 | obj.find("ul").animate({ 15 | marginTop: '-=1' 16 | },0,function(){ 17 | var s = Math.abs(parseInt($(this).css("margin-top"))); 18 | if(s >= step){ 19 | $(this).find("li").slice(0, 1).appendTo($(this)); 20 | $(this).css("margin-top", 0); 21 | } 22 | }); 23 | } 24 | 25 | this.each(function(i){ 26 | var sh = opts["rowHeight"],speed = opts["speed"],_this = $(this); 27 | intId[i] = setInterval(function(){ 28 | if(_this.find("ul").height()<=_this.height()){ 29 | clearInterval(intId[i]); 30 | }else{ 31 | marquee(_this, sh); 32 | } 33 | }, speed); 34 | 35 | _this.hover(function(){ 36 | clearInterval(intId[i]); 37 | },function(){ 38 | intId[i] = setInterval(function(){ 39 | if(_this.find("ul").height()<=_this.height()){ 40 | clearInterval(intId[i]); 41 | }else{ 42 | marquee(_this, sh); 43 | } 44 | }, speed); 45 | }); 46 | 47 | }); 48 | 49 | } 50 | 51 | })(jQuery); -------------------------------------------------------------------------------- /src/main/resources/templates/index/js/share.js: -------------------------------------------------------------------------------- 1 | 2 | (function($){ 3 | $.setStartTime = function(){ 4 | $('.startDate').datepicker({ 5 | dateFormat: "yy/mm/dd", 6 | maxDate: "+d", 7 | onClose : function(dateText, inst) { 8 | $( "#endDate" ).datepicker( "show" ); 9 | }, 10 | onSelect:function(dateText, inst) { 11 | $( "#endDate" ).datepicker( "option","minDate",dateText ); 12 | }, 13 | 14 | }); 15 | }; 16 | $.setEndTime = function(){ 17 | $(".endDate").datepicker({ 18 | dateFormat: "yy/mm/dd", 19 | maxDate: "+d", 20 | defaultDate : new Date(), 21 | onClose : function(dateText, inst) { 22 | if (dateText < $("input[name=startDate]").val()){ 23 | $( "#endDate" ).datepicker( "show" ); 24 | alert("结束日期不能小于开始日期!"); 25 | //$("#endDate").val(newdate) 26 | } 27 | } 28 | }); 29 | }; 30 | $.date = function(){ 31 | $('.date').datepicker( 32 | $.extend({showMonthAfterYear:true}, $.datepicker.regional['zh-CN'], 33 | {'showAnim':'','dateFormat':'yy/mm/dd','changeMonth':'true','changeYear':'true', 34 | 'showButtonPanel':'true'} 35 | )); 36 | }; 37 | $.datepickerjQ = function(){ 38 | $(".ui-datepicker-time").on("click",function(){ 39 | $(".ui-datepicker-css").css("display","block") 40 | }); 41 | $(".ui-kydtype li").on("click",function(){ 42 | $(".ui-kydtype li").removeClass("on").filter($(this)).addClass("on"); 43 | }); 44 | $(".ui-datepicker-quick input").on("click",function(){ 45 | var thisAlt = $(this).attr("alt"); 46 | var dateList = timeConfig(thisAlt); 47 | $(".ui-datepicker-time").val(dateList); 48 | $(".ui-datepicker-css").css("display","none"); 49 | $("#ui-datepicker-div").css("display","none") 50 | // getAppCondtion() 51 | }); 52 | $(".ui-close-date").on("click",function(){ 53 | $(".ui-datepicker-css").css("display","none") 54 | $("#ui-datepicker-div").css("display","none") 55 | }); 56 | $(".startDate").on("click",function(){ 57 | $(".endDate").attr("disabled",false); 58 | }); 59 | 60 | } 61 | 62 | })(jQuery); 63 | 64 | $(function(){ 65 | $.setStartTime(); 66 | $.setEndTime(); 67 | $.datepickerjQ(); 68 | 69 | var nowDate = new Date(); 70 | timeStr = nowDate.getFullYear() + '/' + (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 71 | nowDate.setDate(nowDate.getDate()+parseInt(-1)); 72 | var endDateStr = nowDate.getFullYear() + '/'+ (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 73 | $(".ui-datepicker-time").attr("value",endDateStr +"-"+ timeStr) 74 | $("#startDate").attr("value",endDateStr) 75 | $("#endDate").attr("value",timeStr) 76 | }); 77 | 78 | 79 | function timeConfig(time){ 80 | var nowDate = new Date(); 81 | timeStr = '-' + nowDate.getFullYear() + '/' + (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 82 | nowDate.setDate(nowDate.getDate()+parseInt(time)); 83 | var endDateStr = nowDate.getFullYear() + '/'+ (nowDate.getMonth()+1) + '/' + nowDate.getDate(); 84 | if(time == -1){ 85 | endDateStr += '-' + endDateStr; 86 | }else{ 87 | endDateStr += timeStr; 88 | } 89 | return endDateStr; 90 | } 91 | 92 | function datePickers(){ 93 | var startDate = $("#startDate").val(); 94 | var endDate = $("#endDate").val(); 95 | var dateList = startDate +'-'+ endDate; 96 | $(".ui-datepicker-time").val(dateList); 97 | $(".ui-datepicker-css").css("display","none"); 98 | // getAppCondtion() 99 | } -------------------------------------------------------------------------------- /src/main/resources/templates/index/layer/mobile/layer.js: -------------------------------------------------------------------------------- 1 | /*! layer mobile-v2.0.0 Web弹层组件 MIT License http://layer.layui.com/mobile By 贤心 */ 2 | ;!function(e){"use strict";var t=document,n="querySelectorAll",i="getElementsByClassName",a=function(e){return t[n](e)},s={type:0,shade:!0,shadeClose:!0,fixed:!0,anim:"scale"},l={extend:function(e){var t=JSON.parse(JSON.stringify(s));for(var n in e)t[n]=e[n];return t},timer:{},end:{}};l.touch=function(e,t){e.addEventListener("click",function(e){t.call(this,e)},!1)};var r=0,o=["layui-m-layer"],c=function(e){var t=this;t.config=l.extend(e),t.view()};c.prototype.view=function(){var e=this,n=e.config,s=t.createElement("div");e.id=s.id=o[0]+r,s.setAttribute("class",o[0]+" "+o[0]+(n.type||0)),s.setAttribute("index",r);var l=function(){var e="object"==typeof n.title;return n.title?'

'+(e?n.title[0]:n.title)+"

":""}(),c=function(){"string"==typeof n.btn&&(n.btn=[n.btn]);var e,t=(n.btn||[]).length;return 0!==t&&n.btn?(e=''+n.btn[0]+"",2===t&&(e=''+n.btn[1]+""+e),'
'+e+"
"):""}();if(n.fixed||(n.top=n.hasOwnProperty("top")?n.top:100,n.style=n.style||"",n.style+=" top:"+(t.body.scrollTop+n.top)+"px"),2===n.type&&(n.content='

'+(n.content||"")+"

"),n.skin&&(n.anim="up"),"msg"===n.skin&&(n.shade=!1),s.innerHTML=(n.shade?"
':"")+'
"+l+'
'+n.content+"
"+c+"
",!n.type||2===n.type){var d=t[i](o[0]+n.type),y=d.length;y>=1&&layer.close(d[0].getAttribute("index"))}document.body.appendChild(s);var u=e.elem=a("#"+e.id)[0];n.success&&n.success(u),e.index=r++,e.action(n,u)},c.prototype.action=function(e,t){var n=this;e.time&&(l.timer[n.index]=setTimeout(function(){layer.close(n.index)},1e3*e.time));var a=function(){var t=this.getAttribute("type");0==t?(e.no&&e.no(),layer.close(n.index)):e.yes?e.yes(n.index):layer.close(n.index)};if(e.btn)for(var s=t[i]("layui-m-layerbtn")[0].children,r=s.length,o=0;o 2 | 3 | 4 | 5 | 6 | 7 | 宿州学院闲置物品交易商城 8 | 9 | 10 | 11 |
12 | 13 |
14 | 15 |
16 | 34 |
35 |
36 | 37 | 38 | 39 | 40 | 43 | 100 | 101 | -------------------------------------------------------------------------------- /src/main/resources/templates/login/css/login.css: -------------------------------------------------------------------------------- 1 | .head{ 2 | width: 1500px; 3 | margin: 0 auto; 4 | border: 1px solid silver; 5 | } 6 | #wrapper{ 7 | width: 1500px; 8 | margin: 0 auto; 9 | height: 700px; 10 | } 11 | .htmleaf-container{ 12 | width: 1500px; 13 | height: 900px; 14 | margin: 0 auto; 15 | border: 1px solid silver; 16 | border-bottom: none; 17 | } 18 | .center{text-align: center;} 19 | .login-page { 20 | width: 360px; 21 | padding: 8% 0 0; 22 | margin: auto; 23 | } 24 | .form { 25 | position: relative; 26 | z-index: 1; 27 | background: #FFFFFF; 28 | max-width: 360px; 29 | margin: 0 auto 100px; 30 | padding: 45px; 31 | text-align: center; 32 | box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.2), 0 5px 5px 0 rgba(0, 0, 0, 0.24); 33 | } 34 | .form input { 35 | font-family: "Roboto", sans-serif; 36 | outline: 0; 37 | background: #f2f2f2; 38 | width: 100%; 39 | border: 0; 40 | margin: 0 0 15px; 41 | padding: 15px; 42 | box-sizing: border-box; 43 | font-size: 14px; 44 | } 45 | .form button { 46 | font-family: "Microsoft YaHei","Roboto", sans-serif; 47 | text-transform: uppercase; 48 | outline: 0; 49 | background: #4CAF50; 50 | width: 100%; 51 | border: 0; 52 | padding: 15px; 53 | color: #FFFFFF; 54 | font-size: 14px; 55 | -webkit-transition: all 0.3 ease; 56 | transition: all 0.3 ease; 57 | cursor: pointer; 58 | } 59 | .form button:hover,.form button:active,.form button:focus { 60 | background: #43A047; 61 | } 62 | .form .message { 63 | margin: 15px 0 0; 64 | color: #b3b3b3; 65 | font-size: 12px; 66 | } 67 | .form .message a { 68 | color: #4CAF50; 69 | text-decoration: none; 70 | } 71 | .form .register-form { 72 | display: none; 73 | } 74 | .container { 75 | position: relative; 76 | z-index: 1; 77 | max-width: 300px; 78 | margin: 0 auto; 79 | } 80 | .container:before, .container:after { 81 | content: ""; 82 | display: block; 83 | clear: both; 84 | } 85 | .container .info { 86 | margin: 50px auto; 87 | text-align: center; 88 | } 89 | .container .info h1 { 90 | margin: 0 0 15px; 91 | padding: 0; 92 | font-size: 36px; 93 | font-weight: 300; 94 | color: #1a1a1a; 95 | } 96 | .container .info span { 97 | color: #4d4d4d; 98 | font-size: 12px; 99 | } 100 | .container .info span a { 101 | color: #000000; 102 | text-decoration: none; 103 | } 104 | .container .info span .fa { 105 | color: #EF3B3A; 106 | } 107 | body { 108 | background: url(../img/bg.png) left top no-repeat; 109 | font-family: "Roboto", sans-serif; 110 | -webkit-font-smoothing: antialiased; 111 | -moz-osx-font-smoothing: grayscale; 112 | } 113 | .shake_effect{ 114 | -webkit-animation-name: shake; 115 | animation-name: shake; 116 | -webkit-animation-duration: 1s; 117 | animation-duration: 1s; 118 | } 119 | @-webkit-keyframes shake { 120 | from, to { 121 | -webkit-transform: translate3d(0, 0, 0); 122 | transform: translate3d(0, 0, 0); 123 | } 124 | 125 | 10%, 30%, 50%, 70%, 90% { 126 | -webkit-transform: translate3d(-10px, 0, 0); 127 | transform: translate3d(-10px, 0, 0); 128 | } 129 | 130 | 20%, 40%, 60%, 80% { 131 | -webkit-transform: translate3d(10px, 0, 0); 132 | transform: translate3d(10px, 0, 0); 133 | } 134 | } 135 | 136 | @keyframes shake { 137 | from, to { 138 | -webkit-transform: translate3d(0, 0, 0); 139 | transform: translate3d(0, 0, 0); 140 | } 141 | 142 | 10%, 30%, 50%, 70%, 90% { 143 | -webkit-transform: translate3d(-10px, 0, 0); 144 | transform: translate3d(-10px, 0, 0); 145 | } 146 | 147 | 20%, 40%, 60%, 80% { 148 | -webkit-transform: translate3d(10px, 0, 0); 149 | transform: translate3d(10px, 0, 0); 150 | } 151 | } 152 | p.center{ 153 | color: #fff;font-family: "Microsoft YaHei"; 154 | } 155 | .button{ 156 | width: 100%; 157 | height: 100px; 158 | } -------------------------------------------------------------------------------- /src/main/resources/templates/login/img/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/login/img/bg.png -------------------------------------------------------------------------------- /src/main/resources/templates/login/img/button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/login/img/button.png -------------------------------------------------------------------------------- /src/main/resources/templates/login/js/login.js: -------------------------------------------------------------------------------- 1 | //注册 2 | $('#create').on('click',function () { 3 | var name=$('#r_user_name').val(); 4 | var password=$('#r_password').val(); 5 | var email=$('#r_emial').val(); 6 | $.ajax({ 7 | method:'GET', 8 | data:{ 9 | name:name, 10 | password:password, 11 | email:email, 12 | }, 13 | url:'http://127.0.0.1:9999/user/register', 14 | success:function (response) { 15 | $.ajax({ 16 | method: 'GET', 17 | data:{ 18 | name:name, 19 | password:password 20 | }, 21 | url: 'http://127.0.0.1:9999/user/login', 22 | success:function (response) { 23 | var xh=response.content.xh; 24 | var name=response.content.name; 25 | localStorage.setItem("xh",xh); 26 | localStorage.setItem("name",name); 27 | window.location.href = "index.html"; 28 | } 29 | }) 30 | } 31 | }) 32 | }) 33 | //登陆 34 | $('#login').on('click',function () { 35 | var name=$('#user_name').val(); 36 | var password=$('#password').val(); 37 | $.ajax({ 38 | method: 'GET', 39 | data:{ 40 | name:name, 41 | password:password 42 | }, 43 | url: 'http://127.0.0.1:9999/user/login', 44 | success:function (response) { 45 | if(response.content!=null){ 46 | var xh=response.content.xh; 47 | var name=response.content.name; 48 | localStorage.setItem("xh",xh); 49 | localStorage.setItem("name",name); 50 | window.location.href = "index.html"; 51 | }else { 52 | $('#user_name').val(""); 53 | $('#password').val(""); 54 | localStorage.setItem("name",""); 55 | $('.msg').text('用户名或密码错误,请重新登陆') 56 | } 57 | } 58 | }) 59 | }) -------------------------------------------------------------------------------- /src/main/resources/templates/main.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Our Love Story 5 | 6 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | 41 |
42 | 43 | 76 | 77 | 78 | 79 | 80 | -------------------------------------------------------------------------------- /src/main/resources/templates/my.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | ahsdasdhj 9 | 10 | -------------------------------------------------------------------------------- /src/main/resources/templates/myInfo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 |
9 |
10 | 11 |
12 |
13 |
14 |
15 |
姓名:
16 |
密码:
17 |
昵称:
18 |
邮箱:
19 |
生日:
20 |
我的:
21 |
22 |
23 |
24 |
25 | 26 |
27 |
28 |
29 | 30 |
31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /src/main/resources/templates/myLy.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 18 | 19 |
20 |
21 |
22 |
23 |
24 | 我收到的留言: 25 |
26 | 27 | 28 | 29 |
序号发布人发布物品意向交换物品留言人留言时间确定交易
30 |
31 |
32 | 我发布的留言: 33 |
34 | 35 | 36 | 37 |
序号发布人发布物品意向交换物品留言人留言时间
38 |
39 |
40 |
41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/main/resources/templates/myReply.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 |
序号发帖人发帖内容发帖时间回帖人回帖内容回帖时间
27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/templates/myTopic.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 |
序号主题最后回帖人回帖量发帖时间
27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/templates/myWp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 |
19 |
20 |
21 |
22 |
23 | 24 | 25 | 26 |
序号闲置物品物品描述物品类型意向交换物品上传地点上传时间
27 |
28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /src/main/resources/templates/top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿州学院闲置物品交易商城 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 |
16 | 17 | 18 |
19 |
20 | 29 | 30 |
31 |
32 |
33 |
34 | 35 | 36 | 37 | 38 | 39 | 42 | -------------------------------------------------------------------------------- /src/main/resources/templates/top/css/top.css: -------------------------------------------------------------------------------- 1 | body{ 2 | margin: 0; 3 | background-size: cover; 4 | font-family: "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo; 5 | } 6 | .top{ 7 | margin: 0 auto; 8 | height:85px; 9 | } 10 | .title{ 11 | width:500px; 12 | height:85px; 13 | float: left; 14 | } 15 | .dtu{ 16 | width:500px; 17 | height:85px; 18 | float: left; 19 | //background: url(../img/head.gif) left top no-repeat; 20 | } 21 | .time{ 22 | height: 85px; 23 | width: 500px; 24 | float: left; 25 | } 26 | .time1{ 27 | height: 40px; 28 | width: 240px; 29 | margin-left: 200px; 30 | margin-top: 10px; 31 | } 32 | .time2{ 33 | height: 25px; 34 | width: 550px; 35 | font-size: 20px; 36 | margin-left: 80px; 37 | margin-top: 5px; 38 | } 39 | .time2 a{ 40 | color: #999; 41 | text-decoration: none; 42 | } -------------------------------------------------------------------------------- /src/main/resources/templates/top/js/top.js: -------------------------------------------------------------------------------- 1 | setInterval(function () { 2 | time(); 3 | },1000); 4 | //获取时间 5 | function time(){ 6 | var myDate = new Date(); 7 | var year = myDate.getFullYear();//获取当前年 8 | var yue = myDate.getMonth()+1;//获取当前月 9 | var date = myDate.getDate();//获取当前日 10 | var h = myDate.getHours();//获取当前小时数(0-23) 11 | var m = myDate.getMinutes();//获取当前分钟数(0-59) 12 | var s = myDate.getSeconds();//获取当前秒 13 | if(yue<10){ 14 | yue = "0"+yue; 15 | } 16 | if(date<10){ 17 | date= "0"+ date; 18 | } 19 | if(h<10){ 20 | h="0"+h; 21 | } 22 | if(s<10){ 23 | s="0"+s; 24 | } 25 | if(m<10){ 26 | m="0"+m; 27 | } 28 | $(".topTime").html(h + ":" + m + ":" + s); 29 | $(".topYear").html(year + "年" + yue + "月" + date + "日"); 30 | return year+"-"+yue+"-"+date; 31 | }; 32 | 33 | //用户退出 34 | $('.exit').on("click",function () { 35 | localStorage.clear(); 36 | window.location.href="login.html"; 37 | }) -------------------------------------------------------------------------------- /src/main/resources/templates/tribune.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 宿州学院闲置物品交易商城 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 |
14 | 15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | 24 |
25 |
26 |
27 |
今日: | 昨日: | 帖子: | 用户:lisi
28 |
29 |
30 | 31 |
32 |
33 | 34 | 35 | 36 |
序号内容作者回帖量最后回帖人回帖
37 |
38 |
39 |
40 |
41 |
42 |
43 | 44 |
45 |
46 | 47 | 48 |
49 | 50 |
愉快的发帖吧-_-
51 |
52 |
53 |
54 | 55 | 56 | 57 | 58 | 59 | 60 | 63 | 66 | -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/css/tribune.css: -------------------------------------------------------------------------------- 1 | html,body{ 2 | width: 100%; 3 | height: 100%; 4 | min-width: 1366px; 5 | min-height: 768px; 6 | 7 | } 8 | body{ 9 | margin: 0; 10 | background-size: cover; 11 | font-family: "Microsoft YaHei", "Segoe UI", "Lucida Grande", Helvetica, Arial, sans-serif, FreeSans, Arimo; 12 | } 13 | .container{ 14 | width: 1500px; 15 | margin: 0 auto; 16 | } 17 | .head{ 18 | height:100%; 19 | } 20 | .middle{ 21 | width: 100%; 22 | } 23 | .top_2{ 24 | margin-top: 10px; 25 | width: 100%; 26 | height: 54px; 27 | background: #E3F1F9; 28 | } 29 | .top_3{ 30 | width: 100%; 31 | height: 150px; 32 | background: #D1EAF4; 33 | } 34 | .top_4{ 35 | width: 100%; 36 | height: 60px; 37 | border: 1px silver solid; 38 | float: left; 39 | } 40 | .test{ 41 | margin-left: 20px; 42 | margin-top: 20px; 43 | width:600px; 44 | height: 50px; 45 | float: left; 46 | } 47 | .topic{ 48 | width: 100%; 49 | height: 800px; 50 | border: 1px solid silver; 51 | } 52 | tr{ 53 | width:100%; 54 | height:40px 55 | } 56 | td{ 57 | text-align: center; 58 | } 59 | .page1{ 60 | width: 100%; 61 | height: 80px; 62 | border: 1px solid silver; 63 | border-top: none; 64 | } 65 | .htk{ 66 | display: none; 67 | position: absolute; 68 | top:200px; 69 | left: 600px; 70 | z-index: 1000; 71 | width: 600px; 72 | height: 400px; 73 | border:1px silver solid; 74 | background-image: url("../img/sky.png"); 75 | } 76 | .reply{ 77 | cursor: pointer; 78 | } 79 | .ht_div{ 80 | width:400px; 81 | height:200px; 82 | margin-left: 100px; 83 | } 84 | .ht_al{ 85 | margin-top: 50px; 86 | margin-left: 350px; 87 | } 88 | 89 | -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/img/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/tribune/img/bg.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/tribune/img/delete.png -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/img/school.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/tribune/img/school.png -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/img/sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/tribune/img/sky.jpg -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/img/sky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/tribune/img/sky.png -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/img/title.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/yxjh/szxy/dc20403663eee1db3b45c83fd661868d65f3797d/src/main/resources/templates/tribune/img/title.png -------------------------------------------------------------------------------- /src/main/resources/templates/tribune/js/tribune.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | num() 3 | allTopic('') 4 | $('.head').load("top.html") 5 | }) 6 | //头部数字统计 7 | var num=function () { 8 | $.getJSON('http://127.0.0.1:9999/topic/num',function (response) { 9 | if(response.responseCode=='1000'){ 10 | $('.num1').text(response.content.today) 11 | $('.num2').text(response.content.yesterday) 12 | $('.num3').text(response.content.total) 13 | } 14 | }) 15 | } 16 | //发帖的接口 17 | $('.topic').on('click',function () { 18 | var xh=localStorage.getItem("xh"); 19 | if(xh!=null){ 20 | var ftnr = $('.area').val(); 21 | var user_xh= localStorage.getItem("xh"); 22 | if(ftnr !=null && ftnr !=''){ 23 | $.ajax({ 24 | method:'GET', 25 | data:{ 26 | ftnr:ftnr, 27 | user_xh:user_xh 28 | }, 29 | url : 'http://127.0.0.1:9999/topic/startTopic', 30 | success:function () { 31 | num(); 32 | allTopic(''); 33 | } 34 | }) 35 | $('.area').val('') 36 | } 37 | }else{ 38 | alert("亲,您还没登陆呢"); 39 | } 40 | }) 41 | //回帖的接口 42 | $('.ht').on('click',function () { 43 | var htnr=$('.htnr').val(); 44 | var user_xh=localStorage.getItem("xh"); 45 | var topic_xh=$('.ycxh').text(); 46 | if(htnr !=null && htnr !=''){ 47 | $.ajax({ 48 | method:'GET', 49 | data:{ 50 | htnr:htnr, 51 | user_xh:user_xh, 52 | topic_xh:topic_xh 53 | }, 54 | url : 'http://127.0.0.1:9999/topic/reply', 55 | success:function () { 56 | $('.htk').slideUp(); 57 | num(); 58 | allTopic(''); 59 | } 60 | }) 61 | $('.htnr').val('') 62 | } 63 | }) 64 | //弹出回帖框 65 | function ht(data) { 66 | var xh=localStorage.getItem("xh"); 67 | if(xh!=null){ 68 | $('.htk').slideDown(); 69 | $('.ycxh').text($(data).children().text()); 70 | }else{ 71 | //alert("亲,请先登录!!!!") 72 | } 73 | } 74 | 75 | //删除回帖框 76 | $('.del').on('click',function () { 77 | $('.htk').slideUp(); 78 | }) 79 | 80 | $('.searchReply').on('click',function () { 81 | var key= $('.topicKey').val(); 82 | allTopic(key,1,15); 83 | }) 84 | 85 | //全部主题帖的接口 86 | var allTopic=function (key,pageIndex,pageSize) { 87 | pageSize=15; 88 | $('.list').empty(); 89 | var data = { 90 | key : key, 91 | pageIndex : pageIndex, 92 | pageSize :pageSize, 93 | }; 94 | $.ajax({ 95 | method: 'GET', 96 | data: data, 97 | url: 'http://127.0.0.1:9999/topic/allTopic', 98 | success:function (response) { 99 | if(response.responseCode == '1000') { 100 | $('.num').text(response.content.total) 101 | if (response.content.list.length > 0) { 102 | for(var i = 0;i < response.content.list.length;i++){ 103 | var newTr = '' 104 | + '' + response.content.list[i].rowId +'' 105 | + '' + response.content.list[i].ftnr + '' 106 | + '' + response.content.list[i].name + '' 107 | + '' + response.content.list[i].htl + '' 108 | + '' + response.content.list[i].zhhtr + '' 109 | + '回帖' 110 | + '' 111 | $('.list').append(newTr) 112 | } 113 | } 114 | $("#page").paging({ 115 | pageNo: response.content.pageNum, 116 | totalPage: response.content.pages, 117 | totalSize: response.content.total, 118 | callback: function(num) { 119 | var key= $('.topicKey').val(); 120 | allTopic(key,num,7) 121 | } 122 | }) 123 | } 124 | } 125 | }) 126 | num() 127 | } 128 | 129 | -------------------------------------------------------------------------------- /src/test/java/com/xuwei/SzxyApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.xuwei; 2 | 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | import org.springframework.test.context.junit4.SpringRunner; 7 | 8 | @RunWith(SpringRunner.class) 9 | @SpringBootTest 10 | public class SzxyApplicationTests { 11 | 12 | @Test 13 | public void contextLoads() { 14 | } 15 | 16 | } 17 | --------------------------------------------------------------------------------