parent
fa5b423fe5
commit
cfdf22cccb
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,5 @@
|
||||
# Created by .ignore support plugin (hsz.mobi)
|
||||
/target
|
||||
.idea
|
||||
*.iml
|
||||
/src/main/resources/jdbc.properties
|
||||
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2019 wsk1103
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,126 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>utp</groupId>
|
||||
<artifactId>utp</artifactId>
|
||||
<packaging>war</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<name>utp Maven Webapp</name>
|
||||
<url>http://maven.apache.org</url>
|
||||
|
||||
<properties>
|
||||
<spring-version>5.3.19</spring-version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter</artifactId>
|
||||
<version>2.6.7</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-web -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
<version>2.6.7</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework/spring-websocket -->
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-websocket</artifactId>
|
||||
<version>${spring-version}</version>
|
||||
</dependency>
|
||||
<!--Thymeleaf模板依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-thymeleaf</artifactId>
|
||||
<version>2.6.7</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/cn.hutool/hutool-all -->
|
||||
<dependency>
|
||||
<groupId>cn.hutool</groupId>
|
||||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.0.M4</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-fileupload</groupId>
|
||||
<artifactId>commons-fileupload</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.24</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- https://mvnrepository.com/artifact/net.coobird/thumbnailator -->
|
||||
<dependency>
|
||||
<groupId>net.coobird</groupId>
|
||||
<artifactId>thumbnailator</artifactId>
|
||||
<version>0.4.19</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>2.2.2</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-jdbc -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-jdbc</artifactId>
|
||||
<version>2.6.7</version>
|
||||
</dependency>
|
||||
<!-- https://mvnrepository.com/artifact/com.alibaba/druid -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid</artifactId>
|
||||
<version>1.2.9</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.30</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-logging</artifactId>
|
||||
<version>2.6.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.1.41</version>
|
||||
</dependency>
|
||||
<!--https://mvnrepository.com/artifact/org.apache.commons/commons-email-->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-email</artifactId>
|
||||
<version>1.4</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<finalName>UTP</finalName>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
||||
@ -0,0 +1,19 @@
|
||||
/*
|
||||
package com.wsk.aspect;
|
||||
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Before;
|
||||
|
||||
*/
|
||||
/**
|
||||
* Created by wsk1103 on 2017/10/18.
|
||||
*//*
|
||||
|
||||
@Aspect
|
||||
public class OnlyOneUser {
|
||||
@Before(value = "execution(* com.wsk.controller.UserController.login(..))")
|
||||
public void isExit(){
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
@ -0,0 +1,109 @@
|
||||
package com.wsk.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/22.
|
||||
*/
|
||||
public class GoodsCarBean implements Serializable{
|
||||
private int id;
|
||||
private int uid;
|
||||
private int sid;
|
||||
private String name;
|
||||
private Date modified;
|
||||
private int quantity;
|
||||
private int level;
|
||||
private String remark;
|
||||
private String sort;
|
||||
private String image;
|
||||
private double price;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(int sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,64 @@
|
||||
package com.wsk.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/21.
|
||||
*/
|
||||
public class ShopContextBean implements Serializable {
|
||||
private int id;
|
||||
private Date modified;
|
||||
private int sid;
|
||||
private String context;
|
||||
private int uid;
|
||||
private String username;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
public int getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(int sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.wsk.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/19.
|
||||
*/
|
||||
public class ShopInformationBean implements Serializable{
|
||||
private int id;
|
||||
private String name;
|
||||
private int level;
|
||||
private String remark;
|
||||
private double price;
|
||||
private String sort;
|
||||
private int quantity;
|
||||
private int transaction;
|
||||
private int uid;
|
||||
private String image;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(int level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public int getTransaction() {
|
||||
return transaction;
|
||||
}
|
||||
|
||||
public void setTransaction(int transaction) {
|
||||
this.transaction = transaction;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,83 @@
|
||||
package com.wsk.bean;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/21.
|
||||
*/
|
||||
public class UserWantBean implements Serializable{
|
||||
private int id;
|
||||
private Date modified;
|
||||
private String name;
|
||||
private String sort;
|
||||
private int quantity;
|
||||
private double price;
|
||||
private String remark;
|
||||
private int uid;
|
||||
|
||||
public Date getModified() {
|
||||
return modified;
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public int getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(int quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public double getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(double price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,32 @@
|
||||
package com.wsk.config;
|
||||
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import lombok.Getter;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
|
||||
/**
|
||||
* @author sk
|
||||
* @date 2023/4/18
|
||||
*/
|
||||
@Configuration
|
||||
@Getter
|
||||
public class FileConfig {
|
||||
|
||||
@Value("${my.file.save}")
|
||||
private String fileSave;
|
||||
@Value("${my.file.saveImage}")
|
||||
private String saveImage;
|
||||
@Value("${my.file.saveThumbnails}")
|
||||
private String saveThumbnails;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
String si = "file:" + fileSave + ":" + saveImage;
|
||||
FileUtil.mkdir(si);
|
||||
String st = "file:" + fileSave + ":" + saveThumbnails;
|
||||
FileUtil.mkdir(st);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.wsk.config;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* @author sk
|
||||
* @date 2022/5/1
|
||||
* @description 描述
|
||||
*/
|
||||
@Configuration
|
||||
public class MyWebAppConfigurer implements WebMvcConfigurer {
|
||||
|
||||
@Autowired
|
||||
private FileConfig fileConfig;
|
||||
|
||||
@Override
|
||||
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||||
registry.addResourceHandler("/image/**", "/images/**", "/css/**", "/js/**", "/img/**")
|
||||
.addResourceLocations("classpath:/mystatic/image/", "classpath:/mystatic/images/", "classpath:/mystatic/css/",
|
||||
"classpath:/mystatic/js/", "classpath:/mystatic/img/");
|
||||
String saveFile = "file:" + fileConfig.getFileSave() + ":/toImage/";
|
||||
registry.addResourceHandler("/toImage/**").addResourceLocations(saveFile);
|
||||
WebMvcConfigurer.super.addResourceHandlers(registry);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.wsk.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/23.
|
||||
*/
|
||||
@Controller
|
||||
public class ErrorController {
|
||||
|
||||
@RequestMapping(value = "/error2")
|
||||
public String error() {
|
||||
return "error";
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,99 @@
|
||||
package com.wsk.controller;
|
||||
|
||||
import com.wsk.pojo.UserInformation;
|
||||
import com.wsk.pojo.UserPassword;
|
||||
import com.wsk.response.BaseResponse;
|
||||
import com.wsk.service.UserInformationService;
|
||||
import com.wsk.service.UserPasswordService;
|
||||
import com.wsk.tool.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/9.
|
||||
*/
|
||||
@RestController
|
||||
public class ForgetController {
|
||||
|
||||
@Resource
|
||||
private UserPasswordService userPasswordService;
|
||||
@Resource
|
||||
private UserInformationService userInformationService;
|
||||
|
||||
@RequestMapping(value = "checkCode.do", method = {RequestMethod.POST, RequestMethod.GET})
|
||||
public Map checkPhone(HttpServletRequest request, Model model,
|
||||
@RequestParam String code, @RequestParam String token) {
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
String name = request.getParameter("name");
|
||||
if (!StringUtils.getInstance().isNullOrEmpty(name)) {
|
||||
request.getSession().setAttribute("name", name);
|
||||
}
|
||||
String checkCodeToken = (String) request.getSession().getAttribute("token");
|
||||
if (StringUtils.getInstance().isNullOrEmpty(checkCodeToken) || !checkCodeToken.equals(token)) {
|
||||
map.put("result", 0);
|
||||
return map;
|
||||
}
|
||||
//验证码错误
|
||||
if (!checkCodePhone(code, request)) {
|
||||
map.put("result", 0);
|
||||
return map;
|
||||
}
|
||||
map.put("result", 1);
|
||||
return map;
|
||||
}
|
||||
|
||||
//更新密码
|
||||
@RequestMapping("updatePassword.do")
|
||||
public BaseResponse updatePassword(HttpServletRequest request, Model model,
|
||||
@RequestParam String password, @RequestParam String token) {
|
||||
//防止重复提交
|
||||
String updatePasswordToken = (String) request.getSession().getAttribute("token");
|
||||
if (StringUtils.getInstance().isNullOrEmpty(updatePasswordToken) || !updatePasswordToken.equals(token)) {
|
||||
return BaseResponse.fail();
|
||||
}
|
||||
String realPhone = (String) request.getSession().getAttribute("phone");
|
||||
UserPassword userPassword = new UserPassword();
|
||||
String newPassword = StringUtils.getInstance().getMD5(password);
|
||||
int uid;
|
||||
try {
|
||||
uid = userInformationService.selectIdByPhone(realPhone);
|
||||
if (uid == 0) {
|
||||
return BaseResponse.fail();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return BaseResponse.fail();
|
||||
}
|
||||
int id = userPasswordService.selectByUid(uid).getId();
|
||||
userPassword.setId(id);
|
||||
userPassword.setUid(uid);
|
||||
userPassword.setModified(new Date());
|
||||
userPassword.setPassword(newPassword);
|
||||
int result;
|
||||
try {
|
||||
result = userPasswordService.updateByPrimaryKeySelective(userPassword);
|
||||
} catch (Exception e) {
|
||||
return BaseResponse.fail();
|
||||
}
|
||||
//更新失败
|
||||
if (result != 1) {
|
||||
return BaseResponse.fail();
|
||||
}
|
||||
UserInformation userInformation = userInformationService.selectByPrimaryKey(uid);
|
||||
request.getSession().setAttribute("userInformation", userInformation);
|
||||
return BaseResponse.success();
|
||||
}
|
||||
|
||||
//check the phone`s code
|
||||
private boolean checkCodePhone(String codePhone, HttpServletRequest request) {
|
||||
String trueCodePhone = "1479";
|
||||
return codePhone.equals(trueCodePhone);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,242 @@
|
||||
package com.wsk.controller;
|
||||
|
||||
import com.wsk.bean.ShopContextBean;
|
||||
import com.wsk.bean.ShopInformationBean;
|
||||
import com.wsk.bean.UserWantBean;
|
||||
import com.wsk.pojo.*;
|
||||
import com.wsk.service.*;
|
||||
import com.wsk.token.TokenProccessor;
|
||||
import com.wsk.tool.StringUtils;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/14.
|
||||
*/
|
||||
@Controller
|
||||
public class GoodsController {
|
||||
@Resource
|
||||
private ShopInformationService shopInformationService;
|
||||
@Resource
|
||||
private ShopContextService shopContextService;
|
||||
@Resource
|
||||
private UserInformationService userInformationService;
|
||||
@Resource
|
||||
private SpecificeService specificeService;
|
||||
@Resource
|
||||
private ClassificationService classificationService;
|
||||
@Resource
|
||||
private AllKindsService allKindsService;
|
||||
@Resource
|
||||
private UserWantService userWantService;
|
||||
|
||||
//进入到发布商品页面
|
||||
@RequestMapping(value = "/publish_product.do", method = RequestMethod.GET)
|
||||
public String publish(HttpServletRequest request, Model model) {
|
||||
//先判断用户有没有登录
|
||||
UserInformation userInformation = (UserInformation) request.getSession().getAttribute("userInformation");
|
||||
if (StringUtils.getInstance().isNullOrEmpty(userInformation)) {
|
||||
//如果没有登录
|
||||
return "redirect:/login.do";
|
||||
} else {
|
||||
model.addAttribute("userInformation", userInformation);
|
||||
}
|
||||
//如果登录了,判断该用户有没有经过认证
|
||||
try {
|
||||
String realName = userInformation.getRealname();
|
||||
String sno = userInformation.getSno();
|
||||
String dormitory = userInformation.getDormitory();
|
||||
if (StringUtils.getInstance().isNullOrEmpty(realName) || StringUtils.getInstance().isNullOrEmpty(sno) || StringUtils.getInstance().isNullOrEmpty(dormitory)) {
|
||||
//没有
|
||||
model.addAttribute("message", "请先认证真实信息");
|
||||
return "redirect:personal_info.do";
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "redirect:/login.do";
|
||||
}
|
||||
String goodsToken = TokenProccessor.getInstance().makeToken();
|
||||
request.getSession().setAttribute("goodsToken", goodsToken);
|
||||
model.addAttribute("shopInformation", new ShopInformation());
|
||||
model.addAttribute("action", 1);
|
||||
model.addAttribute("token", goodsToken);
|
||||
return "page/publish_product";
|
||||
}
|
||||
|
||||
//模糊查询商品
|
||||
@RequestMapping(value = "/findShopByName.do")
|
||||
public String findByName(HttpServletRequest request, Model model,
|
||||
@RequestParam String name) {
|
||||
try {
|
||||
List<ShopInformation> shopInformations = shopInformationService.selectByName(name);
|
||||
UserInformation userInformation = (UserInformation) request.getSession().getAttribute("userInformation");
|
||||
if (StringUtils.getInstance().isNullOrEmpty(userInformation)) {
|
||||
userInformation = new UserInformation();
|
||||
model.addAttribute("userInformation", userInformation);
|
||||
} else {
|
||||
model.addAttribute("userInformation", userInformation);
|
||||
}
|
||||
List<ShopInformationBean> shopInformationBeans = new ArrayList<>();
|
||||
String sortName;
|
||||
for (ShopInformation shopInformation : shopInformations) {
|
||||
int sort = shopInformation.getSort();
|
||||
sortName = getSort(sort);
|
||||
ShopInformationBean shopInformationBean = new ShopInformationBean();
|
||||
shopInformationBean.setId(shopInformation.getId());
|
||||
shopInformationBean.setName(shopInformation.getName());
|
||||
shopInformationBean.setLevel(shopInformation.getLevel());
|
||||
shopInformationBean.setRemark(shopInformation.getRemark());
|
||||
shopInformationBean.setPrice(shopInformation.getPrice().doubleValue());
|
||||
shopInformationBean.setQuantity(shopInformation.getQuantity());
|
||||
shopInformationBean.setTransaction(shopInformation.getTransaction());
|
||||
shopInformationBean.setSort(sortName);
|
||||
shopInformationBean.setUid(shopInformation.getUid());
|
||||
shopInformationBean.setImage(shopInformation.getImage());
|
||||
shopInformationBeans.add(shopInformationBean);
|
||||
}
|
||||
model.addAttribute("shopInformationBean", shopInformationBeans);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "redirect:mall_page.do";
|
||||
}
|
||||
return "page/mall_page";
|
||||
}
|
||||
|
||||
//进入查看商品详情
|
||||
@RequestMapping(value = "/selectById.do")
|
||||
public String selectById(@RequestParam int id,
|
||||
HttpServletRequest request, Model model) {
|
||||
UserInformation userInformation = (UserInformation) request.getSession().getAttribute("userInformation");
|
||||
if (StringUtils.getInstance().isNullOrEmpty(userInformation)) {
|
||||
userInformation = new UserInformation();
|
||||
model.addAttribute("userInformation", userInformation);
|
||||
}
|
||||
try {
|
||||
ShopInformation shopInformation = shopInformationService.selectByPrimaryKey(id);
|
||||
model.addAttribute("shopInformation", shopInformation);
|
||||
List<ShopContext> shopContexts = shopContextService.selectById(id);
|
||||
List<ShopContextBean> shopContextBeans = new ArrayList<>();
|
||||
for (ShopContext s : shopContexts) {
|
||||
ShopContextBean shopContextBean = new ShopContextBean();
|
||||
UserInformation u = userInformationService.selectByPrimaryKey(s.getUid());
|
||||
shopContextBean.setContext(s.getContext());
|
||||
shopContextBean.setId(s.getId());
|
||||
shopContextBean.setModified(s.getModified());
|
||||
shopContextBean.setUid(u.getId());
|
||||
shopContextBean.setUsername(u.getUsername());
|
||||
shopContextBeans.add(shopContextBean);
|
||||
}
|
||||
String sort = getSort(shopInformation.getSort());
|
||||
String goodsToken = TokenProccessor.getInstance().makeToken();
|
||||
request.getSession().setAttribute("goodsToken", goodsToken);
|
||||
model.addAttribute("token", goodsToken);
|
||||
model.addAttribute("sort", sort);
|
||||
model.addAttribute("userInformation", userInformation);
|
||||
model.addAttribute("shopContextBeans", shopContextBeans);
|
||||
return "page/product_info";
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
return "redirect:/";
|
||||
}
|
||||
}
|
||||
|
||||
//进入到求购商城
|
||||
@RequestMapping(value = "/require_mall.do")
|
||||
public String requireMall(HttpServletRequest request, Model model) {
|
||||
UserInformation userInformation = (UserInformation) request.getSession().getAttribute("userInformation");
|
||||
if (StringUtils.getInstance().isNullOrEmpty(userInformation)) {
|
||||
userInformation = new UserInformation();
|
||||
model.addAttribute("userInformation", userInformation);
|
||||
} else {
|
||||
model.addAttribute("userInformation", userInformation);
|
||||
}
|
||||
List<UserWant> userWants = userWantService.selectAll();
|
||||
List<UserWantBean> list = new ArrayList<>();
|
||||
for (UserWant userWant : userWants) {
|
||||
UserWantBean u = new UserWantBean();
|
||||
u.setSort(getSort(userWant.getSort()));
|
||||
u.setRemark(userWant.getRemark());
|
||||
u.setQuantity(userWant.getQuantity());
|
||||
u.setPrice(userWant.getPrice().doubleValue());
|
||||
u.setUid(userWant.getUid());
|
||||
u.setId(userWant.getId());
|
||||
u.setModified(userWant.getModified());
|
||||
u.setName(userWant.getName());
|
||||
list.add(u);
|
||||
}
|
||||
model.addAttribute("list", list);
|
||||
return "page/require_mall";
|
||||
}
|
||||
|
||||
//通过id查看商品的详情
|
||||
@RequestMapping(value = "/findShopById.do")
|
||||
@ResponseBody
|
||||
public ShopInformation findShopById(@RequestParam int id) {
|
||||
return shopInformationService.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
//通过分类选择商品
|
||||
@RequestMapping(value = "/selectBySort.do")
|
||||
@ResponseBody
|
||||
public List<ShopInformation> selectBySort(@RequestParam int sort) {
|
||||
return shopInformationService.selectBySort(sort);
|
||||
}
|
||||
|
||||
//分页查询
|
||||
@RequestMapping(value = "/selectByCounts.do")
|
||||
@ResponseBody
|
||||
public List<ShopInformation> selectByCounts(@RequestParam int counts) {
|
||||
Map<String, Integer> map = new HashMap<>();
|
||||
map.put("start", (counts - 1) * 12);
|
||||
map.put("end", 12);
|
||||
return shopInformationService.selectTen(map);
|
||||
}
|
||||
// //通过id查看商品详情
|
||||
// @RequestMapping(value = "/showShop")
|
||||
// public String showShop(@RequestParam int id, HttpServletRequest request, Model model) {
|
||||
// ShopInformation shopInformation =
|
||||
// }
|
||||
|
||||
//获取最详细的分类,第三层
|
||||
private Specific selectSpecificBySort(int sort) {
|
||||
return specificeService.selectByPrimaryKey(sort);
|
||||
}
|
||||
|
||||
//获得第二层分类
|
||||
private Classification selectClassificationByCid(int cid) {
|
||||
return classificationService.selectByPrimaryKey(cid);
|
||||
}
|
||||
|
||||
//获得第一层分类
|
||||
private AllKinds selectAllKindsByAid(int aid) {
|
||||
return allKindsService.selectByPrimaryKey(aid);
|
||||
}
|
||||
|
||||
private String getSort(int sort) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
Specific specific = selectSpecificBySort(sort);
|
||||
int cid = specific.getCid();
|
||||
Classification classification = selectClassificationByCid(cid);
|
||||
int aid = classification.getAid();
|
||||
AllKinds allKinds = selectAllKindsByAid(aid);
|
||||
String allName = allKinds.getName();
|
||||
sb.append(allName);
|
||||
sb.append("-");
|
||||
sb.append(classification.getName());
|
||||
sb.append("-");
|
||||
sb.append(specific.getName());
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,79 @@
|
||||
package com.wsk.controller.webSocket;
|
||||
|
||||
import com.wsk.tool.SaveSession;
|
||||
import org.springframework.web.socket.CloseStatus;
|
||||
import org.springframework.web.socket.TextMessage;
|
||||
import org.springframework.web.socket.WebSocketSession;
|
||||
import org.springframework.web.socket.handler.TextWebSocketHandler;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/22.
|
||||
*/
|
||||
public class ChatWebSocketHandler extends TextWebSocketHandler {
|
||||
|
||||
private final static List<WebSocketSession> sessions = Collections.synchronizedList(new ArrayList<WebSocketSession>());
|
||||
|
||||
//接收文本消息,并发送出去
|
||||
@Override
|
||||
protected void handleTextMessage(WebSocketSession session, TextMessage message) {
|
||||
// System.out.println(session.getId()+":send....");
|
||||
// chatTextMessageHandler(message.getPayload());
|
||||
try {
|
||||
// super.handleTextMessage(session, message);
|
||||
// System.out.println(session.getId()+" :"+message.getPayload() + " " + new Date());
|
||||
String m = message.getPayload();
|
||||
String[] wsk = m.split(",");
|
||||
String phone = wsk[0];
|
||||
long time = Long.parseLong(wsk[1]);
|
||||
String action = wsk[2];
|
||||
if (action.equals("start")){
|
||||
session.sendMessage(new TextMessage("success"));
|
||||
SaveSession.getInstance().save(phone,time);
|
||||
return;
|
||||
}
|
||||
boolean b = SaveSession.getInstance().isHave(phone,time);
|
||||
if (b) {
|
||||
if (session.isOpen()) {
|
||||
session.sendMessage(new TextMessage("error"));
|
||||
}
|
||||
} else {
|
||||
if (session.isOpen())
|
||||
session.sendMessage(new TextMessage("success"));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
try {
|
||||
session.sendMessage(new TextMessage("error"));
|
||||
} catch (IOException e1) {
|
||||
e1.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//连接建立后处理
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void afterConnectionEstablished(WebSocketSession session) {
|
||||
sessions.add(session);
|
||||
//处理离线消息
|
||||
}
|
||||
|
||||
//抛出异常时处理
|
||||
@Override
|
||||
public void handleTransportError(WebSocketSession session, Throwable exception) throws Exception {
|
||||
if (session.isOpen()) {
|
||||
session.close();
|
||||
}
|
||||
sessions.remove(session);
|
||||
}
|
||||
|
||||
//连接关闭后处理
|
||||
@Override
|
||||
public void afterConnectionClosed(WebSocketSession session, CloseStatus closeStatus) {
|
||||
sessions.remove(session);
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.wsk.controller.webSocket;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.socket.config.annotation.EnableWebSocket;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketConfigurer;
|
||||
import org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/22.
|
||||
*/
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@EnableWebSocket
|
||||
public class WebSocketConfig extends WebMvcConfigurerAdapter implements WebSocketConfigurer {
|
||||
@Override
|
||||
public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
|
||||
//WebIM WebSocket通道
|
||||
registry.addHandler(chatWebSocketHandler(),"/webSocketIMServer");
|
||||
registry.addHandler(chatWebSocketHandler(),"/sockjs/webSocketIMServer");
|
||||
registry.addHandler(chatWebSocketHandler(), "/sockjs/webSocketIMServer").withSockJS();
|
||||
}
|
||||
@Bean
|
||||
public ChatWebSocketHandler chatWebSocketHandler() {
|
||||
return new ChatWebSocketHandler();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.AdminInformation;
|
||||
|
||||
public interface AdminInformationMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(AdminInformation record);
|
||||
|
||||
int insertSelective(AdminInformation record);
|
||||
|
||||
AdminInformation selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(AdminInformation record);
|
||||
|
||||
int updateByPrimaryKey(AdminInformation record);
|
||||
|
||||
AdminInformation selectByNo(int ano);
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.AdminOperation;
|
||||
|
||||
public interface AdminOperationMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(AdminOperation record);
|
||||
|
||||
int insertSelective(AdminOperation record);
|
||||
|
||||
AdminOperation selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(AdminOperation record);
|
||||
|
||||
int updateByPrimaryKey(AdminOperation record);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.AllKinds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AllKindsMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(AllKinds record);
|
||||
|
||||
int insertSelective(AllKinds record);
|
||||
|
||||
AllKinds selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(AllKinds record);
|
||||
|
||||
int updateByPrimaryKey(AllKinds record);
|
||||
|
||||
List<AllKinds> selectAll();
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.BoughtShop;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface BoughtShopMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(BoughtShop record);
|
||||
|
||||
int insertSelective(BoughtShop record);
|
||||
|
||||
BoughtShop selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(BoughtShop record);
|
||||
|
||||
int updateByPrimaryKey(BoughtShop record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
List<BoughtShop> selectByUid(int uid, int start);
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.Classification;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ClassificationMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Classification record);
|
||||
|
||||
int insertSelective(Classification record);
|
||||
|
||||
Classification selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Classification record);
|
||||
|
||||
int updateByPrimaryKey(Classification record);
|
||||
List<Classification> selectByAid(int aid);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.GoodsCar;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GoodsCarMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(GoodsCar record);
|
||||
|
||||
int insertSelective(GoodsCar record);
|
||||
|
||||
GoodsCar selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(GoodsCar record);
|
||||
|
||||
int updateByPrimaryKey(GoodsCar record);
|
||||
|
||||
List<GoodsCar> selectByUid(int uid);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.GoodsOfOrderForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface GoodsOfOrderFormMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(GoodsOfOrderForm record);
|
||||
|
||||
int insertSelective(GoodsOfOrderForm record);
|
||||
|
||||
GoodsOfOrderForm selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(GoodsOfOrderForm record);
|
||||
|
||||
int updateByPrimaryKey(GoodsOfOrderForm record);
|
||||
|
||||
List<GoodsOfOrderForm> selectByOFid(int ofid);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.OrderForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OrderFormMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(OrderForm record);
|
||||
|
||||
int insertSelective(OrderForm record);
|
||||
|
||||
OrderForm selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(OrderForm record);
|
||||
|
||||
int updateByPrimaryKey(OrderForm record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
List<OrderForm> selectByUid(int uid, int start);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.ShopCar;
|
||||
|
||||
public interface ShopCarMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ShopCar record);
|
||||
|
||||
int insertSelective(ShopCar record);
|
||||
|
||||
ShopCar selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ShopCar record);
|
||||
|
||||
int updateByPrimaryKey(ShopCar record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
// List<ShopCar> selectByUid(int uid, int start);
|
||||
|
||||
ShopCar selectByUid(int uid);
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.ShopContext;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ShopContextMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ShopContext record);
|
||||
|
||||
int insertSelective(ShopContext record);
|
||||
|
||||
ShopContext selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ShopContext record);
|
||||
|
||||
int updateByPrimaryKey(ShopContext record);
|
||||
|
||||
int getCounts(int sid);
|
||||
|
||||
List<ShopContext> findById(int sid, int start);
|
||||
|
||||
@Select("select * from shopcontext where sid=#{id,jdbcType=INTEGER} and display=1")
|
||||
List<ShopContext> selectBySid(int id);
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.ShopInformation;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ShopInformationMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ShopInformation record);
|
||||
|
||||
int insertSelective(ShopInformation record);
|
||||
|
||||
ShopInformation selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ShopInformation record);
|
||||
|
||||
int updateByPrimaryKey(ShopInformation record);
|
||||
|
||||
List<ShopInformation> selectTen(Map map);
|
||||
|
||||
List<ShopInformation> selectOffShelf(Integer uid, Integer start);
|
||||
|
||||
int getCountsOffShelf(Integer uid);
|
||||
|
||||
int getCounts();
|
||||
|
||||
int selectIdByImage(String image);
|
||||
|
||||
List<ShopInformation> selectByName(String name);
|
||||
|
||||
//通过分类选择
|
||||
@Select("select * from shopinformation where sort=#{sort} and display =1 limit 12")
|
||||
List<ShopInformation> selectBySort(int sort);
|
||||
|
||||
//选择用户的发布
|
||||
@Select("select * from shopinformation where uid=#{uid} and display=1 order by id desc limit 12")
|
||||
List<ShopInformation> selectUserReleaseByUid(int uid);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.ShopPicture;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ShopPictureMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ShopPicture record);
|
||||
|
||||
int insertSelective(ShopPicture record);
|
||||
|
||||
ShopPicture selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ShopPicture record);
|
||||
|
||||
int updateByPrimaryKey(ShopPicture record);
|
||||
|
||||
ShopPicture selectBySidOnlyOne(Integer sid);
|
||||
|
||||
List<ShopPicture> selectBySid(Integer sid);
|
||||
}
|
||||
@ -0,0 +1,21 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.Specific;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface SpecificMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Specific record);
|
||||
|
||||
int insertSelective(Specific record);
|
||||
|
||||
Specific selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Specific record);
|
||||
|
||||
int updateByPrimaryKey(Specific record);
|
||||
|
||||
List<Specific> selectByCid(int cid);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.UserCollection;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserCollectionMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UserCollection record);
|
||||
|
||||
int insertSelective(UserCollection record);
|
||||
|
||||
UserCollection selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(UserCollection record);
|
||||
|
||||
int updateByPrimaryKey(UserCollection record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
List<UserCollection> selectByUid(int uid, int start);
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.UserInformation;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserInformationMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UserInformation record);
|
||||
|
||||
int insertSelective(UserInformation record);
|
||||
|
||||
UserInformation selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(UserInformation record);
|
||||
|
||||
int updateByPrimaryKey(UserInformation record);
|
||||
|
||||
int selectIdByPhone(String phone);
|
||||
|
||||
List<UserInformation> getAllForeach(List<Integer> list);
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.UserPassword;
|
||||
|
||||
public interface UserPasswordMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UserPassword record);
|
||||
|
||||
int insertSelective(UserPassword record);
|
||||
|
||||
UserPassword selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(UserPassword record);
|
||||
|
||||
int updateByPrimaryKey(UserPassword record);
|
||||
|
||||
UserPassword selectByUid(Integer uid);
|
||||
}
|
||||
@ -0,0 +1,27 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.UserRelease;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserReleaseMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UserRelease record);
|
||||
|
||||
int insertSelective(UserRelease record);
|
||||
|
||||
UserRelease selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(UserRelease record);
|
||||
|
||||
int updateByPrimaryKey(UserRelease record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
List<UserRelease> selectByUid(int uid, int start);
|
||||
|
||||
@Select("select * from userrelease where uid=#{uid} and display=1 order by id desc limit 12")
|
||||
List<UserRelease> selectUserProductByUid(int uid);
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.UserState;
|
||||
|
||||
public interface UserStateMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UserState record);
|
||||
|
||||
int insertSelective(UserState record);
|
||||
|
||||
UserState selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(UserState record);
|
||||
|
||||
int updateByPrimaryKey(UserState record);
|
||||
|
||||
UserState selectByUid(int uid);
|
||||
|
||||
}
|
||||
@ -0,0 +1,29 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.UserWant;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface UserWantMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(UserWant record);
|
||||
|
||||
int insertSelective(UserWant record);
|
||||
|
||||
UserWant selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(UserWant record);
|
||||
|
||||
int updateByPrimaryKey(UserWant record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
List<UserWant> selectByUid(int uid, int start);
|
||||
|
||||
@Select("select * from userwant where uid=#{id} and display=1 order by id desc limit 12")
|
||||
List<UserWant> selectMineByUid(int id);
|
||||
|
||||
List<UserWant> selectAll();
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
package com.wsk.dao;
|
||||
|
||||
import com.wsk.pojo.WantContext;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface WantContextMapper {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(WantContext record);
|
||||
|
||||
int insertSelective(WantContext record);
|
||||
|
||||
WantContext selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(WantContext record);
|
||||
|
||||
int updateByPrimaryKey(WantContext record);
|
||||
|
||||
List<WantContext> selectByUWid(int uwid, int start);
|
||||
|
||||
int getCounts(int uwid);
|
||||
}
|
||||
@ -0,0 +1,20 @@
|
||||
package com.wsk.error;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wsk1103
|
||||
* @date 2019/5/8
|
||||
* @description 业务错误类
|
||||
*/
|
||||
@Data
|
||||
public class BaseException extends RuntimeException {
|
||||
|
||||
private int code;
|
||||
private String msg;
|
||||
|
||||
public BaseException(int code, String msg) {
|
||||
super(msg);
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
package com.wsk.handle;
|
||||
|
||||
import com.wsk.error.BaseException;
|
||||
import com.wsk.response.BaseResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.web.bind.annotation.ControllerAdvice;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.ResponseStatus;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @author wsk1103
|
||||
* @date 2019/5/8
|
||||
* @description 描述
|
||||
*/
|
||||
@ControllerAdvice
|
||||
@Slf4j
|
||||
public class GlobalExceptionHandler {
|
||||
|
||||
/**
|
||||
* 全局统一异常返回信息
|
||||
*/
|
||||
public static final String DEFAULT_ERROR_MESSAGE = "系统维护,请稍后访问";
|
||||
|
||||
/**
|
||||
* 500的所有异常会被这个方法捕获
|
||||
*
|
||||
* @param req 请求
|
||||
* @param e 异常
|
||||
* @return 输出
|
||||
* @throws Exception 未知异常
|
||||
*/
|
||||
@ExceptionHandler(Exception.class)
|
||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
@ResponseBody
|
||||
public BaseResponse handleAllError(HttpServletRequest req, Exception e) {
|
||||
log.error("系统内部异常", e);
|
||||
return BaseResponse.fail();
|
||||
}
|
||||
|
||||
/**
|
||||
* 500的事务异常会被这个方法捕获
|
||||
*
|
||||
* @param req 请求
|
||||
* @param e 异常
|
||||
* @return 输出
|
||||
* @throws Exception 未知异常
|
||||
*/
|
||||
@ExceptionHandler(BaseException.class)
|
||||
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
|
||||
@ResponseBody
|
||||
public BaseResponse handleBizError(HttpServletRequest req, BaseException e) {
|
||||
log.error("业务异常", e);
|
||||
return BaseResponse.fail(e.getMsg());
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class AdminInformation implements Serializable{
|
||||
private Integer id;
|
||||
|
||||
private String ano;
|
||||
|
||||
private String password;
|
||||
|
||||
private Date modified;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getAno() {
|
||||
return ano;
|
||||
}
|
||||
|
||||
public void setAno(String ano) {
|
||||
this.ano = ano == null ? null : ano.trim();
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password == null ? null : password.trim();
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = (Date) modified.clone();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class AdminOperation implements Serializable{
|
||||
private Integer id;
|
||||
|
||||
private Integer aid;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private String operation;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getAid() {
|
||||
return aid;
|
||||
}
|
||||
|
||||
public void setAid(Integer aid) {
|
||||
this.aid = aid;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = (Date) modified.clone();
|
||||
}
|
||||
|
||||
public String getOperation() {
|
||||
return operation;
|
||||
}
|
||||
|
||||
public void setOperation(String operation) {
|
||||
this.operation = operation == null ? null : operation.trim();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,36 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class AllKinds implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Date modified;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = (Date) modified.clone();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class BoughtShop implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer state;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(Integer state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class Classification implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer aid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getAid() {
|
||||
return aid;
|
||||
}
|
||||
|
||||
public void setAid(Integer aid) {
|
||||
this.aid = aid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class GoodsCar implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private Integer display;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class GoodsOfOrderForm implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer ofid;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private Integer display;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getOfid() {
|
||||
return ofid;
|
||||
}
|
||||
|
||||
public void setOfid(Integer ofid) {
|
||||
this.ofid = ofid;
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class OrderForm implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer display;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private String address;
|
||||
|
||||
private String context;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address == null ? null : address.trim();
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context == null ? null : context.trim();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class ShopCar implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer display;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class ShopContext implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private String context;
|
||||
|
||||
private Integer display;
|
||||
|
||||
private int uid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context == null ? null : context.trim();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(int uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,147 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class ShopInformation implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer level;
|
||||
|
||||
private String remark;
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Integer display;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private Integer transaction;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private String image;
|
||||
|
||||
private Integer sales;
|
||||
|
||||
private String thumbnails;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
}
|
||||
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim();
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort ;
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public Integer getTransaction() {
|
||||
return transaction;
|
||||
}
|
||||
|
||||
public void setTransaction(Integer transaction) {
|
||||
this.transaction = transaction;
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public String getImage() {
|
||||
return image;
|
||||
}
|
||||
|
||||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public Integer getSales() {
|
||||
return sales;
|
||||
}
|
||||
|
||||
public void setSales(Integer sales) {
|
||||
this.sales = sales;
|
||||
}
|
||||
|
||||
public String getThumbnails() {
|
||||
return thumbnails;
|
||||
}
|
||||
|
||||
public void setThumbnails(String thumbnails) {
|
||||
this.thumbnails = thumbnails;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class ShopPicture implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private String picture;
|
||||
|
||||
private Integer display;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public String getPicture() {
|
||||
return picture;
|
||||
}
|
||||
|
||||
public void setPicture(String picture) {
|
||||
this.picture = picture == null ? null : picture.trim();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class Specific implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer cid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getCid() {
|
||||
return cid;
|
||||
}
|
||||
|
||||
public void setCid(Integer cid) {
|
||||
this.cid = cid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UserCollection implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
private Integer display;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,116 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UserInformation implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private String username;
|
||||
|
||||
private String phone;
|
||||
|
||||
private String realname;
|
||||
|
||||
private String clazz;
|
||||
|
||||
private String sno;
|
||||
|
||||
private String dormitory;
|
||||
|
||||
private String gender;
|
||||
|
||||
private Date createtime;
|
||||
|
||||
private String avatar;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username == null ? null : username.trim();
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone == null ? null : phone.trim();
|
||||
}
|
||||
|
||||
public String getRealname() {
|
||||
return realname;
|
||||
}
|
||||
|
||||
public void setRealname(String realname) {
|
||||
this.realname = realname == null ? null : realname.trim();
|
||||
}
|
||||
|
||||
public String getClazz() {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
public void setClazz(String clazz) {
|
||||
this.clazz = clazz == null ? null : clazz.trim();
|
||||
}
|
||||
|
||||
public String getSno() {
|
||||
return sno;
|
||||
}
|
||||
|
||||
public void setSno(String sno) {
|
||||
this.sno = sno == null ? null : sno.trim();
|
||||
}
|
||||
|
||||
public String getDormitory() {
|
||||
return dormitory;
|
||||
}
|
||||
|
||||
public void setDormitory(String dormitory) {
|
||||
this.dormitory = dormitory == null ? null : dormitory.trim();
|
||||
}
|
||||
|
||||
public String getGender() {
|
||||
return gender;
|
||||
}
|
||||
|
||||
public void setGender(String gender) {
|
||||
this.gender = gender == null ? null : gender.trim();
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime == null ? null : (Date) createtime.clone();
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime == null ? null : (Date) createtime.clone();
|
||||
}
|
||||
|
||||
public String getAvatar() {
|
||||
return avatar;
|
||||
}
|
||||
|
||||
public void setAvatar(String avatar) {
|
||||
this.avatar = avatar == null ? null : avatar.trim();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UserPassword implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private String password;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password == null ? null : password.trim();
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class UserRelease implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer display;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer sid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
|
||||
public Integer getSid() {
|
||||
return sid;
|
||||
}
|
||||
|
||||
public void setSid(Integer sid) {
|
||||
this.sid = sid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class UserState implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Integer credit;
|
||||
|
||||
private BigDecimal balance;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getCredit() {
|
||||
return credit;
|
||||
}
|
||||
|
||||
public void setCredit(Integer credit) {
|
||||
this.credit = credit;
|
||||
}
|
||||
|
||||
public BigDecimal getBalance() {
|
||||
return balance;
|
||||
}
|
||||
|
||||
public void setBalance(BigDecimal balance) {
|
||||
this.balance = balance;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,97 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class UserWant implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer display;
|
||||
|
||||
private String name;
|
||||
|
||||
private Integer sort;
|
||||
|
||||
private Integer uid;
|
||||
|
||||
private Integer quantity;
|
||||
|
||||
private BigDecimal price;
|
||||
|
||||
private String remark;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort ;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return quantity;
|
||||
}
|
||||
|
||||
public void setQuantity(Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice() {
|
||||
return price;
|
||||
}
|
||||
|
||||
public void setPrice(BigDecimal price) {
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim();
|
||||
}
|
||||
|
||||
public Integer getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
||||
public void setUid(Integer uid) {
|
||||
this.uid = uid;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
package com.wsk.pojo;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class WantContext implements Serializable{
|
||||
private Integer id;
|
||||
|
||||
private Date modified;
|
||||
|
||||
private Integer uwid;
|
||||
|
||||
private String context;
|
||||
|
||||
private Integer display;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Date getModified() {
|
||||
return modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public void setModified(Date modified) {
|
||||
this.modified = modified == null ? null : (Date) modified.clone();
|
||||
}
|
||||
|
||||
public Integer getUwid() {
|
||||
return uwid;
|
||||
}
|
||||
|
||||
public void setUwid(Integer uwid) {
|
||||
this.uwid = uwid;
|
||||
}
|
||||
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
|
||||
public void setContext(String context) {
|
||||
this.context = context == null ? null : context.trim();
|
||||
}
|
||||
|
||||
public Integer getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(Integer display) {
|
||||
this.display = display;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.wsk.response;
|
||||
|
||||
import com.wsk.handle.GlobalExceptionHandler;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wsk1103
|
||||
* @date 2019/5/8
|
||||
* @description 描述
|
||||
*/
|
||||
@Data
|
||||
public class BaseResponse {
|
||||
private int result;
|
||||
|
||||
private String msg;
|
||||
|
||||
public BaseResponse(int result, String msg) {
|
||||
this.result = result;
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public BaseResponse(int result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
public static BaseResponse fail() {
|
||||
return new BaseResponse(0, GlobalExceptionHandler.DEFAULT_ERROR_MESSAGE);
|
||||
}
|
||||
|
||||
public static BaseResponse fail(String msg) {
|
||||
return new BaseResponse(0, msg);
|
||||
}
|
||||
|
||||
public static BaseResponse fail(int result) {
|
||||
return new BaseResponse(result);
|
||||
}
|
||||
|
||||
public static BaseResponse success() {
|
||||
return new BaseResponse(1, "success");
|
||||
}
|
||||
|
||||
public static BaseResponse success(String msg) {
|
||||
return new BaseResponse(1, msg);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.AllKinds;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface AllKindsService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(AllKinds record);
|
||||
|
||||
int insertSelective(AllKinds record);
|
||||
|
||||
AllKinds selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(AllKinds record);
|
||||
|
||||
int updateByPrimaryKey(AllKinds record);
|
||||
|
||||
List<AllKinds> selectAll();
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.BoughtShop;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface BoughtShopService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(BoughtShop record);
|
||||
|
||||
int insertSelective(BoughtShop record);
|
||||
|
||||
BoughtShop selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(BoughtShop record);
|
||||
|
||||
int updateByPrimaryKey(BoughtShop record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
List<BoughtShop> selectByUid(int uid, int start);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.Classification;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface ClassificationService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Classification record);
|
||||
|
||||
int insertSelective(Classification record);
|
||||
|
||||
Classification selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Classification record);
|
||||
|
||||
int updateByPrimaryKey(Classification record);
|
||||
|
||||
List<Classification> selectByAid(int aid);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.GoodsCar;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface GoodsCarService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(GoodsCar record);
|
||||
|
||||
int insertSelective(GoodsCar record);
|
||||
|
||||
GoodsCar selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(GoodsCar record);
|
||||
|
||||
int updateByPrimaryKey(GoodsCar record);
|
||||
|
||||
List<GoodsCar> selectByUid(int uid);
|
||||
}
|
||||
@ -0,0 +1,24 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.GoodsOfOrderForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface GoodsOfOrderFormService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(GoodsOfOrderForm record);
|
||||
|
||||
int insertSelective(GoodsOfOrderForm record);
|
||||
|
||||
GoodsOfOrderForm selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(GoodsOfOrderForm record);
|
||||
|
||||
int updateByPrimaryKey(GoodsOfOrderForm record);
|
||||
|
||||
List<GoodsOfOrderForm> selectByOFid(int ofid);
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.AllKindsMapper;
|
||||
import com.wsk.pojo.AllKinds;
|
||||
import com.wsk.service.AllKindsService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class AllKindsServiceImpl implements AllKindsService {
|
||||
@Resource
|
||||
private AllKindsMapper allKindsMapper;
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(AllKinds record) {
|
||||
return allKindsMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(AllKinds record) {
|
||||
return allKindsMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AllKinds selectByPrimaryKey(Integer id) {
|
||||
return allKindsMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(AllKinds record) {
|
||||
return allKindsMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(AllKinds record) {
|
||||
return allKindsMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AllKinds> selectAll() {
|
||||
return allKindsMapper.selectAll();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.BoughtShopMapper;
|
||||
import com.wsk.pojo.BoughtShop;
|
||||
import com.wsk.service.BoughtShopService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class BoughtShopServiceImpl implements BoughtShopService {
|
||||
@Resource
|
||||
private BoughtShopMapper boughtShopMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(BoughtShop record) {
|
||||
return boughtShopMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(BoughtShop record) {
|
||||
return boughtShopMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoughtShop selectByPrimaryKey(Integer id) {
|
||||
return boughtShopMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(BoughtShop record) {
|
||||
return boughtShopMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(BoughtShop record) {
|
||||
return boughtShopMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uid) {
|
||||
return boughtShopMapper.getCounts(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<BoughtShop> selectByUid(int uid, int start) {
|
||||
return boughtShopMapper.selectByUid(uid, start);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.ClassificationMapper;
|
||||
import com.wsk.pojo.Classification;
|
||||
import com.wsk.service.ClassificationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class ClassificationServiceImpl implements ClassificationService {
|
||||
|
||||
@Resource
|
||||
private ClassificationMapper classificationMapper;
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(Classification record) {
|
||||
return classificationMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(Classification record) {
|
||||
return classificationMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Classification selectByPrimaryKey(Integer id) {
|
||||
return classificationMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(Classification record) {
|
||||
return classificationMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(Classification record) {
|
||||
return classificationMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Classification> selectByAid(int aid) {
|
||||
return classificationMapper.selectByAid(aid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.GoodsCarMapper;
|
||||
import com.wsk.pojo.GoodsCar;
|
||||
import com.wsk.service.GoodsCarService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class GoodsCarServiceImpl implements GoodsCarService {
|
||||
@Resource
|
||||
private GoodsCarMapper goodsCarMapper;
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(GoodsCar record) {
|
||||
return goodsCarMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(GoodsCar record) {
|
||||
return goodsCarMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsCar selectByPrimaryKey(Integer id) {
|
||||
return goodsCarMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(GoodsCar record) {
|
||||
return goodsCarMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(GoodsCar record) {
|
||||
return goodsCarMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsCar> selectByUid(int scid) {
|
||||
return goodsCarMapper.selectByUid(scid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.GoodsOfOrderFormMapper;
|
||||
import com.wsk.pojo.GoodsOfOrderForm;
|
||||
import com.wsk.service.GoodsOfOrderFormService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class GoodsOfOrderFormServiceImpl implements GoodsOfOrderFormService {
|
||||
@Resource
|
||||
private GoodsOfOrderFormMapper goodsOfOrderFormMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(GoodsOfOrderForm record) {
|
||||
return goodsOfOrderFormMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(GoodsOfOrderForm record) {
|
||||
return goodsOfOrderFormMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public GoodsOfOrderForm selectByPrimaryKey(Integer id) {
|
||||
return goodsOfOrderFormMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(GoodsOfOrderForm record) {
|
||||
return goodsOfOrderFormMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(GoodsOfOrderForm record) {
|
||||
return goodsOfOrderFormMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<GoodsOfOrderForm> selectByOFid(int ofid) {
|
||||
return goodsOfOrderFormMapper.selectByOFid(ofid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.OrderFormMapper;
|
||||
import com.wsk.pojo.OrderForm;
|
||||
import com.wsk.service.OrderFormService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class OrderFormServiceImpl implements OrderFormService {
|
||||
@Resource
|
||||
private OrderFormMapper orderFormMapper;
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(OrderForm record) {
|
||||
return orderFormMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(OrderForm record) {
|
||||
return orderFormMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public OrderForm selectByPrimaryKey(Integer id) {
|
||||
return orderFormMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(OrderForm record) {
|
||||
return orderFormMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(OrderForm record) {
|
||||
return orderFormMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uid) {
|
||||
return orderFormMapper.getCounts(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderForm> selectByUid(int uid, int start) {
|
||||
return orderFormMapper.selectByUid(uid, start);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.ShopCarMapper;
|
||||
import com.wsk.pojo.ShopCar;
|
||||
import com.wsk.service.ShopCarService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class ShopCarServiceImpl implements ShopCarService {
|
||||
@Resource
|
||||
private ShopCarMapper shopCarMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ShopCar record) {
|
||||
return shopCarMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ShopCar record) {
|
||||
return shopCarMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopCar selectByPrimaryKey(Integer id) {
|
||||
return shopCarMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ShopCar record) {
|
||||
return shopCarMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(ShopCar record) {
|
||||
return shopCarMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uid) {
|
||||
return shopCarMapper.getCounts(uid);
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public List<ShopCar> selectByUid(int uid, int start) {
|
||||
// return shopCarMapper.selectByUid(uid, start);
|
||||
// }
|
||||
|
||||
@Override
|
||||
public ShopCar selectByUid(int uid) {
|
||||
return shopCarMapper.selectByUid(uid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.ShopContextMapper;
|
||||
import com.wsk.pojo.ShopContext;
|
||||
import com.wsk.service.ShopContextService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class ShopContextServiceImpl implements ShopContextService {
|
||||
@Resource
|
||||
private ShopContextMapper shopContextMapper;
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ShopContext record) {
|
||||
return shopContextMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ShopContext record) {
|
||||
return shopContextMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopContext selectByPrimaryKey(Integer id) {
|
||||
return shopContextMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ShopContext record) {
|
||||
return shopContextMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(ShopContext record) {
|
||||
return shopContextMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int sid) {
|
||||
return shopContextMapper.getCounts(sid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopContext> findById(int sid, int start) {
|
||||
return shopContextMapper.findById(sid,start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopContext> selectById(int id) {
|
||||
return shopContextMapper.selectBySid(id);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,89 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.ShopInformationMapper;
|
||||
import com.wsk.pojo.ShopInformation;
|
||||
import com.wsk.service.ShopInformationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/12.
|
||||
*/
|
||||
@Service
|
||||
public class ShopInformationServiceImpl implements ShopInformationService{
|
||||
|
||||
@Resource
|
||||
private ShopInformationMapper shopInformationMapper;
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ShopInformation record) {
|
||||
return shopInformationMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ShopInformation record) {
|
||||
return shopInformationMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopInformation selectByPrimaryKey(Integer id) {
|
||||
return shopInformationMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ShopInformation record) {
|
||||
return shopInformationMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(ShopInformation record) {
|
||||
return shopInformationMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopInformation> selectTen(Map map) {
|
||||
return shopInformationMapper.selectTen(map);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopInformation> selectOffShelf(int uid, int start) {
|
||||
return shopInformationMapper.selectOffShelf(uid,start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCountsOffShelf(int uid) {
|
||||
return shopInformationMapper.getCountsOffShelf(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts() {
|
||||
return shopInformationMapper.getCounts();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectIdByImage(String image) {
|
||||
return shopInformationMapper.selectIdByImage(image);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopInformation> selectByName(String name){
|
||||
return shopInformationMapper.selectByName(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopInformation> selectBySort(int sort) {
|
||||
return shopInformationMapper.selectBySort(sort);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopInformation> selectUserReleaseByUid(int uid) {
|
||||
return shopInformationMapper.selectUserReleaseByUid(uid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,57 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.ShopPictureMapper;
|
||||
import com.wsk.pojo.ShopPicture;
|
||||
import com.wsk.service.ShopPictureService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/12.
|
||||
*/
|
||||
@Service
|
||||
public class ShopPictureServiceImpl implements ShopPictureService {
|
||||
@Resource
|
||||
private ShopPictureMapper shopPictureMapper;
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(ShopPicture record) {
|
||||
return shopPictureMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(ShopPicture record) {
|
||||
return shopPictureMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopPicture selectByPrimaryKey(Integer id) {
|
||||
return shopPictureMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(ShopPicture record) {
|
||||
return shopPictureMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(ShopPicture record) {
|
||||
return shopPictureMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ShopPicture selectBySidOnlyOne(Integer sid) {
|
||||
return shopPictureMapper.selectBySidOnlyOne(sid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ShopPicture> selectBySid(Integer sid) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.SpecificMapper;
|
||||
import com.wsk.pojo.Specific;
|
||||
import com.wsk.service.SpecificeService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class SpecificeServiceImpl implements SpecificeService {
|
||||
@Resource
|
||||
private SpecificMapper specificMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(Specific record) {
|
||||
return specificMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(Specific record) {
|
||||
return specificMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Specific selectByPrimaryKey(Integer id) {
|
||||
return specificMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(Specific record) {
|
||||
return specificMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(Specific record) {
|
||||
return specificMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Specific> selectByCid(int cid) {
|
||||
return specificMapper.selectByCid(cid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.UserCollectionMapper;
|
||||
import com.wsk.pojo.UserCollection;
|
||||
import com.wsk.service.UserCollectionService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class UserCollectionServiceImpl implements UserCollectionService {
|
||||
@Resource
|
||||
private UserCollectionMapper userCollectionMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(UserCollection record) {
|
||||
return userCollectionMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(UserCollection record) {
|
||||
return userCollectionMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserCollection selectByPrimaryKey(Integer id) {
|
||||
return userCollectionMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(UserCollection record) {
|
||||
return userCollectionMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(UserCollection record) {
|
||||
return userCollectionMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uid) {
|
||||
return userCollectionMapper.getCounts(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserCollection> selectByUid(int uid, int start) {
|
||||
return userCollectionMapper.selectByUid(uid, start);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,62 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.UserInformationMapper;
|
||||
import com.wsk.pojo.UserInformation;
|
||||
import com.wsk.service.UserInformationService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/4/26.
|
||||
*/
|
||||
@Service("userInformationService")
|
||||
public class UserInformationServiceImpl implements UserInformationService {
|
||||
@Resource
|
||||
private UserInformationMapper userInformationMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(UserInformation record) {
|
||||
return this.userInformationMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(UserInformation record) {
|
||||
return this.userInformationMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserInformation selectByPrimaryKey(Integer id) {
|
||||
return this.userInformationMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(UserInformation record) {
|
||||
return this.userInformationMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(UserInformation record) {
|
||||
return this.userInformationMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int selectIdByPhone(String phone) {
|
||||
try {
|
||||
return this.userInformationMapper.selectIdByPhone(phone);
|
||||
} catch (Exception e) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserInformation> getAllForeach(List<Integer> list) {
|
||||
return this.userInformationMapper.getAllForeach(list);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,53 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.UserPasswordMapper;
|
||||
import com.wsk.pojo.UserPassword;
|
||||
import com.wsk.service.UserPasswordService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/4/27.
|
||||
*/
|
||||
@Service("userPasswordService")
|
||||
public class UserPasswordServiceImpl implements UserPasswordService{
|
||||
@Resource
|
||||
private
|
||||
UserPasswordMapper userPasswordMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(UserPassword record) {
|
||||
return userPasswordMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(UserPassword record) {
|
||||
return userPasswordMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserPassword selectByPrimaryKey(Integer id) {
|
||||
return userPasswordMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(UserPassword record) {
|
||||
return userPasswordMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(UserPassword record) {
|
||||
return userPasswordMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserPassword selectByUid(Integer uid) {
|
||||
return this.userPasswordMapper.selectByUid(uid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,63 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.UserReleaseMapper;
|
||||
import com.wsk.pojo.UserRelease;
|
||||
import com.wsk.service.UserReleaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class UserReleaseServiceImpl implements UserReleaseService {
|
||||
@Resource
|
||||
private UserReleaseMapper userReleaseMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(UserRelease record) {
|
||||
return userReleaseMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(UserRelease record) {
|
||||
return userReleaseMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserRelease selectByPrimaryKey(Integer id) {
|
||||
return userReleaseMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(UserRelease record) {
|
||||
return userReleaseMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(UserRelease record) {
|
||||
return userReleaseMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uid) {
|
||||
return userReleaseMapper.getCounts(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserRelease> selectByUid(int uid, int start) {
|
||||
return userReleaseMapper.selectByUid(uid, start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserRelease> selectUserProductByUid(int uid) {
|
||||
return userReleaseMapper.selectUserProductByUid(uid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,52 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.UserStateMapper;
|
||||
import com.wsk.pojo.UserState;
|
||||
import com.wsk.service.UserStateService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class UserStateServiceImpl implements UserStateService {
|
||||
@Resource
|
||||
private UserStateMapper userStateMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(UserState record) {
|
||||
return userStateMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(UserState record) {
|
||||
return userStateMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserState selectByPrimaryKey(Integer id) {
|
||||
return userStateMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(UserState record) {
|
||||
return userStateMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(UserState record) {
|
||||
return userStateMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserState selectByUid(int uid) {
|
||||
return userStateMapper.selectByUid(uid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.UserWantMapper;
|
||||
import com.wsk.pojo.UserWant;
|
||||
import com.wsk.service.UserWantService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class UserWantServiceImpl implements UserWantService {
|
||||
@Resource
|
||||
private UserWantMapper userWantMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(UserWant record) {
|
||||
return userWantMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(UserWant record) {
|
||||
return userWantMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserWant selectByPrimaryKey(Integer id) {
|
||||
return userWantMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(UserWant record) {
|
||||
return userWantMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(UserWant record) {
|
||||
return userWantMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uid) {
|
||||
return userWantMapper.getCounts(uid);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserWant> selectByUid(int uid, int start) {
|
||||
return userWantMapper.selectByUid(uid, start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserWant> selectMineByUid(int id) {
|
||||
return userWantMapper.selectMineByUid(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserWant> selectAll() {
|
||||
return userWantMapper.selectAll();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,58 @@
|
||||
package com.wsk.service.Impl;
|
||||
|
||||
import com.wsk.dao.WantContextMapper;
|
||||
import com.wsk.pojo.WantContext;
|
||||
import com.wsk.service.WantContextService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
@Service
|
||||
public class WantContextServiceImpl implements WantContextService {
|
||||
@Resource
|
||||
private WantContextMapper wantContextMapper;
|
||||
|
||||
@Override
|
||||
public int deleteByPrimaryKey(Integer id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insert(WantContext record) {
|
||||
return wantContextMapper.insert(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int insertSelective(WantContext record) {
|
||||
return wantContextMapper.insertSelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public WantContext selectByPrimaryKey(Integer id) {
|
||||
return wantContextMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKeySelective(WantContext record) {
|
||||
return wantContextMapper.updateByPrimaryKeySelective(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateByPrimaryKey(WantContext record) {
|
||||
return wantContextMapper.updateByPrimaryKey(record);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<WantContext> selectByUWid(int uwid, int start) {
|
||||
return wantContextMapper.selectByUWid(uwid, start);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getCounts(int uwid) {
|
||||
return wantContextMapper.getCounts(uwid);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.OrderForm;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface OrderFormService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(OrderForm record);
|
||||
|
||||
int insertSelective(OrderForm record);
|
||||
|
||||
OrderForm selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(OrderForm record);
|
||||
|
||||
int updateByPrimaryKey(OrderForm record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
List<OrderForm> selectByUid(int uid, int start);
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.ShopCar;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface ShopCarService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ShopCar record);
|
||||
|
||||
int insertSelective(ShopCar record);
|
||||
|
||||
ShopCar selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ShopCar record);
|
||||
|
||||
int updateByPrimaryKey(ShopCar record);
|
||||
|
||||
int getCounts(int uid);
|
||||
|
||||
// List<ShopCar> selectByUid(int uid, int start);
|
||||
|
||||
ShopCar selectByUid(int uid);
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
package com.wsk.service;
|
||||
|
||||
import com.wsk.pojo.ShopContext;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Created by wsk1103 on 2017/5/13.
|
||||
*/
|
||||
public interface ShopContextService {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(ShopContext record);
|
||||
|
||||
int insertSelective(ShopContext record);
|
||||
|
||||
ShopContext selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(ShopContext record);
|
||||
|
||||
int updateByPrimaryKey(ShopContext record);
|
||||
|
||||
int getCounts(int sid);
|
||||
|
||||
List<ShopContext> findById(int sid, int start);
|
||||
|
||||
List<ShopContext> selectById(int id);
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue