parent
6ee2ec18e2
commit
143806ec56
@ -0,0 +1,37 @@
|
||||
HELP.md
|
||||
target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
!**/src/main/**/target/
|
||||
!**/src/test/**/target
|
||||
/.mvn/
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
*.log
|
||||
*.jar
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
build/
|
||||
!**/src/main/**/build/
|
||||
!**/src/test/**/build/
|
||||
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
@ -0,0 +1,76 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<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/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.shasnzhu</groupId>
|
||||
<artifactId>superMarket-backend</artifactId>
|
||||
<version>1.0.0</version>
|
||||
|
||||
<!--父工程-->
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>2.3.2.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
<!--mysql驱动-->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
</dependency>
|
||||
<!--druid启动依赖-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.2.11</version>
|
||||
</dependency>
|
||||
<!--mybatis plus启动依赖-->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-boot-starter</artifactId>
|
||||
<version>3.5.2</version>
|
||||
</dependency>
|
||||
<!--web启动依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<!--fastjson-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.71</version>
|
||||
</dependency>
|
||||
<!--参数校验-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<!--redis启动依赖-->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
||||
</dependency>
|
||||
<!--密码加密工具类-->
|
||||
<dependency>
|
||||
<groupId>org.mindrot</groupId>
|
||||
<artifactId>jbcrypt</artifactId>
|
||||
<version>0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<!-- lombok-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<version>1.18.10</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
@ -0,0 +1,24 @@
|
||||
package com.shanzhu.market.common.advice;
|
||||
|
||||
|
||||
import com.shanzhu.market.common.constants.HttpStatus;
|
||||
import com.shanzhu.market.common.exception.BusinessException;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import org.springframework.web.bind.annotation.ExceptionHandler;
|
||||
import org.springframework.web.bind.annotation.RestControllerAdvice;
|
||||
|
||||
/**
|
||||
* 统一异常处理类的基类
|
||||
*/
|
||||
@RestControllerAdvice
|
||||
public class ExceptionControllerAdvice {
|
||||
@ExceptionHandler(RuntimeException.class)
|
||||
public JsonResult<?> commonExceptionHandler(RuntimeException ex){
|
||||
ex.printStackTrace();
|
||||
return JsonResult.error(HttpStatus.CODE_BUSINESS_ERROR,ex.getMessage());
|
||||
}
|
||||
@ExceptionHandler(BusinessException.class)
|
||||
public JsonResult<?> businessHanler(BusinessException ex){
|
||||
return JsonResult.error(HttpStatus.CODE_BUSINESS_ERROR,ex.getMessage());
|
||||
}
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package com.shanzhu.market.common.config;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.DbType;
|
||||
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
||||
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class MpConfig {
|
||||
/*mybatis plus分页插件生效*/
|
||||
@Bean
|
||||
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
||||
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
||||
PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(DbType.MYSQL);
|
||||
paginationInnerInterceptor.setOverflow(true); //合理化
|
||||
interceptor.addInnerInterceptor(paginationInnerInterceptor);
|
||||
return interceptor;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.shanzhu.market.common.exception;
|
||||
|
||||
import com.shanzhu.market.common.constants.HttpStatus;
|
||||
|
||||
public class BusinessException extends SysException {
|
||||
public BusinessException(String message, Integer code) {
|
||||
super(message, code);
|
||||
}
|
||||
|
||||
public BusinessException(String msg) {
|
||||
super(msg, HttpStatus.CODE_BUSINESS_ERROR);
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shanzhu.market.common.exception;
|
||||
|
||||
import com.shanzhu.market.common.constants.HttpStatus;
|
||||
|
||||
public class SysException extends RuntimeException {
|
||||
private Integer code;
|
||||
|
||||
public SysException(String message, Integer code) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
public SysException(String msg){
|
||||
super(msg);
|
||||
this.code= HttpStatus.CODE_ERROR;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.shanzhu.market.common.redis.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.data.redis.connection.RedisConnectionFactory;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
|
||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
||||
|
||||
@Configuration
|
||||
public class RedisConfig {
|
||||
@Bean
|
||||
public RedisTemplate<Object,Object> redisTemplate(RedisConnectionFactory connectionFactory) {
|
||||
RedisTemplate<Object,Object> template = new RedisTemplate<>();
|
||||
template.setConnectionFactory(connectionFactory);
|
||||
template.setKeySerializer(new StringRedisSerializer()); //设置redis key 的序列化方式为String
|
||||
template.setValueSerializer(new GenericJackson2JsonRedisSerializer());//设置value的序列化方式为jackson方式,默认的序列化方式是jdk的序列化
|
||||
template.setHashKeySerializer(new StringRedisSerializer());
|
||||
template.setHashValueSerializer(new GenericJackson2JsonRedisSerializer() );//设置hash类型的value序列化方式
|
||||
return template;
|
||||
}
|
||||
}
|
@ -0,0 +1,72 @@
|
||||
package com.shanzhu.market.common.redis.constants;
|
||||
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public enum RedisKeys {
|
||||
//用户注册
|
||||
LOGIN_USER("LOGIN_USER",1440L,TimeUnit.MINUTES),
|
||||
//登录密码错误次数
|
||||
LOGIN_ERRO_PWDNUM("LOGIN_ERRO_PWDNUM",1L,TimeUnit.DAYS),
|
||||
//商品分类信息的缓存
|
||||
GOODS_CATEGORY("GOODS_CATEGORY",24L,TimeUnit.HOURS),
|
||||
//账户冻结6小时
|
||||
DISABLEUSER("DISABLEUSER",6L,TimeUnit.HOURS);
|
||||
|
||||
private String prefix; //前缀
|
||||
private Long timeout; //失效时间
|
||||
private TimeUnit timeUnit; //时间单位
|
||||
|
||||
private final String SEP=":";//key分隔符
|
||||
|
||||
RedisKeys(String prefix, Long timeout, TimeUnit timeUnit) {
|
||||
this.prefix = prefix;
|
||||
this.timeout = timeout;
|
||||
this.timeUnit = timeUnit;
|
||||
}
|
||||
|
||||
RedisKeys(String prefix, Long timeout) {
|
||||
this(prefix, timeout, TimeUnit.MINUTES);
|
||||
}
|
||||
RedisKeys(String prefix){
|
||||
this(prefix,30L,TimeUnit.MINUTES);
|
||||
}
|
||||
|
||||
public String join(String ...suffix){
|
||||
|
||||
StringBuilder sb = new StringBuilder(80);
|
||||
sb.append(this.prefix);
|
||||
for (String s : suffix) {
|
||||
sb.append(getSEP()).append(s);
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public String getPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix) {
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
public Long getTimeout() {
|
||||
return timeout;
|
||||
}
|
||||
|
||||
public void setTimeout(Long timeout) {
|
||||
this.timeout = timeout;
|
||||
}
|
||||
|
||||
public TimeUnit getTimeUnit() {
|
||||
return timeUnit;
|
||||
}
|
||||
|
||||
public void setTimeUnit(TimeUnit timeUnit) {
|
||||
this.timeUnit = timeUnit;
|
||||
}
|
||||
|
||||
public String getSEP() {
|
||||
return SEP;
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.shanzhu.market.common.sercurity.annotation;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 判断是否有权限
|
||||
*/
|
||||
@Target({ElementType.METHOD})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface HasPermisson {
|
||||
String value();
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.shanzhu.market.common.sercurity.interceptor;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.shanzhu.market.common.constants.HttpStatus;
|
||||
import com.shanzhu.market.common.redis.constants.RedisKeys;
|
||||
import com.shanzhu.market.common.redis.service.RedisTemplateService;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.sercurity.annotation.NoRequireLogin;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Employee;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.method.HandlerMethod;
|
||||
import org.springframework.web.servlet.HandlerInterceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
public class EmpLoginInterceptor implements HandlerInterceptor {
|
||||
@Autowired
|
||||
private RedisTemplateService redisTemplateService;
|
||||
|
||||
@Override
|
||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||
if (!(handler instanceof HandlerMethod)) {
|
||||
//optinos请求
|
||||
return true;
|
||||
}
|
||||
response.setHeader("Access-Control-Allow-Origin", "*");
|
||||
response.setHeader("Cache-Control", "no-cache");
|
||||
response.setCharacterEncoding("UTF-8");
|
||||
response.setContentType("application/json");
|
||||
//获取token
|
||||
String token = request.getHeader("token");
|
||||
//是否贴有不必登录的注解
|
||||
HandlerMethod handler1 = (HandlerMethod) handler;
|
||||
NoRequireLogin noRequireLogin = handler1.getMethodAnnotation(NoRequireLogin.class);
|
||||
if (noRequireLogin != null) {
|
||||
//贴有注解
|
||||
return true;
|
||||
|
||||
} else {
|
||||
if (StringUtils.hasText(token)) {
|
||||
String value2 = redisTemplateService.getCacheObject(token);
|
||||
if (!StringUtils.hasText(value2)) {
|
||||
JsonResult res = JsonResult.error(HttpStatus.CODE_BUSINESS_ERROR, "请先登录");
|
||||
String result = JSONObject.toJSONString(res);
|
||||
response.getWriter().println(result);
|
||||
response.getWriter().flush();
|
||||
return false;
|
||||
} else {
|
||||
//缓存有值,延长存储时间
|
||||
redisTemplateService.expire(token, RedisKeys.LOGIN_USER.getTimeout(), RedisKeys.LOGIN_USER.getTimeUnit());
|
||||
}
|
||||
} else {
|
||||
//没有token
|
||||
JsonResult res = JsonResult.error(HttpStatus.CODE_BUSINESS_ERROR, "请先登录");
|
||||
String result = JSONObject.toJSONString(res);
|
||||
response.getWriter().println(result);
|
||||
response.getWriter().flush();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//是否贴有HasPermisson注解
|
||||
HasPermisson hasPermisson = handler1.getMethodAnnotation(HasPermisson.class);
|
||||
if (hasPermisson != null) {
|
||||
if (!StringUtils.hasText(token)) {
|
||||
//没有token
|
||||
JsonResult res = JsonResult.error(HttpStatus.CODE_BUSINESS_ERROR, "请先登录");
|
||||
String result = JSONObject.toJSONString(res);
|
||||
response.getWriter().println(result);
|
||||
response.getWriter().flush();
|
||||
return false;
|
||||
}
|
||||
Employee employee = JSONObject.parseObject(redisTemplateService.getCacheObject(token), Employee.class);
|
||||
//判断是否是系统管理员
|
||||
if (employee.getIsAdmin()) {
|
||||
return true;
|
||||
}
|
||||
String value = hasPermisson.value();
|
||||
boolean contains = employee.getFlags().contains(value);
|
||||
if (!contains) {
|
||||
JsonResult res = JsonResult.error(HttpStatus.CODE_BUSINESS_ERROR, "您没有权限操作");
|
||||
String result = JSONObject.toJSONString(res);
|
||||
response.getWriter().println(result);
|
||||
response.getWriter().flush();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
package com.shanzhu.market.common.sercurity.resolver;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
/**
|
||||
* 定义userInfo 参数注入注解
|
||||
* 贴有该注解UserInfo类型的参数使用自定义参数数解析
|
||||
*/
|
||||
@Target({ElementType.PARAMETER})
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface UserParam {
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.shanzhu.market.common.util;
|
||||
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
public class DateUtil {
|
||||
/**
|
||||
* 获取两个时间的间隔(秒)
|
||||
* @param d1
|
||||
* @param d2
|
||||
* @return
|
||||
*/
|
||||
public static long getDateBetween(Date d1, Date d2){
|
||||
return Math.abs((d1.getTime()-d2.getTime())/1000);//取绝对值
|
||||
}
|
||||
|
||||
public static Date getEndDate(Date date) {
|
||||
if (date == null) {
|
||||
return null;
|
||||
}
|
||||
Calendar c = Calendar.getInstance();
|
||||
c.setTime(date);
|
||||
c.set(Calendar.HOUR_OF_DAY,23);
|
||||
c.set(Calendar.MINUTE,59);
|
||||
c.set(Calendar.SECOND,59);
|
||||
return c.getTime();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.shanzhu.market.common.util;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
|
||||
public class PathUtils {
|
||||
public static String getClassLoadRootPath() {
|
||||
String path = "";
|
||||
try {
|
||||
String prePath = URLDecoder.decode(PathUtils.class.getClassLoader().getResource("").getPath(),"utf-8").replace("/target/classes", "");
|
||||
String osName = System.getProperty("os.name");
|
||||
if (osName.toLowerCase().startsWith("mac")) {
|
||||
// 苹果
|
||||
path = prePath.substring(0, prePath.length() - 1);
|
||||
} else if (osName.toLowerCase().startsWith("windows")) {
|
||||
// windows
|
||||
path = prePath.substring(1, prePath.length() - 1);
|
||||
} else if(osName.toLowerCase().startsWith("linux") || osName.toLowerCase().startsWith("unix")) {
|
||||
// unix or linux
|
||||
path = prePath.substring(0, prePath.length() - 1);
|
||||
} else {
|
||||
path = prePath.substring(1, prePath.length() - 1);
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
public static String upload(MultipartFile multipartFile) {
|
||||
String res = null; // 返回网络路径
|
||||
try {
|
||||
String staticDir = PathUtils.getClassLoadRootPath() + "/src/main/resources/static/files/";
|
||||
// 如果结果目录不存在,则创建目录
|
||||
File resDirFile = new File(staticDir);
|
||||
if(!resDirFile.exists()) {
|
||||
boolean flag = resDirFile.mkdirs();
|
||||
if(!flag) throw new RuntimeException("创建结果目录失败");
|
||||
}
|
||||
// 获取MultipartFile的字节数组
|
||||
byte[] fileBytes = multipartFile.getBytes();
|
||||
|
||||
// 创建文件对象
|
||||
|
||||
// 加个时间戳防止重名
|
||||
String newFileName = System.currentTimeMillis() + "_" + multipartFile.getOriginalFilename();
|
||||
res = "/files/" + newFileName;
|
||||
// 写文件
|
||||
File file = new File(staticDir + newFileName);
|
||||
|
||||
// 将字节数组写入文件
|
||||
FileOutputStream fos = new FileOutputStream(file);
|
||||
fos.write(fileBytes);
|
||||
fos.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,55 @@
|
||||
package com.shanzhu.market.common.util;
|
||||
|
||||
/**
|
||||
* 文件上传工具
|
||||
*/
|
||||
public class UploadUtil {
|
||||
//阿里域名
|
||||
private static final String ALI_DOMAIN = "https://zyl-9.oss-cn-chengdu.aliyuncs.com/";
|
||||
private static final String ENDPOINT = "http://oss-cn-chengdu.aliyuncs.com";
|
||||
private static final String BUCKET_NAME = "zyl-9";
|
||||
|
||||
private static final String ACCESS_KEY_ID = "LTAI5tGxrbz4oXKzQ63LZzQn";
|
||||
private static final String ACCESS_KEY_SECRET = "Do4mpXNQ4bOTzpNqrUhTeQSSwrXfHe";
|
||||
private static final String path = "wolf2w-70";
|
||||
//MultipartFile 对象
|
||||
// public static String uploadAli(MultipartFile file,String path_suffix) throws Exception {
|
||||
// //生成文件名称
|
||||
// String uuid = UUID.randomUUID().toString();
|
||||
// String orgFileName =file.getOriginalFilename();//获取真实文件名称 xxx.jpg
|
||||
// String ext= "." + FilenameUtils.getExtension(orgFileName);//获取拓展名字.jpg
|
||||
// String fileName =path+path_suffix+"/"+uuid + ext;//xxxxxsfsasa.jpg
|
||||
// // 创建OSSClient实例。
|
||||
// OSS ossClient = new OSSClientBuilder().build(ENDPOINT, ACCESS_KEY_ID,ACCESS_KEY_SECRET);
|
||||
// // 上传文件流。
|
||||
// ossClient.putObject(BUCKET_NAME, fileName, file.getInputStream());
|
||||
// // 关闭OSSClient。
|
||||
// ossClient.shutdown();
|
||||
// return ALI_DOMAIN + fileName;
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,79 @@
|
||||
package com.shanzhu.market.common.web.response;
|
||||
|
||||
import com.shanzhu.market.common.constants.HttpStatus;
|
||||
|
||||
public class JsonResult<T> {
|
||||
public static final int CODE_SUCCESS = HttpStatus.CODE_SUCCESS;
|
||||
public static final String MSG_SUCCESS = "操作成功";
|
||||
public static final int CODE_NOLOGIN = HttpStatus.CODE_NOLOGIN;
|
||||
public static final String MSG_NOLOGIN = "请先登录";
|
||||
public static final int CODE_ERROR = HttpStatus.CODE_ERROR;
|
||||
public static final String MSG_ERROR = "系统异常,请联系管理员";
|
||||
public static final int CODE_ERROR_PARAM = HttpStatus.CODE_ERROR_PARAM; //参数异常
|
||||
|
||||
private int code; //区分不同结果, 而不再是true或者false
|
||||
private String msg;
|
||||
private T data; //除了操作结果之后, 还行携带数据返回
|
||||
public JsonResult(int code, String msg, T data){
|
||||
this.code = code;
|
||||
this.msg = msg;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public JsonResult() {
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public T getData() {
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(T data) {
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public static <T> JsonResult success(T data){
|
||||
return new JsonResult(CODE_SUCCESS, MSG_SUCCESS, data);
|
||||
}
|
||||
|
||||
public static JsonResult success(){
|
||||
return new JsonResult(CODE_SUCCESS, MSG_SUCCESS, null);
|
||||
}
|
||||
|
||||
public static <T> JsonResult error(int code, String msg, T data){
|
||||
return new JsonResult(code, msg, data);
|
||||
}
|
||||
public static <T> JsonResult error(int code, String msg){
|
||||
return new JsonResult(code, msg, null);
|
||||
}
|
||||
public static JsonResult defaultError(){
|
||||
return new JsonResult(CODE_ERROR, MSG_ERROR, null);
|
||||
}
|
||||
|
||||
|
||||
public static JsonResult noLogin() {
|
||||
return new JsonResult(CODE_NOLOGIN, MSG_NOLOGIN, null);
|
||||
}
|
||||
|
||||
public static JsonResult noPermission() {
|
||||
return new JsonResult(403, "非法访问", null);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Dept;
|
||||
import com.shanzhu.market.entity.query.QueryDept;
|
||||
import com.shanzhu.market.service.IDeptService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/personnel_management/dept")
|
||||
public class DeptController {
|
||||
|
||||
@Resource
|
||||
private IDeptService deptService;
|
||||
|
||||
/*保存信息接口*/
|
||||
@HasPermisson("personnel_management:dept:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveDept(Dept dept){
|
||||
deptService.saveDept(dept);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*修改接口*/
|
||||
@HasPermisson("personnel_management:dept:update")
|
||||
@PostMapping("/update")
|
||||
public JsonResult updateDept(Dept dept){
|
||||
deptService.updateDept(dept);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*停用*/
|
||||
@HasPermisson("personnel_management:dept:deactivate")
|
||||
@PostMapping("/deactivate")
|
||||
public JsonResult deactivate(Long id){
|
||||
deptService.forbiddenRole(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
/*查询信息*/
|
||||
@GetMapping("/list")
|
||||
public JsonResult listByQo(QueryDept qo){
|
||||
return JsonResult.success(deptService.listByQo(qo));
|
||||
}
|
||||
}
|
@ -0,0 +1,113 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.sercurity.annotation.NoRequireLogin;
|
||||
import com.shanzhu.market.common.util.PathUtils;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Employee;
|
||||
import com.shanzhu.market.entity.query.QueryEmp;
|
||||
import com.shanzhu.market.entity.vo.DetailEmpVo;
|
||||
import com.shanzhu.market.entity.vo.EditEmpVo;
|
||||
import com.shanzhu.market.service.IEmployeeService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/personnel_management/employee")
|
||||
public class EmployeeController {
|
||||
|
||||
@Resource
|
||||
private IEmployeeService employeeService;
|
||||
|
||||
@HasPermisson("personnel_management:employee:list")
|
||||
@PostMapping("/list")
|
||||
public JsonResult pageByQo(QueryEmp qo) {
|
||||
Page<Employee> page = employeeService.pageByQo(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("personnel_management:employee:list")
|
||||
@GetMapping("/detail")
|
||||
public JsonResult detail(Long uid) {
|
||||
DetailEmpVo vo = employeeService.detail(uid);
|
||||
return JsonResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传图片到阿里云oss
|
||||
* 返回网络图片地址,uploaded:1:成功 0:失败
|
||||
*/
|
||||
@NoRequireLogin
|
||||
@PostMapping("/uploadImg")
|
||||
public Map<String, Object> uploadImg(@RequestParam("file") MultipartFile upload) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (upload != null && upload.getSize() > 0) {
|
||||
String path;
|
||||
try {
|
||||
path = PathUtils.upload(upload);
|
||||
map.put("uploaded", 1); //成功
|
||||
map.put("url", path); //成功
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
map.put("uploaded", 0); //失败
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", e.getMessage());
|
||||
map.put("error", errorMap);
|
||||
}
|
||||
} else {
|
||||
map.put("uploaded", 0); //失败
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", "上传失败,图片文件异常");
|
||||
map.put("error", errorMap);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/*保存*/
|
||||
@HasPermisson("personnel_management:employee:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveEmp(Employee employee, HttpServletRequest request) {
|
||||
employeeService.saveEmp(employee, (String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*修改按钮*/
|
||||
@HasPermisson("personnel_management:employee:update")
|
||||
@GetMapping("/editbtn")
|
||||
public JsonResult editbtn(Long uid) {
|
||||
EditEmpVo vo = employeeService.editbtn(uid);
|
||||
return JsonResult.success(vo);
|
||||
}
|
||||
|
||||
/*修改员工业务*/
|
||||
@HasPermisson("personnel_management:employee:update")
|
||||
@PostMapping("/update")
|
||||
public JsonResult updateEmp(Employee employee, HttpServletRequest request) {
|
||||
employeeService.updateEmp(employee, (String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*离职业务*/
|
||||
@HasPermisson("personnel_management:employee:update")
|
||||
@PostMapping("/deactivate")
|
||||
public JsonResult deactivate(Long id) {
|
||||
employeeService.deactivate(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*更改密码*/
|
||||
@HasPermisson("personnel_management:employee:resetPwd")
|
||||
@PostMapping("/resetPwd")
|
||||
public JsonResult resetPwd(Long eid, String code) {
|
||||
employeeService.resetPwd(eid, code);
|
||||
return JsonResult.success();
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.ExchangePointProducts;
|
||||
import com.shanzhu.market.entity.domain.PointProducts;
|
||||
import com.shanzhu.market.entity.query.QueryExchangePointProductsRecords;
|
||||
import com.shanzhu.market.service.IExchangePointProductsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/sale_management/exchange_point_products_records")
|
||||
public class ExchangePointProductsRecordsController {
|
||||
|
||||
@Resource
|
||||
private IExchangePointProductsService exchangePointProductsService;
|
||||
|
||||
|
||||
@GetMapping("/queryPointProductBymemberId")
|
||||
public JsonResult queryPointProductBymemberId(Long memberId) {
|
||||
List<Map<String, Object>> list = exchangePointProductsService.queryPointProductBymemberId(memberId);
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/queryMemberByGoodsId")
|
||||
public JsonResult queryMemberByGoodsId(Long goodsId) {
|
||||
List<Map<String, Object>> list = exchangePointProductsService.queryMemberByGoodsId(goodsId);
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/queryPointProductByGoodsId")
|
||||
public JsonResult queryPointProductByGoodsId(Long goodsId) {
|
||||
PointProducts pointProducts = exchangePointProductsService.queryPointProductByGoodsId(goodsId);
|
||||
return JsonResult.success(pointProducts);
|
||||
}
|
||||
|
||||
@PostMapping("/saveExchangePointProductRecords")
|
||||
public JsonResult saveExchangePointProductRecords(ExchangePointProducts exchangePointProducts, HttpServletRequest request) {
|
||||
exchangePointProductsService.saveExchangePointProductRecords(exchangePointProducts, (String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/queryOptionsMemberPhone")
|
||||
public JsonResult queryOptionsMemberPhone() {
|
||||
List<Map<String, Object>> list = exchangePointProductsService.queryOptionsMemberPhone();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/delExchangePointProducts")
|
||||
public JsonResult delExchangePointProducts(String cn) {
|
||||
exchangePointProductsService.delExchangePointProducts(cn);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@HasPermisson("sale_management:exchange_point_products_records:list")
|
||||
@PostMapping("/queryPageByQoExchangePointProducts")
|
||||
public JsonResult queryPageByQoExchangePointProducts(QueryExchangePointProductsRecords qo) {
|
||||
Page<ExchangePointProducts> page = exchangePointProductsService.queryPageByQoExchangePointProducts(qo);
|
||||
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@GetMapping("/queryOptionsPointProducts")
|
||||
public JsonResult queryOptionsPointProducts() {
|
||||
List<Map<String, Object>> list = exchangePointProductsService.queryOptionsPointProducts();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/queryOptionsMember")
|
||||
public JsonResult queryOptionsMember() {
|
||||
List<Map<String, Object>> list = exchangePointProductsService.queryOptionsMember();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.GoodsCategory;
|
||||
import com.shanzhu.market.entity.query.QueryGoodsCategory;
|
||||
import com.shanzhu.market.service.IGoodsCategoryService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/goods_management/goods_category")
|
||||
public class GoodsCategoryController {
|
||||
|
||||
@Resource
|
||||
private IGoodsCategoryService goodsCategoryService;
|
||||
|
||||
/*保存信息接口*/
|
||||
@HasPermisson("goods_management:goods_category:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveGoodsCategory(GoodsCategory category){
|
||||
goodsCategoryService.saveGoodsCategory(category);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*修改接口*/
|
||||
@HasPermisson("goods_management:goods_category:update")
|
||||
@PostMapping("/update")
|
||||
public JsonResult updateGoodsCategory(GoodsCategory category){
|
||||
goodsCategoryService.updateGoodsCategory(category);
|
||||
return JsonResult.success();
|
||||
}
|
||||
/*停用*/
|
||||
@HasPermisson("goods_management:goods_category:deactivate")
|
||||
@PostMapping("/deactivate")
|
||||
public JsonResult deactivate(Long cid){
|
||||
goodsCategoryService.deactivate(cid);
|
||||
return JsonResult.success();
|
||||
}
|
||||
/*查询信息*/
|
||||
@HasPermisson("goods_management:goods_category:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryGoodsCategory qo) {
|
||||
Page<GoodsCategory> page = goodsCategoryService.queryPageByQo(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@GetMapping("/normalCategoryAll")
|
||||
public JsonResult getNormalCategoryAll(){
|
||||
List<Map<String ,Object>> list=goodsCategoryService.getNormalCategoryAll();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,109 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.NoRequireLogin;
|
||||
import com.shanzhu.market.common.util.PathUtils;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.DetailStoreGoods;
|
||||
import com.shanzhu.market.entity.domain.Goods;
|
||||
import com.shanzhu.market.entity.query.QueryGoods;
|
||||
import com.shanzhu.market.entity.vo.GoodsListVo;
|
||||
import com.shanzhu.market.service.IGoodsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/goods_management/goods")
|
||||
public class GoodsController {
|
||||
|
||||
@Resource
|
||||
private IGoodsService goodsService;
|
||||
|
||||
/*查询信息*/
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryGoods qo) {
|
||||
Page<GoodsListVo> page = goodsService.queryPageByQo(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
/**
|
||||
* 上传图片到阿里云oss
|
||||
* 返回网络图片地址,uploaded:1:成功 0:失败
|
||||
*/
|
||||
@NoRequireLogin
|
||||
@PostMapping("/uploadImg")
|
||||
public Map<String, Object> uploadImg(@RequestParam("file") MultipartFile upload) {
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
if (upload != null && upload.getSize() > 0) {
|
||||
String path = "";
|
||||
try {
|
||||
path = PathUtils.upload(upload);
|
||||
map.put("uploaded", 1); //成功
|
||||
map.put("url", path); //成功
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
map.put("uploaded", 0); //失败
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", e.getMessage());
|
||||
map.put("error", errorMap);
|
||||
}
|
||||
} else {
|
||||
map.put("uploaded", 0); //失败
|
||||
Map<String, Object> errorMap = new HashMap<>();
|
||||
errorMap.put("message", "上传失败,图片文件异常");
|
||||
map.put("error", errorMap);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
/*保存*/
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveGoods(Goods goods, HttpServletRequest request){
|
||||
goodsService.saveGoods(goods,(String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*上/下架*/
|
||||
@PostMapping("/upOrdown")
|
||||
public JsonResult upOrdown(@NotNull(message = "商品编号不能为空") Long gid, String state,HttpServletRequest request){
|
||||
goodsService.upOrdown(gid,state,(String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
@GetMapping("/queryGoodsById")
|
||||
public JsonResult queryGoodsById(@NotNull(message = "商品编号不能为空") Long id){
|
||||
return JsonResult.success(goodsService.getById(id));
|
||||
}
|
||||
|
||||
@PostMapping("/update")
|
||||
public JsonResult update(Goods goods, HttpServletRequest request){
|
||||
goodsService.updateGoods(goods,(String)request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/selected_goodsAll")
|
||||
public JsonResult selected_goodsAll(){
|
||||
List<Map<String,Object>> list=goodsService.selected_goodsAll();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@GetMapping("/selected_storeAll")
|
||||
public JsonResult selected_storeAll(){
|
||||
List<Map<String,Object>> list=goodsService.selected_storeAll();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
/*退还商品入库*/
|
||||
@PostMapping("/returnGoods")
|
||||
public JsonResult returnGoods(DetailStoreGoods detailStoreGoods, HttpServletRequest request){
|
||||
goodsService.returnGoods(detailStoreGoods,(String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.query.QueryGoodsStore;
|
||||
import com.shanzhu.market.entity.vo.GoodsStoreVo;
|
||||
import com.shanzhu.market.service.IGoodsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/goods_management/goods_store")
|
||||
public class GoodsStoreController {
|
||||
|
||||
@Resource
|
||||
private IGoodsService goodsService;
|
||||
|
||||
/*查询信息*/
|
||||
@HasPermisson("goods_management:goods_store:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryGoodsStore qo) {
|
||||
Page<GoodsStoreVo> page = goodsService.queryPageGoodsStore(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@GetMapping("/queryGoodsStoreById")
|
||||
public JsonResult queryGoodsStoreById(Long id) {
|
||||
GoodsStoreVo vo= goodsService.queryGoodsStoreById(id);
|
||||
return JsonResult.success(vo);
|
||||
}
|
||||
|
||||
@PostMapping("/updateInventory")
|
||||
public JsonResult updateInventory(GoodsStoreVo vo) {
|
||||
goodsService.updateInventory(vo);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,75 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.shanzhu.market.common.sercurity.annotation.NoRequireLogin;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Menu;
|
||||
import com.shanzhu.market.service.ILoginService;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
public class LoginEmpController {
|
||||
|
||||
@Resource
|
||||
private ILoginService loginService;
|
||||
|
||||
/**
|
||||
* 登录功能
|
||||
*/
|
||||
@NoRequireLogin
|
||||
@PostMapping("/login")
|
||||
public JsonResult login(@NotEmpty(message = "账号不能为空") String username, @NotEmpty(message = "密码不能为空") String password) {
|
||||
Map<String, Object> map = loginService.login(username, password);
|
||||
return JsonResult.success(map);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出功能
|
||||
*/
|
||||
@NoRequireLogin
|
||||
@GetMapping("/exit")
|
||||
public JsonResult exit(HttpServletRequest request) {
|
||||
String token = request.getHeader("token");
|
||||
if (StringUtils.hasLength(token)){
|
||||
loginService.exit(token);
|
||||
}
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@PostMapping("/logout")
|
||||
public JsonResult logout(@NotEmpty(message = "内容不能为空") String content,HttpServletRequest request) {
|
||||
|
||||
loginService.logout(request.getHeader("token"), content);
|
||||
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询登录者的拥有的菜单
|
||||
*/
|
||||
@GetMapping("/empMenu")
|
||||
public JsonResult empMenu(HttpServletRequest request){
|
||||
List<Menu> menus=loginService.empMenu((String)request.getHeader("token"));
|
||||
return JsonResult.success(menus);
|
||||
}
|
||||
|
||||
@NoRequireLogin
|
||||
@GetMapping("/checkedToken")
|
||||
public JsonResult checkedToken(String token){
|
||||
Map<String,Object> map=loginService.checkedToken(token);
|
||||
return JsonResult.success(map);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Member;
|
||||
import com.shanzhu.market.entity.query.QueryMember;
|
||||
import com.shanzhu.market.service.IMemberService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/member_management/member")
|
||||
public class MemberController {
|
||||
|
||||
@Resource
|
||||
private IMemberService memberService;
|
||||
|
||||
/*查询信息*/
|
||||
@HasPermisson("member_management:member:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryMember qo) {
|
||||
Page<Member> page = memberService.queryPageByQo(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("member_management:member:delMember")
|
||||
@PostMapping("/delMember")
|
||||
public JsonResult delMember(Long id) {
|
||||
memberService.delMember(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@HasPermisson("member_management:member:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult save(Member member) {
|
||||
memberService.saveMember(member);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/queryMemberById")
|
||||
public JsonResult queryMemberById(Long id) {
|
||||
Member member = memberService.queryMemberById(id);
|
||||
return JsonResult.success(member);
|
||||
}
|
||||
|
||||
@HasPermisson("member_management:member:update")
|
||||
@PostMapping("/update")
|
||||
public JsonResult updateMember(Member member) {
|
||||
memberService.updateMember(member);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/queryMemberByPhone")
|
||||
public JsonResult queryMemberByPhone(String phone) {
|
||||
Member member = memberService.queryMemberByPhone(phone);
|
||||
return JsonResult.success(member);
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Menu;
|
||||
import com.shanzhu.market.entity.query.MenuQuery;
|
||||
import com.shanzhu.market.service.IMenuService;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/system/menu")
|
||||
public class MenuController {
|
||||
|
||||
@Resource
|
||||
private IMenuService menuService;
|
||||
|
||||
/**
|
||||
* 条件分页查询菜单的信息
|
||||
*/
|
||||
@HasPermisson("system:menu:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(MenuQuery qo) {
|
||||
Page<Menu> page = menuService.queryPageByQo(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,64 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.DetailStoreGoods;
|
||||
import com.shanzhu.market.entity.domain.NoticeIn;
|
||||
import com.shanzhu.market.entity.domain.NoticeOut;
|
||||
import com.shanzhu.market.entity.query.QueryNoticeIn;
|
||||
import com.shanzhu.market.entity.query.QueryNoticeOut;
|
||||
import com.shanzhu.market.entity.vo.NoticeInNotNormalVo;
|
||||
import com.shanzhu.market.service.IGoodsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/inventory_management/detail_store_goods/notice")
|
||||
public class NoticeController {
|
||||
|
||||
@Resource
|
||||
private IGoodsService goodsService;
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_in:notice:list")
|
||||
@PostMapping("/queryPageNoticeIn")
|
||||
public JsonResult queryPageNoticeIn(QueryNoticeIn qo) {
|
||||
Page<NoticeIn> page = goodsService.queryPageNoticeIn(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:notice:list")
|
||||
@PostMapping("/queryPageNoticeOut_shelves")
|
||||
public JsonResult queryPageNoticeOut_shelves(QueryNoticeOut qo) {
|
||||
Page<NoticeOut> page = goodsService.queryPageNoticeOut_shelves(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:notice:saveOut_shelves")
|
||||
@PostMapping("/saveOut_shelves")
|
||||
public JsonResult saveOut_shelves(DetailStoreGoods detailStoreGoods, HttpServletRequest request) {
|
||||
goodsService.saveOut_shelves(detailStoreGoods, (String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:notice:list")
|
||||
@PostMapping("/queryPageNoticeOut_untreated")
|
||||
public JsonResult queryPageNoticeOut_untreated(QueryNoticeOut qo) {
|
||||
Page<NoticeInNotNormalVo> page = goodsService.queryPageNoticeOut_untreated(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:notice:resolveOutUntreatedForm")
|
||||
@PostMapping("/resolveOutUntreatedForm")
|
||||
public JsonResult resolveOutUntreatedForm(NoticeInNotNormalVo vo, HttpServletRequest request) {
|
||||
goodsService.resolveOutUntreatedForm(vo, (String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.query.QueryEditPwd;
|
||||
import com.shanzhu.market.entity.vo.InformationVo;
|
||||
import com.shanzhu.market.service.IEmployeeService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/personal")
|
||||
public class PersonalController {
|
||||
|
||||
@Resource
|
||||
private IEmployeeService employeeService;
|
||||
|
||||
/**
|
||||
* 修改个人的密码
|
||||
*/
|
||||
@HasPermisson("personal:edit_pwd")
|
||||
@PostMapping("/edit_pwd")
|
||||
public JsonResult edit_pwd(HttpServletRequest request, QueryEditPwd editPwd){
|
||||
String token = request.getHeader("token");
|
||||
employeeService.edit_pwd(editPwd,token);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@HasPermisson("personnel_management:employee:update")
|
||||
@GetMapping("/information")
|
||||
public JsonResult information(HttpServletRequest request){
|
||||
String token = request.getHeader("token");
|
||||
InformationVo vo=employeeService.information(token);
|
||||
return JsonResult.success(vo);
|
||||
}
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.PointProducts;
|
||||
import com.shanzhu.market.entity.query.QueryPointProducts;
|
||||
import com.shanzhu.market.service.IPointProductsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/goods_management/point_products")
|
||||
public class PointProductController {
|
||||
|
||||
@Resource
|
||||
private IPointProductsService pointProductsService;
|
||||
|
||||
/*查询信息*/
|
||||
@HasPermisson("goods_management:point_products:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryPointProducts qo) {
|
||||
Page<PointProducts> page = pointProductsService.queryPageByQo(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@GetMapping("/del")
|
||||
public JsonResult del(Long id) {
|
||||
pointProductsService.del(id);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@GetMapping("/queryOptionGoods")
|
||||
public JsonResult queryOptionGoods() {
|
||||
List<Map<String,Object>> list=pointProductsService.queryOptionGoods();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/savePointGoods")
|
||||
public JsonResult savePointGoods(PointProducts pointProducts, HttpServletRequest request) {
|
||||
pointProductsService.savePointGoods(pointProducts,(String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
@GetMapping("/queryPointGoodsById")
|
||||
public JsonResult queryPointGoodsById(Long goodsId) {
|
||||
PointProducts pointProducts = pointProductsService.getOne(new QueryWrapper<PointProducts>().eq("goods_id", goodsId));
|
||||
return JsonResult.success(pointProducts);
|
||||
}
|
||||
|
||||
@PostMapping("/updatePointGoods")
|
||||
public JsonResult updatePointGoods(PointProducts pointProducts, HttpServletRequest request) {
|
||||
pointProductsService.updatePointGoods(pointProducts,(String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,117 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.shanzhu.market.common.exception.BusinessException;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Role;
|
||||
import com.shanzhu.market.entity.query.RoleQuery;
|
||||
import com.shanzhu.market.entity.vo.RolePermissonVo;
|
||||
import com.shanzhu.market.service.IRoleService;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/system/role")
|
||||
public class RoleController {
|
||||
|
||||
@Resource
|
||||
private IRoleService roleService;
|
||||
|
||||
/**
|
||||
* 查询角色所有的信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@HasPermisson("system:role:list")
|
||||
@PostMapping("/list")
|
||||
public JsonResult list(RoleQuery qo) {
|
||||
List<Role> roles = roleService.listByQo(qo);
|
||||
return JsonResult.success(roles);
|
||||
}
|
||||
|
||||
/**
|
||||
* 停用角色
|
||||
*/
|
||||
@HasPermisson("system:role:forbiddenRole")
|
||||
@PostMapping("/forbiddenRole")
|
||||
public JsonResult forbiddenRole(Long rid) {
|
||||
roleService.forbiddenRole(rid);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改角色信息
|
||||
*/
|
||||
@HasPermisson("system:role:edit_role")
|
||||
@PostMapping("/edit_role")
|
||||
public JsonResult edit_role(Role role) {
|
||||
if (Role.SYS_ID == role.getId() || 2L == role.getId()) {
|
||||
throw new BusinessException("不能停用系统拥有者");
|
||||
}
|
||||
if (role != null && StringUtils.hasText(role.getInfo())) {
|
||||
roleService.updateById(role);
|
||||
}
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色信息
|
||||
*/
|
||||
@HasPermisson("system:role:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult save(Role role) {
|
||||
roleService.saveRole(role);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询角色拥有的权限
|
||||
*/
|
||||
@HasPermisson("system:role:saveRolePermissons")
|
||||
@GetMapping("/checkPermissons")
|
||||
public JsonResult checkPermissons(@NotNull(message = "角色不能为空") Long rid) {
|
||||
RolePermissonVo vo = roleService.checkPermissons(rid);
|
||||
return JsonResult.success(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存角色-菜单的关系
|
||||
*/
|
||||
@HasPermisson("system:role:saveRolePermissons")
|
||||
@PostMapping("/saveRolePermissons")
|
||||
public JsonResult saveRolePermissons(@NotNull(message = "角色不能为空") @RequestParam("rid") Long rid, @RequestParam("menuIds") Long[] menuIds) {
|
||||
roleService.saveRolePermissons(rid, menuIds);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@GetMapping("/all")
|
||||
public JsonResult getRoleAll() {
|
||||
List<Map<String, Object>> list = roleService.getRoleAll();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@HasPermisson("personnel_management:employee:queryRoleIdsByEid")
|
||||
@GetMapping("/queryRoleIdsByEid")
|
||||
public JsonResult queryRoleIdsByEid(Long eid) {
|
||||
|
||||
List<Long> list = roleService.queryRoleIdsByEid(eid);
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@HasPermisson("personnel_management:employee:queryRoleIdsByEid")
|
||||
@PostMapping("/saveRoleEmp")
|
||||
public JsonResult saveRoleEmp(Long eid, Long[] empRoleIds, HttpServletRequest request) {
|
||||
String token = request.getHeader("token");
|
||||
roleService.saveRoleEmp(eid, empRoleIds, token);
|
||||
return JsonResult.success();
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.SaleRecords;
|
||||
import com.shanzhu.market.entity.query.QuerySaleRecords;
|
||||
import com.shanzhu.market.service.ISaleRecordsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/sale_management/sale_record")
|
||||
public class SaleRecordController {
|
||||
|
||||
@Resource
|
||||
private ISaleRecordsService saleRecordsService;
|
||||
|
||||
@GetMapping("/getCn")
|
||||
public JsonResult getCn(){
|
||||
return JsonResult.success(IdWorker.getIdStr());
|
||||
}
|
||||
|
||||
@GetMapping("/getOptionSaleRecordsGoods")
|
||||
public JsonResult getOptionSaleRecordsGoods(){
|
||||
List<Map<String,Object>> list=saleRecordsService.getOptionSaleRecordsGoods();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
|
||||
@PostMapping("/saveSaleRecords")
|
||||
public JsonResult saveSaleRecords(@RequestBody SaleRecords saleRecords, HttpServletRequest request){
|
||||
saleRecords=saleRecordsService.saveSaleRecords(saleRecords,(String) request.getHeader("token"));
|
||||
return JsonResult.success(saleRecords);
|
||||
}
|
||||
|
||||
@HasPermisson("sale_management:sale_records:list")
|
||||
@PostMapping("/queryPageByQoSaleRecords")
|
||||
public JsonResult queryPageByQoSaleRecords(QuerySaleRecords qo){
|
||||
Page<SaleRecords> page=saleRecordsService.queryPageByQoSaleRecords(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@GetMapping("/delSaleRecords")
|
||||
public JsonResult delSaleRecords(String cn){
|
||||
saleRecordsService.delSaleRecords(cn);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,30 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.query.QueryStatisticSale;
|
||||
import com.shanzhu.market.entity.vo.SalesStatisticsVo;
|
||||
import com.shanzhu.market.service.IGoodsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/goods_management/statistic_sale")
|
||||
public class StatisticSaleController {
|
||||
|
||||
@Resource
|
||||
private IGoodsService goodsService;
|
||||
|
||||
@HasPermisson("goods_management:statistic_sale:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryStatisticSale qo) {
|
||||
SalesStatisticsVo vo = goodsService.queryPageStatisticSaleByQo(qo);
|
||||
return JsonResult.success(vo);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.query.QueryDetailStorageSituation;
|
||||
import com.shanzhu.market.entity.query.QueryStorageSituation;
|
||||
import com.shanzhu.market.service.IGoodsStoreService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/inventory_management/store/storage_situation")
|
||||
public class StorageSituationController {
|
||||
|
||||
@Resource
|
||||
private IGoodsStoreService goodsStoreService;
|
||||
|
||||
@HasPermisson("inventory_management:store:storage_situation")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryStorageSituation qo) {
|
||||
Map<String, Object> map = goodsStoreService.queryPageStorageSituationByQo(qo);
|
||||
return JsonResult.success(map);
|
||||
|
||||
}
|
||||
@HasPermisson("inventory_management:store:storage_situation")
|
||||
@PostMapping("/queryStoreGoodsByStoreId")
|
||||
public JsonResult queryStoreGoodsByStoreId(QueryDetailStorageSituation qo) {
|
||||
Map<String, Object> map = goodsStoreService.queryStoreGoodsByStoreId(qo);
|
||||
return JsonResult.success(map);
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Store;
|
||||
import com.shanzhu.market.entity.query.QueryStore;
|
||||
import com.shanzhu.market.service.IStoreService;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/inventory_management/store")
|
||||
public class StoreController {
|
||||
|
||||
@Resource
|
||||
private IStoreService storeService;
|
||||
|
||||
/*保存仓库信息接口*/
|
||||
@HasPermisson("inventory_management:store:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveStore(Store store){
|
||||
storeService.saveStore(store);
|
||||
return JsonResult.success();
|
||||
}
|
||||
/*修改仓库接口*/
|
||||
@HasPermisson("inventory_management:store:update")
|
||||
@PostMapping("/update")
|
||||
public JsonResult updateStore(Store store){
|
||||
storeService.updateStore(store);
|
||||
return JsonResult.success();
|
||||
}
|
||||
/*停用仓库*/
|
||||
@HasPermisson("inventory_management:store:deactivate")
|
||||
@PostMapping("/deactivate")
|
||||
public JsonResult deactivate(Long sid){
|
||||
storeService.deactivate(sid);
|
||||
return JsonResult.success();
|
||||
}
|
||||
/*查询仓库信息*/
|
||||
@HasPermisson("inventory_management:store:list")
|
||||
@PostMapping("/list")
|
||||
public JsonResult list(QueryStore qo){
|
||||
return JsonResult.success(storeService.list( new QueryWrapper<Store>()
|
||||
.like(StringUtils.hasText(qo.getName()),"name",qo.getName())
|
||||
.eq(StringUtils.hasText(qo.getState()),"state",qo.getState())
|
||||
));
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.DetailStoreGoods;
|
||||
import com.shanzhu.market.entity.query.QueryDetailStoreGoods;
|
||||
import com.shanzhu.market.entity.vo.DetailStoreGoodsVo;
|
||||
import com.shanzhu.market.service.IDetailStoreGoodsService;
|
||||
import com.shanzhu.market.service.ISupplierService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/inventory_management/detail_store_goods_in")
|
||||
public class StoreInController {
|
||||
|
||||
@Resource
|
||||
private IDetailStoreGoodsService detailStoreGoodsService;
|
||||
|
||||
@Resource
|
||||
private ISupplierService supplierService;
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_in:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveIn(DetailStoreGoods detailStoreGoods, HttpServletRequest request) {
|
||||
detailStoreGoodsService.saveIn(detailStoreGoods, (String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_in:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QueryDetailStoreGoods qo) {
|
||||
Page<DetailStoreGoodsVo> page = detailStoreGoodsService.queryPageByQoIn(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_in:delIn")
|
||||
@PostMapping("/delIn")
|
||||
public JsonResult delIn(@NotEmpty(message = "系统编号不能为空") String cn) {
|
||||
detailStoreGoodsService.delIn(cn);
|
||||
return JsonResult.success();
|
||||
}
|
||||
@HasPermisson("inventory_management:detail_store_goods_in:save")
|
||||
@GetMapping("/queryOptionsSuppliers")
|
||||
public JsonResult queryOptionsSuppliers() {
|
||||
List<Map<String, Object>> list = supplierService.queryOptionsSuppliers();
|
||||
return JsonResult.success(list);
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.DetailStoreGoods;
|
||||
import com.shanzhu.market.entity.query.QueryDetailStoreGoodsOut;
|
||||
import com.shanzhu.market.entity.vo.DetailStoreGoodsOutVo;
|
||||
import com.shanzhu.market.service.IDetailStoreGoodsService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.Map;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/inventory_management/detail_store_goods_out")
|
||||
public class StoreOutController {
|
||||
|
||||
@Resource
|
||||
private IDetailStoreGoodsService detailStoreGoodsService;
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:list")
|
||||
@PostMapping("/queryPageByQoOut")
|
||||
public JsonResult queryPageByQoOut(QueryDetailStoreGoodsOut qo){
|
||||
Page<DetailStoreGoodsOutVo> page=detailStoreGoodsService.queryPageByQoOut(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:save")
|
||||
@GetMapping("/initOutOptions")
|
||||
public JsonResult<Map<String,Object>> initOutOptions(){
|
||||
return JsonResult.success(detailStoreGoodsService.initOutOptions());
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:save")
|
||||
@GetMapping("/changeOutGoods")
|
||||
public JsonResult changeOutGoods(Long gid){
|
||||
return JsonResult.success(detailStoreGoodsService.changeOutGoods(gid));
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:save")
|
||||
@GetMapping("/changeOutStore")
|
||||
public JsonResult changeOutStore(Long storeId){
|
||||
return JsonResult.success(detailStoreGoodsService.changeOutStore(storeId));
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:save")
|
||||
@PostMapping("/queryOutGoods")
|
||||
public JsonResult queryOutGoods(@RequestParam("goodsId") Long goodsId,
|
||||
@RequestParam("storeId") Long storeId){
|
||||
DetailStoreGoodsOutVo vo=detailStoreGoodsService.queryOutGoods(goodsId,storeId);
|
||||
return JsonResult.success(vo);
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveOut(DetailStoreGoods detailStoreGoods,HttpServletRequest request){
|
||||
detailStoreGoodsService.saveOut(detailStoreGoods,(String) request.getHeader("token"));
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:detail_store_goods_out:delOut")
|
||||
@PostMapping("/delOut")
|
||||
public JsonResult delOut(@NotEmpty(message = "系统编号不能为空") String cn) {
|
||||
detailStoreGoodsService.delIn(cn);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
package com.shanzhu.market.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.shanzhu.market.common.sercurity.annotation.HasPermisson;
|
||||
import com.shanzhu.market.common.web.response.JsonResult;
|
||||
import com.shanzhu.market.entity.domain.Supplier;
|
||||
import com.shanzhu.market.entity.query.QuerySupplier;
|
||||
import com.shanzhu.market.service.ISupplierService;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@Validated
|
||||
@RequestMapping("/inventory_management/supplier")
|
||||
public class SupplierController {
|
||||
|
||||
@Resource
|
||||
private ISupplierService supplierService;
|
||||
|
||||
@HasPermisson("inventory_management:supplier:list")
|
||||
@PostMapping("/queryPageByQo")
|
||||
public JsonResult queryPageByQo(QuerySupplier qo) {
|
||||
Page<Supplier> page = supplierService.queryPageByQo(qo);
|
||||
return JsonResult.success(page);
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:supplier:save")
|
||||
@PostMapping("/save")
|
||||
public JsonResult saveSupplier(Supplier supplier){
|
||||
supplierService.saveSupplier(supplier);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
/*修改接口*/
|
||||
@HasPermisson("inventory_management:supplier:update")
|
||||
@PostMapping("/update")
|
||||
public JsonResult updateSupplier(Supplier supplier){
|
||||
supplierService.updateSupplier(supplier);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:supplier:update")
|
||||
@GetMapping("/queryByCn")
|
||||
public JsonResult queryByCn(Long cn){
|
||||
return JsonResult.success(supplierService.getById(cn));
|
||||
}
|
||||
|
||||
@HasPermisson("inventory_management:supplier:deactivate")
|
||||
@PostMapping("/deactivate")
|
||||
public JsonResult deactivate(Long cn){
|
||||
supplierService.deactivate(cn);
|
||||
return JsonResult.success();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,65 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 部门实体
|
||||
*/
|
||||
@TableName("department")
|
||||
public class Dept implements Serializable {
|
||||
//正常
|
||||
public static final String STATE_NORMAL="0";
|
||||
//禁用
|
||||
public static final String STATE_BAN="-1";
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String info;
|
||||
private String state;
|
||||
|
||||
public Dept() {
|
||||
}
|
||||
|
||||
public Dept(Long id, String name, String info, String state) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.info = info;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@TableName("detail_sale_records")
|
||||
public class DetailSaleRecords implements Serializable {
|
||||
@TableField("sell_cn")
|
||||
private String sellCn;
|
||||
@TableField("goods_id")
|
||||
private Long goodsId;
|
||||
@TableField("goods_num")
|
||||
private Long goodsNum;
|
||||
@TableField("goods_price")
|
||||
private Double goodsPrice;
|
||||
@TableField("goods_name")
|
||||
private String goodsName;
|
||||
|
||||
public DetailSaleRecords() {
|
||||
}
|
||||
|
||||
public DetailSaleRecords(String sellCn, Long goodsId, Long goodsNum, Double goodsPrice, String goodsName) {
|
||||
this.sellCn = sellCn;
|
||||
this.goodsId = goodsId;
|
||||
this.goodsNum = goodsNum;
|
||||
this.goodsPrice = goodsPrice;
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getSellCn() {
|
||||
return sellCn;
|
||||
}
|
||||
|
||||
public void setSellCn(String sellCn) {
|
||||
this.sellCn = sellCn;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
public void setGoodsNum(Long goodsNum) {
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public Double getGoodsPrice() {
|
||||
return goodsPrice;
|
||||
}
|
||||
|
||||
public void setGoodsPrice(Double goodsPrice) {
|
||||
this.goodsPrice = goodsPrice;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
}
|
@ -0,0 +1,224 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("t_detail_store_goods")
|
||||
public class DetailStoreGoods implements Serializable {
|
||||
public static final String STATE_NORMAL="0"; //正常
|
||||
public static final String STATE_EXPIRY="1"; //过期
|
||||
public static final String STATE_DOWN="2"; //下架
|
||||
public static final String STATE1_DEL="1"; //删除
|
||||
public static final String STATE1_NORMAL="0"; //正常
|
||||
public static final String STATE1_UNTREATED="2"; //待处理
|
||||
public static final String TYPE_IN="0";
|
||||
public static final String TYPE_OUT="1";
|
||||
private String cn;
|
||||
@TableField("goods_id")
|
||||
private Long goodsId;
|
||||
@TableField("goods_num")
|
||||
private Long goodsNum;
|
||||
@TableField("goods_name")
|
||||
private String goodsName;
|
||||
@TableField("goods_price")
|
||||
private Double goodsPrice;
|
||||
private String type;
|
||||
private Long createid;
|
||||
private String createby;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern ="yyyy-MM-dd" )
|
||||
@TableField("create_time")
|
||||
private Date createTime;
|
||||
private String state;
|
||||
private String info;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern ="yyyy-MM-dd" )
|
||||
@TableField("expiry_time")
|
||||
private Date expiryTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern ="yyyy-MM-dd" )
|
||||
@TableField("birth_time")
|
||||
private Date birthTime;
|
||||
@TableField("store_id")
|
||||
private Long storeId;
|
||||
private String state1;
|
||||
@TableField("supplier_id")
|
||||
private Long supplierId;
|
||||
@TableField("supplier_name")
|
||||
private String supplierName;
|
||||
@TableField("untreated_num")
|
||||
private Long untreatedNum;
|
||||
|
||||
public DetailStoreGoods() {
|
||||
}
|
||||
|
||||
public DetailStoreGoods(String cn, Long goodsId, Long goodsNum, String goodsName, Double goodsPrice, String type, Long createid, String createby, Date createTime, String state, String info, Date expiryTime, Date birthTime, Long storeId, String state1, Long supplierId, String supplierName, Long untreatedNum) {
|
||||
this.cn = cn;
|
||||
this.goodsId = goodsId;
|
||||
this.goodsNum = goodsNum;
|
||||
this.goodsName = goodsName;
|
||||
this.goodsPrice = goodsPrice;
|
||||
this.type = type;
|
||||
this.createid = createid;
|
||||
this.createby = createby;
|
||||
this.createTime = createTime;
|
||||
this.state = state;
|
||||
this.info = info;
|
||||
this.expiryTime = expiryTime;
|
||||
this.birthTime = birthTime;
|
||||
this.storeId = storeId;
|
||||
this.state1 = state1;
|
||||
this.supplierId = supplierId;
|
||||
this.supplierName = supplierName;
|
||||
this.untreatedNum = untreatedNum;
|
||||
}
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
public void setGoodsNum(Long goodsNum) {
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public Double getGoodsPrice() {
|
||||
return goodsPrice;
|
||||
}
|
||||
|
||||
public void setGoodsPrice(Double goodsPrice) {
|
||||
this.goodsPrice = goodsPrice;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getCreateid() {
|
||||
return createid;
|
||||
}
|
||||
|
||||
public void setCreateid(Long createid) {
|
||||
this.createid = createid;
|
||||
}
|
||||
|
||||
public String getCreateby() {
|
||||
return createby;
|
||||
}
|
||||
|
||||
public void setCreateby(String createby) {
|
||||
this.createby = createby;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Date getExpiryTime() {
|
||||
return expiryTime;
|
||||
}
|
||||
|
||||
public void setExpiryTime(Date expiryTime) {
|
||||
this.expiryTime = expiryTime;
|
||||
}
|
||||
|
||||
public Date getBirthTime() {
|
||||
return birthTime;
|
||||
}
|
||||
|
||||
public void setBirthTime(Date birthTime) {
|
||||
this.birthTime = birthTime;
|
||||
}
|
||||
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getState1() {
|
||||
return state1;
|
||||
}
|
||||
|
||||
public void setState1(String state1) {
|
||||
this.state1 = state1;
|
||||
}
|
||||
|
||||
public Long getSupplierId() {
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setSupplierId(Long supplierId) {
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
|
||||
public Long getUntreatedNum() {
|
||||
return untreatedNum;
|
||||
}
|
||||
|
||||
public void setUntreatedNum(Long untreatedNum) {
|
||||
this.untreatedNum = untreatedNum;
|
||||
}
|
||||
}
|
@ -0,0 +1,305 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 员工实体类
|
||||
*/
|
||||
@TableName("employee")
|
||||
public class Employee implements Serializable {
|
||||
public static final String STATE_NORMAL = "0";
|
||||
public static final String STATE_DEL = "1";
|
||||
public static final String DEFAULT_PWD = "123456";
|
||||
public static final String SEX_MEN = "1";
|
||||
public static final String SEX_WOWEN = "0";
|
||||
public static final String DEFAULT_HEAD_IMG="/files/1694434162457_07.jpg";
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String sex;
|
||||
@TableField("isAdmin")
|
||||
private Boolean isAdmin;
|
||||
@TableField("phone")
|
||||
private String username;
|
||||
@TableField("nick_name")
|
||||
private String nickName;
|
||||
private String password;
|
||||
@TableField("head_img")
|
||||
private String headImg=DEFAULT_HEAD_IMG;
|
||||
private String state = STATE_NORMAL;
|
||||
private String info;
|
||||
private String createby;
|
||||
@TableField("create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@TableField("leave_time")
|
||||
private Date leaveTime;
|
||||
private String address;
|
||||
private String email;
|
||||
private Integer age;
|
||||
@TableField("deptId")
|
||||
private Long deptId;
|
||||
|
||||
@TableField(value = "dept_name",exist = false)
|
||||
private String deptName;
|
||||
//角色集合
|
||||
@TableField(exist = false)
|
||||
@JsonIgnore
|
||||
private Set<Role> roles;
|
||||
|
||||
//权限集合
|
||||
@TableField(exist = false)
|
||||
@JsonIgnore
|
||||
private List<Menu> menus;
|
||||
@TableField(exist = false)
|
||||
@JsonIgnore
|
||||
private Set<String> flags;
|
||||
|
||||
@TableField("id_card")
|
||||
private String idCard;
|
||||
|
||||
public Employee() {
|
||||
}
|
||||
|
||||
public Employee(Long id, String sex, Boolean isAdmin, String username, String nickName, String password, String headImg, String state, String info, String createby, Date createTime, Date leaveTime, String address, String email, Integer age, Long deptId, String deptName, Set<Role> roles, List<Menu> menus, Set<String> flags, String idCard) {
|
||||
this.id = id;
|
||||
this.sex = sex;
|
||||
this.isAdmin = isAdmin;
|
||||
this.username = username;
|
||||
this.nickName = nickName;
|
||||
this.password = password;
|
||||
this.headImg = headImg;
|
||||
this.state = state;
|
||||
this.info = info;
|
||||
this.createby = createby;
|
||||
this.createTime = createTime;
|
||||
this.leaveTime = leaveTime;
|
||||
this.address = address;
|
||||
this.email = email;
|
||||
this.age = age;
|
||||
this.deptId = deptId;
|
||||
this.deptName = deptName;
|
||||
this.roles = roles;
|
||||
this.menus = menus;
|
||||
this.flags = flags;
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public Boolean getIsAdmin() {
|
||||
return isAdmin;
|
||||
}
|
||||
|
||||
public void setIsAdmin(Boolean admin) {
|
||||
isAdmin = admin;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getHeadImg() {
|
||||
return headImg;
|
||||
}
|
||||
|
||||
public void setHeadImg(String headImg) {
|
||||
this.headImg = headImg;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCreateby() {
|
||||
return createby;
|
||||
}
|
||||
|
||||
public void setCreateby(String createby) {
|
||||
this.createby = createby;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getLeaveTime() {
|
||||
return leaveTime;
|
||||
}
|
||||
|
||||
public void setLeaveTime(Date leaveTime) {
|
||||
this.leaveTime = leaveTime;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Set<Role> getRoles() {
|
||||
return roles;
|
||||
}
|
||||
|
||||
public void setRoles(Set<Role> roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
|
||||
public List<Menu> getMenus() {
|
||||
return menus;
|
||||
}
|
||||
|
||||
public Set<String> getFlags() {
|
||||
return flags;
|
||||
}
|
||||
|
||||
public void setFlags(Set<String> flags) {
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public void setMenus(List<Menu> menus) {
|
||||
this.menus = menus;
|
||||
if (menus!=null) {
|
||||
this.flags = getFlags(this.menus);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取权限标识符集合
|
||||
*
|
||||
* @param menus
|
||||
* @return
|
||||
*/
|
||||
private Set<String> getFlags(List<Menu> menus) {
|
||||
Set<String> flags = new HashSet<>();
|
||||
for (Menu menu : menus) {
|
||||
//目录遍历
|
||||
if (menu.getFlag() != null) {
|
||||
flags.add(menu.getFlag());
|
||||
//如果没有子集
|
||||
if (menu.getChildren() == null) {
|
||||
continue;
|
||||
}
|
||||
for (Menu child : menu.getChildren()) {
|
||||
//菜单遍历
|
||||
if (child.getFlag() != null) {
|
||||
flags.add(child.getFlag());
|
||||
}
|
||||
//如果没有子集
|
||||
if (child.getChildren() == null) {
|
||||
continue;
|
||||
}
|
||||
for (Menu childChild : child.getChildren()) {
|
||||
if (childChild.getFlag() != null) {
|
||||
flags.add(childChild.getFlag());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return flags;
|
||||
}
|
||||
}
|
@ -0,0 +1,121 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@TableName("exchange_point_products_records")
|
||||
public class ExchangePointProducts implements Serializable {
|
||||
public static final String STATE_NORMAL="0";
|
||||
public static final String STATE_DEL="1";
|
||||
private String cn;
|
||||
@TableField("goods_id")
|
||||
private Long goodsId;
|
||||
@TableField("member_id")
|
||||
private Long memberId;
|
||||
private Long integral;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
private String updateby;
|
||||
@TableField("update_id")
|
||||
private Long updateId;
|
||||
private String state;
|
||||
@TableField(exist = false)
|
||||
private String memberPhone;//会员账号
|
||||
@TableField(exist = false)
|
||||
private String goodsName;
|
||||
@TableField(exist = false)
|
||||
private String goodsCoverUrl;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
|
||||
public void setMemberId(Long memberId) {
|
||||
this.memberId = memberId;
|
||||
}
|
||||
|
||||
public Long getIntegral() {
|
||||
return integral;
|
||||
}
|
||||
|
||||
public void setIntegral(Long integral) {
|
||||
this.integral = integral;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getUpdateby() {
|
||||
return updateby;
|
||||
}
|
||||
|
||||
public void setUpdateby(String updateby) {
|
||||
this.updateby = updateby;
|
||||
}
|
||||
|
||||
public Long getUpdateId() {
|
||||
return updateId;
|
||||
}
|
||||
|
||||
public void setUpdateId(Long updateId) {
|
||||
this.updateId = updateId;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getMemberPhone() {
|
||||
return memberPhone;
|
||||
}
|
||||
|
||||
public void setMemberPhone(String memberPhone) {
|
||||
this.memberPhone = memberPhone;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getGoodsCoverUrl() {
|
||||
return goodsCoverUrl;
|
||||
}
|
||||
|
||||
public void setGoodsCoverUrl(String goodsCoverUrl) {
|
||||
this.goodsCoverUrl = goodsCoverUrl;
|
||||
}
|
||||
}
|
@ -0,0 +1,218 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 商品
|
||||
*/
|
||||
@TableName("goods")
|
||||
public class Goods implements Serializable {
|
||||
public static final String STATE_UP="0";
|
||||
public static final String STATE_DOWN="1";
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String name; //商品名
|
||||
private String info;
|
||||
@TableField("category_name")
|
||||
private String categoryName; //商品分类名
|
||||
@TableField("category_id")
|
||||
private Long categoryId; //商品分类id
|
||||
private String createby; //创建者
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@TableField("create_time")
|
||||
private Date createTime; //创建时间
|
||||
private String updateby; //更新者
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@TableField("update_time")
|
||||
private Date updateTime; //更新时间
|
||||
@TableField("sell_price")
|
||||
private Double sellPrice; // 销售价格
|
||||
@TableField("purchash_price")
|
||||
private Double purchashPrice; //进货价格
|
||||
@TableField("residue_num")
|
||||
private Long residueNum; //剩余数量
|
||||
@TableField(exist = false)
|
||||
private Long residueStoreNum;//剩余库存数量
|
||||
@TableField("cover_url")
|
||||
private String coverUrl; //商品封面
|
||||
private String state=STATE_UP;
|
||||
@TableField("sales_volume")
|
||||
private Long salesVolume;//销售量
|
||||
private Long inventory;//需库存量
|
||||
private Long shelves;//货架商品数量
|
||||
|
||||
public Goods() {
|
||||
}
|
||||
|
||||
public Goods(Long id, String name, String info, String categoryName, Long categoryId, String createby, Date createTime, String updateby, Date updateTime, Double sellPrice, Double purchashPrice, Long residueNum, Long residueStoreNum, String coverUrl, String state, Long salesVolume, Long inventory, Long shelves) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.info = info;
|
||||
this.categoryName = categoryName;
|
||||
this.categoryId = categoryId;
|
||||
this.createby = createby;
|
||||
this.createTime = createTime;
|
||||
this.updateby = updateby;
|
||||
this.updateTime = updateTime;
|
||||
this.sellPrice = sellPrice;
|
||||
this.purchashPrice = purchashPrice;
|
||||
this.residueNum = residueNum;
|
||||
this.residueStoreNum = residueStoreNum;
|
||||
this.coverUrl = coverUrl;
|
||||
this.state = state;
|
||||
this.salesVolume = salesVolume;
|
||||
this.inventory = inventory;
|
||||
this.shelves = shelves;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public Long getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryId(Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public String getCreateby() {
|
||||
return createby;
|
||||
}
|
||||
|
||||
public void setCreateby(String createby) {
|
||||
this.createby = createby;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getUpdateby() {
|
||||
return updateby;
|
||||
}
|
||||
|
||||
public void setUpdateby(String updateby) {
|
||||
this.updateby = updateby;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public Double getSellPrice() {
|
||||
return sellPrice;
|
||||
}
|
||||
|
||||
public void setSellPrice(Double sellPrice) {
|
||||
this.sellPrice = sellPrice;
|
||||
}
|
||||
|
||||
public Double getPurchashPrice() {
|
||||
return purchashPrice;
|
||||
}
|
||||
|
||||
public void setPurchashPrice(Double purchashPrice) {
|
||||
this.purchashPrice = purchashPrice;
|
||||
}
|
||||
|
||||
public Long getResidueNum() {
|
||||
return residueNum;
|
||||
}
|
||||
|
||||
public void setResidueNum(Long residueNum) {
|
||||
this.residueNum = residueNum;
|
||||
}
|
||||
|
||||
public Long getResidueStoreNum() {
|
||||
return residueStoreNum;
|
||||
}
|
||||
|
||||
public void setResidueStoreNum(Long residueStoreNum) {
|
||||
this.residueStoreNum = residueStoreNum;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getSalesVolume() {
|
||||
return salesVolume;
|
||||
}
|
||||
|
||||
public void setSalesVolume(Long salesVolume) {
|
||||
this.salesVolume = salesVolume;
|
||||
}
|
||||
|
||||
public Long getInventory() {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
public void setInventory(Long inventory) {
|
||||
this.inventory = inventory;
|
||||
}
|
||||
|
||||
public Long getShelves() {
|
||||
return shelves;
|
||||
}
|
||||
|
||||
public void setShelves(Long shelves) {
|
||||
this.shelves = shelves;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品分类
|
||||
*/
|
||||
@TableName("goods_category")
|
||||
public class GoodsCategory implements Serializable {
|
||||
public static final String STATE_NORMAL="0";
|
||||
public static final String STATE_BAN="-1";
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String info;
|
||||
private String state;
|
||||
|
||||
public GoodsCategory() {
|
||||
}
|
||||
|
||||
public GoodsCategory(Long id, String name, String info, String state) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.info = info;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,71 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@TableName("t_goods_store")
|
||||
public class GoodsStore implements Serializable {
|
||||
@TableField("goods_id")
|
||||
private Long goodsId;
|
||||
@TableField("store_id")
|
||||
private Long storeId;
|
||||
@TableField("in_num")
|
||||
private Long inNum;
|
||||
@TableField("residue_num")
|
||||
private Long residueNum;
|
||||
@TableField("store_name")
|
||||
private String storeName;
|
||||
|
||||
public GoodsStore() {
|
||||
}
|
||||
|
||||
public GoodsStore(Long goodsId, Long storeId, Long inNum, Long residueNum, String storeName) {
|
||||
this.goodsId = goodsId;
|
||||
this.storeId = storeId;
|
||||
this.inNum = inNum;
|
||||
this.residueNum = residueNum;
|
||||
this.storeName = storeName;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public Long getInNum() {
|
||||
return inNum;
|
||||
}
|
||||
|
||||
public void setInNum(Long inNum) {
|
||||
this.inNum = inNum;
|
||||
}
|
||||
|
||||
public Long getResidueNum() {
|
||||
return residueNum;
|
||||
}
|
||||
|
||||
public void setResidueNum(Long residueNum) {
|
||||
this.residueNum = residueNum;
|
||||
}
|
||||
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
public void setStoreName(String storeName) {
|
||||
this.storeName = storeName;
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@TableName("t_member")
|
||||
public class Member implements Serializable {
|
||||
public static final String STATE_NORMAL = "0";
|
||||
public static final String STATE_BAN = "1";
|
||||
public static final String DEFAULT_PWD="123456";
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String phone;
|
||||
@JsonIgnore
|
||||
private String password;
|
||||
private String email;
|
||||
private Long integral;
|
||||
private String state;
|
||||
private String info;
|
||||
|
||||
public Member() {
|
||||
}
|
||||
|
||||
public Member(Long id, String name, String phone, String password, String email, Long integral, String state, String info) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.phone = phone;
|
||||
this.password = password;
|
||||
this.email = email;
|
||||
this.integral = integral;
|
||||
this.state = state;
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Long getIntegral() {
|
||||
return integral;
|
||||
}
|
||||
|
||||
public void setIntegral(Long integral) {
|
||||
this.integral = integral;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
@ -0,0 +1,154 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
@TableName("t_menu")
|
||||
public class Menu implements Serializable {
|
||||
public static final String TYPE_CATALOGUE="0";//目录
|
||||
public static final String TYPE_MENU="1"; //菜单
|
||||
public static final String TYPE_BUTTON="2";//按钮
|
||||
public static final String STATE_NORMAL="0";//正常
|
||||
public static final String STATE_DEL="-1";//禁用
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String label;
|
||||
private String purl;
|
||||
private String type;
|
||||
@TableField("parent_id")
|
||||
private Long parentId;
|
||||
@TableField("parent_label")
|
||||
private String parentLabel;
|
||||
private String info;
|
||||
private String state;
|
||||
private String flag;
|
||||
private String icon;
|
||||
private String component;
|
||||
@TableField(exist = false)
|
||||
private List<Menu> children;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
Menu menu = (Menu) o;
|
||||
return Objects.equals(id, menu.id) &&
|
||||
Objects.equals(label, menu.label) &&
|
||||
Objects.equals(purl, menu.purl) &&
|
||||
Objects.equals(type, menu.type) &&
|
||||
Objects.equals(parentId, menu.parentId) &&
|
||||
Objects.equals(parentLabel, menu.parentLabel) &&
|
||||
Objects.equals(info, menu.info) &&
|
||||
Objects.equals(state, menu.state) &&
|
||||
Objects.equals(flag, menu.flag) &&
|
||||
Objects.equals(component, menu.component) &&
|
||||
Objects.equals(children, menu.children);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, label, purl, type, parentId, parentLabel, info, state, flag, children);
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
return label;
|
||||
}
|
||||
|
||||
public void setLabel(String label) {
|
||||
this.label = label;
|
||||
}
|
||||
|
||||
public String getPurl() {
|
||||
return purl;
|
||||
}
|
||||
|
||||
public void setPurl(String purl) {
|
||||
this.purl = purl;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentLabel() {
|
||||
return parentLabel;
|
||||
}
|
||||
|
||||
public void setParentLabel(String parentLabel) {
|
||||
this.parentLabel = parentLabel;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getFlag() {
|
||||
return flag;
|
||||
}
|
||||
|
||||
public void setFlag(String flag) {
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getComponent() {
|
||||
return component;
|
||||
}
|
||||
|
||||
public void setComponent(String component) {
|
||||
this.component = component;
|
||||
}
|
||||
|
||||
public List<Menu> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<Menu> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class NoticeIn implements Serializable {
|
||||
private Long id;
|
||||
private String name; //商品名
|
||||
private Double purchashPrice; //进货价格
|
||||
private Long goodsNum;
|
||||
private String coverUrl; //商品封面
|
||||
|
||||
public NoticeIn() {
|
||||
}
|
||||
|
||||
public NoticeIn(Long id, String name, Double purchashPrice, Long goodsNum, String coverUrl) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.purchashPrice = purchashPrice;
|
||||
this.goodsNum = goodsNum;
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Double getPurchashPrice() {
|
||||
return purchashPrice;
|
||||
}
|
||||
|
||||
public void setPurchashPrice(Double purchashPrice) {
|
||||
this.purchashPrice = purchashPrice;
|
||||
}
|
||||
|
||||
public Long getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
public void setGoodsNum(Long goodsNum) {
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
}
|
@ -0,0 +1,62 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class NoticeOut implements Serializable {
|
||||
private Long id;
|
||||
private String name; //商品名
|
||||
private Long goodsNum;
|
||||
private String coverUrl; //商品封面
|
||||
private String state;
|
||||
|
||||
public NoticeOut() {
|
||||
}
|
||||
|
||||
public NoticeOut(Long id, String name, Long goodsNum, String coverUrl, String state) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.goodsNum = goodsNum;
|
||||
this.coverUrl = coverUrl;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Long getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
public void setGoodsNum(Long goodsNum) {
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,103 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
@TableName("point_products")
|
||||
public class PointProducts implements Serializable {
|
||||
public static final String STATE_NORMAL="0";
|
||||
public static final String STATE_DEL="1";
|
||||
@TableField("goods_id")
|
||||
private Long goodsId;
|
||||
@TableField("goods_name")
|
||||
private String goodsName;
|
||||
private Long integral;
|
||||
private String updateby;
|
||||
@TableField("update_time")
|
||||
private Date updateTime;
|
||||
@TableField("cover_url")
|
||||
private String coverUrl;
|
||||
@TableField("update_id")
|
||||
private Long updateId;
|
||||
private String state;
|
||||
|
||||
public PointProducts() {
|
||||
}
|
||||
|
||||
public PointProducts(Long goodsId, String goodsName, Long integral, String updateby, Date updateTime, String coverUrl, Long updateId, String state) {
|
||||
this.goodsId = goodsId;
|
||||
this.goodsName = goodsName;
|
||||
this.integral = integral;
|
||||
this.updateby = updateby;
|
||||
this.updateTime = updateTime;
|
||||
this.coverUrl = coverUrl;
|
||||
this.updateId = updateId;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public Long getIntegral() {
|
||||
return integral;
|
||||
}
|
||||
|
||||
public void setIntegral(Long integral) {
|
||||
this.integral = integral;
|
||||
}
|
||||
|
||||
public String getUpdateby() {
|
||||
return updateby;
|
||||
}
|
||||
|
||||
public void setUpdateby(String updateby) {
|
||||
this.updateby = updateby;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public Long getUpdateId() {
|
||||
return updateId;
|
||||
}
|
||||
|
||||
public void setUpdateId(Long updateId) {
|
||||
this.updateId = updateId;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 权限实体类
|
||||
*/
|
||||
@TableName("t_role")
|
||||
public class Role implements Serializable {
|
||||
public static final Long SYS_ID=1L;
|
||||
//正常
|
||||
public static final String STATE_NORMAL="0";
|
||||
//禁用
|
||||
public static final String STATE_BAN="-1";
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String info;
|
||||
private String state;
|
||||
|
||||
public Role() {
|
||||
}
|
||||
|
||||
public Role(Long id, String name, String info, String state) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.info = info;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,158 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@TableName("t_sale_records")
|
||||
public class SaleRecords implements Serializable {
|
||||
public static final String STATE_NORMAL="0";
|
||||
public static final String STATE_DEL="1";
|
||||
private static final String TYPE_MEMBER="1";
|
||||
private static final String TYPE_NOMEMBER="0";
|
||||
private static final String SELLWAY_ALIPAY="0";
|
||||
private static final String SELLWAY_WECHAT="1";
|
||||
private static final String SELLWAY_CASH="2";
|
||||
private static final String SELLWAY_CREDIT="3";
|
||||
private static final Double DISCOUNT=0.9;
|
||||
@TableField("cn")
|
||||
private String cn;
|
||||
private Long eid;
|
||||
private String sellway;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@TableField("sell_time")
|
||||
private Date sellTime;
|
||||
private String state;
|
||||
private String info;
|
||||
private String sellby;
|
||||
@TableField("sell_total")
|
||||
private Long sellTotal;
|
||||
@TableField("sell_totalmoney")
|
||||
private Double sellTotalmoney;
|
||||
private String type;
|
||||
@TableField(exist = false)
|
||||
private List<DetailSaleRecords> detailSaleRecords=new ArrayList<>();
|
||||
@TableField("member_phone")
|
||||
private String memberPhone;//会员账号
|
||||
|
||||
public SaleRecords() {
|
||||
}
|
||||
|
||||
public SaleRecords(String cn, Long eid, String sellway, Date sellTime, String state, String info, String sellby, Long sellTotal, Double sellTotalmoney, String type, List<DetailSaleRecords> detailSaleRecords, String memberPhone) {
|
||||
this.cn = cn;
|
||||
this.eid = eid;
|
||||
this.sellway = sellway;
|
||||
this.sellTime = sellTime;
|
||||
this.state = state;
|
||||
this.info = info;
|
||||
this.sellby = sellby;
|
||||
this.sellTotal = sellTotal;
|
||||
this.sellTotalmoney = sellTotalmoney;
|
||||
this.type = type;
|
||||
this.detailSaleRecords = detailSaleRecords;
|
||||
this.memberPhone = memberPhone;
|
||||
}
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public Long getEid() {
|
||||
return eid;
|
||||
}
|
||||
|
||||
public void setEid(Long eid) {
|
||||
this.eid = eid;
|
||||
}
|
||||
|
||||
public String getSellway() {
|
||||
return sellway;
|
||||
}
|
||||
|
||||
public void setSellway(String sellway) {
|
||||
this.sellway = sellway;
|
||||
}
|
||||
|
||||
public Date getSellTime() {
|
||||
return sellTime;
|
||||
}
|
||||
|
||||
public void setSellTime(Date sellTime) {
|
||||
this.sellTime = sellTime;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getSellby() {
|
||||
return sellby;
|
||||
}
|
||||
|
||||
public void setSellby(String sellby) {
|
||||
this.sellby = sellby;
|
||||
}
|
||||
|
||||
public Long getSellTotal() {
|
||||
return sellTotal;
|
||||
}
|
||||
|
||||
public void setSellTotal(Long sellTotal) {
|
||||
this.sellTotal = sellTotal;
|
||||
}
|
||||
|
||||
public Double getSellTotalmoney() {
|
||||
return sellTotalmoney;
|
||||
}
|
||||
|
||||
public void setSellTotalmoney(Double sellTotalmoney) {
|
||||
this.sellTotalmoney = sellTotalmoney;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public List<DetailSaleRecords> getDetailSaleRecords() {
|
||||
return detailSaleRecords;
|
||||
}
|
||||
|
||||
public void setDetailSaleRecords(List<DetailSaleRecords> detailSaleRecords) {
|
||||
this.detailSaleRecords = detailSaleRecords;
|
||||
}
|
||||
|
||||
public String getMemberPhone() {
|
||||
return memberPhone;
|
||||
}
|
||||
|
||||
public void setMemberPhone(String memberPhone) {
|
||||
this.memberPhone = memberPhone;
|
||||
}
|
||||
}
|
@ -0,0 +1,73 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 仓库实体
|
||||
*/
|
||||
@TableName("store")
|
||||
public class Store implements Serializable {
|
||||
public static final String STATE_NORMAL="0";
|
||||
public static final String STATE_BAN="-1";
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
private String name;
|
||||
private String address;
|
||||
private String info;
|
||||
private String state;
|
||||
|
||||
public Store() {
|
||||
}
|
||||
|
||||
public Store(Long id, String name, String address, String info, String state) {
|
||||
this.id = id;
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
this.info = info;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
package com.shanzhu.market.entity.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@TableName("supplier")
|
||||
public class Supplier implements Serializable {
|
||||
public static final String STATE_NORMAL="0";
|
||||
public static final String STATE_BAN="-1";
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long cn;
|
||||
private String name;
|
||||
private String address;
|
||||
private String tel;
|
||||
private String info;
|
||||
private String state;
|
||||
|
||||
public Supplier() {
|
||||
}
|
||||
|
||||
public Supplier(Long cn, String name, String address, String tel, String info, String state) {
|
||||
this.cn = cn;
|
||||
this.name = name;
|
||||
this.address = address;
|
||||
this.tel = tel;
|
||||
this.info = info;
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(Long cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Map;
|
||||
|
||||
public class BaseQuery implements Serializable {
|
||||
private Integer currentPage=1;
|
||||
private Integer pageSize=3;
|
||||
private Map<String,Object> params;//其他请求参数
|
||||
public Integer getStart(){
|
||||
return (currentPage-1)*pageSize;
|
||||
}
|
||||
|
||||
public Integer getCurrentPage() {
|
||||
return currentPage;
|
||||
}
|
||||
|
||||
public void setCurrentPage(Integer currentPage) {
|
||||
this.currentPage = currentPage;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
|
||||
public Map<String, Object> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, Object> params) {
|
||||
this.params = params;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class MenuQuery extends BaseQuery {
|
||||
private String name;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryDept {
|
||||
private String name;
|
||||
private String state;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,22 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryDetailStorageSituation extends BaseQuery {
|
||||
private Long id;
|
||||
private Long storeId;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryDetailStoreGoods extends BaseQuery {
|
||||
private String cn;
|
||||
private String goodsName;
|
||||
private String state1;
|
||||
private String startCreateTime;
|
||||
private String endCreateTime;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getState1() {
|
||||
return state1;
|
||||
}
|
||||
|
||||
public void setState1(String state1) {
|
||||
this.state1 = state1;
|
||||
}
|
||||
|
||||
public String getStartCreateTime() {
|
||||
return startCreateTime;
|
||||
}
|
||||
|
||||
public void setStartCreateTime(String startCreateTime) {
|
||||
this.startCreateTime = startCreateTime;
|
||||
}
|
||||
|
||||
public String getEndCreateTime() {
|
||||
return endCreateTime;
|
||||
}
|
||||
|
||||
public void setEndCreateTime(String endCreateTime) {
|
||||
this.endCreateTime = endCreateTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryDetailStoreGoodsOut extends BaseQuery {
|
||||
private String cn;
|
||||
private String goodsName;
|
||||
private String state1;
|
||||
private String state;
|
||||
private String startCreateTime;
|
||||
private String endCreateTime;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getState1() {
|
||||
return state1;
|
||||
}
|
||||
|
||||
public void setState1(String state1) {
|
||||
this.state1 = state1;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getStartCreateTime() {
|
||||
return startCreateTime;
|
||||
}
|
||||
|
||||
public void setStartCreateTime(String startCreateTime) {
|
||||
this.startCreateTime = startCreateTime;
|
||||
}
|
||||
|
||||
public String getEndCreateTime() {
|
||||
return endCreateTime;
|
||||
}
|
||||
|
||||
public void setEndCreateTime(String endCreateTime) {
|
||||
this.endCreateTime = endCreateTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,33 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class QueryEditPwd implements Serializable {
|
||||
private String username;
|
||||
private String oldPwd;
|
||||
private String newPwd;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getOldPwd() {
|
||||
return oldPwd;
|
||||
}
|
||||
|
||||
public void setOldPwd(String oldPwd) {
|
||||
this.oldPwd = oldPwd;
|
||||
}
|
||||
|
||||
public String getNewPwd() {
|
||||
return newPwd;
|
||||
}
|
||||
|
||||
public void setNewPwd(String newPwd) {
|
||||
this.newPwd = newPwd;
|
||||
}
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryEmp extends BaseQuery {
|
||||
private String username;
|
||||
private String nickName;
|
||||
private String age;
|
||||
private String address;
|
||||
private String sex;
|
||||
private Long deptId;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(String age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryExchangePointProductsRecords extends BaseQuery {
|
||||
private String cn;
|
||||
private Long memberId;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public Long getMemberId() {
|
||||
return memberId;
|
||||
}
|
||||
|
||||
public void setMemberId(Long memberId) {
|
||||
this.memberId = memberId;
|
||||
}
|
||||
|
||||
public String getStartTime() {
|
||||
return startTime;
|
||||
}
|
||||
|
||||
public void setStartTime(String startTime) {
|
||||
this.startTime = startTime;
|
||||
}
|
||||
|
||||
public String getEndTime() {
|
||||
return endTime;
|
||||
}
|
||||
|
||||
public void setEndTime(String endTime) {
|
||||
this.endTime = endTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryGoods extends BaseQuery {
|
||||
private Long id;
|
||||
private String name;
|
||||
private Double sellPrice;
|
||||
private Long categoryId;
|
||||
private String state;
|
||||
private String operateStartTime;
|
||||
private String operateEndTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Double getSellPrice() {
|
||||
return sellPrice;
|
||||
}
|
||||
|
||||
public void setSellPrice(Double sellPrice) {
|
||||
this.sellPrice = sellPrice;
|
||||
}
|
||||
|
||||
public Long getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryId(Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getOperateStartTime() {
|
||||
return operateStartTime;
|
||||
}
|
||||
|
||||
public void setOperateStartTime(String operateStartTime) {
|
||||
this.operateStartTime = operateStartTime;
|
||||
}
|
||||
|
||||
public String getOperateEndTime() {
|
||||
return operateEndTime;
|
||||
}
|
||||
|
||||
public void setOperateEndTime(String operateEndTime) {
|
||||
this.operateEndTime = operateEndTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryGoodsCategory extends BaseQuery {
|
||||
private String name;
|
||||
private String state;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryGoodsStore extends BaseQuery {
|
||||
private String name;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryMember extends BaseQuery {
|
||||
private String phone;
|
||||
private String state;
|
||||
private String name;
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryNoticeIn extends BaseQuery {
|
||||
private String name;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryNoticeOut extends BaseQuery {
|
||||
private String name;
|
||||
private String state;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryPointProducts extends BaseQuery {
|
||||
private String name;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QuerySaleRecords extends BaseQuery {
|
||||
private String cn;
|
||||
private String startSellTime;
|
||||
private String endSellTime;
|
||||
private String type;
|
||||
private String sellway;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getStartSellTime() {
|
||||
return startSellTime;
|
||||
}
|
||||
|
||||
public void setStartSellTime(String startSellTime) {
|
||||
this.startSellTime = startSellTime;
|
||||
}
|
||||
|
||||
public String getEndSellTime() {
|
||||
return endSellTime;
|
||||
}
|
||||
|
||||
public void setEndSellTime(String endSellTime) {
|
||||
this.endSellTime = endSellTime;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getSellway() {
|
||||
return sellway;
|
||||
}
|
||||
|
||||
public void setSellway(String sellway) {
|
||||
this.sellway = sellway;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryStatisticSale extends BaseQuery {
|
||||
private String name;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QueryStorageSituation extends BaseQuery {
|
||||
private String name;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class QueryStore implements Serializable {
|
||||
private String name;
|
||||
private String state;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class QuerySupplier extends BaseQuery {
|
||||
private String name;
|
||||
private String address;
|
||||
private String info;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
package com.shanzhu.market.entity.query;
|
||||
|
||||
public class RoleQuery{
|
||||
private String name;
|
||||
private String state;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
}
|
@ -0,0 +1,184 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.Set;
|
||||
|
||||
public class DetailEmpVo implements Serializable {
|
||||
private Long id;
|
||||
private String sex;
|
||||
private Boolean isAdmin;
|
||||
private String username;
|
||||
private String nickName;
|
||||
private String password;
|
||||
private String headImg;
|
||||
private String state;
|
||||
private String info;
|
||||
private String createby;
|
||||
private String idCard;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date leaveTime;
|
||||
private String address;
|
||||
private String email;
|
||||
private Integer age;
|
||||
private Long deptId;
|
||||
private String deptName;
|
||||
//角色集合
|
||||
private Set<String> roleNames;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public Boolean getAdmin() {
|
||||
return isAdmin;
|
||||
}
|
||||
|
||||
public void setAdmin(Boolean admin) {
|
||||
isAdmin = admin;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public String getHeadImg() {
|
||||
return headImg;
|
||||
}
|
||||
|
||||
public void setHeadImg(String headImg) {
|
||||
this.headImg = headImg;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getCreateby() {
|
||||
return createby;
|
||||
}
|
||||
|
||||
public void setCreateby(String createby) {
|
||||
this.createby = createby;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getLeaveTime() {
|
||||
return leaveTime;
|
||||
}
|
||||
|
||||
public void setLeaveTime(Date leaveTime) {
|
||||
this.leaveTime = leaveTime;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Set<String> getRoleNames() {
|
||||
return roleNames;
|
||||
}
|
||||
|
||||
public void setRoleNames(Set<String> roleNames) {
|
||||
this.roleNames = roleNames;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 仓库存储情况
|
||||
*/
|
||||
public class DetailStorageSituationVo implements Serializable {
|
||||
private Long goodsId;
|
||||
private String goodsName;
|
||||
private Long residueNum; //商品数量
|
||||
private Long percentage=0L;
|
||||
public void setPercentage(Long total) {
|
||||
if (total==null ||total==0){
|
||||
this.percentage=0L;
|
||||
}else {
|
||||
String num=((this.residueNum*100.0)/total)+"";
|
||||
Long num1=Long.valueOf(num.split("\\.")[0]);
|
||||
this.percentage =num1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public Long getResidueNum() {
|
||||
return residueNum;
|
||||
}
|
||||
|
||||
public void setResidueNum(Long residueNum) {
|
||||
this.residueNum = residueNum;
|
||||
}
|
||||
|
||||
public Long getPercentage() {
|
||||
return percentage;
|
||||
}
|
||||
}
|
@ -0,0 +1,120 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
public class DetailStoreGoodsOutVo implements Serializable {
|
||||
private String cn;
|
||||
private Long goodsId;
|
||||
private Long goodsNum;
|
||||
private String goodsName;
|
||||
private Long createid;
|
||||
private String createby;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern ="yyyy-MM-dd" )
|
||||
private Date createTime;
|
||||
private String state;
|
||||
private String info;
|
||||
private Long storeId;
|
||||
private String storeName;
|
||||
private String state1;
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
public void setGoodsNum(Long goodsNum) {
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public Long getCreateid() {
|
||||
return createid;
|
||||
}
|
||||
|
||||
public void setCreateid(Long createid) {
|
||||
this.createid = createid;
|
||||
}
|
||||
|
||||
public String getCreateby() {
|
||||
return createby;
|
||||
}
|
||||
|
||||
public void setCreateby(String createby) {
|
||||
this.createby = createby;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
public void setStoreName(String storeName) {
|
||||
this.storeName = storeName;
|
||||
}
|
||||
|
||||
public String getState1() {
|
||||
return state1;
|
||||
}
|
||||
|
||||
public void setState1(String state1) {
|
||||
this.state1 = state1;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,170 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class DetailStoreGoodsVo implements Serializable {
|
||||
private String cn;
|
||||
private Long goodsId;
|
||||
private Long goodsNum;
|
||||
private String goodsName;
|
||||
private Double goodsPrice;
|
||||
private String info;
|
||||
private Long createid;
|
||||
private String createby;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern ="yyyy-MM-dd" )
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern ="yyyy-MM-dd" )
|
||||
private Date expiryTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern ="yyyy-MM-dd" )
|
||||
private Date birthTime;
|
||||
private String state1;
|
||||
private Long storeId;
|
||||
private String storeName;
|
||||
private String state;
|
||||
private Long supplierId;
|
||||
private String supplierName;
|
||||
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getGoodsNum() {
|
||||
return goodsNum;
|
||||
}
|
||||
|
||||
public void setGoodsNum(Long goodsNum) {
|
||||
this.goodsNum = goodsNum;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public Double getGoodsPrice() {
|
||||
return goodsPrice;
|
||||
}
|
||||
|
||||
public void setGoodsPrice(Double goodsPrice) {
|
||||
this.goodsPrice = goodsPrice;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Long getCreateid() {
|
||||
return createid;
|
||||
}
|
||||
|
||||
public void setCreateid(Long createid) {
|
||||
this.createid = createid;
|
||||
}
|
||||
|
||||
public String getCreateby() {
|
||||
return createby;
|
||||
}
|
||||
|
||||
public void setCreateby(String createby) {
|
||||
this.createby = createby;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
public Date getExpiryTime() {
|
||||
return expiryTime;
|
||||
}
|
||||
|
||||
public void setExpiryTime(Date expiryTime) {
|
||||
this.expiryTime = expiryTime;
|
||||
}
|
||||
|
||||
public Date getBirthTime() {
|
||||
return birthTime;
|
||||
}
|
||||
|
||||
public void setBirthTime(Date birthTime) {
|
||||
this.birthTime = birthTime;
|
||||
}
|
||||
|
||||
public String getState1() {
|
||||
return state1;
|
||||
}
|
||||
|
||||
public void setState1(String state1) {
|
||||
this.state1 = state1;
|
||||
}
|
||||
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
public void setStoreName(String storeName) {
|
||||
this.storeName = storeName;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getSupplierId() {
|
||||
return supplierId;
|
||||
}
|
||||
|
||||
public void setSupplierId(Long supplierId) {
|
||||
this.supplierId = supplierId;
|
||||
}
|
||||
|
||||
public String getSupplierName() {
|
||||
return supplierName;
|
||||
}
|
||||
|
||||
public void setSupplierName(String supplierName) {
|
||||
this.supplierName = supplierName;
|
||||
}
|
||||
}
|
@ -0,0 +1,122 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
public class EditEmpVo implements Serializable {
|
||||
private Long id;
|
||||
private String idCard;
|
||||
private String username;
|
||||
private String address;
|
||||
private String sex;
|
||||
private Integer age;
|
||||
private String nickName;
|
||||
private String headImg;
|
||||
private String state;
|
||||
private String info;
|
||||
private Long deptId;
|
||||
private String deptName;
|
||||
private Boolean isAdmin;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getHeadImg() {
|
||||
return headImg;
|
||||
}
|
||||
|
||||
public void setHeadImg(String headImg) {
|
||||
this.headImg = headImg;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
|
||||
public Boolean getAdmin() {
|
||||
return isAdmin;
|
||||
}
|
||||
|
||||
public void setAdmin(Boolean admin) {
|
||||
isAdmin = admin;
|
||||
}
|
||||
}
|
@ -0,0 +1,139 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class GoodsListVo implements Serializable {
|
||||
|
||||
/*商品编码*/
|
||||
private Long id;
|
||||
/*商品封面*/
|
||||
private String coverUrl;
|
||||
/*商品名称*/
|
||||
private String name;
|
||||
/*售价*/
|
||||
private Double sellPrice;
|
||||
/*批发价*/
|
||||
private Double purchashPrice;
|
||||
/*商品数量*/
|
||||
private Long residueNum;
|
||||
/*可用库存*/
|
||||
private Long residueStoreNum;
|
||||
/*商品类型*/
|
||||
private Long categoryId;
|
||||
private String categoryName;
|
||||
/*状态,下架、上架*/
|
||||
private String state;
|
||||
/*操作者*/
|
||||
private String updateby;
|
||||
private String info;
|
||||
/*操作时间*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date updateTime;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Double getSellPrice() {
|
||||
return sellPrice;
|
||||
}
|
||||
|
||||
public void setSellPrice(Double sellPrice) {
|
||||
this.sellPrice = sellPrice;
|
||||
}
|
||||
|
||||
public Double getPurchashPrice() {
|
||||
return purchashPrice;
|
||||
}
|
||||
|
||||
public void setPurchashPrice(Double purchashPrice) {
|
||||
this.purchashPrice = purchashPrice;
|
||||
}
|
||||
|
||||
public Long getResidueNum() {
|
||||
return residueNum;
|
||||
}
|
||||
|
||||
public void setResidueNum(Long residueNum) {
|
||||
this.residueNum = residueNum;
|
||||
}
|
||||
|
||||
public Long getResidueStoreNum() {
|
||||
return residueStoreNum;
|
||||
}
|
||||
|
||||
public void setResidueStoreNum(Long residueStoreNum) {
|
||||
this.residueStoreNum = residueStoreNum;
|
||||
}
|
||||
|
||||
public Long getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
|
||||
public void setCategoryId(Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getUpdateby() {
|
||||
return updateby;
|
||||
}
|
||||
|
||||
public void setUpdateby(String updateby) {
|
||||
this.updateby = updateby;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,51 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class GoodsStoreVo implements Serializable {
|
||||
private Long id;
|
||||
private String name; //商品名
|
||||
private String coverUrl; //商品封面
|
||||
private Long inventory;//需库存量
|
||||
private Long shelves;//货架商品数量
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public Long getInventory() {
|
||||
return inventory;
|
||||
}
|
||||
|
||||
public void setInventory(Long inventory) {
|
||||
this.inventory = inventory;
|
||||
}
|
||||
|
||||
public Long getShelves() {
|
||||
return shelves;
|
||||
}
|
||||
|
||||
public void setShelves(Long shelves) {
|
||||
this.shelves = shelves;
|
||||
}
|
||||
}
|
@ -0,0 +1,114 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
public class InformationVo implements Serializable {
|
||||
private Long id;
|
||||
private String sex;
|
||||
private String username;
|
||||
private String nickName;
|
||||
private String headImg;
|
||||
private String info;
|
||||
private String address;
|
||||
private String email;
|
||||
private Integer age;
|
||||
private Long deptId;
|
||||
private String idCard;
|
||||
private String deptName;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(String sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public void setNickName(String nickName) {
|
||||
this.nickName = nickName;
|
||||
}
|
||||
|
||||
public String getHeadImg() {
|
||||
return headImg;
|
||||
}
|
||||
|
||||
public void setHeadImg(String headImg) {
|
||||
this.headImg = headImg;
|
||||
}
|
||||
|
||||
public String getInfo() {
|
||||
return info;
|
||||
}
|
||||
|
||||
public void setInfo(String info) {
|
||||
this.info = info;
|
||||
}
|
||||
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Integer getAge() {
|
||||
return age;
|
||||
}
|
||||
|
||||
public void setAge(Integer age) {
|
||||
this.age = age;
|
||||
}
|
||||
|
||||
public Long getDeptId() {
|
||||
return deptId;
|
||||
}
|
||||
|
||||
public void setDeptId(Long deptId) {
|
||||
this.deptId = deptId;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getDeptName() {
|
||||
return deptName;
|
||||
}
|
||||
|
||||
public void setDeptName(String deptName) {
|
||||
this.deptName = deptName;
|
||||
}
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
public class NoticeInNotNormalVo implements Serializable {
|
||||
private String cn;
|
||||
private String coverUrl;
|
||||
private Long goodsId;
|
||||
private Long untreatedNum;
|
||||
private String goodsName;
|
||||
private String state;
|
||||
private Long storeId;
|
||||
private String storeName;
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;//通知时间
|
||||
|
||||
public String getCn() {
|
||||
return cn;
|
||||
}
|
||||
|
||||
public void setCn(String cn) {
|
||||
this.cn = cn;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public Long getUntreatedNum() {
|
||||
return untreatedNum;
|
||||
}
|
||||
|
||||
public void setUntreatedNum(Long untreatedNum) {
|
||||
this.untreatedNum = untreatedNum;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
public void setStoreName(String storeName) {
|
||||
this.storeName = storeName;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
@ -0,0 +1,63 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 单个商品销售信息
|
||||
*/
|
||||
public class SaleGoodsVo implements Serializable {
|
||||
private Long goodsId;
|
||||
private String goodsName;
|
||||
private String coverUrl;
|
||||
private Long salesVolume;//销量
|
||||
private Long percentage=0L;
|
||||
public void setPercentage(Long total) {
|
||||
if (total==null || total==0){
|
||||
this.percentage=0L;
|
||||
}else {
|
||||
if (this.salesVolume==null){
|
||||
this.salesVolume=0L;
|
||||
}
|
||||
String num=((this.salesVolume*100.0)/total)+"";
|
||||
Long num1=Long.valueOf(num.split("\\.")[0]);
|
||||
this.percentage =num1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Long getGoodsId() {
|
||||
return goodsId;
|
||||
}
|
||||
|
||||
public void setGoodsId(Long goodsId) {
|
||||
this.goodsId = goodsId;
|
||||
}
|
||||
|
||||
public String getGoodsName() {
|
||||
return goodsName;
|
||||
}
|
||||
|
||||
public void setGoodsName(String goodsName) {
|
||||
this.goodsName = goodsName;
|
||||
}
|
||||
|
||||
public String getCoverUrl() {
|
||||
return coverUrl;
|
||||
}
|
||||
|
||||
public void setCoverUrl(String coverUrl) {
|
||||
this.coverUrl = coverUrl;
|
||||
}
|
||||
|
||||
public Long getSalesVolume() {
|
||||
return salesVolume;
|
||||
}
|
||||
|
||||
public void setSalesVolume(Long salesVolume) {
|
||||
this.salesVolume = salesVolume;
|
||||
}
|
||||
|
||||
public Long getPercentage() {
|
||||
return percentage;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 商品销售量统计
|
||||
*/
|
||||
public class SalesStatisticsVo implements Serializable {
|
||||
private Long total; //所有商品总售卖量
|
||||
private Page<SaleGoodsVo> vos;
|
||||
|
||||
public Long getTotal() {
|
||||
return total;
|
||||
}
|
||||
|
||||
public void setTotal(Long total) {
|
||||
this.total = total;
|
||||
}
|
||||
|
||||
public Page<SaleGoodsVo> getVos() {
|
||||
return vos;
|
||||
}
|
||||
|
||||
public void setVos(Page<SaleGoodsVo> vos) {
|
||||
this.vos = vos;
|
||||
}
|
||||
}
|
@ -0,0 +1,36 @@
|
||||
package com.shanzhu.market.entity.vo;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 仓库存储情况
|
||||
*/
|
||||
public class StorageSituationVo implements Serializable {
|
||||
private Long storeId;
|
||||
private String storeName;
|
||||
private Long residueNum; //该仓库存储商品数量
|
||||
|
||||
public Long getStoreId() {
|
||||
return storeId;
|
||||
}
|
||||
|
||||
public void setStoreId(Long storeId) {
|
||||
this.storeId = storeId;
|
||||
}
|
||||
|
||||
public String getStoreName() {
|
||||
return storeName;
|
||||
}
|
||||
|
||||
public void setStoreName(String storeName) {
|
||||
this.storeName = storeName;
|
||||
}
|
||||
|
||||
public Long getResidueNum() {
|
||||
return residueNum;
|
||||
}
|
||||
|
||||
public void setResidueNum(Long residueNum) {
|
||||
this.residueNum = residueNum;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
package com.shanzhu.market.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.shanzhu.market.common.redis.constants.RedisKeys;
|
||||
import com.shanzhu.market.common.redis.service.RedisTemplateService;
|
||||
import com.shanzhu.market.entity.domain.GoodsCategory;
|
||||
import com.shanzhu.market.service.IGoodsCategoryService;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
public class CacheDataJob {
|
||||
|
||||
@Resource
|
||||
private RedisTemplateService redisTemplateService;
|
||||
|
||||
@Resource
|
||||
private IGoodsCategoryService goodsCategoryService;
|
||||
|
||||
@Scheduled(cron = "0 0 1 * * ?") //每天凌晨1点执行一次
|
||||
public void cache_category(){
|
||||
System.out.println("被执行。。。。");
|
||||
QueryWrapper<GoodsCategory> wrapper = new QueryWrapper<GoodsCategory>()
|
||||
.eq("state", GoodsCategory.STATE_NORMAL);
|
||||
List<GoodsCategory> list = goodsCategoryService.list(wrapper);
|
||||
if (list==null ||list.size()<=0){
|
||||
return;
|
||||
}
|
||||
String cacheKey = RedisKeys.GOODS_CATEGORY.join();
|
||||
for (GoodsCategory goodsCategory : list) {
|
||||
redisTemplateService.setCacheMapValue(cacheKey,goodsCategory.getId().toString(),goodsCategory);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.shanzhu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.shanzhu.market.entity.domain.Dept;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface DeptMapper extends BaseMapper<Dept> {
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.shanzhu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.shanzhu.market.entity.domain.DetailSaleRecords;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface DetailSaleRecordsMapper extends BaseMapper<DetailSaleRecords> {
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.shanzhu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.shanzhu.market.entity.domain.DetailStoreGoods;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface DetailStoreGoodsMapper extends BaseMapper<DetailStoreGoods> {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.shanzhu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.shanzhu.market.entity.domain.Employee;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface EmployeeMapper extends BaseMapper<Employee> {
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package com.shanzhu.market.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.shanzhu.market.entity.domain.ExchangePointProducts;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface ExchangePointProductsMapper extends BaseMapper<ExchangePointProducts> {
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue