mirror of
https://gitee.com/dromara/RuoYi-Vue-Plus.git
synced 2026-09-18 09:35:29 +08:00
调整
This commit is contained in:
parent
4bf49f1b66
commit
72fae52435
@ -1,23 +0,0 @@
|
|||||||
<?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">
|
|
||||||
<parent>
|
|
||||||
<artifactId>ruoyi-vue-plus</artifactId>
|
|
||||||
<groupId>org.dromara</groupId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>ruoyi-mall</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<artifactId>ruoyi-saas-app</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
ruoyi-saas-app 业务模块
|
|
||||||
</description>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
<?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">
|
|
||||||
<parent>
|
|
||||||
<artifactId>ruoyi-vue-plus</artifactId>
|
|
||||||
<groupId>ruoyi-saas-app</groupId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<modules>
|
|
||||||
<module>ruoyi-mall-admin</module>
|
|
||||||
<module>ruoyi-mall-common</module>
|
|
||||||
<module>ruoyi-mall-mbg</module>
|
|
||||||
</modules>
|
|
||||||
|
|
||||||
<artifactId>ruoyi-mall</artifactId>
|
|
||||||
<packaging>pom</packaging>
|
|
||||||
|
|
||||||
<description>
|
|
||||||
ruoyi-mall 业务模块
|
|
||||||
</description>
|
|
||||||
|
|
||||||
</project>
|
|
||||||
@ -1,80 +0,0 @@
|
|||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
|
|
||||||
<artifactId>ruoyi-mall-admin</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
|
|
||||||
<name>ruoyi-mall-admin</name>
|
|
||||||
<description>ruoyi-mall-admin project for mall</description>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>ruoyi-vue-plus</groupId>
|
|
||||||
<artifactId>ruoyi-mall</artifactId>
|
|
||||||
<version>${revision}</version>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.macro.mall</groupId>
|
|
||||||
<artifactId>mall-mbg</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.alibaba.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-data-redis</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>com.aliyun.oss</groupId>
|
|
||||||
<artifactId>aliyun-sdk-oss</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>io.minio</groupId>
|
|
||||||
<artifactId>minio</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.cloud</groupId>
|
|
||||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.dev33</groupId>
|
|
||||||
<artifactId>sa-token-spring-boot3-starter</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.dev33</groupId>
|
|
||||||
<artifactId>sa-token-redis-jackson</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.apache.commons</groupId>
|
|
||||||
<artifactId>commons-pool2</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>cn.dev33</groupId>
|
|
||||||
<artifactId>sa-token-jwt</artifactId>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
|
||||||
<groupId>de.codecentric</groupId>
|
|
||||||
<artifactId>spring-boot-admin-starter-client</artifactId>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<groupId>io.fabric8</groupId>
|
|
||||||
<artifactId>docker-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package com.macro.mall;
|
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
||||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 应用启动入口
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@EnableFeignClients
|
|
||||||
@EnableDiscoveryClient
|
|
||||||
@SpringBootApplication
|
|
||||||
public class MallAdminApplication {
|
|
||||||
public static void main(String[] args) {
|
|
||||||
SpringApplication.run(MallAdminApplication.class, args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,23 +0,0 @@
|
|||||||
package com.macro.mall.component;
|
|
||||||
|
|
||||||
import com.macro.mall.service.UmsResourceService;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import jakarta.annotation.PostConstruct;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 路径与资源访问对应关系操作组件
|
|
||||||
* Created by macro on 2020/7/17.
|
|
||||||
*/
|
|
||||||
@Component
|
|
||||||
public class PathResourceRulesHolder {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private UmsResourceService resourceService;
|
|
||||||
|
|
||||||
@PostConstruct
|
|
||||||
public void initPathResourceMap(){
|
|
||||||
resourceService.initPathResourceMap();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package com.macro.mall.config;
|
|
||||||
|
|
||||||
import org.mybatis.spring.annotation.MapperScan;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MyBatis相关配置
|
|
||||||
* Created by macro on 2019/4/8.
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
@EnableTransactionManagement
|
|
||||||
@MapperScan({"com.macro.mall.mapper","com.macro.mall.dao"})
|
|
||||||
public class MyBatisConfig {
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.macro.mall.config;
|
|
||||||
|
|
||||||
import com.aliyun.oss.OSSClient;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* OSS对象存储相关配置
|
|
||||||
* Created by macro on 2018/5/17.
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class OssConfig {
|
|
||||||
@Value("${aliyun.oss.endpoint}")
|
|
||||||
private String ALIYUN_OSS_ENDPOINT;
|
|
||||||
@Value("${aliyun.oss.accessKeyId}")
|
|
||||||
private String ALIYUN_OSS_ACCESSKEYID;
|
|
||||||
@Value("${aliyun.oss.accessKeySecret}")
|
|
||||||
private String ALIYUN_OSS_ACCESSKEYSECRET;
|
|
||||||
@Bean
|
|
||||||
public OSSClient ossClient(){
|
|
||||||
return new OSSClient(ALIYUN_OSS_ENDPOINT,ALIYUN_OSS_ACCESSKEYID,ALIYUN_OSS_ACCESSKEYSECRET);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package com.macro.mall.config;
|
|
||||||
|
|
||||||
import com.macro.mall.common.config.BaseRedisConfig;
|
|
||||||
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.repository.configuration.EnableRedisRepositories;
|
|
||||||
import org.springframework.data.redis.serializer.Jackson2JsonRedisSerializer;
|
|
||||||
import org.springframework.data.redis.serializer.StringRedisSerializer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Redis相关配置
|
|
||||||
* Created by macro on 2020/6/19.
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class RedisConfig extends BaseRedisConfig {
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
package com.macro.mall.config;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.jwt.StpLogicJwtForSimple;
|
|
||||||
import cn.dev33.satoken.stp.StpLogic;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @auther macrozheng
|
|
||||||
* @description Sa-Token相关配置
|
|
||||||
* @date 2023/11/28
|
|
||||||
* @github https://github.com/macrozheng
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class SaTokenConfigure {
|
|
||||||
// Sa-Token 整合 jwt (Simple 简单模式)
|
|
||||||
@Bean
|
|
||||||
public StpLogic getStpLogicJwt() {
|
|
||||||
return new StpLogicJwtForSimple();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,68 +0,0 @@
|
|||||||
package com.macro.mall.config;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.models.Components;
|
|
||||||
import io.swagger.v3.oas.models.ExternalDocumentation;
|
|
||||||
import io.swagger.v3.oas.models.OpenAPI;
|
|
||||||
import io.swagger.v3.oas.models.info.Info;
|
|
||||||
import io.swagger.v3.oas.models.info.License;
|
|
||||||
import io.swagger.v3.oas.models.security.SecurityRequirement;
|
|
||||||
import io.swagger.v3.oas.models.security.SecurityScheme;
|
|
||||||
import org.springdoc.core.customizers.GlobalOpenApiCustomizer;
|
|
||||||
import org.springframework.context.annotation.Bean;
|
|
||||||
import org.springframework.context.annotation.Configuration;
|
|
||||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
|
||||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* SpringDoc相关配置
|
|
||||||
* Created by macro on 2024/3/5.
|
|
||||||
*/
|
|
||||||
@Configuration
|
|
||||||
public class SpringDocConfig implements WebMvcConfigurer {
|
|
||||||
|
|
||||||
private static final String SECURITY_SCHEME_NAME = "Authorization";
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public OpenAPI mallAdminOpenAPI() {
|
|
||||||
return new OpenAPI()
|
|
||||||
.info(new Info().title("mall后台系统")
|
|
||||||
.description("mall后台相关接口文档")
|
|
||||||
.version("v1.0.0")
|
|
||||||
.license(new License().name("Apache 2.0")
|
|
||||||
.url("https://github.com/macrozheng/mall-learning")))
|
|
||||||
.externalDocs(new ExternalDocumentation()
|
|
||||||
.description("SpringBoot实战电商项目mall(60K+Star)全套文档")
|
|
||||||
.url("http://www.macrozheng.com"))
|
|
||||||
.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME))
|
|
||||||
.components(new Components()
|
|
||||||
.addSecuritySchemes(SECURITY_SCHEME_NAME,
|
|
||||||
new SecurityScheme()
|
|
||||||
.name(SECURITY_SCHEME_NAME)
|
|
||||||
.type(SecurityScheme.Type.HTTP)
|
|
||||||
.scheme("bearer")
|
|
||||||
.bearerFormat("JWT")));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void addViewControllers(ViewControllerRegistry registry) {
|
|
||||||
//配置访问`/swagger-ui/`路径时可以直接跳转到`/swagger-ui/index.html`
|
|
||||||
registry.addViewController("/swagger-ui/").setViewName("redirect:/swagger-ui/index.html");
|
|
||||||
}
|
|
||||||
|
|
||||||
@Bean
|
|
||||||
public GlobalOpenApiCustomizer orderGlobalOpenApiCustomizer() {
|
|
||||||
//解决Knife4j配置认证后无法自动添加认证头的问题
|
|
||||||
return openApi -> {
|
|
||||||
//全局添加鉴权参数
|
|
||||||
if (openApi.getPaths() != null) {
|
|
||||||
openApi.getPaths().forEach((s, pathItem) -> {
|
|
||||||
pathItem.readOperations().forEach(operation -> {
|
|
||||||
operation.addSecurityItem(new SecurityRequirement().addList(SECURITY_SCHEME_NAME));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.CmsPrefrenceArea;
|
|
||||||
import com.macro.mall.service.CmsPrefrenceAreaService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品优选管理Controller
|
|
||||||
* Created by macro on 2018/6/1.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "CmsPrefrenceAreaController", description = "商品优选管理")
|
|
||||||
@RequestMapping("/prefrenceArea")
|
|
||||||
public class CmsPrefrenceAreaController {
|
|
||||||
@Autowired
|
|
||||||
private CmsPrefrenceAreaService prefrenceAreaService;
|
|
||||||
|
|
||||||
@Operation(summary = "获取所有商品优选")
|
|
||||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<CmsPrefrenceArea>> listAll() {
|
|
||||||
List<CmsPrefrenceArea> prefrenceAreaList = prefrenceAreaService.listAll();
|
|
||||||
return CommonResult.success(prefrenceAreaList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,47 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.CmsSubject;
|
|
||||||
import com.macro.mall.service.CmsSubjectService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品专题管理Controller
|
|
||||||
* Created by macro on 2018/6/1.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "CmsSubjectController", description = "商品专题管理")
|
|
||||||
@RequestMapping("/subject")
|
|
||||||
public class CmsSubjectController {
|
|
||||||
@Autowired
|
|
||||||
private CmsSubjectService subjectService;
|
|
||||||
|
|
||||||
@Operation(summary = "获取全部商品专题")
|
|
||||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<CmsSubject>> listAll() {
|
|
||||||
List<CmsSubject> subjectList = subjectService.listAll();
|
|
||||||
return CommonResult.success(subjectList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据专题名称分页获取专题")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<CmsSubject>> getList(@RequestParam(value = "keyword", required = false) String keyword,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
|
|
||||||
List<CmsSubject> subjectList = subjectService.list(keyword, pageNum, pageSize);
|
|
||||||
return CommonResult.success(CommonPage.restPage(subjectList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,115 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.BucketPolicyConfigDto;
|
|
||||||
import com.macro.mall.dto.MinioUploadDto;
|
|
||||||
import io.minio.*;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.slf4j.Logger;
|
|
||||||
import org.slf4j.LoggerFactory;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
|
||||||
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MinIO对象存储管理
|
|
||||||
* Created by macro on 2019/12/25.
|
|
||||||
*/
|
|
||||||
@Tag(name = "MinioController", description = "MinIO对象存储管理")
|
|
||||||
@Controller
|
|
||||||
@RequestMapping("/minio")
|
|
||||||
public class MinioController {
|
|
||||||
|
|
||||||
private static final Logger LOGGER = LoggerFactory.getLogger(MinioController.class);
|
|
||||||
@Value("${minio.endpoint}")
|
|
||||||
private String ENDPOINT;
|
|
||||||
@Value("${minio.bucketName}")
|
|
||||||
private String BUCKET_NAME;
|
|
||||||
@Value("${minio.accessKey}")
|
|
||||||
private String ACCESS_KEY;
|
|
||||||
@Value("${minio.secretKey}")
|
|
||||||
private String SECRET_KEY;
|
|
||||||
|
|
||||||
@Operation(summary = "文件上传")
|
|
||||||
@RequestMapping(value = "/upload", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult upload(@RequestPart("file") MultipartFile file) {
|
|
||||||
try {
|
|
||||||
//创建一个MinIO的Java客户端
|
|
||||||
MinioClient minioClient =MinioClient.builder()
|
|
||||||
.endpoint(ENDPOINT)
|
|
||||||
.credentials(ACCESS_KEY,SECRET_KEY)
|
|
||||||
.build();
|
|
||||||
boolean isExist = minioClient.bucketExists(BucketExistsArgs.builder().bucket(BUCKET_NAME).build());
|
|
||||||
if (isExist) {
|
|
||||||
LOGGER.info("存储桶已经存在!");
|
|
||||||
} else {
|
|
||||||
//创建存储桶并设置只读权限
|
|
||||||
minioClient.makeBucket(MakeBucketArgs.builder().bucket(BUCKET_NAME).build());
|
|
||||||
BucketPolicyConfigDto bucketPolicyConfigDto = createBucketPolicyConfigDto(BUCKET_NAME);
|
|
||||||
SetBucketPolicyArgs setBucketPolicyArgs = SetBucketPolicyArgs.builder()
|
|
||||||
.bucket(BUCKET_NAME)
|
|
||||||
.config(JSONUtil.toJsonStr(bucketPolicyConfigDto))
|
|
||||||
.build();
|
|
||||||
minioClient.setBucketPolicy(setBucketPolicyArgs);
|
|
||||||
}
|
|
||||||
String filename = file.getOriginalFilename();
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
|
|
||||||
// 设置存储对象名称
|
|
||||||
String objectName = sdf.format(new Date()) + "/" + filename;
|
|
||||||
// 使用putObject上传一个文件到存储桶中
|
|
||||||
PutObjectArgs putObjectArgs = PutObjectArgs.builder()
|
|
||||||
.bucket(BUCKET_NAME)
|
|
||||||
.object(objectName)
|
|
||||||
.contentType(file.getContentType())
|
|
||||||
.stream(file.getInputStream(), file.getSize(), ObjectWriteArgs.MIN_MULTIPART_SIZE).build();
|
|
||||||
minioClient.putObject(putObjectArgs);
|
|
||||||
LOGGER.info("文件上传成功!");
|
|
||||||
MinioUploadDto minioUploadDto = new MinioUploadDto();
|
|
||||||
minioUploadDto.setName(filename);
|
|
||||||
minioUploadDto.setUrl(ENDPOINT + "/" + BUCKET_NAME + "/" + objectName);
|
|
||||||
return CommonResult.success(minioUploadDto);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
LOGGER.info("上传发生错误: {}!", e.getMessage());
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
private BucketPolicyConfigDto createBucketPolicyConfigDto(String bucketName) {
|
|
||||||
BucketPolicyConfigDto.Statement statement = BucketPolicyConfigDto.Statement.builder()
|
|
||||||
.Effect("Allow")
|
|
||||||
.Principal("*")
|
|
||||||
.Action("s3:GetObject")
|
|
||||||
.Resource("arn:aws:s3:::"+bucketName+"/*.**").build();
|
|
||||||
return BucketPolicyConfigDto.builder()
|
|
||||||
.Version("2012-10-17")
|
|
||||||
.Statement(CollUtil.toList(statement))
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "文件删除")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("objectName") String objectName) {
|
|
||||||
try {
|
|
||||||
MinioClient minioClient = MinioClient.builder()
|
|
||||||
.endpoint(ENDPOINT)
|
|
||||||
.credentials(ACCESS_KEY,SECRET_KEY)
|
|
||||||
.build();
|
|
||||||
minioClient.removeObject(RemoveObjectArgs.builder().bucket(BUCKET_NAME).object(objectName).build());
|
|
||||||
return CommonResult.success(null);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,35 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.OmsCompanyAddress;
|
|
||||||
import com.macro.mall.service.OmsCompanyAddressService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 收货地址管理Controller
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "OmsCompanyAddressController", description = "收货地址管理")
|
|
||||||
@RequestMapping("/companyAddress")
|
|
||||||
public class OmsCompanyAddressController {
|
|
||||||
@Autowired
|
|
||||||
private OmsCompanyAddressService companyAddressService;
|
|
||||||
|
|
||||||
@Operation(summary = "获取所有收货地址")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<OmsCompanyAddress>> list() {
|
|
||||||
List<OmsCompanyAddress> companyAddressList = companyAddressService.list();
|
|
||||||
return CommonResult.success(companyAddressList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,113 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.*;
|
|
||||||
import com.macro.mall.model.OmsOrder;
|
|
||||||
import com.macro.mall.service.OmsOrderService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单管理Controller
|
|
||||||
* Created by macro on 2018/10/11.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "OmsOrderController", description = "订单管理")
|
|
||||||
@RequestMapping("/order")
|
|
||||||
public class OmsOrderController {
|
|
||||||
@Autowired
|
|
||||||
private OmsOrderService orderService;
|
|
||||||
|
|
||||||
@Operation(summary = "查询订单")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<OmsOrder>> list(OmsOrderQueryParam queryParam,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<OmsOrder> orderList = orderService.list(queryParam, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(orderList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量发货")
|
|
||||||
@RequestMapping(value = "/update/delivery", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delivery(@RequestBody List<OmsOrderDeliveryParam> deliveryParamList) {
|
|
||||||
int count = orderService.delivery(deliveryParamList);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量关闭订单")
|
|
||||||
@RequestMapping(value = "/update/close", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult close(@RequestParam("ids") List<Long> ids, @RequestParam String note) {
|
|
||||||
int count = orderService.close(ids, note);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除订单")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = orderService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取订单详情:订单信息、商品信息、操作记录")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<OmsOrderDetail> detail(@PathVariable Long id) {
|
|
||||||
OmsOrderDetail orderDetailResult = orderService.detail(id);
|
|
||||||
return CommonResult.success(orderDetailResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改收货人信息")
|
|
||||||
@RequestMapping(value = "/update/receiverInfo", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateReceiverInfo(@RequestBody OmsReceiverInfoParam receiverInfoParam) {
|
|
||||||
int count = orderService.updateReceiverInfo(receiverInfoParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改订单费用信息")
|
|
||||||
@RequestMapping(value = "/update/moneyInfo", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateReceiverInfo(@RequestBody OmsMoneyInfoParam moneyInfoParam) {
|
|
||||||
int count = orderService.updateMoneyInfo(moneyInfoParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "备注订单")
|
|
||||||
@RequestMapping(value = "/update/note", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateNote(@RequestParam("id") Long id,
|
|
||||||
@RequestParam("note") String note,
|
|
||||||
@RequestParam("status") Integer status) {
|
|
||||||
int count = orderService.updateNote(id, note, status);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.OmsOrderReturnApplyResult;
|
|
||||||
import com.macro.mall.dto.OmsReturnApplyQueryParam;
|
|
||||||
import com.macro.mall.dto.OmsUpdateStatusParam;
|
|
||||||
import com.macro.mall.model.OmsOrderReturnApply;
|
|
||||||
import com.macro.mall.service.OmsOrderReturnApplyService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单退货申请管理
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "OmsOrderReturnApplyController", description = "订单退货申请管理")
|
|
||||||
@RequestMapping("/returnApply")
|
|
||||||
public class OmsOrderReturnApplyController {
|
|
||||||
@Autowired
|
|
||||||
private OmsOrderReturnApplyService returnApplyService;
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询退货申请")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<OmsOrderReturnApply>> list(OmsReturnApplyQueryParam queryParam,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<OmsOrderReturnApply> returnApplyList = returnApplyService.list(queryParam, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(returnApplyList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除申请")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = returnApplyService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取退货申请详情")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult getItem(@PathVariable Long id) {
|
|
||||||
OmsOrderReturnApplyResult result = returnApplyService.getItem(id);
|
|
||||||
return CommonResult.success(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改申请状态")
|
|
||||||
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam) {
|
|
||||||
int count = returnApplyService.updateStatus(id, statusParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,88 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.OmsOrderReturnReason;
|
|
||||||
import com.macro.mall.service.OmsOrderReturnReasonService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退货原因管理Controller
|
|
||||||
* Created by macro on 2018/10/17.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "OmsOrderReturnReasonController", description = "退货原因管理")
|
|
||||||
@RequestMapping("/returnReason")
|
|
||||||
public class OmsOrderReturnReasonController {
|
|
||||||
@Autowired
|
|
||||||
private OmsOrderReturnReasonService orderReturnReasonService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加退货原因")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody OmsOrderReturnReason returnReason) {
|
|
||||||
int count = orderReturnReasonService.create(returnReason);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改退货原因")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) {
|
|
||||||
int count = orderReturnReasonService.update(id, returnReason);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除退货原因")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = orderReturnReasonService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询全部退货原因")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<OmsOrderReturnReason>> list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<OmsOrderReturnReason> reasonList = orderReturnReasonService.list(pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(reasonList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取单个退货原因详情信息")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<OmsOrderReturnReason> getItem(@PathVariable Long id) {
|
|
||||||
OmsOrderReturnReason reason = orderReturnReasonService.getItem(id);
|
|
||||||
return CommonResult.success(reason);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改退货原因启用状态")
|
|
||||||
@RequestMapping(value = "/update/status", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateStatus(@RequestParam(value = "status") Integer status,
|
|
||||||
@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = orderReturnReasonService.updateStatus(ids, status);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,42 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.OmsOrderSetting;
|
|
||||||
import com.macro.mall.service.OmsOrderSettingService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单设置Controller
|
|
||||||
* Created by macro on 2018/10/16.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "OmsOrderSettingController", description = "订单设置管理")
|
|
||||||
@RequestMapping("/orderSetting")
|
|
||||||
public class OmsOrderSettingController {
|
|
||||||
@Autowired
|
|
||||||
private OmsOrderSettingService orderSettingService;
|
|
||||||
|
|
||||||
@Operation(summary = "获取指定订单设置")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<OmsOrderSetting> getItem(@PathVariable Long id) {
|
|
||||||
OmsOrderSetting orderSetting = orderSettingService.getItem(id);
|
|
||||||
return CommonResult.success(orderSetting);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改指定订单设置")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody OmsOrderSetting orderSetting) {
|
|
||||||
int count = orderSettingService.update(id,orderSetting);
|
|
||||||
if(count>0){
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.OssCallbackResult;
|
|
||||||
import com.macro.mall.dto.OssPolicyResult;
|
|
||||||
import com.macro.mall.service.impl.OssServiceImpl;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Oss相关操作接口
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "OssController", description = "Oss管理")
|
|
||||||
@RequestMapping("/aliyun/oss")
|
|
||||||
public class OssController {
|
|
||||||
@Autowired
|
|
||||||
private OssServiceImpl ossService;
|
|
||||||
|
|
||||||
@Operation(summary = "oss上传签名生成")
|
|
||||||
@RequestMapping(value = "/policy", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<OssPolicyResult> policy() {
|
|
||||||
OssPolicyResult result = ossService.policy();
|
|
||||||
return CommonResult.success(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "oss上传成功回调")
|
|
||||||
@RequestMapping(value = "callback", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<OssCallbackResult> callback(HttpServletRequest request) {
|
|
||||||
OssCallbackResult ossCallbackResult = ossService.callback(request);
|
|
||||||
return CommonResult.success(ossCallbackResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,131 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.PmsBrandParam;
|
|
||||||
import com.macro.mall.model.PmsBrand;
|
|
||||||
import com.macro.mall.service.PmsBrandService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 品牌功能Controller
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "PmsBrandController", description = "商品品牌管理")
|
|
||||||
@RequestMapping("/brand")
|
|
||||||
public class PmsBrandController {
|
|
||||||
@Autowired
|
|
||||||
private PmsBrandService brandService;
|
|
||||||
|
|
||||||
@Operation(summary = "获取全部品牌列表")
|
|
||||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<PmsBrand>> getList() {
|
|
||||||
return CommonResult.success(brandService.listAllBrand());
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "添加品牌")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@Validated @RequestBody PmsBrandParam pmsBrand) {
|
|
||||||
CommonResult commonResult;
|
|
||||||
int count = brandService.createBrand(pmsBrand);
|
|
||||||
if (count == 1) {
|
|
||||||
commonResult = CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
commonResult = CommonResult.failed();
|
|
||||||
}
|
|
||||||
return commonResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "更新品牌")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable("id") Long id,
|
|
||||||
@Validated @RequestBody PmsBrandParam pmsBrandParam) {
|
|
||||||
CommonResult commonResult;
|
|
||||||
int count = brandService.updateBrand(id, pmsBrandParam);
|
|
||||||
if (count == 1) {
|
|
||||||
commonResult = CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
commonResult = CommonResult.failed();
|
|
||||||
}
|
|
||||||
return commonResult;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除品牌")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable("id") Long id) {
|
|
||||||
int count = brandService.deleteBrand(id);
|
|
||||||
if (count == 1) {
|
|
||||||
return CommonResult.success(null);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据品牌名称分页获取品牌列表")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<PmsBrand>> getList(@RequestParam(value = "keyword", required = false) String keyword,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
|
|
||||||
List<PmsBrand> brandList = brandService.listBrand(keyword, pageNum, pageSize);
|
|
||||||
return CommonResult.success(CommonPage.restPage(brandList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据编号查询品牌信息")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<PmsBrand> getItem(@PathVariable("id") Long id) {
|
|
||||||
return CommonResult.success(brandService.getBrand(id));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除品牌")
|
|
||||||
@RequestMapping(value = "/delete/batch", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult deleteBatch(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = brandService.deleteBrand(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量更新显示状态")
|
|
||||||
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateShowStatus(@RequestParam("ids") List<Long> ids,
|
|
||||||
@RequestParam("showStatus") Integer showStatus) {
|
|
||||||
int count = brandService.updateShowStatus(ids, showStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量更新厂家制造商状态")
|
|
||||||
@RequestMapping(value = "/update/factoryStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateFactoryStatus(@RequestParam("ids") List<Long> ids,
|
|
||||||
@RequestParam("factoryStatus") Integer factoryStatus) {
|
|
||||||
int count = brandService.updateFactoryStatus(ids, factoryStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.PmsProductAttributeCategoryItem;
|
|
||||||
import com.macro.mall.model.PmsProductAttributeCategory;
|
|
||||||
import com.macro.mall.service.PmsProductAttributeCategoryService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品属性分类Controller
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "PmsProductAttributeCategoryController", description = "商品属性分类管理")
|
|
||||||
@RequestMapping("/productAttribute/category")
|
|
||||||
public class PmsProductAttributeCategoryController {
|
|
||||||
@Autowired
|
|
||||||
private PmsProductAttributeCategoryService productAttributeCategoryService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加商品属性分类")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestParam String name) {
|
|
||||||
int count = productAttributeCategoryService.create(name);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改商品属性分类")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestParam String name) {
|
|
||||||
int count = productAttributeCategoryService.update(id, name);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除单个商品属性分类")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = productAttributeCategoryService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取单个商品属性分类信息")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<PmsProductAttributeCategory> getItem(@PathVariable Long id) {
|
|
||||||
PmsProductAttributeCategory productAttributeCategory = productAttributeCategoryService.getItem(id);
|
|
||||||
return CommonResult.success(productAttributeCategory);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页获取所有商品属性分类")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<PmsProductAttributeCategory>> getList(@RequestParam(defaultValue = "5") Integer pageSize, @RequestParam(defaultValue = "1") Integer pageNum) {
|
|
||||||
List<PmsProductAttributeCategory> productAttributeCategoryList = productAttributeCategoryService.getList(pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(productAttributeCategoryList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取所有商品属性分类及其下属性")
|
|
||||||
@RequestMapping(value = "/list/withAttr", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<PmsProductAttributeCategoryItem>> getListWithAttr() {
|
|
||||||
List<PmsProductAttributeCategoryItem> productAttributeCategoryResultList = productAttributeCategoryService.getListWithAttr();
|
|
||||||
return CommonResult.success(productAttributeCategoryResultList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,95 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.PmsProductAttributeParam;
|
|
||||||
import com.macro.mall.dto.ProductAttrInfo;
|
|
||||||
import com.macro.mall.model.PmsProductAttribute;
|
|
||||||
import com.macro.mall.service.PmsProductAttributeService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameter;
|
|
||||||
import io.swagger.v3.oas.annotations.Parameters;
|
|
||||||
import io.swagger.v3.oas.annotations.enums.ParameterIn;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品属性管理Controller
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "PmsProductAttributeController", description = "商品属性管理")
|
|
||||||
@RequestMapping("/productAttribute")
|
|
||||||
public class PmsProductAttributeController {
|
|
||||||
@Autowired
|
|
||||||
private PmsProductAttributeService productAttributeService;
|
|
||||||
|
|
||||||
@Operation(summary = "根据分类查询属性列表或参数列表")
|
|
||||||
@Parameters({@Parameter(name = "type", description = "0表示属性,1表示参数", required = true,in = ParameterIn.QUERY, schema = @Schema(type = "integer"))})
|
|
||||||
@RequestMapping(value = "/list/{cid}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<PmsProductAttribute>> getList(@PathVariable Long cid,
|
|
||||||
@RequestParam(value = "type") Integer type,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<PmsProductAttribute> productAttributeList = productAttributeService.getList(cid, type, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(productAttributeList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "添加商品属性信息")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody PmsProductAttributeParam productAttributeParam) {
|
|
||||||
int count = productAttributeService.create(productAttributeParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改商品属性信息")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody PmsProductAttributeParam productAttributeParam) {
|
|
||||||
int count = productAttributeService.update(id, productAttributeParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "查询单个商品属性")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<PmsProductAttribute> getItem(@PathVariable Long id) {
|
|
||||||
PmsProductAttribute productAttribute = productAttributeService.getItem(id);
|
|
||||||
return CommonResult.success(productAttribute);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除商品属性")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = productAttributeService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据商品分类的id获取商品属性及属性分类")
|
|
||||||
@RequestMapping(value = "/attrInfo/{productCategoryId}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<ProductAttrInfo>> getAttrInfo(@PathVariable Long productCategoryId) {
|
|
||||||
List<ProductAttrInfo> productAttrInfoList = productAttributeService.getProductAttrInfo(productCategoryId);
|
|
||||||
return CommonResult.success(productAttrInfoList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,117 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.PmsProductCategoryParam;
|
|
||||||
import com.macro.mall.dto.PmsProductCategoryWithChildrenItem;
|
|
||||||
import com.macro.mall.model.PmsProductCategory;
|
|
||||||
import com.macro.mall.service.PmsProductCategoryService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品分类模块Controller
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "PmsProductCategoryController", description = "商品分类管理")
|
|
||||||
@RequestMapping("/productCategory")
|
|
||||||
public class PmsProductCategoryController {
|
|
||||||
@Autowired
|
|
||||||
private PmsProductCategoryService productCategoryService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加产品分类")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@Validated @RequestBody PmsProductCategoryParam productCategoryParam) {
|
|
||||||
int count = productCategoryService.create(productCategoryParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改商品分类")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id,
|
|
||||||
@Validated
|
|
||||||
@RequestBody PmsProductCategoryParam productCategoryParam) {
|
|
||||||
int count = productCategoryService.update(id, productCategoryParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询商品分类")
|
|
||||||
@RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<PmsProductCategory>> getList(@PathVariable Long parentId,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<PmsProductCategory> productCategoryList = productCategoryService.getList(parentId, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(productCategoryList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据id获取商品分类")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<PmsProductCategory> getItem(@PathVariable Long id) {
|
|
||||||
PmsProductCategory productCategory = productCategoryService.getItem(id);
|
|
||||||
return CommonResult.success(productCategory);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除商品分类")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = productCategoryService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改导航栏显示状态")
|
|
||||||
@RequestMapping(value = "/update/navStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateNavStatus(@RequestParam("ids") List<Long> ids, @RequestParam("navStatus") Integer navStatus) {
|
|
||||||
int count = productCategoryService.updateNavStatus(ids, navStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改显示状态")
|
|
||||||
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateShowStatus(@RequestParam("ids") List<Long> ids, @RequestParam("showStatus") Integer showStatus) {
|
|
||||||
int count = productCategoryService.updateShowStatus(ids, showStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "查询所有一级分类及子分类")
|
|
||||||
@RequestMapping(value = "/list/withChildren", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<PmsProductCategoryWithChildrenItem>> listWithChildren() {
|
|
||||||
List<PmsProductCategoryWithChildrenItem> list = productCategoryService.listWithChildren();
|
|
||||||
return CommonResult.success(list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,145 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.PmsProductParam;
|
|
||||||
import com.macro.mall.dto.PmsProductQueryParam;
|
|
||||||
import com.macro.mall.dto.PmsProductResult;
|
|
||||||
import com.macro.mall.model.PmsProduct;
|
|
||||||
import com.macro.mall.service.PmsProductService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品管理Controller
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "PmsProductController", description = "商品管理")
|
|
||||||
@RequestMapping("/product")
|
|
||||||
public class PmsProductController {
|
|
||||||
@Autowired
|
|
||||||
private PmsProductService productService;
|
|
||||||
|
|
||||||
@Operation(summary = "创建商品")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody PmsProductParam productParam) {
|
|
||||||
int count = productService.create(productParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据商品id获取商品编辑信息")
|
|
||||||
@RequestMapping(value = "/updateInfo/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<PmsProductResult> getUpdateInfo(@PathVariable Long id) {
|
|
||||||
PmsProductResult productResult = productService.getUpdateInfo(id);
|
|
||||||
return CommonResult.success(productResult);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "更新商品")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody PmsProductParam productParam) {
|
|
||||||
int count = productService.update(id, productParam);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "查询商品")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<PmsProduct>> getList(PmsProductQueryParam productQueryParam,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<PmsProduct> productList = productService.list(productQueryParam, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(productList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据商品名称或货号模糊查询")
|
|
||||||
@RequestMapping(value = "/simpleList", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<PmsProduct>> getList(String keyword) {
|
|
||||||
List<PmsProduct> productList = productService.list(keyword);
|
|
||||||
return CommonResult.success(productList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量修改审核状态")
|
|
||||||
@RequestMapping(value = "/update/verifyStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateVerifyStatus(@RequestParam("ids") List<Long> ids,
|
|
||||||
@RequestParam("verifyStatus") Integer verifyStatus,
|
|
||||||
@RequestParam("detail") String detail) {
|
|
||||||
int count = productService.updateVerifyStatus(ids, verifyStatus, detail);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量上下架")
|
|
||||||
@RequestMapping(value = "/update/publishStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updatePublishStatus(@RequestParam("ids") List<Long> ids,
|
|
||||||
@RequestParam("publishStatus") Integer publishStatus) {
|
|
||||||
int count = productService.updatePublishStatus(ids, publishStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量推荐商品")
|
|
||||||
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateRecommendStatus(@RequestParam("ids") List<Long> ids,
|
|
||||||
@RequestParam("recommendStatus") Integer recommendStatus) {
|
|
||||||
int count = productService.updateRecommendStatus(ids, recommendStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量设为新品")
|
|
||||||
@RequestMapping(value = "/update/newStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateNewStatus(@RequestParam("ids") List<Long> ids,
|
|
||||||
@RequestParam("newStatus") Integer newStatus) {
|
|
||||||
int count = productService.updateNewStatus(ids, newStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量修改删除状态")
|
|
||||||
@RequestMapping(value = "/update/deleteStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateDeleteStatus(@RequestParam("ids") List<Long> ids,
|
|
||||||
@RequestParam("deleteStatus") Integer deleteStatus) {
|
|
||||||
int count = productService.updateDeleteStatus(ids, deleteStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,44 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.PmsSkuStock;
|
|
||||||
import com.macro.mall.service.PmsSkuStockService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* sku库存Controller
|
|
||||||
* Created by macro on 2018/4/27.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "PmsSkuStockController", description = "sku商品库存管理")
|
|
||||||
@RequestMapping("/sku")
|
|
||||||
public class PmsSkuStockController {
|
|
||||||
@Autowired
|
|
||||||
private PmsSkuStockService skuStockService;
|
|
||||||
|
|
||||||
@Operation(summary = "根据商品编号及编号模糊搜索sku库存")
|
|
||||||
@RequestMapping(value = "/{pid}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<PmsSkuStock>> getList(@PathVariable Long pid, @RequestParam(value = "keyword",required = false) String keyword) {
|
|
||||||
List<PmsSkuStock> skuStockList = skuStockService.getList(pid, keyword);
|
|
||||||
return CommonResult.success(skuStockList);
|
|
||||||
}
|
|
||||||
@Operation(summary = "批量更新库存信息")
|
|
||||||
@RequestMapping(value ="/update/{pid}",method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long pid,@RequestBody List<PmsSkuStock> skuStockList){
|
|
||||||
int count = skuStockService.update(pid,skuStockList);
|
|
||||||
if(count>0){
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}else{
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.SmsCouponParam;
|
|
||||||
import com.macro.mall.model.SmsCoupon;
|
|
||||||
import com.macro.mall.service.SmsCouponService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 优惠券管理Controller
|
|
||||||
* Created by macro on 2018/8/28.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsCouponController", description = "优惠券管理")
|
|
||||||
@RequestMapping("/coupon")
|
|
||||||
public class SmsCouponController {
|
|
||||||
@Autowired
|
|
||||||
private SmsCouponService couponService;
|
|
||||||
@Operation(summary = "添加优惠券")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult add(@RequestBody SmsCouponParam couponParam) {
|
|
||||||
int count = couponService.create(couponParam);
|
|
||||||
if(count>0){
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除优惠券")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = couponService.delete(id);
|
|
||||||
if(count>0){
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改优惠券")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id,@RequestBody SmsCouponParam couponParam) {
|
|
||||||
int count = couponService.update(id,couponParam);
|
|
||||||
if(count>0){
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据优惠券名称和类型分页获取优惠券列表")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsCoupon>> list(
|
|
||||||
@RequestParam(value = "name",required = false) String name,
|
|
||||||
@RequestParam(value = "type",required = false) Integer type,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsCoupon> couponList = couponService.list(name,type,pageSize,pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(couponList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取单个优惠券的详细信息")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<SmsCouponParam> getItem(@PathVariable Long id) {
|
|
||||||
SmsCouponParam couponParam = couponService.getItem(id);
|
|
||||||
return CommonResult.success(couponParam);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.SmsCouponHistory;
|
|
||||||
import com.macro.mall.service.SmsCouponHistoryService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 优惠券领取记录管理Controller
|
|
||||||
* Created by macro on 2018/11/6.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsCouponHistoryController", description = "优惠券领取记录管理")
|
|
||||||
@RequestMapping("/couponHistory")
|
|
||||||
public class SmsCouponHistoryController {
|
|
||||||
@Autowired
|
|
||||||
private SmsCouponHistoryService historyService;
|
|
||||||
|
|
||||||
@Operation(summary = "根据优惠券id,使用状态,订单编号分页获取领取记录")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsCouponHistory>> list(@RequestParam(value = "couponId", required = false) Long couponId,
|
|
||||||
@RequestParam(value = "useStatus", required = false) Integer useStatus,
|
|
||||||
@RequestParam(value = "orderSn", required = false) String orderSn,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsCouponHistory> historyList = historyService.list(couponId, useStatus, orderSn, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(historyList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,87 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.SmsFlashPromotion;
|
|
||||||
import com.macro.mall.service.SmsFlashPromotionService;
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 限时购活动管理Controller
|
|
||||||
* Created by macro on 2018/11/16.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsFlashPromotionController", description = "限时购活动管理")
|
|
||||||
@RequestMapping("/flash")
|
|
||||||
public class SmsFlashPromotionController {
|
|
||||||
@Autowired
|
|
||||||
private SmsFlashPromotionService flashPromotionService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加活动")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody SmsFlashPromotion flashPromotion) {
|
|
||||||
int count = flashPromotionService.create(flashPromotion);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "编辑活动信息")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public Object update(@PathVariable Long id, @RequestBody SmsFlashPromotion flashPromotion) {
|
|
||||||
int count = flashPromotionService.update(id, flashPromotion);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除活动信息")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public Object delete(@PathVariable Long id) {
|
|
||||||
int count = flashPromotionService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改上下线状态")
|
|
||||||
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public Object update(@PathVariable Long id, Integer status) {
|
|
||||||
int count = flashPromotionService.updateStatus(id, status);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取活动详情")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public Object getItem(@PathVariable Long id) {
|
|
||||||
SmsFlashPromotion flashPromotion = flashPromotionService.getItem(id);
|
|
||||||
return CommonResult.success(flashPromotion);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据活动名称分页查询")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public Object getItem(@RequestParam(value = "keyword", required = false) String keyword,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsFlashPromotion> flashPromotionList = flashPromotionService.list(keyword, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(flashPromotionList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,79 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.SmsFlashPromotionProduct;
|
|
||||||
import com.macro.mall.model.SmsFlashPromotionProductRelation;
|
|
||||||
import com.macro.mall.service.SmsFlashPromotionProductRelationService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 限时购和商品关系管理Controller
|
|
||||||
* Created by macro on 2018/11/16.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsFlashPromotionProductRelationController", description = "限时购和商品关系管理")
|
|
||||||
@RequestMapping("/flashProductRelation")
|
|
||||||
public class SmsFlashPromotionProductRelationController {
|
|
||||||
@Autowired
|
|
||||||
private SmsFlashPromotionProductRelationService relationService;
|
|
||||||
|
|
||||||
@Operation(summary = "批量选择商品添加关联")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody List<SmsFlashPromotionProductRelation> relationList) {
|
|
||||||
int count = relationService.create(relationList);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改关联相关信息")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionProductRelation relation) {
|
|
||||||
int count = relationService.update(id, relation);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除关联")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = relationService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取管理商品促销信息")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<SmsFlashPromotionProductRelation> getItem(@PathVariable Long id) {
|
|
||||||
SmsFlashPromotionProductRelation relation = relationService.getItem(id);
|
|
||||||
return CommonResult.success(relation);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询不同场次关联及商品信息")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsFlashPromotionProduct>> list(@RequestParam(value = "flashPromotionId") Long flashPromotionId,
|
|
||||||
@RequestParam(value = "flashPromotionSessionId") Long flashPromotionSessionId,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsFlashPromotionProduct> flashPromotionProductList = relationService.list(flashPromotionId, flashPromotionSessionId, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(flashPromotionProductList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.SmsFlashPromotionSessionDetail;
|
|
||||||
import com.macro.mall.model.SmsFlashPromotionSession;
|
|
||||||
import com.macro.mall.service.SmsFlashPromotionSessionService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 限时购场次管理Controller
|
|
||||||
* Created by macro on 2018/11/16.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsFlashPromotionSessionController", description = "限时购场次管理")
|
|
||||||
@RequestMapping("/flashSession")
|
|
||||||
public class SmsFlashPromotionSessionController {
|
|
||||||
@Autowired
|
|
||||||
private SmsFlashPromotionSessionService flashPromotionSessionService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加场次")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody SmsFlashPromotionSession promotionSession) {
|
|
||||||
int count = flashPromotionSessionService.create(promotionSession);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改场次")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody SmsFlashPromotionSession promotionSession) {
|
|
||||||
int count = flashPromotionSessionService.update(id, promotionSession);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改启用状态")
|
|
||||||
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateStatus(@PathVariable Long id, Integer status) {
|
|
||||||
int count = flashPromotionSessionService.updateStatus(id, status);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除场次")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = flashPromotionSessionService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取场次详情")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<SmsFlashPromotionSession> getItem(@PathVariable Long id) {
|
|
||||||
SmsFlashPromotionSession promotionSession = flashPromotionSessionService.getItem(id);
|
|
||||||
return CommonResult.success(promotionSession);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取全部场次")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<SmsFlashPromotionSession>> list() {
|
|
||||||
List<SmsFlashPromotionSession> promotionSessionList = flashPromotionSessionService.list();
|
|
||||||
return CommonResult.success(promotionSessionList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取全部可选场次及其数量")
|
|
||||||
@RequestMapping(value = "/selectList", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<SmsFlashPromotionSessionDetail>> selectList(Long flashPromotionId) {
|
|
||||||
List<SmsFlashPromotionSessionDetail> promotionSessionList = flashPromotionSessionService.selectList(flashPromotionId);
|
|
||||||
return CommonResult.success(promotionSessionList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,86 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.SmsHomeAdvertise;
|
|
||||||
import com.macro.mall.service.SmsHomeAdvertiseService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 首页轮播广告管理Controller
|
|
||||||
* Created by macro on 2018/11/7.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsHomeAdvertiseController", description = "首页轮播广告管理")
|
|
||||||
@RequestMapping("/home/advertise")
|
|
||||||
public class SmsHomeAdvertiseController {
|
|
||||||
@Autowired
|
|
||||||
private SmsHomeAdvertiseService advertiseService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加广告")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody SmsHomeAdvertise advertise) {
|
|
||||||
int count = advertiseService.create(advertise);
|
|
||||||
if (count > 0)
|
|
||||||
return CommonResult.success(count);
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除广告")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = advertiseService.delete(ids);
|
|
||||||
if (count > 0)
|
|
||||||
return CommonResult.success(count);
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改上下线状态")
|
|
||||||
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateStatus(@PathVariable Long id, Integer status) {
|
|
||||||
int count = advertiseService.updateStatus(id, status);
|
|
||||||
if (count > 0)
|
|
||||||
return CommonResult.success(count);
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取广告详情")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<SmsHomeAdvertise> getItem(@PathVariable Long id) {
|
|
||||||
SmsHomeAdvertise advertise = advertiseService.getItem(id);
|
|
||||||
return CommonResult.success(advertise);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改广告")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody SmsHomeAdvertise advertise) {
|
|
||||||
int count = advertiseService.update(id, advertise);
|
|
||||||
if (count > 0)
|
|
||||||
return CommonResult.success(count);
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询广告")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsHomeAdvertise>> list(@RequestParam(value = "name", required = false) String name,
|
|
||||||
@RequestParam(value = "type", required = false) Integer type,
|
|
||||||
@RequestParam(value = "endTime", required = false) String endTime,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsHomeAdvertise> advertiseList = advertiseService.list(name, type, endTime, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(advertiseList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.SmsHomeBrand;
|
|
||||||
import com.macro.mall.service.SmsHomeBrandService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 首页品牌管理Controller
|
|
||||||
* Created by macro on 2018/11/6.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsHomeBrandController", description = "首页品牌管理")
|
|
||||||
@RequestMapping("/home/brand")
|
|
||||||
public class SmsHomeBrandController {
|
|
||||||
@Autowired
|
|
||||||
private SmsHomeBrandService homeBrandService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加首页推荐品牌")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody List<SmsHomeBrand> homeBrandList) {
|
|
||||||
int count = homeBrandService.create(homeBrandList);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改品牌排序")
|
|
||||||
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateSort(@PathVariable Long id, Integer sort) {
|
|
||||||
int count = homeBrandService.updateSort(id, sort);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除推荐品牌")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = homeBrandService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量修改推荐状态")
|
|
||||||
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) {
|
|
||||||
int count = homeBrandService.updateRecommendStatus(ids, recommendStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询推荐品牌")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsHomeBrand>> list(@RequestParam(value = "brandName", required = false) String brandName,
|
|
||||||
@RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsHomeBrand> homeBrandList = homeBrandService.list(brandName, recommendStatus, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(homeBrandList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.SmsHomeNewProduct;
|
|
||||||
import com.macro.mall.service.SmsHomeNewProductService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 首页新品管理Controller
|
|
||||||
* Created by macro on 2018/11/6.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsHomeNewProductController", description = "首页新品管理")
|
|
||||||
@RequestMapping("/home/newProduct")
|
|
||||||
public class SmsHomeNewProductController {
|
|
||||||
@Autowired
|
|
||||||
private SmsHomeNewProductService homeNewProductService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加首页推荐品牌")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody List<SmsHomeNewProduct> homeBrandList) {
|
|
||||||
int count = homeNewProductService.create(homeBrandList);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改推荐排序")
|
|
||||||
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateSort(@PathVariable Long id, Integer sort) {
|
|
||||||
int count = homeNewProductService.updateSort(id, sort);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除推荐")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = homeNewProductService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量修改推荐状态")
|
|
||||||
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) {
|
|
||||||
int count = homeNewProductService.updateRecommendStatus(ids, recommendStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询推荐")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsHomeNewProduct>> list(@RequestParam(value = "productName", required = false) String productName,
|
|
||||||
@RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsHomeNewProduct> homeBrandList = homeNewProductService.list(productName, recommendStatus, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(homeBrandList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.SmsHomeRecommendProduct;
|
|
||||||
import com.macro.mall.service.SmsHomeRecommendProductService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 首页人气推荐管理Controller
|
|
||||||
* Created by macro on 2018/11/6.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsHomeRecommendProductController", description = "首页人气推荐管理")
|
|
||||||
@RequestMapping("/home/recommendProduct")
|
|
||||||
public class SmsHomeRecommendProductController {
|
|
||||||
@Autowired
|
|
||||||
private SmsHomeRecommendProductService recommendProductService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加首页推荐")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody List<SmsHomeRecommendProduct> homeBrandList) {
|
|
||||||
int count = recommendProductService.create(homeBrandList);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改推荐排序")
|
|
||||||
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateSort(@PathVariable Long id, Integer sort) {
|
|
||||||
int count = recommendProductService.updateSort(id, sort);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除推荐")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = recommendProductService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量修改推荐状态")
|
|
||||||
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) {
|
|
||||||
int count = recommendProductService.updateRecommendStatus(ids, recommendStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询推荐")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsHomeRecommendProduct>> list(@RequestParam(value = "productName", required = false) String productName,
|
|
||||||
@RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsHomeRecommendProduct> homeBrandList = recommendProductService.list(productName, recommendStatus, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(homeBrandList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,81 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.SmsHomeRecommendSubject;
|
|
||||||
import com.macro.mall.service.SmsHomeRecommendSubjectService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 首页专题推荐管理Controller
|
|
||||||
* Created by macro on 2018/11/6.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "SmsHomeRecommendSubjectController", description = "首页专题推荐管理")
|
|
||||||
@RequestMapping("/home/recommendSubject")
|
|
||||||
public class SmsHomeRecommendSubjectController {
|
|
||||||
@Autowired
|
|
||||||
private SmsHomeRecommendSubjectService recommendSubjectService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加首页推荐专题")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody List<SmsHomeRecommendSubject> homeBrandList) {
|
|
||||||
int count = recommendSubjectService.create(homeBrandList);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改推荐排序")
|
|
||||||
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateSort(@PathVariable Long id, Integer sort) {
|
|
||||||
int count = recommendSubjectService.updateSort(id, sort);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除推荐")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = recommendSubjectService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量修改推荐状态")
|
|
||||||
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) {
|
|
||||||
int count = recommendSubjectService.updateRecommendStatus(ids, recommendStatus);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询推荐")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<SmsHomeRecommendSubject>> list(@RequestParam(value = "subjectName", required = false) String subjectName,
|
|
||||||
@RequestParam(value = "recommendStatus", required = false) Integer recommendStatus,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<SmsHomeRecommendSubject> homeBrandList = recommendSubjectService.list(subjectName, recommendStatus, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(homeBrandList));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,183 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.SaTokenInfo;
|
|
||||||
import cn.hutool.core.collection.CollUtil;
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.UmsAdminLoginParam;
|
|
||||||
import com.macro.mall.dto.UmsAdminParam;
|
|
||||||
import com.macro.mall.dto.UpdateAdminPasswordParam;
|
|
||||||
import com.macro.mall.model.UmsAdmin;
|
|
||||||
import com.macro.mall.model.UmsRole;
|
|
||||||
import com.macro.mall.service.UmsAdminService;
|
|
||||||
import com.macro.mall.service.UmsRoleService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.validation.annotation.Validated;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台用户管理
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "UmsAdminController", description = "后台用户管理")
|
|
||||||
@RequestMapping("/admin")
|
|
||||||
public class UmsAdminController {
|
|
||||||
@Autowired
|
|
||||||
private UmsAdminService adminService;
|
|
||||||
@Autowired
|
|
||||||
private UmsRoleService roleService;
|
|
||||||
@Value("${sa-token.token-prefix}")
|
|
||||||
private String tokenHead;
|
|
||||||
|
|
||||||
@Operation(summary = "用户注册")
|
|
||||||
@RequestMapping(value = "/register", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<UmsAdmin> register(@Validated @RequestBody UmsAdminParam umsAdminParam) {
|
|
||||||
UmsAdmin umsAdmin = adminService.register(umsAdminParam);
|
|
||||||
if (umsAdmin == null) {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
return CommonResult.success(umsAdmin);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "登录以后返回token")
|
|
||||||
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult login(@Validated @RequestBody UmsAdminLoginParam umsAdminLoginParam) {
|
|
||||||
SaTokenInfo saTokenInfo = adminService.login(umsAdminLoginParam.getUsername(), umsAdminLoginParam.getPassword());
|
|
||||||
if (saTokenInfo == null) {
|
|
||||||
return CommonResult.validateFailed("用户名或密码错误");
|
|
||||||
}
|
|
||||||
Map<String, String> tokenMap = new HashMap<>();
|
|
||||||
tokenMap.put("token", saTokenInfo.getTokenValue() );
|
|
||||||
tokenMap.put("tokenHead", tokenHead+" ");
|
|
||||||
return CommonResult.success(tokenMap);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取当前登录用户信息")
|
|
||||||
@RequestMapping(value = "/info", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult getAdminInfo() {
|
|
||||||
UmsAdmin umsAdmin = adminService.getCurrentAdmin();
|
|
||||||
Map<String, Object> data = new HashMap<>();
|
|
||||||
data.put("username", umsAdmin.getUsername());
|
|
||||||
data.put("menus", roleService.getMenuList(umsAdmin.getId()));
|
|
||||||
data.put("icon", umsAdmin.getIcon());
|
|
||||||
List<UmsRole> roleList = adminService.getRoleList(umsAdmin.getId());
|
|
||||||
if(CollUtil.isNotEmpty(roleList)){
|
|
||||||
List<String> roles = roleList.stream().map(UmsRole::getName).collect(Collectors.toList());
|
|
||||||
data.put("roles",roles);
|
|
||||||
}
|
|
||||||
return CommonResult.success(data);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "登出功能")
|
|
||||||
@RequestMapping(value = "/logout", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult logout() {
|
|
||||||
adminService.logout();
|
|
||||||
return CommonResult.success(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据用户名或姓名分页获取用户列表")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<UmsAdmin>> list(@RequestParam(value = "keyword", required = false) String keyword,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<UmsAdmin> adminList = adminService.list(keyword, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(adminList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取指定用户信息")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<UmsAdmin> getItem(@PathVariable Long id) {
|
|
||||||
UmsAdmin admin = adminService.getItem(id);
|
|
||||||
return CommonResult.success(admin);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改指定用户信息")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody UmsAdmin admin) {
|
|
||||||
int count = adminService.update(id, admin);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改指定用户密码")
|
|
||||||
@RequestMapping(value = "/updatePassword", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updatePassword(@RequestBody UpdateAdminPasswordParam updatePasswordParam) {
|
|
||||||
int status = adminService.updatePassword(updatePasswordParam);
|
|
||||||
if (status > 0) {
|
|
||||||
return CommonResult.success(status);
|
|
||||||
} else if (status == -1) {
|
|
||||||
return CommonResult.failed("提交参数不合法");
|
|
||||||
} else if (status == -2) {
|
|
||||||
return CommonResult.failed("找不到该用户");
|
|
||||||
} else if (status == -3) {
|
|
||||||
return CommonResult.failed("旧密码错误");
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "删除指定用户信息")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = adminService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改帐号状态")
|
|
||||||
@RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateStatus(@PathVariable Long id,@RequestParam(value = "status") Integer status) {
|
|
||||||
UmsAdmin umsAdmin = new UmsAdmin();
|
|
||||||
umsAdmin.setStatus(status);
|
|
||||||
int count = adminService.update(id,umsAdmin);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "给用户分配角色")
|
|
||||||
@RequestMapping(value = "/role/update", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateRole(@RequestParam("adminId") Long adminId,
|
|
||||||
@RequestParam("roleIds") List<Long> roleIds) {
|
|
||||||
int count = adminService.updateRole(adminId, roleIds);
|
|
||||||
if (count >= 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取指定用户的角色")
|
|
||||||
@RequestMapping(value = "/role/{adminId}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsRole>> getRoleList(@PathVariable Long adminId) {
|
|
||||||
List<UmsRole> roleList = adminService.getRoleList(adminId);
|
|
||||||
return CommonResult.success(roleList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,36 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.UmsMemberLevel;
|
|
||||||
import com.macro.mall.service.UmsMemberLevelService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMethod;
|
|
||||||
import org.springframework.web.bind.annotation.RequestParam;
|
|
||||||
import org.springframework.web.bind.annotation.ResponseBody;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 会员等级管理Controller
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "UmsMemberLevelController", description = "会员等级管理")
|
|
||||||
@RequestMapping("/memberLevel")
|
|
||||||
public class UmsMemberLevelController {
|
|
||||||
@Autowired
|
|
||||||
private UmsMemberLevelService memberLevelService;
|
|
||||||
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@Operation(summary = "查询所有会员等级")
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsMemberLevel>> list(@RequestParam("defaultStatus") Integer defaultStatus) {
|
|
||||||
List<UmsMemberLevel> memberLevelList = memberLevelService.list(defaultStatus);
|
|
||||||
return CommonResult.success(memberLevelList);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,103 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.dto.UmsMenuNode;
|
|
||||||
import com.macro.mall.model.UmsMenu;
|
|
||||||
import com.macro.mall.service.UmsMenuService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台菜单管理Controller
|
|
||||||
* Created by macro on 2020/2/4.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "UmsMenuController", description = "后台菜单管理")
|
|
||||||
@RequestMapping("/menu")
|
|
||||||
public class UmsMenuController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private UmsMenuService menuService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加后台菜单")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody UmsMenu umsMenu) {
|
|
||||||
int count = menuService.create(umsMenu);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改后台菜单")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id,
|
|
||||||
@RequestBody UmsMenu umsMenu) {
|
|
||||||
int count = menuService.update(id, umsMenu);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据ID获取菜单详情")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<UmsMenu> getItem(@PathVariable Long id) {
|
|
||||||
UmsMenu umsMenu = menuService.getItem(id);
|
|
||||||
return CommonResult.success(umsMenu);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据ID删除后台菜单")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = menuService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页查询后台菜单")
|
|
||||||
@RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<UmsMenu>> list(@PathVariable Long parentId,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<UmsMenu> menuList = menuService.list(parentId, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(menuList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "树形结构返回所有菜单列表")
|
|
||||||
@RequestMapping(value = "/treeList", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsMenuNode>> treeList() {
|
|
||||||
List<UmsMenuNode> list = menuService.treeList();
|
|
||||||
return CommonResult.success(list);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改菜单显示状态")
|
|
||||||
@RequestMapping(value = "/updateHidden/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateHidden(@PathVariable Long id, @RequestParam("hidden") Integer hidden) {
|
|
||||||
int count = menuService.updateHidden(id, hidden);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,70 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.UmsResourceCategory;
|
|
||||||
import com.macro.mall.service.UmsResourceCategoryService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台资源分类管理Controller
|
|
||||||
* Created by macro on 2020/2/5.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "UmsResourceCategoryController", description = "后台资源分类管理")
|
|
||||||
@RequestMapping("/resourceCategory")
|
|
||||||
public class UmsResourceCategoryController {
|
|
||||||
@Autowired
|
|
||||||
private UmsResourceCategoryService resourceCategoryService;
|
|
||||||
|
|
||||||
@Operation(summary = "查询所有后台资源分类")
|
|
||||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsResourceCategory>> listAll() {
|
|
||||||
List<UmsResourceCategory> resourceList = resourceCategoryService.listAll();
|
|
||||||
return CommonResult.success(resourceList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "添加后台资源分类")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody UmsResourceCategory umsResourceCategory) {
|
|
||||||
int count = resourceCategoryService.create(umsResourceCategory);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改后台资源分类")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id,
|
|
||||||
@RequestBody UmsResourceCategory umsResourceCategory) {
|
|
||||||
int count = resourceCategoryService.update(id, umsResourceCategory);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据ID删除后台资源")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = resourceCategoryService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,101 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.UmsResource;
|
|
||||||
import com.macro.mall.service.UmsResourceService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台资源管理Controller
|
|
||||||
* Created by macro on 2020/2/4.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "UmsResourceController", description = "后台资源管理")
|
|
||||||
@RequestMapping("/resource")
|
|
||||||
public class UmsResourceController {
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private UmsResourceService resourceService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加后台资源")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody UmsResource umsResource) {
|
|
||||||
int count = resourceService.create(umsResource);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改后台资源")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id,
|
|
||||||
@RequestBody UmsResource umsResource) {
|
|
||||||
int count = resourceService.update(id, umsResource);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据ID获取资源详情")
|
|
||||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<UmsResource> getItem(@PathVariable Long id) {
|
|
||||||
UmsResource umsResource = resourceService.getItem(id);
|
|
||||||
return CommonResult.success(umsResource);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据ID删除后台资源")
|
|
||||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@PathVariable Long id) {
|
|
||||||
int count = resourceService.delete(id);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
} else {
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "分页模糊查询后台资源")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<UmsResource>> list(@RequestParam(required = false) Long categoryId,
|
|
||||||
@RequestParam(required = false) String nameKeyword,
|
|
||||||
@RequestParam(required = false) String urlKeyword,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<UmsResource> resourceList = resourceService.list(categoryId,nameKeyword, urlKeyword, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(resourceList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "查询所有后台资源")
|
|
||||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsResource>> listAll() {
|
|
||||||
List<UmsResource> resourceList = resourceService.listAll();
|
|
||||||
return CommonResult.success(resourceList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "初始化路径和资源的关联数据")
|
|
||||||
@RequestMapping(value = "/initPathResourceMap", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult initPathResourceMap() {
|
|
||||||
Map<String, String> pathResourceMap = resourceService.initPathResourceMap();
|
|
||||||
return CommonResult.success(pathResourceMap);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
package com.macro.mall.controller;
|
|
||||||
|
|
||||||
import com.macro.mall.common.api.CommonPage;
|
|
||||||
import com.macro.mall.common.api.CommonResult;
|
|
||||||
import com.macro.mall.model.*;
|
|
||||||
import com.macro.mall.service.UmsRoleService;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.Operation;
|
|
||||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.stereotype.Controller;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台用户角色管理
|
|
||||||
* Created by macro on 2018/9/30.
|
|
||||||
*/
|
|
||||||
@Controller
|
|
||||||
@Tag(name = "UmsRoleController", description = "后台用户角色管理")
|
|
||||||
@RequestMapping("/role")
|
|
||||||
public class UmsRoleController {
|
|
||||||
@Autowired
|
|
||||||
private UmsRoleService roleService;
|
|
||||||
|
|
||||||
@Operation(summary = "添加角色")
|
|
||||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult create(@RequestBody UmsRole role) {
|
|
||||||
int count = roleService.create(role);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改角色")
|
|
||||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult update(@PathVariable Long id, @RequestBody UmsRole role) {
|
|
||||||
int count = roleService.update(id, role);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "批量删除角色")
|
|
||||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult delete(@RequestParam("ids") List<Long> ids) {
|
|
||||||
int count = roleService.delete(ids);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取所有角色")
|
|
||||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsRole>> listAll() {
|
|
||||||
List<UmsRole> roleList = roleService.list();
|
|
||||||
return CommonResult.success(roleList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "根据角色名称分页获取角色列表")
|
|
||||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<CommonPage<UmsRole>> list(@RequestParam(value = "keyword", required = false) String keyword,
|
|
||||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
|
||||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
|
||||||
List<UmsRole> roleList = roleService.list(keyword, pageSize, pageNum);
|
|
||||||
return CommonResult.success(CommonPage.restPage(roleList));
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "修改角色状态")
|
|
||||||
@RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult updateStatus(@PathVariable Long id, @RequestParam(value = "status") Integer status) {
|
|
||||||
UmsRole umsRole = new UmsRole();
|
|
||||||
umsRole.setStatus(status);
|
|
||||||
int count = roleService.update(id, umsRole);
|
|
||||||
if (count > 0) {
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
return CommonResult.failed();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取角色相关菜单")
|
|
||||||
@RequestMapping(value = "/listMenu/{roleId}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsMenu>> listMenu(@PathVariable Long roleId) {
|
|
||||||
List<UmsMenu> roleList = roleService.listMenu(roleId);
|
|
||||||
return CommonResult.success(roleList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "获取角色相关资源")
|
|
||||||
@RequestMapping(value = "/listResource/{roleId}", method = RequestMethod.GET)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult<List<UmsResource>> listResource(@PathVariable Long roleId) {
|
|
||||||
List<UmsResource> roleList = roleService.listResource(roleId);
|
|
||||||
return CommonResult.success(roleList);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "给角色分配菜单")
|
|
||||||
@RequestMapping(value = "/allocMenu", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult allocMenu(@RequestParam Long roleId, @RequestParam List<Long> menuIds) {
|
|
||||||
int count = roleService.allocMenu(roleId, menuIds);
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Operation(summary = "给角色分配资源")
|
|
||||||
@RequestMapping(value = "/allocResource", method = RequestMethod.POST)
|
|
||||||
@ResponseBody
|
|
||||||
public CommonResult allocResource(@RequestParam Long roleId, @RequestParam List<Long> resourceIds) {
|
|
||||||
int count = roleService.allocResource(roleId, resourceIds);
|
|
||||||
return CommonResult.success(count);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.CmsPrefrenceAreaProductRelation;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义优选和商品关系操作Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface CmsPrefrenceAreaProductRelationDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.CmsSubjectProductRelation;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品和专题关系操作Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface CmsSubjectProductRelationDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<CmsSubjectProductRelation> subjectProductRelationList);
|
|
||||||
}
|
|
||||||
@ -1,30 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.OmsOrderDeliveryParam;
|
|
||||||
import com.macro.mall.dto.OmsOrderDetail;
|
|
||||||
import com.macro.mall.dto.OmsOrderQueryParam;
|
|
||||||
import com.macro.mall.model.OmsOrder;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单自定义查询Dao
|
|
||||||
* Created by macro on 2018/10/12.
|
|
||||||
*/
|
|
||||||
public interface OmsOrderDao {
|
|
||||||
/**
|
|
||||||
* 条件查询订单
|
|
||||||
*/
|
|
||||||
List<OmsOrder> getList(@Param("queryParam") OmsOrderQueryParam queryParam);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量发货
|
|
||||||
*/
|
|
||||||
int delivery(@Param("list") List<OmsOrderDeliveryParam> deliveryParamList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取订单详情
|
|
||||||
*/
|
|
||||||
OmsOrderDetail getDetail(@Param("id") Long id);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.OmsOrderOperateHistory;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单操作记录自定义Dao
|
|
||||||
* Created by macro on 2018/10/12.
|
|
||||||
*/
|
|
||||||
public interface OmsOrderOperateHistoryDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<OmsOrderOperateHistory> orderOperateHistoryList);
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.OmsOrderReturnApplyResult;
|
|
||||||
import com.macro.mall.dto.OmsReturnApplyQueryParam;
|
|
||||||
import com.macro.mall.model.OmsOrderReturnApply;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单退货申请自定义Dao
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
public interface OmsOrderReturnApplyDao {
|
|
||||||
/**
|
|
||||||
* 查询申请列表
|
|
||||||
*/
|
|
||||||
List<OmsOrderReturnApply> getList(@Param("queryParam") OmsReturnApplyQueryParam queryParam);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取申请详情
|
|
||||||
*/
|
|
||||||
OmsOrderReturnApplyResult getDetail(@Param("id")Long id);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsMemberPrice;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义会员价格Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface PmsMemberPriceDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<PmsMemberPrice> memberPriceList);
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.PmsProductAttributeCategoryItem;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品属性分类Dao
|
|
||||||
* Created by macro on 2018/5/24.
|
|
||||||
*/
|
|
||||||
public interface PmsProductAttributeCategoryDao {
|
|
||||||
/**
|
|
||||||
* 获取包含属性的商品属性分类
|
|
||||||
*/
|
|
||||||
List<PmsProductAttributeCategoryItem> getListWithAttr();
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.ProductAttrInfo;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品属性Dao
|
|
||||||
* Created by macro on 2018/5/23.
|
|
||||||
*/
|
|
||||||
public interface PmsProductAttributeDao {
|
|
||||||
/**
|
|
||||||
* 获取商品属性信息
|
|
||||||
*/
|
|
||||||
List<ProductAttrInfo> getProductAttrInfo(@Param("id") Long productCategoryId);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProductAttributeValue;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品参数,商品自定义规格属性Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface PmsProductAttributeValueDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list")List<PmsProductAttributeValue> productAttributeValueList);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProductCategoryAttributeRelation;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品分类和属性关系Dao
|
|
||||||
* Created by macro on 2018/5/23.
|
|
||||||
*/
|
|
||||||
public interface PmsProductCategoryAttributeRelationDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<PmsProductCategoryAttributeRelation> productCategoryAttributeRelationList);
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.PmsProductCategoryWithChildrenItem;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品分类自定义Dao
|
|
||||||
* Created by macro on 2018/5/25.
|
|
||||||
*/
|
|
||||||
public interface PmsProductCategoryDao {
|
|
||||||
/**
|
|
||||||
* 获取商品分类及其子分类
|
|
||||||
*/
|
|
||||||
List<PmsProductCategoryWithChildrenItem> listWithChildren();
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.PmsProductResult;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品管理Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface PmsProductDao {
|
|
||||||
/**
|
|
||||||
* 获取商品编辑信息
|
|
||||||
*/
|
|
||||||
PmsProductResult getUpdateInfo(@Param("id") Long id);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProductFullReduction;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品满减Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface PmsProductFullReductionDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<PmsProductFullReduction> productFullReductionList);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProductLadder;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义会员阶梯价格Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface PmsProductLadderDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<PmsProductLadder> productLadderList);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProductVertifyRecord;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品审核日志管理Dao
|
|
||||||
* Created by macro on 2018/4/27.
|
|
||||||
*/
|
|
||||||
public interface PmsProductVertifyRecordDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<PmsProductVertifyRecord> list);
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsSkuStock;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义商品SKU管理Dao
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public interface PmsSkuStockDao {
|
|
||||||
/**
|
|
||||||
* 批量插入操作
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list")List<PmsSkuStock> skuStockList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量插入或替换操作
|
|
||||||
*/
|
|
||||||
int replaceList(@Param("list")List<PmsSkuStock> skuStockList);
|
|
||||||
}
|
|
||||||
@ -1,15 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.SmsCouponParam;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义优惠券管理Dao
|
|
||||||
* Created by macro on 2018/8/29.
|
|
||||||
*/
|
|
||||||
public interface SmsCouponDao {
|
|
||||||
/**
|
|
||||||
* 获取优惠券详情包括绑定关系
|
|
||||||
*/
|
|
||||||
SmsCouponParam getItem(@Param("id") Long id);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.SmsCouponProductCategoryRelation;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义优惠券和商品分类关系管理Dao
|
|
||||||
* Created by macro on 2018/8/28.
|
|
||||||
*/
|
|
||||||
public interface SmsCouponProductCategoryRelationDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list")List<SmsCouponProductCategoryRelation> productCategoryRelationList);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.SmsCouponProductRelation;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义优惠券和商品关系关系Dao
|
|
||||||
* Created by macro on 2018/8/28.
|
|
||||||
*/
|
|
||||||
public interface SmsCouponProductRelationDao {
|
|
||||||
/**
|
|
||||||
* 批量创建
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list")List<SmsCouponProductRelation> productRelationList);
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.SmsFlashPromotionProduct;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义限时购商品关系管理Dao
|
|
||||||
* Created by macro on 2018/11/16.
|
|
||||||
*/
|
|
||||||
public interface SmsFlashPromotionProductRelationDao {
|
|
||||||
/**
|
|
||||||
* 获取限时购及相关商品信息
|
|
||||||
*/
|
|
||||||
List<SmsFlashPromotionProduct> getList(@Param("flashPromotionId") Long flashPromotionId, @Param("flashPromotionSessionId") Long flashPromotionSessionId);
|
|
||||||
}
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.UmsAdminRoleRelation;
|
|
||||||
import com.macro.mall.model.UmsResource;
|
|
||||||
import com.macro.mall.model.UmsRole;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义后台用户与角色管理Dao
|
|
||||||
* Created by macro on 2018/10/8.
|
|
||||||
*/
|
|
||||||
public interface UmsAdminRoleRelationDao {
|
|
||||||
/**
|
|
||||||
* 批量插入用户角色关系
|
|
||||||
*/
|
|
||||||
int insertList(@Param("list") List<UmsAdminRoleRelation> adminRoleRelationList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用于所有角色
|
|
||||||
*/
|
|
||||||
List<UmsRole> getRoleList(@Param("adminId") Long adminId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取用户所有可访问资源
|
|
||||||
*/
|
|
||||||
List<UmsResource> getResourceList(@Param("adminId") Long adminId);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取资源相关用户ID列表
|
|
||||||
*/
|
|
||||||
List<Long> getAdminIdList(@Param("resourceId") Long resourceId);
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.macro.mall.dao;
|
|
||||||
|
|
||||||
import com.macro.mall.model.UmsMenu;
|
|
||||||
import com.macro.mall.model.UmsResource;
|
|
||||||
import org.apache.ibatis.annotations.Param;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 自定义后台角色管理Dao
|
|
||||||
* Created by macro on 2020/2/2.
|
|
||||||
*/
|
|
||||||
public interface UmsRoleDao {
|
|
||||||
/**
|
|
||||||
* 根据后台用户ID获取菜单
|
|
||||||
*/
|
|
||||||
List<UmsMenu> getMenuList(@Param("adminId") Long adminId);
|
|
||||||
/**
|
|
||||||
* 根据角色ID获取菜单
|
|
||||||
*/
|
|
||||||
List<UmsMenu> getMenuListByRoleId(@Param("roleId") Long roleId);
|
|
||||||
/**
|
|
||||||
* 根据角色ID获取资源
|
|
||||||
*/
|
|
||||||
List<UmsResource> getResourceListByRoleId(@Param("roleId") Long roleId);
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import lombok.Builder;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Minio Bucket访问策略配置
|
|
||||||
* Created by macro on 2020/8/11.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@Builder
|
|
||||||
public class BucketPolicyConfigDto {
|
|
||||||
|
|
||||||
private String Version;
|
|
||||||
private List<Statement> Statement;
|
|
||||||
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@Builder
|
|
||||||
public static class Statement {
|
|
||||||
private String Effect;
|
|
||||||
private String Principal;
|
|
||||||
private String Action;
|
|
||||||
private String Resource;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 文件上传返回结果
|
|
||||||
* Created by macro on 2019/12/25.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class MinioUploadDto {
|
|
||||||
@Schema(title = "文件访问URL")
|
|
||||||
private String url;
|
|
||||||
@Schema(title = "文件名称")
|
|
||||||
private String name;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改订单费用信息参数
|
|
||||||
* Created by macro on 2018/10/29.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class OmsMoneyInfoParam {
|
|
||||||
@Schema(title = "订单ID")
|
|
||||||
private Long orderId;
|
|
||||||
@Schema(title = "运费金额")
|
|
||||||
private BigDecimal freightAmount;
|
|
||||||
@Schema(title = "管理员后台调整订单使用的折扣金额")
|
|
||||||
private BigDecimal discountAmount;
|
|
||||||
@Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单")
|
|
||||||
private Integer status;
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单发货参数
|
|
||||||
* Created by macro on 2018/10/12.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class OmsOrderDeliveryParam {
|
|
||||||
@Schema(title = "订单id")
|
|
||||||
private Long orderId;
|
|
||||||
@Schema(title = "物流公司")
|
|
||||||
private String deliveryCompany;
|
|
||||||
@Schema(title = "物流单号")
|
|
||||||
private String deliverySn;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.OmsOrder;
|
|
||||||
import com.macro.mall.model.OmsOrderItem;
|
|
||||||
import com.macro.mall.model.OmsOrderOperateHistory;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单详情信息
|
|
||||||
* Created by macro on 2018/10/11.
|
|
||||||
*/
|
|
||||||
public class OmsOrderDetail extends OmsOrder {
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "订单商品列表")
|
|
||||||
private List<OmsOrderItem> orderItemList;
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "订单操作记录列表")
|
|
||||||
private List<OmsOrderOperateHistory> historyList;
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单查询参数
|
|
||||||
* Created by macro on 2018/10/11.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class OmsOrderQueryParam {
|
|
||||||
@Schema(title = "订单编号")
|
|
||||||
private String orderSn;
|
|
||||||
@Schema(title = "收货人姓名/号码")
|
|
||||||
private String receiverKeyword;
|
|
||||||
@Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单")
|
|
||||||
private Integer status;
|
|
||||||
@Schema(title = "订单类型:0->正常订单;1->秒杀订单")
|
|
||||||
private Integer orderType;
|
|
||||||
@Schema(title = "订单来源:0->PC订单;1->app订单")
|
|
||||||
private Integer sourceType;
|
|
||||||
@Schema(title = "订单提交时间")
|
|
||||||
private String createTime;
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.OmsCompanyAddress;
|
|
||||||
import com.macro.mall.model.OmsOrderReturnApply;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 申请信息封装
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
public class OmsOrderReturnApplyResult extends OmsOrderReturnApply {
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "公司收货地址")
|
|
||||||
private OmsCompanyAddress companyAddress;
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单修改收货人信息参数
|
|
||||||
* Created by macro on 2018/10/29.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class OmsReceiverInfoParam {
|
|
||||||
@Schema(title = "订单ID")
|
|
||||||
private Long orderId;
|
|
||||||
@Schema(title = "收货人姓名")
|
|
||||||
private String receiverName;
|
|
||||||
@Schema(title = "收货人电话")
|
|
||||||
private String receiverPhone;
|
|
||||||
@Schema(title = "收货人邮编")
|
|
||||||
private String receiverPostCode;
|
|
||||||
@Schema(title = "详细地址")
|
|
||||||
private String receiverDetailAddress;
|
|
||||||
@Schema(title = "省份/直辖市")
|
|
||||||
private String receiverProvince;
|
|
||||||
@Schema(title = "城市")
|
|
||||||
private String receiverCity;
|
|
||||||
@Schema(title = "区")
|
|
||||||
private String receiverRegion;
|
|
||||||
@Schema(title = "订单状态:0->待付款;1->待发货;2->已发货;3->已完成;4->已关闭;5->无效订单")
|
|
||||||
private Integer status;
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单退货申请查询参数
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class OmsReturnApplyQueryParam {
|
|
||||||
@Schema(title = "服务单号")
|
|
||||||
private Long id;
|
|
||||||
@Schema(title = "收货人姓名/号码")
|
|
||||||
private String receiverKeyword;
|
|
||||||
@Schema(title = "申请状态:0->待处理;1->退货中;2->已完成;3->已拒绝")
|
|
||||||
private Integer status;
|
|
||||||
@Schema(title = "申请时间")
|
|
||||||
private String createTime;
|
|
||||||
@Schema(title = "处理人员")
|
|
||||||
private String handleMan;
|
|
||||||
@Schema(title = "处理时间")
|
|
||||||
private String handleTime;
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 确认收货提交参数
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class OmsUpdateStatusParam {
|
|
||||||
@Schema(title = "服务单号")
|
|
||||||
private Long id;
|
|
||||||
@Schema(title = "收货地址关联id")
|
|
||||||
private Long companyAddressId;
|
|
||||||
@Schema(title = "确认退款金额")
|
|
||||||
private BigDecimal returnAmount;
|
|
||||||
@Schema(title = "处理备注")
|
|
||||||
private String handleNote;
|
|
||||||
@Schema(title = "处理人")
|
|
||||||
private String handleMan;
|
|
||||||
@Schema(title = "收货备注")
|
|
||||||
private String receiveNote;
|
|
||||||
@Schema(title = "收货人")
|
|
||||||
private String receiveMan;
|
|
||||||
@Schema(title = "申请状态:1->退货中;2->已完成;3->已拒绝")
|
|
||||||
private Integer status;
|
|
||||||
}
|
|
||||||
@ -1,20 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* oss上传成功后的回调参数
|
|
||||||
* Created by macro on 2018/5/17.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class OssCallbackParam {
|
|
||||||
@Schema(title = "请求的回调地址")
|
|
||||||
private String callbackUrl;
|
|
||||||
@Schema(title = "回调是传入request中的参数")
|
|
||||||
private String callbackBody;
|
|
||||||
@Schema(title = "回调时传入参数的格式,比如表单提交形式")
|
|
||||||
private String callbackBodyType;
|
|
||||||
}
|
|
||||||
@ -1,24 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* oss上传文件的回调结果
|
|
||||||
* Created by macro on 2018/5/17.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class OssCallbackResult {
|
|
||||||
@Schema(title = "文件名称")
|
|
||||||
private String filename;
|
|
||||||
@Schema(title = "文件大小")
|
|
||||||
private String size;
|
|
||||||
@Schema(title = "文件的mimeType")
|
|
||||||
private String mimeType;
|
|
||||||
@Schema(title = "图片文件的宽")
|
|
||||||
private String width;
|
|
||||||
@Schema(title = "图片文件的高")
|
|
||||||
private String height;
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取OSS上传文件授权返回结果
|
|
||||||
* Created by macro on 2018/5/17.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class OssPolicyResult {
|
|
||||||
@Schema(title = "访问身份验证中用到用户标识")
|
|
||||||
private String accessKeyId;
|
|
||||||
@Schema(title = "用户表单上传的策略,经过base64编码过的字符串")
|
|
||||||
private String policy;
|
|
||||||
@Schema(title = "对policy签名后的字符串")
|
|
||||||
private String signature;
|
|
||||||
@Schema(title = "上传文件夹路径前缀")
|
|
||||||
private String dir;
|
|
||||||
@Schema(title = "oss对外服务的访问域名")
|
|
||||||
private String host;
|
|
||||||
@Schema(title = "上传成功后的回调设置")
|
|
||||||
private String callback;
|
|
||||||
}
|
|
||||||
@ -1,39 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.validator.FlagValidator;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.Min;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 品牌传递参数
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class PmsBrandParam {
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "品牌名称",required = true)
|
|
||||||
private String name;
|
|
||||||
@Schema(title = "品牌首字母")
|
|
||||||
private String firstLetter;
|
|
||||||
@Min(value = 0)
|
|
||||||
@Schema(title = "排序字段")
|
|
||||||
private Integer sort;
|
|
||||||
@FlagValidator(value = {"0","1"}, message = "厂家状态不正确")
|
|
||||||
@Schema(title = "是否为厂家制造商")
|
|
||||||
private Integer factoryStatus;
|
|
||||||
@FlagValidator(value = {"0","1"}, message = "显示状态不正确")
|
|
||||||
@Schema(title = "是否进行显示")
|
|
||||||
private Integer showStatus;
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "品牌logo",required = true)
|
|
||||||
private String logo;
|
|
||||||
@Schema(title = "品牌大图")
|
|
||||||
private String bigPic;
|
|
||||||
@Schema(title = "品牌故事")
|
|
||||||
private String brandStory;
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProductAttribute;
|
|
||||||
import com.macro.mall.model.PmsProductAttributeCategory;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 包含有分类下属性的dto
|
|
||||||
* Created by macro on 2018/5/24.
|
|
||||||
*/
|
|
||||||
public class PmsProductAttributeCategoryItem extends PmsProductAttributeCategory {
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "商品属性列表")
|
|
||||||
private List<PmsProductAttribute> productAttributeList;
|
|
||||||
}
|
|
||||||
@ -1,48 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.validator.FlagValidator;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品属性参数
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class PmsProductAttributeParam {
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "属性分类ID")
|
|
||||||
private Long productAttributeCategoryId;
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "属性名称")
|
|
||||||
private String name;
|
|
||||||
@FlagValidator({"0","1","2"})
|
|
||||||
@Schema(title = "属性选择类型:0->唯一;1->单选;2->多选")
|
|
||||||
private Integer selectType;
|
|
||||||
@FlagValidator({"0","1"})
|
|
||||||
@Schema(title = "属性录入方式:0->手工录入;1->从列表中选取")
|
|
||||||
private Integer inputType;
|
|
||||||
@Schema(title = "可选值列表,以逗号隔开")
|
|
||||||
private String inputList;
|
|
||||||
|
|
||||||
private Integer sort;
|
|
||||||
@FlagValidator({"0","1"})
|
|
||||||
@Schema(title = "分类筛选样式:0->普通;1->颜色")
|
|
||||||
private Integer filterType;
|
|
||||||
@FlagValidator({"0","1","2"})
|
|
||||||
@Schema(title = "检索类型;0->不需要进行检索;1->关键字检索;2->范围检索")
|
|
||||||
private Integer searchType;
|
|
||||||
@FlagValidator({"0","1"})
|
|
||||||
@Schema(title = "相同属性产品是否关联;0->不关联;1->关联")
|
|
||||||
private Integer relatedStatus;
|
|
||||||
@FlagValidator({"0","1"})
|
|
||||||
@Schema(title = "是否支持手动新增;0->不支持;1->支持")
|
|
||||||
private Integer handAddStatus;
|
|
||||||
@FlagValidator({"0","1"})
|
|
||||||
@Schema(title = "属性的类型;0->规格;1->参数")
|
|
||||||
private Integer type;
|
|
||||||
}
|
|
||||||
@ -1,43 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.validator.FlagValidator;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.Min;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 添加更新产品分类的参数
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class PmsProductCategoryParam {
|
|
||||||
@Schema(title = "父分类的编号")
|
|
||||||
private Long parentId;
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "商品分类名称",required = true)
|
|
||||||
private String name;
|
|
||||||
@Schema(title = "分类单位")
|
|
||||||
private String productUnit;
|
|
||||||
@FlagValidator(value = {"0","1"},message = "状态只能为0或1")
|
|
||||||
@Schema(title = "是否在导航栏显示")
|
|
||||||
private Integer navStatus;
|
|
||||||
@FlagValidator(value = {"0","1"},message = "状态只能为0或1")
|
|
||||||
@Schema(title = "是否进行显示")
|
|
||||||
private Integer showStatus;
|
|
||||||
@Min(value = 0)
|
|
||||||
@Schema(title = "排序")
|
|
||||||
private Integer sort;
|
|
||||||
@Schema(title = "图标")
|
|
||||||
private String icon;
|
|
||||||
@Schema(title = "关键字")
|
|
||||||
private String keywords;
|
|
||||||
@Schema(title = "描述")
|
|
||||||
private String description;
|
|
||||||
@Schema(title = "产品相关筛选属性集合")
|
|
||||||
private List<Long> productAttributeIdList;
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProductCategory;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by macro on 2018/5/25.
|
|
||||||
*/
|
|
||||||
public class PmsProductCategoryWithChildrenItem extends PmsProductCategory {
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "子级分类")
|
|
||||||
private List<PmsProductCategory> children;
|
|
||||||
}
|
|
||||||
@ -1,31 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.*;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建和修改商品时使用的参数
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class PmsProductParam extends PmsProduct{
|
|
||||||
@Schema(title = "商品阶梯价格设置")
|
|
||||||
private List<PmsProductLadder> productLadderList;
|
|
||||||
@Schema(title = "商品满减价格设置")
|
|
||||||
private List<PmsProductFullReduction> productFullReductionList;
|
|
||||||
@Schema(title = "商品会员价格设置")
|
|
||||||
private List<PmsMemberPrice> memberPriceList;
|
|
||||||
@Schema(title = "商品的sku库存信息")
|
|
||||||
private List<PmsSkuStock> skuStockList;
|
|
||||||
@Schema(title = "商品参数及自定义规格属性")
|
|
||||||
private List<PmsProductAttributeValue> productAttributeValueList;
|
|
||||||
@Schema(title = "专题和商品关系")
|
|
||||||
private List<CmsSubjectProductRelation> subjectProductRelationList;
|
|
||||||
@Schema(title = "优选专区和商品的关系")
|
|
||||||
private List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList;
|
|
||||||
}
|
|
||||||
@ -1,26 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 产品查询参数
|
|
||||||
* Created by macro on 2018/4/27.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class PmsProductQueryParam {
|
|
||||||
@Schema(title = "上架状态")
|
|
||||||
private Integer publishStatus;
|
|
||||||
@Schema(title = "审核状态")
|
|
||||||
private Integer verifyStatus;
|
|
||||||
@Schema(title = "商品名称模糊关键字")
|
|
||||||
private String keyword;
|
|
||||||
@Schema(title = "商品货号")
|
|
||||||
private String productSn;
|
|
||||||
@Schema(title = "商品分类编号")
|
|
||||||
private Long productCategoryId;
|
|
||||||
@Schema(title = "商品品牌编号")
|
|
||||||
private Long brandId;
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询单个产品进行修改时返回的结果
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
public class PmsProductResult extends PmsProductParam {
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "商品所选分类的父id")
|
|
||||||
private Long cateParentId;
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品分类对应属性信息
|
|
||||||
* Created by macro on 2018/5/23.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class ProductAttrInfo {
|
|
||||||
@Schema(title = "商品属性ID")
|
|
||||||
private Long attributeId;
|
|
||||||
@Schema(title = "商品属性分类ID")
|
|
||||||
private Long attributeCategoryId;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.SmsCoupon;
|
|
||||||
import com.macro.mall.model.SmsCouponProductCategoryRelation;
|
|
||||||
import com.macro.mall.model.SmsCouponProductRelation;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 优惠券信息封装,包括绑定商品和绑定分类
|
|
||||||
* Created by macro on 2018/8/28.
|
|
||||||
*/
|
|
||||||
public class SmsCouponParam extends SmsCoupon {
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "优惠券绑定的商品")
|
|
||||||
private List<SmsCouponProductRelation> productRelationList;
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "优惠券绑定的商品分类")
|
|
||||||
private List<SmsCouponProductCategoryRelation> productCategoryRelationList;
|
|
||||||
}
|
|
||||||
@ -1,18 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.PmsProduct;
|
|
||||||
import com.macro.mall.model.SmsFlashPromotionProductRelation;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 限时购及商品信息封装
|
|
||||||
* Created by macro on 2018/11/16.
|
|
||||||
*/
|
|
||||||
public class SmsFlashPromotionProduct extends SmsFlashPromotionProductRelation{
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
@Schema(title = "关联商品")
|
|
||||||
private PmsProduct product;
|
|
||||||
}
|
|
||||||
@ -1,17 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.SmsFlashPromotionSession;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 包含商品数量的场次信息
|
|
||||||
* Created by macro on 2018/11/19.
|
|
||||||
*/
|
|
||||||
public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession {
|
|
||||||
@Setter
|
|
||||||
@Getter
|
|
||||||
@Schema(title = "商品数量")
|
|
||||||
private Long productCount;
|
|
||||||
}
|
|
||||||
@ -1,22 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户登录参数
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
public class UmsAdminLoginParam {
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "用户名", required = true)
|
|
||||||
private String username;
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "密码", required = true)
|
|
||||||
private String password;
|
|
||||||
}
|
|
||||||
@ -1,32 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.Email;
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 用户登录参数
|
|
||||||
* Created by macro on 2018/4/26.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class UmsAdminParam {
|
|
||||||
@Schema(title = "用户名", required = true)
|
|
||||||
@NotEmpty
|
|
||||||
private String username;
|
|
||||||
@Schema(title = "密码", required = true)
|
|
||||||
@NotEmpty
|
|
||||||
private String password;
|
|
||||||
@Schema(title = "用户头像")
|
|
||||||
private String icon;
|
|
||||||
@Schema(title = "邮箱")
|
|
||||||
@Email
|
|
||||||
private String email;
|
|
||||||
@Schema(title = "用户昵称")
|
|
||||||
private String nickName;
|
|
||||||
@Schema(title = "备注")
|
|
||||||
private String note;
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import com.macro.mall.model.UmsMenu;
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 后台菜单节点封装
|
|
||||||
* Created by macro on 2020/2/4.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class UmsMenuNode extends UmsMenu {
|
|
||||||
@Schema(title = "子级菜单")
|
|
||||||
private List<UmsMenuNode> children;
|
|
||||||
}
|
|
||||||
@ -1,25 +0,0 @@
|
|||||||
package com.macro.mall.dto;
|
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
|
||||||
import lombok.Getter;
|
|
||||||
import lombok.Setter;
|
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotEmpty;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改用户名密码参数
|
|
||||||
* Created by macro on 2019/10/9.
|
|
||||||
*/
|
|
||||||
@Getter
|
|
||||||
@Setter
|
|
||||||
public class UpdateAdminPasswordParam {
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "用户名", required = true)
|
|
||||||
private String username;
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "旧密码", required = true)
|
|
||||||
private String oldPassword;
|
|
||||||
@NotEmpty
|
|
||||||
@Schema(title = "新密码", required = true)
|
|
||||||
private String newPassword;
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.model.CmsPrefrenceArea;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品优选管理Service
|
|
||||||
* Created by macro on 2018/6/1.
|
|
||||||
*/
|
|
||||||
public interface CmsPrefrenceAreaService {
|
|
||||||
/**
|
|
||||||
* 获取所有优选专区
|
|
||||||
*/
|
|
||||||
List<CmsPrefrenceArea> listAll();
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.model.CmsSubject;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 商品专题管理Service
|
|
||||||
* Created by macro on 2018/6/1.
|
|
||||||
*/
|
|
||||||
public interface CmsSubjectService {
|
|
||||||
/**
|
|
||||||
* 查询所有专题
|
|
||||||
*/
|
|
||||||
List<CmsSubject> listAll();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页查询专题
|
|
||||||
*/
|
|
||||||
List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize);
|
|
||||||
}
|
|
||||||
@ -1,16 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.model.OmsCompanyAddress;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 收货地址管Service
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
public interface OmsCompanyAddressService {
|
|
||||||
/**
|
|
||||||
* 获取全部收货地址
|
|
||||||
*/
|
|
||||||
List<OmsCompanyAddress> list();
|
|
||||||
}
|
|
||||||
@ -1,34 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.OmsOrderReturnApplyResult;
|
|
||||||
import com.macro.mall.dto.OmsReturnApplyQueryParam;
|
|
||||||
import com.macro.mall.dto.OmsUpdateStatusParam;
|
|
||||||
import com.macro.mall.model.OmsOrderReturnApply;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退货申请管理Service
|
|
||||||
* Created by macro on 2018/10/18.
|
|
||||||
*/
|
|
||||||
public interface OmsOrderReturnApplyService {
|
|
||||||
/**
|
|
||||||
* 分页查询申请
|
|
||||||
*/
|
|
||||||
List<OmsOrderReturnApply> list(OmsReturnApplyQueryParam queryParam, Integer pageSize, Integer pageNum);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除申请
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改申请状态
|
|
||||||
*/
|
|
||||||
int updateStatus(Long id, OmsUpdateStatusParam statusParam);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取指定申请详情
|
|
||||||
*/
|
|
||||||
OmsOrderReturnApplyResult getItem(Long id);
|
|
||||||
}
|
|
||||||
@ -1,41 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.model.OmsOrderReturnReason;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单原因管理Service
|
|
||||||
* Created by macro on 2018/10/17.
|
|
||||||
*/
|
|
||||||
public interface OmsOrderReturnReasonService {
|
|
||||||
/**
|
|
||||||
* 添加订单原因
|
|
||||||
*/
|
|
||||||
int create(OmsOrderReturnReason returnReason);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改退货原因
|
|
||||||
*/
|
|
||||||
int update(Long id, OmsOrderReturnReason returnReason);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除退货原因
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分页获取退货原因
|
|
||||||
*/
|
|
||||||
List<OmsOrderReturnReason> list(Integer pageSize, Integer pageNum);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量修改退货原因状态
|
|
||||||
*/
|
|
||||||
int updateStatus(List<Long> ids, Integer status);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取单个退货原因详情信息
|
|
||||||
*/
|
|
||||||
OmsOrderReturnReason getItem(Long id);
|
|
||||||
}
|
|
||||||
@ -1,58 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.*;
|
|
||||||
import com.macro.mall.model.OmsOrder;
|
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单管理Service
|
|
||||||
* Created by macro on 2018/10/11.
|
|
||||||
*/
|
|
||||||
public interface OmsOrderService {
|
|
||||||
/**
|
|
||||||
* 订单查询
|
|
||||||
*/
|
|
||||||
List<OmsOrder> list(OmsOrderQueryParam queryParam, Integer pageSize, Integer pageNum);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量发货
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
int delivery(List<OmsOrderDeliveryParam> deliveryParamList);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量关闭订单
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
int close(List<Long> ids, String note);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 批量删除订单
|
|
||||||
*/
|
|
||||||
int delete(List<Long> ids);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 获取指定订单详情
|
|
||||||
*/
|
|
||||||
OmsOrderDetail detail(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改订单收货人信息
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
int updateReceiverInfo(OmsReceiverInfoParam receiverInfoParam);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改订单费用信息
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
int updateMoneyInfo(OmsMoneyInfoParam moneyInfoParam);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改订单备注
|
|
||||||
*/
|
|
||||||
@Transactional
|
|
||||||
int updateNote(Long id, String note, Integer status);
|
|
||||||
}
|
|
||||||
@ -1,19 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.model.OmsOrderSetting;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 订单设置Service
|
|
||||||
* Created by macro on 2018/10/16.
|
|
||||||
*/
|
|
||||||
public interface OmsOrderSettingService {
|
|
||||||
/**
|
|
||||||
* 获取指定订单设置
|
|
||||||
*/
|
|
||||||
OmsOrderSetting getItem(Long id);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改指定订单设置
|
|
||||||
*/
|
|
||||||
int update(Long id, OmsOrderSetting orderSetting);
|
|
||||||
}
|
|
||||||
@ -1,21 +0,0 @@
|
|||||||
package com.macro.mall.service;
|
|
||||||
|
|
||||||
import com.macro.mall.dto.OssCallbackResult;
|
|
||||||
import com.macro.mall.dto.OssPolicyResult;
|
|
||||||
|
|
||||||
import jakarta.servlet.http.HttpServletRequest;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* oss上传管理Service
|
|
||||||
* Created by macro on 2018/5/17.
|
|
||||||
*/
|
|
||||||
public interface OssService {
|
|
||||||
/**
|
|
||||||
* oss上传策略生成
|
|
||||||
*/
|
|
||||||
OssPolicyResult policy();
|
|
||||||
/**
|
|
||||||
* oss上传成功回调
|
|
||||||
*/
|
|
||||||
OssCallbackResult callback(HttpServletRequest request);
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user