master
parent
68c75b0650
commit
9b9d066459
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" output="target/classes" path="src/main/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
|
||||
<attributes>
|
||||
<attribute name="optional" value="true"/>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||
<attributes>
|
||||
<attribute name="maven.pomderived" value="true"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="output" path="target/classes"/>
|
||||
</classpath>
|
@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>mall-admin</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.wst.common.project.facet.core.builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.m2e.core.maven2Builder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.core.springbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.springframework.ide.eclipse.boot.validation.springbootbuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.springframework.ide.eclipse.core.springnature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.m2e.core.maven2Nature</nature>
|
||||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
|
||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.8
|
@ -0,0 +1,4 @@
|
||||
activeProfiles=
|
||||
eclipse.preferences.version=1
|
||||
resolveWorkspaceProjects=true
|
||||
version=1
|
@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<faceted-project>
|
||||
<installed facet="cloudfoundry.standalone.app" version="1.0"/>
|
||||
</faceted-project>
|
@ -0,0 +1,142 @@
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>com.macro.mall</groupId>
|
||||
<artifactId>mall-admin</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>mall-admin</name>
|
||||
<description>mall-admin project for mall</description>
|
||||
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.5.14.RELEASE</version>
|
||||
<relativePath/> <!-- lookup parent from repository -->
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
<java.version>1.8</java.version>
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.macro.mall</groupId>
|
||||
<artifactId>mall-mbg</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-security</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mybatis.spring.boot</groupId>
|
||||
<artifactId>mybatis-spring-boot-starter</artifactId>
|
||||
<version>1.2.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-actuator</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aop</artifactId>
|
||||
</dependency>
|
||||
<!--MyBatis分页插件-->
|
||||
<dependency>
|
||||
<groupId>com.github.pagehelper</groupId>
|
||||
<artifactId>pagehelper-spring-boot-starter</artifactId>
|
||||
<version>1.2.3</version>
|
||||
</dependency>
|
||||
<!--Swagger-UI API文档生产工具-->
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger2</artifactId>
|
||||
<version>2.6.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>2.6.1</version>
|
||||
</dependency>
|
||||
<!--JWT(Json Web Token)登录支持-->
|
||||
<dependency>
|
||||
<groupId>io.jsonwebtoken</groupId>
|
||||
<artifactId>jjwt</artifactId>
|
||||
<version>0.9.0</version>
|
||||
</dependency>
|
||||
<!-- 阿里云OSS -->
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>2.5.0</version>
|
||||
</dependency>
|
||||
<!--集成logstash-->
|
||||
<dependency>
|
||||
<groupId>net.logstash.logback</groupId>
|
||||
<artifactId>logstash-logback-encoder</artifactId>
|
||||
<version>4.8</version>
|
||||
</dependency>
|
||||
<!--集成druid连接池-->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>druid-spring-boot-starter</artifactId>
|
||||
<version>1.1.10</version>
|
||||
</dependency>
|
||||
<!--lombok依赖-->
|
||||
<dependency>
|
||||
<groupId>org.projectlombok</groupId>
|
||||
<artifactId>lombok</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.spotify</groupId>
|
||||
<artifactId>docker-maven-plugin</artifactId>
|
||||
<version>1.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<imageName>mall/${project.artifactId}:${project.version}</imageName>
|
||||
<dockerHost>http://192.168.1.71:2375</dockerHost>
|
||||
<baseImage>java:8</baseImage>
|
||||
<entryPoint>["java", "-jar", "-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>
|
||||
<resources>
|
||||
<resource>
|
||||
<targetPath>/</targetPath>
|
||||
<directory>${project.build.directory}</directory>
|
||||
<include>${project.build.finalName}.jar</include>
|
||||
</resource>
|
||||
</resources>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</project>
|
@ -0,0 +1,18 @@
|
||||
package com.macro.mall;
|
||||
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.transaction.annotation.EnableTransactionManagement;
|
||||
|
||||
/**
|
||||
* Ó¦ÓÃÆô¶¯Èë¿Ú
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@MapperScan({"com.macro.mall.mapper","com.macro.mall.dao"})
|
||||
@EnableTransactionManagement
|
||||
public class MallAdminApplication {
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(MallAdminApplication.class, args);
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
package com.sock.mall.bo;
import com.sock.mall.model.UmsAdmin;
import com.sock.mall.model.UmsPermission;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;
import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
/**
* SpringSecurity需要的用户详情
*/
public class AdminUserDetails implements UserDetails {
private UmsAdmin umsAdmin;
private List<UmsPermission> permissionList;
public AdminUserDetails(UmsAdmin umsAdmin,List<UmsPermission> permissionList) {
this.umsAdmin = umsAdmin;
this.permissionList = permissionList;
}
@Override
public Collection<? extends GrantedAuthority> getAuthorities() {
//返回当前用户的权限
return permissionList.stream()
.filter(permission -> permission.getValue()!=null)
.map(permission ->new SimpleGrantedAuthority(permission.getValue()))
.collect(Collectors.toList());
}
@Override
/*登录密码*/
public String getPassword() {
return umsAdmin.getPassword();
}
@Override
/*登录名称*/
public String getUsername() {
return umsAdmin.getUsername();
}
@Override
/*有效性验证(是否过期)*/
public boolean isAccountNonExpired() {
return true;
}
@Override
/*有效性验证(是否被锁)*/
public boolean isAccountNonLocked() {
return true;
}
@Override
/*验证证书是否有效*/
public boolean isCredentialsNonExpired() {
return true;
}
@Override
/*状态判断890-*/
public boolean isEnabled() {
return umsAdmin.getStatus().equals(1);
}
}
|
@ -1 +0,0 @@
|
||||
package com.sock.mall.bo;
/**
* Controller层的日志封装类
*/
public class WebLog {
/**
* 操作描述
*/
private String description;
/**
* 操作用户
*/
private String username;
/**
* 操作时间
*/
private Long startTime;
/**
* 消耗时间
*/
private Integer spendTime;
/**
* 根路径
*/
private String basePath;
/**
* URI
*/
private String uri;
/**
* URL
*/
private String url;
/**
* 请求类型
*/
private String method;
/**
* IP地址
*/
private String ip;
private Object parameter;
private Object result;
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public Long getStartTime() {
return startTime;
}
public void setStartTime(Long startTime) {
this.startTime = startTime;
}
public Integer getSpendTime() {
return spendTime;
}
public void setSpendTime(Integer spendTime) {
this.spendTime = spendTime;
}
public String getBasePath() {
return basePath;
}
public void setBasePath(String basePath) {
this.basePath = basePath;
}
public String getUri() {
return uri;
}
public void setUri(String uri) {
this.uri = uri;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getMethod() {
return method;
}
public void setMethod(String method) {
this.method = method;
}
public String getIp() {
return ip;
}
public void setIp(String ip) {
this.ip = ip;
}
public Object getParameter() {
return parameter;
}
public void setParameter(Object parameter) {
this.parameter = parameter;
}
public Object getResult() {
return result;
}
public void setResult(Object result) {
this.result = result;
}
}
|
@ -1,43 +0,0 @@
|
||||
package com.macro.mall.component;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.validation.BindingResult;
|
||||
|
||||
/**
|
||||
* HibernateValidator错误结果处理切面
|
||||
*/
|
||||
@Aspect
|
||||
@Component
|
||||
@Order(2)
|
||||
public class BindingResultAspect {
|
||||
@Pointcut("execution(public * com.macro.mall.controller.*.*(..))")
|
||||
/*SpringMVC的参数验证*/
|
||||
/*Spring验证的错误返回BindingResult*/
|
||||
public void BindingResult() {
|
||||
}
|
||||
|
||||
@Around("BindingResult()")
|
||||
public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
/*Around(value="BindingResult()"*/
|
||||
Object[] args = joinPoint.getArgs();
|
||||
for (Object arg : args) {
|
||||
if (arg instanceof BindingResult) {
|
||||
/*参数正常,验证通过*/
|
||||
BindingResult result = (BindingResult) arg;
|
||||
if (result.hasErrors()) {
|
||||
/*传递参数有误*/
|
||||
return new CommonResult().validateFailed(result);
|
||||
/* 验证不通过,产生异常*/
|
||||
/*返回错误文件,错误信息*/
|
||||
}
|
||||
}
|
||||
}
|
||||
return joinPoint.proceed();//调用AOP中环绕通知中proceed方法
|
||||
}
|
||||
}
|
@ -1,37 +0,0 @@
|
||||
package com.macro.mall.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||
|
||||
/**
|
||||
* Swagger2API文档的配置
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
public class Swagger2Config {//swagger2配置
|
||||
@Bean
|
||||
public Docket createRestApi(){
|
||||
return new Docket(DocumentationType.SWAGGER_2)//标签
|
||||
.apiInfo(apiInfo())
|
||||
.select()
|
||||
.apis(RequestHandlerSelectors.basePackage("com.macro.mall.controller"))
|
||||
.paths(PathSelectors.any())
|
||||
.build();
|
||||
}
|
||||
/*自定义返回信息*/
|
||||
private ApiInfo apiInfo() {
|
||||
return new ApiInfoBuilder()
|
||||
.title("mall后台系统")
|
||||
.description("mall后台模块")
|
||||
.contact("macro")
|
||||
.version("1.0")
|
||||
.build();
|
||||
}
|
||||
}
|
@ -1,44 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.CmsSubject;
|
||||
import com.macro.mall.service.CmsSubjectService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "CmsSubjectController", description = "商品专题管理")
|
||||
@RequestMapping("/subject")
|
||||
public class CmsSubjectController {
|
||||
@Autowired
|
||||
private CmsSubjectService subjectService;
|
||||
|
||||
@ApiOperation("获取全部商品专题")
|
||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object listAll() {
|
||||
List<CmsSubject> subjectList = subjectService.listAll();
|
||||
return new CommonResult().success(subjectList);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据专题名称分页获取专题")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
/*@RequestParam绑定HTTPServletRequest请求参数到控制器参数*/
|
||||
public Object 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 new CommonResult().pageSuccess(subjectList);
|
||||
}
|
@ -1,34 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.OmsCompanyAddress;
|
||||
import com.macro.mall.service.OmsCompanyAddressService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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
|
||||
@Api(tags = "OmsCompanyAddressController", description = "收货地址管理")
|
||||
@RequestMapping("/companyAddress")
|
||||
public class OmsCompanyAddressController {
|
||||
@Autowired
|
||||
private OmsCompanyAddressService companyAddressService;
|
||||
|
||||
@ApiOperation("获取所有收货地址")
|
||||
@RequestMapping(value = "/list",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object list() {
|
||||
List<OmsCompanyAddress> companyAddressList = companyAddressService.list();
|
||||
return new CommonResult().success(companyAddressList);
|
||||
}
|
||||
}
|
@ -1,110 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.*;
|
||||
import com.macro.mall.model.OmsOrder;
|
||||
import com.macro.mall.service.OmsOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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
|
||||
@Api(tags = "OmsOrderController", description = "订单管理")
|
||||
@RequestMapping("/order")
|
||||
public class OmsOrderController {
|
||||
@Autowired
|
||||
private OmsOrderService orderService;
|
||||
|
||||
@ApiOperation("查询订单")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object 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 new CommonResult().pageSuccess(orderList);
|
||||
}
|
||||
|
||||
@ApiOperation("批量发货")
|
||||
@RequestMapping(value = "/update/delivery", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delivery(@RequestBody List<OmsOrderDeliveryParam> deliveryParamList) {
|
||||
int count = orderService.delivery(deliveryParamList);//请求发送订单数量
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("批量关闭订单")
|
||||
@RequestMapping(value = "/update/close", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object close(@RequestParam("ids") List<Long> ids,@RequestParam String note) {
|
||||
int count = orderService.close(ids,note);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除订单")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = orderService.delete(ids);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取订单详情:订单信息、商品信息、操作记录")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object detail(@PathVariable Long id) {
|
||||
OmsOrderDetail orderDetailResult = orderService.detail(id);
|
||||
return new CommonResult().success(orderDetailResult);
|
||||
}
|
||||
|
||||
@ApiOperation("修改收货人信息")
|
||||
@RequestMapping(value = "/update/receiverInfo", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateReceiverInfo(@RequestBody OmsReceiverInfoParam receiverInfoParam) {
|
||||
int count = orderService.updateReceiverInfo(receiverInfoParam);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改订单费用信息")
|
||||
@RequestMapping(value = "/update/moneyInfo", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateReceiverInfo(@RequestBody OmsMoneyInfoParam moneyInfoParam) {
|
||||
int count = orderService.updateMoneyInfo(moneyInfoParam);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("备注订单")
|
||||
@RequestMapping(value = "/update/note", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateNote(@RequestParam("id") Long id,
|
||||
@RequestParam("note") String note,
|
||||
@RequestParam("status") Integer status) {//状态
|
||||
int count = orderService.updateNote(id,note,status);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.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.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单退货申请管理
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "OmsOrderReturnApplyController", description = "订单退货申请管理")
|
||||
@RequestMapping("/returnApply")
|
||||
public class OmsOrderReturnApplyController {//退货请求
|
||||
@Autowired
|
||||
private OmsOrderReturnApplyService returnApplyService;
|
||||
|
||||
@ApiOperation("分页查询退货申请")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object 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 new CommonResult().pageSuccess(returnApplyList);
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除申请")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = returnApplyService.delete(ids);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取退货申请详情")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
/*@PathVariable绑定URL占位符参数到控制器参数中*/
|
||||
public Object getItem(@PathVariable Long id) {
|
||||
OmsOrderReturnApplyResult result = returnApplyService.getItem(id);
|
||||
return new CommonResult().success(result);
|
||||
}
|
||||
|
||||
@ApiOperation("修改申请状态")
|
||||
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateStatus(@PathVariable Long id, @RequestBody OmsUpdateStatusParam statusParam) {
|
||||
int count = returnApplyService.updateStatus(id, statusParam);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.OmsOrderReturnReason;
|
||||
import com.macro.mall.service.OmsOrderReturnReasonService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 退货原因管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "OmsOrderReturnReasonController", description = "退货原因管理")
|
||||
@RequestMapping("/returnReason")
|
||||
public class OmsOrderReturnReasonController {
|
||||
@Autowired
|
||||
private OmsOrderReturnReasonService orderReturnReasonService;
|
||||
|
||||
@ApiOperation("添加退货原因")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody OmsOrderReturnReason returnReason) {//添加退货原因
|
||||
int count = orderReturnReasonService.create(returnReason);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改退货原因")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody OmsOrderReturnReason returnReason) {
|
||||
int count = orderReturnReasonService.update(id,returnReason);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除退货原因")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = orderReturnReasonService.delete(ids);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询全部退货原因")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object list(@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
|
||||
List<OmsOrderReturnReason> reasonList = orderReturnReasonService.list(pageSize,pageNum);
|
||||
return new CommonResult().pageSuccess(reasonList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取单个退货原因详情信息")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id) {
|
||||
OmsOrderReturnReason reason = orderReturnReasonService.getItem(id);
|
||||
return new CommonResult().success(reason);
|
||||
}
|
||||
|
||||
@ApiOperation("修改退货原因启用状态")
|
||||
@RequestMapping(value = "/update/status", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateStatus(@RequestParam(value = "status") Integer status,
|
||||
@RequestParam("ids") List<Long> ids) {//修改状态
|
||||
int count = orderReturnReasonService.updateStatus(ids,status);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.OssCallbackResult;
|
||||
import com.macro.mall.dto.OssPolicyResult;
|
||||
import com.macro.mall.service.impl.OssServiceImpl;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* Oss相关操作接口
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "OssController",description = "Oss管理")
|
||||
@RequestMapping("/aliyun/oss")
|
||||
public class OssController {
|
||||
@Autowired
|
||||
private OssServiceImpl ossService;//阿里云服务
|
||||
|
||||
@ApiOperation(value = "oss上传签名生成")
|
||||
@RequestMapping(value = "/policy",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object policy() {
|
||||
OssPolicyResult result = ossService.policy();
|
||||
return new CommonResult().success(result);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "oss上传成功回调")//阿里云存储
|
||||
@RequestMapping(value = "callback",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object callback(HttpServletRequest request) {
|
||||
OssCallbackResult ossCallbackResult = ossService.callback(request);
|
||||
return new CommonResult().success(ossCallbackResult);
|
||||
}
|
||||
|
||||
}
|
@ -1,138 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.PmsBrandParam;
|
||||
import com.macro.mall.service.PmsBrandService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品牌功能Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "PmsBrandController",description = "商品品牌管理")
|
||||
@RequestMapping("/brand")
|
||||
public class PmsBrandController {
|
||||
@Autowired
|
||||
private PmsBrandService brandService;//品牌服务
|
||||
|
||||
@ApiOperation(value = "获取全部品牌列表")
|
||||
@RequestMapping(value = "/listAll", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:read')")//将登陆用户的roles/permissions参数传到方法中
|
||||
public Object getList() {//获取列表
|
||||
return new CommonResult().success(brandService.listAllBrand());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "添加品牌")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:create')")
|
||||
public Object create(@Validated @RequestBody PmsBrandParam pmsBrand, BindingResult result) {//添加
|
||||
CommonResult commonResult;
|
||||
int count = brandService.createBrand(pmsBrand);
|
||||
if (count == 1) {
|
||||
commonResult = new CommonResult().success(count);
|
||||
} else {
|
||||
commonResult = new CommonResult().failed();
|
||||
}
|
||||
return commonResult;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "更新品牌")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:update')")
|
||||
public Object update(@PathVariable("id") Long id,
|
||||
@Validated @RequestBody PmsBrandParam pmsBrandParam,
|
||||
BindingResult result) {
|
||||
CommonResult commonResult;
|
||||
int count = brandService.updateBrand(id, pmsBrandParam);
|
||||
if (count == 1) {
|
||||
commonResult = new CommonResult().success(count);
|
||||
} else {
|
||||
commonResult = new CommonResult().failed();
|
||||
}
|
||||
return commonResult;
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除品牌")
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:delete')")
|
||||
public Object delete(@PathVariable("id") Long id) {
|
||||
int count = brandService.deleteBrand(id);
|
||||
if (count == 1) {
|
||||
return new CommonResult().success(null);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据品牌名称分页获取品牌列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:read')")
|
||||
public Object getList(@RequestParam(value = "keyword", required = false) String keyword,
|
||||
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||
@RequestParam(value = "pageSize", defaultValue = "5") Integer pageSize) {
|
||||
return new CommonResult().pageSuccess(brandService.listBrand(keyword, pageNum, pageSize));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "根据编号查询品牌信息")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:read')")
|
||||
public Object getItem(@PathVariable("id") Long id) {//获取信息
|
||||
return new CommonResult().success(brandService.getBrand(id));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量删除品牌")
|
||||
@RequestMapping(value = "/delete/batch", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:delete')")
|
||||
public Object deleteBatch(@RequestParam("ids") List<Long> ids) {
|
||||
int count = brandService.deleteBrand(ids);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量更新显示状态")
|
||||
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:update')")
|
||||
public Object updateShowStatus(@RequestParam("ids") List<Long> ids,
|
||||
@RequestParam("showStatus") Integer showStatus) {//更新状态
|
||||
int count = brandService.updateShowStatus(ids, showStatus);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation(value = "批量更新厂家制造商状态")
|
||||
@RequestMapping(value = "/update/factoryStatus", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:brand:update')")
|
||||
public Object updateFactoryStatus(@RequestParam("ids") List<Long> ids,
|
||||
@RequestParam("factoryStatus") Integer factoryStatus) {
|
||||
int count = brandService.updateFactoryStatus(ids, factoryStatus);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.PmsProductAttributeCategoryItem;
|
||||
import com.macro.mall.model.PmsProductAttributeCategory;
|
||||
import com.macro.mall.service.PmsProductAttributeCategoryService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品属性分类Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "PmsProductAttributeCategoryController", description = "商品属性分类管理")
|
||||
@RequestMapping("/productAttribute/category")
|
||||
public class PmsProductAttributeCategoryController {
|
||||
@Autowired
|
||||
private PmsProductAttributeCategoryService productAttributeCategoryService;
|
||||
|
||||
@ApiOperation("添加商品属性分类")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestParam String name) {
|
||||
int count = productAttributeCategoryService.create(name);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品属性分类")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestParam String name) {
|
||||
int count = productAttributeCategoryService.update(id, name);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("删除单个商品属性分类")
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object delete(@PathVariable Long id) {
|
||||
int count = productAttributeCategoryService.delete(id);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("获取单个商品属性分类信息")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id) {
|
||||
PmsProductAttributeCategory productAttributeCategory = productAttributeCategoryService.getItem(id);
|
||||
return new CommonResult().success(productAttributeCategory);
|
||||
}
|
||||
|
||||
@ApiOperation("分页获取所有商品属性分类")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getList(@RequestParam(defaultValue = "5") Integer pageSize, @RequestParam(defaultValue = "1") Integer pageNum) {
|
||||
List<PmsProductAttributeCategory> productAttributeCategoryList = productAttributeCategoryService.getList(pageSize, pageNum);
|
||||
return new CommonResult().pageSuccess(productAttributeCategoryList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有商品属性分类及其下属性")
|
||||
@RequestMapping(value = "/list/withAttr", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getListWithAttr() {
|
||||
List<PmsProductAttributeCategoryItem> productAttributeCategoryResultList = productAttributeCategoryService.getListWithAttr();
|
||||
return new CommonResult().success(productAttributeCategoryResultList);
|
||||
}
|
||||
}
|
@ -1,126 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.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.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品分类模块Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "PmsProductCategoryController", description = "商品分类管理")
|
||||
@RequestMapping("/productCategory")
|
||||
public class PmsProductCategoryController {//商品分类控制器
|
||||
@Autowired
|
||||
private PmsProductCategoryService productCategoryService;//商品分类服务
|
||||
|
||||
@ApiOperation("添加产品分类")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:create')")
|
||||
public Object create(@Validated @RequestBody PmsProductCategoryParam productCategoryParam,
|
||||
BindingResult result) {
|
||||
int count = productCategoryService.create(productCategoryParam);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("修改商品分类")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:update')")
|
||||
public Object update(@PathVariable Long id,
|
||||
@Validated
|
||||
@RequestBody PmsProductCategoryParam productCategoryParam,
|
||||
BindingResult result) {
|
||||
int count = productCategoryService.update(id, productCategoryParam);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询商品分类")
|
||||
@RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:read')")
|
||||
public Object 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 new CommonResult().pageSuccess(productCategoryList);
|
||||
}
|
||||
|
||||
@ApiOperation("根据id获取商品分类")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:read')")
|
||||
public Object getItem(@PathVariable Long id) {
|
||||
PmsProductCategory productCategory = productCategoryService.getItem(id);
|
||||
return new CommonResult().success(productCategory);
|
||||
}
|
||||
|
||||
@ApiOperation("删除商品分类")
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:delete')")
|
||||
public Object delete(@PathVariable Long id) {
|
||||
int count = productCategoryService.delete(id);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("修改导航栏显示状态")
|
||||
@RequestMapping(value = "/update/navStatus", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:update')")
|
||||
public Object updateNavStatus(@RequestParam("ids") List<Long> ids, @RequestParam("navStatus") Integer navStatus) {
|
||||
int count = productCategoryService.updateNavStatus(ids, navStatus);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("修改显示状态")
|
||||
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:update')")
|
||||
public Object updateShowStatus(@RequestParam("ids") List<Long> ids, @RequestParam("showStatus") Integer showStatus) {
|
||||
int count = productCategoryService.updateShowStatus(ids, showStatus);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("查询所有一级分类及子分类")
|
||||
@RequestMapping(value = "/list/withChildren", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:productCategory:read')")
|
||||
public Object listWithChildren() {//携带子分类
|
||||
List<PmsProductCategoryWithChildrenItem> list = productCategoryService.listWithChildren();
|
||||
return new CommonResult().success(list);
|
||||
}
|
||||
}
|
@ -1,153 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.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.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.validation.BindingResult;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "PmsProductController", description = "商品管理")
|
||||
@RequestMapping("/product")
|
||||
public class PmsProductController {
|
||||
@Autowired
|
||||
private PmsProductService productService;
|
||||
|
||||
@ApiOperation("创建商品")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:create')")
|
||||
public Object create(@RequestBody PmsProductParam productParam, BindingResult bindingResult) {//创建(添加)商品
|
||||
int count = productService.create(productParam);//商品服务
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("根据商品id获取商品编辑信息")
|
||||
@RequestMapping(value = "/updateInfo/{id}", method = RequestMethod.GET)//更新信息
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:read')")
|
||||
public Object getUpdateInfo(@PathVariable Long id) {
|
||||
PmsProductResult productResult = productService.getUpdateInfo(id);
|
||||
return new CommonResult().success(productResult);
|
||||
}
|
||||
|
||||
@ApiOperation("更新商品")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:update')")
|
||||
public Object update(@PathVariable Long id, @RequestBody PmsProductParam productParam, BindingResult bindingResult) {
|
||||
int count = productService.update(id, productParam);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("查询商品")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:read')")
|
||||
public Object 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 new CommonResult().pageSuccess(productList);
|
||||
}
|
||||
|
||||
@ApiOperation("根据商品名称或货号模糊查询")
|
||||
@RequestMapping(value = "/simpleList", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getList(String keyword) {//模糊查询
|
||||
List<PmsProduct> productList = productService.list(keyword);
|
||||
return new CommonResult().success(productList);
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改审核状态")
|
||||
@RequestMapping(value = "/update/verifyStatus",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:update')")
|
||||
public Object 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 new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("批量上下架")
|
||||
@RequestMapping(value = "/update/publishStatus",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:update')")
|
||||
public Object updatePublishStatus(@RequestParam("ids") List<Long> ids,
|
||||
@RequestParam("publishStatus") Integer publishStatus) {
|
||||
int count = productService.updatePublishStatus(ids, publishStatus);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("批量推荐商品")
|
||||
@RequestMapping(value = "/update/recommendStatus",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:update')")
|
||||
public Object updateRecommendStatus(@RequestParam("ids") List<Long> ids,
|
||||
@RequestParam("recommendStatus") Integer recommendStatus) {
|
||||
int count = productService.updateRecommendStatus(ids, recommendStatus);//更新推荐状态
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("批量设为新品")
|
||||
@RequestMapping(value = "/update/newStatus",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:update')")
|
||||
public Object updateNewStatus(@RequestParam("ids") List<Long> ids,
|
||||
@RequestParam("newStatus") Integer newStatus) {
|
||||
int count = productService.updateNewStatus(ids, newStatus);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改删除状态")
|
||||
@RequestMapping(value = "/update/deleteStatus",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
@PreAuthorize("hasAuthority('pms:product:delete')")
|
||||
public Object updateDeleteStatus(@RequestParam("ids") List<Long> ids,
|
||||
@RequestParam("deleteStatus") Integer deleteStatus) {
|
||||
int count = productService.updateDeleteStatus(ids, deleteStatus);
|
||||
if (count > 0) {
|
||||
return new CommonResult().success(count);
|
||||
} else {
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.PmsSkuStock;
|
||||
import com.macro.mall.service.PmsSkuStockService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* sku库存Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "PmsSkuStockController", description = "sku商品库存管理")
|
||||
@RequestMapping("/sku")
|
||||
public class PmsSkuStockController {
|
||||
@Autowired
|
||||
private PmsSkuStockService skuStockService;
|
||||
|
||||
@ApiOperation("根据商品编号及编号模糊搜索sku库存")
|
||||
@RequestMapping(value = "/{pid}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getList(@PathVariable Long pid, @RequestParam(value = "keyword",required = false) String keyword) {//获取列表
|
||||
List<PmsSkuStock> skuStockList = skuStockService.getList(pid, keyword);//sku存储列表
|
||||
return new CommonResult().success(skuStockList);
|
||||
}
|
||||
@ApiOperation("批量更新库存信息")
|
||||
@RequestMapping(value ="/update/{pid}",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long pid,@RequestBody List<PmsSkuStock> skuStockList){
|
||||
int count = skuStockService.update(pid,skuStockList);//sku存储服务
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}else{
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,76 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.SmsCouponParam;
|
||||
import com.macro.mall.model.SmsCoupon;
|
||||
import com.macro.mall.service.SmsCouponService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠券管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "SmsCouponController", description = "优惠券管理")
|
||||
@RequestMapping("/coupon")
|
||||
public class SmsCouponController {
|
||||
@Autowired
|
||||
private SmsCouponService couponService;
|
||||
@ApiOperation("添加优惠券")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object add(@RequestBody SmsCouponParam couponParam) {//添加
|
||||
int count = couponService.create(couponParam);//优惠券服务
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("删除优惠券")
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@PathVariable Long id) {
|
||||
int count = couponService.delete(id);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改优惠券")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id,@RequestBody SmsCouponParam couponParam) {
|
||||
int count = couponService.update(id,couponParam);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("根据优惠券名称和类型分页获取优惠券列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object 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 new CommonResult().pageSuccess(couponList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取单个优惠券的详细信息")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id) {//获取信息
|
||||
SmsCouponParam couponParam = couponService.getItem(id);
|
||||
return new CommonResult().success(couponParam);
|
||||
}
|
||||
}
|
@ -1,84 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.SmsFlashPromotion;
|
||||
import com.macro.mall.service.SmsFlashPromotionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 限时购活动管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "SmsFlashPromotionController",description = "限时购活动管理")
|
||||
@RequestMapping("/flash")
|
||||
public class SmsFlashPromotionController {
|
||||
@Autowired
|
||||
private SmsFlashPromotionService flashPromotionService;//限时促销服务
|
||||
@ApiOperation("添加活动")
|
||||
@RequestMapping(value = "/create",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody SmsFlashPromotion flashPromotion){
|
||||
int count = flashPromotionService.create(flashPromotion);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("编辑活动信息")
|
||||
@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 new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("删除活动信息")
|
||||
@RequestMapping(value = "/delete/{id}",method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@PathVariable Long id){
|
||||
int count = flashPromotionService.delete(id);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改上下线状态")
|
||||
@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 new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取活动详情")
|
||||
@RequestMapping(value = "/{id}",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id){//获取信息
|
||||
SmsFlashPromotion flashPromotion = flashPromotionService.getItem(id);
|
||||
return new CommonResult().success(flashPromotion);
|
||||
}
|
||||
|
||||
@ApiOperation("根据活动名称分页查询")
|
||||
@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 new CommonResult().pageSuccess(flashPromotionList);
|
||||
}
|
||||
}
|
@ -1,75 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.SmsFlashPromotionProduct;
|
||||
import com.macro.mall.model.SmsFlashPromotionProductRelation;
|
||||
import com.macro.mall.service.SmsFlashPromotionProductRelationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 限时购和商品关系管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "SmsFlashPromotionProductRelationController", description = "限时购和商品关系管理")
|
||||
@RequestMapping("/flashProductRelation")
|
||||
public class SmsFlashPromotionProductRelationController {
|
||||
@Autowired
|
||||
private SmsFlashPromotionProductRelationService relationService;//限时促销商品关联服务
|
||||
@ApiOperation("批量选择商品添加关联")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody List<SmsFlashPromotionProductRelation> relationList) {
|
||||
int count = relationService.create(relationList);//关联服务
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改关联相关信息")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody SmsFlashPromotionProductRelation relation) {
|
||||
int count = relationService.update(id,relation);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("删除关联")
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@PathVariable Long id) {
|
||||
int count = relationService.delete(id);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取管理商品促销信息")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id) {//根据商品id获取信息
|
||||
SmsFlashPromotionProductRelation relation = relationService.getItem(id);
|
||||
return new CommonResult().success(relation);
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询不同场次关联及商品信息")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object list(@RequestParam(value = "flashPromotionId")Long flashPromotionId,//限时促销id
|
||||
@RequestParam(value = "flashPromotionSessionId")Long flashPromotionSessionId,//限时促销会场id
|
||||
@RequestParam(value = "pageSize",defaultValue = "5")Integer pageSize,
|
||||
@RequestParam(value = "pageNum",defaultValue = "1")Integer pageNum) {
|
||||
List<SmsFlashPromotionProduct> flashPromotionProductList = relationService.list(flashPromotionId,flashPromotionSessionId,pageSize,pageNum);
|
||||
return new CommonResult().pageSuccess(flashPromotionProductList);
|
||||
}
|
||||
}
|
@ -1,91 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.SmsFlashPromotionSessionDetail;
|
||||
import com.macro.mall.model.SmsFlashPromotionSession;
|
||||
import com.macro.mall.service.SmsFlashPromotionSessionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 限时购场次管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "SmsFlashPromotionSessionController", description = "限时购场次管理")
|
||||
@RequestMapping("/flashSession")
|
||||
public class SmsFlashPromotionSessionController {
|
||||
@Autowired
|
||||
private SmsFlashPromotionSessionService flashPromotionSessionService;
|
||||
@ApiOperation("添加场次")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody SmsFlashPromotionSession promotionSession) {
|
||||
int count = flashPromotionSessionService.create(promotionSession);//限时促销会场服务
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改场次")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody SmsFlashPromotionSession promotionSession) {
|
||||
int count = flashPromotionSessionService.update(id,promotionSession);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改启用状态")
|
||||
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateStatus(@PathVariable Long id, Integer status) {
|
||||
int count = flashPromotionSessionService.updateStatus(id,status);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("删除场次")
|
||||
@RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@PathVariable Long id) {
|
||||
int count = flashPromotionSessionService.delete(id);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取场次详情")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id) {
|
||||
SmsFlashPromotionSession promotionSession = flashPromotionSessionService.getItem(id);
|
||||
return new CommonResult().success(promotionSession);
|
||||
}
|
||||
|
||||
@ApiOperation("获取全部场次")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object list() {//获取信息成列表
|
||||
List<SmsFlashPromotionSession> promotionSessionList = flashPromotionSessionService.list();
|
||||
return new CommonResult().success(promotionSessionList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取全部可选场次及其数量")
|
||||
@RequestMapping(value = "/selectList", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object selectList(Long flashPromotionId) {//可选择列表
|
||||
List<SmsFlashPromotionSessionDetail> promotionSessionList = flashPromotionSessionService.selectList(flashPromotionId);
|
||||
return new CommonResult().success(promotionSessionList);
|
||||
}
|
||||
}
|
@ -1,83 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.SmsHomeAdvertise;
|
||||
import com.macro.mall.service.SmsHomeAdvertiseService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页轮播广告管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "SmsHomeAdvertiseController", description = "首页轮播广告管理")
|
||||
@RequestMapping("/home/advertise")
|
||||
public class SmsHomeAdvertiseController {
|
||||
@Autowired
|
||||
private SmsHomeAdvertiseService advertiseService;
|
||||
|
||||
@ApiOperation("添加广告")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody SmsHomeAdvertise advertise) {
|
||||
int count = advertiseService.create(advertise);
|
||||
if (count > 0)
|
||||
return new CommonResult().success(count);
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("删除广告")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = advertiseService.delete(ids);
|
||||
if (count > 0)
|
||||
return new CommonResult().success(count);
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改上下线状态")
|
||||
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateStatus(@PathVariable Long id, Integer status) {
|
||||
int count = advertiseService.updateStatus(id, status);
|
||||
if (count > 0)
|
||||
return new CommonResult().success(count);
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取广告详情")
|
||||
@RequestMapping(value = "/{id}", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object getItem(@PathVariable Long id) {
|
||||
SmsHomeAdvertise advertise = advertiseService.getItem(id);
|
||||
return new CommonResult().success(advertise);
|
||||
}
|
||||
|
||||
@ApiOperation("修改广告")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody SmsHomeAdvertise advertise) {
|
||||
int count = advertiseService.update(id, advertise);
|
||||
if (count > 0)
|
||||
return new CommonResult().success(count);
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询广告")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object 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 new CommonResult().pageSuccess(advertiseList);
|
||||
}
|
||||
}
|
@ -1,77 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.SmsHomeNewProduct;
|
||||
import com.macro.mall.service.SmsHomeNewProductService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 首页新品管理Controller
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "SmsHomeNewProductController", description = "首页新品管理")
|
||||
@RequestMapping("/home/newProduct")
|
||||
public class SmsHomeNewProductController {
|
||||
@Autowired
|
||||
private SmsHomeNewProductService homeNewProductService;
|
||||
@ApiOperation("添加首页推荐品牌")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody List<SmsHomeNewProduct> homeBrandList) {
|
||||
int count = homeNewProductService.create(homeBrandList);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改推荐排序")
|
||||
@RequestMapping(value = "/update/sort/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateSort(@PathVariable Long id, Integer sort) {
|
||||
int count = homeNewProductService.updateSort(id,sort);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除推荐")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = homeNewProductService.delete(ids);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("批量修改推荐状态")
|
||||
@RequestMapping(value = "/update/recommendStatus", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updateRecommendStatus(@RequestParam("ids") List<Long> ids, @RequestParam Integer recommendStatus) {
|
||||
int count = homeNewProductService.updateRecommendStatus(ids,recommendStatus);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询推荐")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object 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 new CommonResult().pageSuccess(homeBrandList);
|
||||
}
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.UmsMemberLevel;
|
||||
import com.macro.mall.service.UmsMemberLevelService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
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
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "UmsMemberLevelController",description = "会员等级管理")
|
||||
@RequestMapping("/memberLevel")
|
||||
public class UmsMemberLevelController {
|
||||
@Autowired
|
||||
private UmsMemberLevelService memberLevelService;//会员等级服务
|
||||
@RequestMapping(value = "/list",method = RequestMethod.GET)
|
||||
@ApiOperation("查询所有会员等级")
|
||||
@ResponseBody
|
||||
public Object list(@RequestParam("defaultStatus") Integer defaultStatus){
|
||||
List<UmsMemberLevel> memberLevelList = memberLevelService.list(defaultStatus);
|
||||
return new CommonResult().success(memberLevelList);
|
||||
}
|
||||
}
|
@ -1,72 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.dto.UmsPermissionNode;
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.service.UmsPermissionService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户权限管理
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "UmsPermissionController", description = "后台用户权限管理")
|
||||
@RequestMapping("/permission")
|
||||
public class UmsPermissionController {
|
||||
@Autowired
|
||||
private UmsPermissionService permissionService;//权限服务
|
||||
@ApiOperation("添加权限")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody UmsPermission permission) {
|
||||
int count = permissionService.create(permission);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改权限")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody UmsPermission permission) {
|
||||
int count = permissionService.update(id,permission);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("根据id批量删除权限")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {
|
||||
int count = permissionService.delete(ids);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("以层级结构返回所有权限")
|
||||
@RequestMapping(value = "/treeList", method = RequestMethod.GET)//层级树
|
||||
@ResponseBody
|
||||
public Object treeList() {
|
||||
List<UmsPermissionNode> permissionNodeList = permissionService.treeList();
|
||||
return new CommonResult().success(permissionNodeList);
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有权限列表")
|
||||
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object list() {
|
||||
List<UmsPermission> permissionList = permissionService.list();
|
||||
return new CommonResult().success(permissionList);
|
||||
}
|
||||
}
|
@ -1,86 +0,0 @@
|
||||
package com.macro.mall.controller;
|
||||
|
||||
import com.macro.mall.dto.CommonResult;
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsRole;
|
||||
import com.macro.mall.service.UmsRoleService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户角色管理
|
||||
*/
|
||||
@Controller
|
||||
@Api(tags = "UmsRoleController", description = "后台用户角色管理")
|
||||
@RequestMapping("/role")
|
||||
public class UmsRoleController {
|
||||
@Autowired
|
||||
private UmsRoleService roleService;//角色服务
|
||||
|
||||
@ApiOperation("添加角色")
|
||||
@RequestMapping(value = "/create", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object create(@RequestBody UmsRole role) {
|
||||
int count = roleService.create(role);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("修改角色")
|
||||
@RequestMapping(value = "/update/{id}", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object update(@PathVariable Long id, @RequestBody UmsRole role) {
|
||||
int count = roleService.update(id,role);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("批量删除角色")
|
||||
@RequestMapping(value = "/delete", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object delete(@RequestParam("ids") List<Long> ids) {//根据id删除角色
|
||||
int count = roleService.delete(ids);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取相应角色权限")
|
||||
@RequestMapping(value = "/permission/{roleId}", method = RequestMethod.GET)//角色权限
|
||||
@ResponseBody
|
||||
public Object getPermissionList(@PathVariable Long roleId) {
|
||||
List<UmsPermission> permissionList =roleService.getPermissionList(roleId);
|
||||
return new CommonResult().success(permissionList);
|
||||
}
|
||||
|
||||
@ApiOperation("修改角色权限")
|
||||
@RequestMapping(value = "/permission/update", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public Object updatePermission(@RequestParam Long roleId,
|
||||
@RequestParam("permissionIds") List<Long> permissionIds) {
|
||||
int count = roleService.updatePermission(roleId,permissionIds);
|
||||
if(count>0){
|
||||
return new CommonResult().success(count);
|
||||
}
|
||||
return new CommonResult().failed();
|
||||
}
|
||||
|
||||
@ApiOperation("获取所有角色")
|
||||
@RequestMapping(value = "/list",method = RequestMethod.GET)
|
||||
@ResponseBody
|
||||
public Object list(){
|
||||
List<UmsRole> roleList = roleService.list();
|
||||
return new CommonResult().success(roleList);
|
||||
}
|
||||
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.CmsPrefrenceAreaProductRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自定义优选和商品关系操作
|
||||
* DAO数据库访问对象
|
||||
*/
|
||||
public interface CmsPrefrenceAreaProductRelationDao {//优选区域商品关系
|
||||
int insertList(@Param("list") List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.CmsSubjectProductRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自定义商品和专题关系操作
|
||||
*/
|
||||
public interface CmsSubjectProductRelationDao {//专题商品关系
|
||||
int insertList(@Param("list") List<CmsSubjectProductRelation> subjectProductRelationList);//插入列表
|
||||
}
|
@ -1,29 +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
|
||||
*/
|
||||
public interface OmsOrderDao {
|
||||
/**
|
||||
* 係숭꿴璂땐데
|
||||
*/
|
||||
List<OmsOrder> getList(@Param("queryParam") OmsOrderQueryParam queryParam);
|
||||
|
||||
/**
|
||||
* 툽좆랙새
|
||||
*/
|
||||
int delivery(@Param("list") List<OmsOrderDeliveryParam> deliveryParamList);
|
||||
|
||||
/**
|
||||
* 삿혤땐데圈헙
|
||||
*/
|
||||
OmsOrderDetail getDetail(@Param("id") Long id);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.OmsOrderOperateHistory;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 땐데꾸鱗션쩌菱땍屢Dao
|
||||
*/
|
||||
public interface OmsOrderOperateHistoryDao {
|
||||
int insertList(@Param("list") List<OmsOrderOperateHistory> orderOperateHistoryList);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.PmsMemberPrice;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自定义会员价格Dao
|
||||
*/
|
||||
public interface PmsMemberPriceDao {//会员价格
|
||||
int insertList(@Param("list") List<PmsMemberPrice> memberPriceList);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.dto.PmsProductAttributeCategoryItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自定义商品属性分类Dao
|
||||
*/
|
||||
public interface PmsProductAttributeCategoryDao {//商品属性分类
|
||||
List<PmsProductAttributeCategoryItem> getListWithAttr();
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.dto.ProductAttrInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自定义商品属性Dao
|
||||
*/
|
||||
public interface PmsProductAttributeDao {//商品属性
|
||||
List<ProductAttrInfo> getProductAttrInfo(@Param("id") Long productCategoryId);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.PmsProductCategoryAttributeRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自定义商品分类和属性关系Dao
|
||||
*/
|
||||
public interface PmsProductCategoryAttributeRelationDao {//商品分类属性关系
|
||||
int insertList(@Param("list") List<PmsProductCategoryAttributeRelation> productCategoryAttributeRelationList);
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.dto.PmsProductCategoryWithChildrenItem;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品分类自定义Dao
|
||||
*/
|
||||
public interface PmsProductCategoryDao {//商品分类
|
||||
List<PmsProductCategoryWithChildrenItem> listWithChildren();
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.dto.PmsProductResult;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
||||
/**
|
||||
* 商品自定义Dao
|
||||
*/
|
||||
public interface PmsProductDao {
|
||||
/**
|
||||
* 获取商品编辑信息
|
||||
*/
|
||||
PmsProductResult getUpdateInfo(@Param("id") Long id);//获取更新信息
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.PmsProductLadder;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自定义会员阶梯价格Dao
|
||||
*/
|
||||
public interface PmsProductLadderDao {//商品阶梯层次
|
||||
int insertList(@Param("list") List<PmsProductLadder> productLadderList);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.PmsProductVertifyRecord;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品审核日志自定义dao
|
||||
*/
|
||||
public interface PmsProductVertifyRecordDao {//商品审核记录
|
||||
int insertList(@Param("list") List<PmsProductVertifyRecord> list);
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.dto.SmsCouponParam;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 优惠券管理自定义查询Dao
|
||||
*/
|
||||
public interface SmsCouponDao {//优惠券Dao
|
||||
SmsCouponParam getItem(@Param("id") Long id);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.SmsCouponProductCategoryRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠券和商品分类关系自定义Dao
|
||||
*/
|
||||
public interface SmsCouponProductCategoryRelationDao {//优惠券商品分类关系
|
||||
int insertList(@Param("list")List<SmsCouponProductCategoryRelation> productCategoryRelationList);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.SmsCouponProductRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优惠券和产品关系自定义Dao
|
||||
*/
|
||||
public interface SmsCouponProductRelationDao {//优惠券商品关系
|
||||
int insertList(@Param("list")List<SmsCouponProductRelation> productRelationList);
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.dto.SmsFlashPromotionProduct;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 限时购商品关联自定义Dao
|
||||
*/
|
||||
public interface SmsFlashPromotionProductRelationDao {
|
||||
/**
|
||||
* 获取限时购及相关商品信息
|
||||
*/
|
||||
List<SmsFlashPromotionProduct> getList(@Param("flashPromotionId") Long flashPromotionId, @Param("flashPromotionSessionId") Long flashPromotionSessionId);
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.UmsAdminPermissionRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户权限自定义Dao
|
||||
*/
|
||||
public interface UmsAdminPermissionRelationDao {//用户权限关系
|
||||
int insertList(@Param("list") List<UmsAdminPermissionRelation> list);
|
||||
}
|
@ -1,33 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.UmsAdminRoleRelation;
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsRole;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户与角色管理自定义Dao
|
||||
*/
|
||||
public interface UmsAdminRoleRelationDao {//用户角色关系
|
||||
/**
|
||||
* 批量插入用户角色关系
|
||||
*/
|
||||
int insertList(@Param("list") List<UmsAdminRoleRelation> adminRoleRelationList);
|
||||
|
||||
/**
|
||||
* 获取用于所有角色
|
||||
*/
|
||||
List<UmsRole> getRoleList(@Param("adminId") Long adminId);
|
||||
|
||||
/**
|
||||
* 获取用户所有角色权限
|
||||
*/
|
||||
List<UmsPermission> getRolePermissionList(@Param("adminId") Long adminId);
|
||||
|
||||
/**
|
||||
* 获取用户所有权限(包括+ - 权限)
|
||||
*/
|
||||
List<UmsPermission> getPermissionList(@Param("adminId") Long adminId);
|
||||
}
|
@ -1,22 +0,0 @@
|
||||
package com.macro.mall.dao;
|
||||
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import com.macro.mall.model.UmsRolePermissionRelation;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 后台用户角色管理自定义Dao
|
||||
*/
|
||||
public interface UmsRolePermissionRelationDao {
|
||||
/**
|
||||
* 批量插入角色和权限关系
|
||||
*/
|
||||
int insertList(@Param("list")List<UmsRolePermissionRelation> list);
|
||||
|
||||
/**
|
||||
* 根据角色获取权限
|
||||
*/
|
||||
List<UmsPermission> getPermissionList(@Param("roleId") Long roleId);
|
||||
}
|
@ -1,145 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.macro.mall.util.JsonUtil;
|
||||
import org.springframework.validation.BindingResult;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 通用返回对象
|
||||
*/
|
||||
public class CommonResult {
|
||||
//操作成功
|
||||
public static final int SUCCESS = 200;
|
||||
//操作失败
|
||||
public static final int FAILED = 500;
|
||||
//参数校验失败
|
||||
public static final int VALIDATE_FAILED = 404;
|
||||
//未认证
|
||||
public static final int UNAUTHORIZED = 401;
|
||||
//未授权
|
||||
public static final int FORBIDDEN = 403;
|
||||
private int code;
|
||||
private String message;
|
||||
private Object data;
|
||||
|
||||
/**
|
||||
* 普通成功返回
|
||||
*
|
||||
* @param data 获取的数据
|
||||
*/
|
||||
public CommonResult success(Object data) {
|
||||
this.code = SUCCESS;
|
||||
this.message = "操作成功";
|
||||
this.data = data;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 返回分页成功数据
|
||||
*/
|
||||
public CommonResult pageSuccess(List data) {
|
||||
PageInfo pageInfo = new PageInfo(data);//分页数据
|
||||
Map<String, Object> result = new HashMap<>();
|
||||
result.put("pageSize", pageInfo.getPageSize());
|
||||
result.put("totalPage", pageInfo.getPages());
|
||||
result.put("total", pageInfo.getTotal());
|
||||
result.put("pageNum", pageInfo.getPageNum());
|
||||
result.put("list", pageInfo.getList());
|
||||
this.code = SUCCESS;
|
||||
this.message = "操作成功";
|
||||
this.data = result;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 普通失败提示信息
|
||||
*/
|
||||
public CommonResult failed() {
|
||||
this.code = FAILED;
|
||||
this.message = "操作失败";
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数验证失败使用
|
||||
*
|
||||
* @param message 错误信息
|
||||
*/
|
||||
public CommonResult validateFailed(String message) {
|
||||
this.code = VALIDATE_FAILED;
|
||||
this.message = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 未登录时使用
|
||||
*
|
||||
* @param message 错误信息
|
||||
*/
|
||||
public CommonResult unauthorized(String message) {
|
||||
this.code = UNAUTHORIZED;
|
||||
this.message = "暂未登录或token已经过期";//证书过期
|
||||
this.data = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 未授权时使用
|
||||
*
|
||||
* @param message 错误信息
|
||||
*/
|
||||
public CommonResult forbidden(String message) {
|
||||
this.code = FORBIDDEN;
|
||||
this.message = "没有相关权限";
|
||||
this.data = message;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数验证失败使用
|
||||
* @param result 错误信息
|
||||
*/
|
||||
public CommonResult validateFailed(BindingResult result) {
|
||||
validateFailed(result.getFieldError().getDefaultMessage());
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return JsonUtil.objectToJson(this);
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
/*获取验证码*/
|
||||
return code;
|
||||
}
|
||||
|
||||
public void setCode(int code) {
|
||||
/*编辑验证码*/
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
/*获取信息*/
|
||||
return message;
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
/*编辑信息*/
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public Object getData() {
|
||||
/*获取数据*/
|
||||
return data;
|
||||
}
|
||||
|
||||
public void setData(Object data) {
|
||||
/*编辑数据*/
|
||||
this.data = data;
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 땐데랙새꽝鑒
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class OmsOrderDeliveryParam {
|
||||
@ApiModelProperty("땐데id")
|
||||
private Long orderId;
|
||||
@ApiModelProperty("膠직무鱇")
|
||||
private String deliveryCompany;
|
||||
@ApiModelProperty("膠직데뵀")
|
||||
private String deliverySn;
|
||||
}
|
@ -1,21 +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 lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单详情信息
|
||||
*/
|
||||
public class OmsOrderDetail extends OmsOrder {
|
||||
@Getter
|
||||
@Setter
|
||||
private List<OmsOrderItem> orderItemList;
|
||||
@Getter
|
||||
@Setter
|
||||
private List<OmsOrderOperateHistory> historyList;//订单操作日志
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.OmsCompanyAddress;
|
||||
import com.macro.mall.model.OmsOrderReturnApply;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 申请信息封装
|
||||
*/
|
||||
public class OmsOrderReturnApplyResult extends OmsOrderReturnApply {
|
||||
@Getter
|
||||
@Setter
|
||||
private OmsCompanyAddress companyAddress;
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 订单修改收货人信息参数
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class OmsReceiverInfoParam {
|
||||
private Long orderId;//订单id
|
||||
private String receiverName;//收货人姓名
|
||||
private String receiverPhone;//收货人电话号码
|
||||
private String receiverPostCode;//收货地址邮政编码
|
||||
private String receiverDetailAddress;//收货人详细地址
|
||||
private String receiverProvince;//收货人省份
|
||||
private String receiverCity;//收货人城市
|
||||
private String receiverRegion;//收货地区
|
||||
private Integer status;//状态
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
/**
|
||||
* 反馈参数
|
||||
*/
|
||||
|
||||
public class OssCallbackParam {//反馈参数
|
||||
private String callbackUrl;//反馈资源定位符
|
||||
private String callbackBody;//反馈体
|
||||
private String callbackBodyType;//反馈体类型
|
||||
|
||||
public String getCallbackUrl() {
|
||||
/*获取反馈资源定位符*/
|
||||
return callbackUrl;
|
||||
}
|
||||
|
||||
public void setCallbackUrl(String callbackUrl) {
|
||||
/*设置反馈资源定位符*/
|
||||
this.callbackUrl = callbackUrl;
|
||||
}
|
||||
|
||||
public String getCallbackBody() {
|
||||
/*获取反馈体*/
|
||||
return callbackBody;
|
||||
}
|
||||
|
||||
public void setCallbackBody(String callbackBody) {
|
||||
/*设置反馈体*/
|
||||
this.callbackBody = callbackBody;
|
||||
}
|
||||
|
||||
public String getCallbackBodyType() {
|
||||
/*获取反馈体类型*/
|
||||
return callbackBodyType;
|
||||
}
|
||||
|
||||
public void setCallbackBodyType(String callbackBodyType) {
|
||||
/*设置反馈体类型*/
|
||||
this.callbackBodyType = callbackBodyType;
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
/**
|
||||
* 反馈结果
|
||||
*/
|
||||
public class OssCallbackResult {
|
||||
private String filename;//文件名称
|
||||
private String size;
|
||||
private String mimeType;
|
||||
private String width;
|
||||
private String height;
|
||||
|
||||
public String getFilename() {
|
||||
return filename;
|
||||
}
|
||||
|
||||
public void setFilename(String filename) {
|
||||
this.filename = filename;
|
||||
}
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
public String getMimeType() {//获取文件方法
|
||||
return mimeType;
|
||||
}
|
||||
|
||||
public void setMimeType(String mimeType) {
|
||||
this.mimeType = mimeType;
|
||||
}
|
||||
|
||||
public String getWidth() {//显示大小--宽
|
||||
return width;
|
||||
}
|
||||
|
||||
public void setWidth(String width) {
|
||||
this.width = width;
|
||||
}
|
||||
|
||||
public String getHeight() {//显示大小--高
|
||||
return height;
|
||||
}
|
||||
|
||||
public void setHeight(String height) {
|
||||
this.height = height;
|
||||
}
|
||||
}
|
@ -1,52 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
/**
|
||||
* 获取OSS上传授权返回结果
|
||||
*/
|
||||
public class OssPolicyResult {
|
||||
private String accessKeyId;//辅助键id
|
||||
private String policy;//授权
|
||||
private String signature;//签名
|
||||
private String dir;//目录
|
||||
private String host;//主机
|
||||
|
||||
public String getAccessKeyId() {
|
||||
return accessKeyId;
|
||||
}
|
||||
|
||||
public void setAccessKeyId(String accessKeyId) {
|
||||
this.accessKeyId = accessKeyId;
|
||||
}
|
||||
|
||||
public String getPolicy() {
|
||||
return policy;
|
||||
}
|
||||
|
||||
public void setPolicy(String policy) {
|
||||
this.policy = policy;
|
||||
}
|
||||
|
||||
public String getSignature() {
|
||||
return signature;
|
||||
}
|
||||
|
||||
public void setSignature(String signature) {
|
||||
this.signature = signature;
|
||||
}
|
||||
|
||||
public String getDir() {
|
||||
return dir;
|
||||
}
|
||||
|
||||
public void setDir(String dir) {
|
||||
this.dir = dir;
|
||||
}
|
||||
|
||||
public String getHost() {
|
||||
return host;
|
||||
}
|
||||
|
||||
public void setHost(String host) {
|
||||
this.host = host;
|
||||
}
|
||||
}
|
@ -1,100 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.validator.FlagValidator;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* 品牌传递参数
|
||||
*/
|
||||
public class PmsBrandParam {//品牌参数
|
||||
@ApiModelProperty(value = "品牌名称",required = true)
|
||||
@NotEmpty(message = "名称不能为空")
|
||||
private String name;
|
||||
@ApiModelProperty(value = "品牌首字母")
|
||||
private String firstLetter;
|
||||
@ApiModelProperty(value = "排序字段")
|
||||
@Min(value = 0, message = "排序最小为0")
|
||||
private Integer sort;
|
||||
@ApiModelProperty(value = "是否为厂家制造商")
|
||||
@FlagValidator(value = {"0","1"}, message = "厂家状态不正确")
|
||||
private Integer factoryStatus;
|
||||
@ApiModelProperty(value = "是否进行显示")
|
||||
@FlagValidator(value = {"0","1"}, message = "显示状态不正确")
|
||||
private Integer showStatus;
|
||||
@ApiModelProperty(value = "品牌logo",required = true)
|
||||
@NotEmpty(message = "品牌logo不能为空")
|
||||
private String logo;
|
||||
@ApiModelProperty(value = "品牌大图")
|
||||
private String bigPic;
|
||||
@ApiModelProperty(value = "品牌故事")
|
||||
private String brandStory;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getFirstLetter() {
|
||||
return firstLetter;
|
||||
}
|
||||
|
||||
public void setFirstLetter(String firstLetter) {
|
||||
this.firstLetter = firstLetter;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Integer getFactoryStatus() {
|
||||
return factoryStatus;
|
||||
}
|
||||
|
||||
public void setFactoryStatus(Integer factoryStatus) {
|
||||
this.factoryStatus = factoryStatus;
|
||||
}
|
||||
|
||||
public Integer getShowStatus() {
|
||||
return showStatus;
|
||||
}
|
||||
|
||||
public void setShowStatus(Integer showStatus) {
|
||||
this.showStatus = showStatus;
|
||||
}
|
||||
|
||||
public String getLogo() {
|
||||
return logo;
|
||||
}
|
||||
|
||||
public void setLogo(String logo) {
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
public String getBigPic() {
|
||||
return bigPic;
|
||||
}
|
||||
|
||||
public void setBigPic(String bigPic) {
|
||||
this.bigPic = bigPic;
|
||||
}
|
||||
|
||||
public String getBrandStory() {
|
||||
return brandStory;
|
||||
}
|
||||
|
||||
public void setBrandStory(String brandStory) {
|
||||
this.brandStory = brandStory;
|
||||
}
|
||||
}
|
@ -1,21 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.PmsProductAttribute;
|
||||
import com.macro.mall.model.PmsProductAttributeCategory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 包含有分类下属性的dto
|
||||
*/
|
||||
public class PmsProductAttributeCategoryItem extends PmsProductAttributeCategory {//商品属性分类信息
|
||||
private List<PmsProductAttribute> productAttributeList;
|
||||
|
||||
public List<PmsProductAttribute> getProductAttributeList() {//获取商品属性列表
|
||||
return productAttributeList;
|
||||
}
|
||||
|
||||
public void setProductAttributeList(List<PmsProductAttribute> productAttributeList) {//编辑商品属性列表
|
||||
this.productAttributeList = productAttributeList;
|
||||
}
|
||||
}
|
@ -1,118 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.validator.FlagValidator;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 添加更新产品分类的参数
|
||||
*/
|
||||
public class PmsProductCategoryParam {//商品分类参数
|
||||
@ApiModelProperty("父分类的编号")
|
||||
private Long parentId;
|
||||
@ApiModelProperty(value = "商品分类名称",required = true)
|
||||
@NotEmpty(message = "商品分类名称不能为空")
|
||||
private String name;
|
||||
@ApiModelProperty("分类单位")
|
||||
private String productUnit;
|
||||
@ApiModelProperty("是否在导航栏显示")
|
||||
@FlagValidator(value = {"0","1"},message = "状态只能为0或1")
|
||||
private Integer navStatus;
|
||||
@ApiModelProperty("是否进行显示")
|
||||
@FlagValidator(value = {"0","1"},message = "状态只能为0或1")
|
||||
private Integer showStatus;
|
||||
@ApiModelProperty("排序")
|
||||
@Min(value = 0,message = "排序最小为0")
|
||||
private Integer sort;
|
||||
@ApiModelProperty("图标")
|
||||
private String icon;
|
||||
@ApiModelProperty("关键字")
|
||||
private String keywords;
|
||||
@ApiModelProperty("描述")
|
||||
private String description;
|
||||
@ApiModelProperty("产品相关筛选属性集合")
|
||||
private List<Long> productAttributeIdList;
|
||||
|
||||
public Long getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
|
||||
public void setParentId(Long parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getProductUnit() {
|
||||
return productUnit;
|
||||
}
|
||||
|
||||
public void setProductUnit(String productUnit) {
|
||||
this.productUnit = productUnit;
|
||||
}
|
||||
|
||||
public Integer getNavStatus() {
|
||||
return navStatus;
|
||||
}
|
||||
|
||||
public void setNavStatus(Integer navStatus) {
|
||||
this.navStatus = navStatus;
|
||||
}
|
||||
|
||||
public Integer getShowStatus() {
|
||||
return showStatus;
|
||||
}
|
||||
|
||||
public void setShowStatus(Integer showStatus) {
|
||||
this.showStatus = showStatus;
|
||||
}
|
||||
|
||||
public Integer getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setSort(Integer sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public String getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
public void setIcon(String icon) {
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
public String getKeywords() {
|
||||
return keywords;
|
||||
}
|
||||
|
||||
public void setKeywords(String keywords) {
|
||||
this.keywords = keywords;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public List<Long> getProductAttributeIdList() {
|
||||
return productAttributeIdList;
|
||||
}
|
||||
|
||||
public void setProductAttributeIdList(List<Long> productAttributeIdList) {
|
||||
this.productAttributeIdList = productAttributeIdList;
|
||||
}
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.PmsProductCategory;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*商品分类与子分类信息
|
||||
*/
|
||||
public class PmsProductCategoryWithChildrenItem extends PmsProductCategory {
|
||||
private List<PmsProductCategory> children;
|
||||
|
||||
public List<PmsProductCategory> getChildren() {//获取子分类
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<PmsProductCategory> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
@ -1,82 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.*;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 创建和修改商品时使用的参数
|
||||
*/
|
||||
public class PmsProductParam extends PmsProduct{
|
||||
@ApiModelProperty("商品阶梯价格设置")
|
||||
private List<PmsProductLadder> productLadderList;
|
||||
@ApiModelProperty("商品满减价格设置")
|
||||
private List<PmsProductFullReduction> productFullReductionList;
|
||||
@ApiModelProperty("商品会员价格设置")
|
||||
private List<PmsMemberPrice> memberPriceList;
|
||||
@ApiModelProperty("商品的sku库存信息")
|
||||
private List<PmsSkuStock> skuStockList;
|
||||
@ApiModelProperty("商品参数及自定义规格属性")
|
||||
private List<PmsProductAttributeValue> productAttributeValueList;
|
||||
@ApiModelProperty("专题和商品关系")
|
||||
private List<CmsSubjectProductRelation> subjectProductRelationList;
|
||||
@ApiModelProperty("优选专区和商品的关系")
|
||||
private List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList;
|
||||
|
||||
public List<PmsProductLadder> getProductLadderList() {
|
||||
return productLadderList;
|
||||
}
|
||||
|
||||
public void setProductLadderList(List<PmsProductLadder> productLadderList) {
|
||||
this.productLadderList = productLadderList;
|
||||
}
|
||||
|
||||
public List<PmsProductFullReduction> getProductFullReductionList() {
|
||||
return productFullReductionList;
|
||||
}
|
||||
|
||||
public void setProductFullReductionList(List<PmsProductFullReduction> productFullReductionList) {
|
||||
this.productFullReductionList = productFullReductionList;
|
||||
}
|
||||
|
||||
public List<PmsMemberPrice> getMemberPriceList() {
|
||||
return memberPriceList;
|
||||
}
|
||||
|
||||
public void setMemberPriceList(List<PmsMemberPrice> memberPriceList) {
|
||||
this.memberPriceList = memberPriceList;
|
||||
}
|
||||
|
||||
public List<PmsSkuStock> getSkuStockList() {
|
||||
return skuStockList;
|
||||
}
|
||||
|
||||
public void setSkuStockList(List<PmsSkuStock> skuStockList) {
|
||||
this.skuStockList = skuStockList;
|
||||
}
|
||||
|
||||
public List<PmsProductAttributeValue> getProductAttributeValueList() {
|
||||
return productAttributeValueList;
|
||||
}
|
||||
|
||||
public void setProductAttributeValueList(List<PmsProductAttributeValue> productAttributeValueList) {
|
||||
this.productAttributeValueList = productAttributeValueList;
|
||||
}
|
||||
|
||||
public List<CmsSubjectProductRelation> getSubjectProductRelationList() {
|
||||
return subjectProductRelationList;
|
||||
}
|
||||
|
||||
public void setSubjectProductRelationList(List<CmsSubjectProductRelation> subjectProductRelationList) {
|
||||
this.subjectProductRelationList = subjectProductRelationList;
|
||||
}
|
||||
|
||||
public List<CmsPrefrenceAreaProductRelation> getPrefrenceAreaProductRelationList() {
|
||||
return prefrenceAreaProductRelationList;
|
||||
}
|
||||
|
||||
public void setPrefrenceAreaProductRelationList(List<CmsPrefrenceAreaProductRelation> prefrenceAreaProductRelationList) {
|
||||
this.prefrenceAreaProductRelationList = prefrenceAreaProductRelationList;
|
||||
}
|
||||
}
|
@ -1,69 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
/**
|
||||
* 产品查询参数
|
||||
*/
|
||||
public class PmsProductQueryParam {
|
||||
@ApiModelProperty("上架状态")
|
||||
private Integer publishStatus;
|
||||
@ApiModelProperty("审核状态")
|
||||
private Integer verifyStatus;
|
||||
@ApiModelProperty("商品名称模糊关键字")
|
||||
private String keyword;
|
||||
@ApiModelProperty("商品货号")
|
||||
private String productSn;
|
||||
@ApiModelProperty("商品分类编号")
|
||||
private Long productCategoryId;
|
||||
@ApiModelProperty("商品品牌编号")
|
||||
private Long brandId;
|
||||
|
||||
public Integer getPublishStatus() {
|
||||
return publishStatus;
|
||||
}
|
||||
|
||||
public void setPublishStatus(Integer publishStatus) {
|
||||
this.publishStatus = publishStatus;
|
||||
}
|
||||
|
||||
public Integer getVerifyStatus() {
|
||||
return verifyStatus;
|
||||
}
|
||||
|
||||
public void setVerifyStatus(Integer verifyStatus) {
|
||||
this.verifyStatus = verifyStatus;
|
||||
}
|
||||
|
||||
public String getKeyword() {
|
||||
return keyword;
|
||||
}
|
||||
|
||||
public void setKeyword(String keyword) {
|
||||
this.keyword = keyword;
|
||||
}
|
||||
|
||||
public String getProductSn() {
|
||||
return productSn;
|
||||
}
|
||||
|
||||
public void setProductSn(String productSn) {
|
||||
this.productSn = productSn;
|
||||
}
|
||||
|
||||
public Long getProductCategoryId() {
|
||||
return productCategoryId;
|
||||
}
|
||||
|
||||
public void setProductCategoryId(Long productCategoryId) {
|
||||
this.productCategoryId = productCategoryId;
|
||||
}
|
||||
|
||||
public Long getBrandId() {
|
||||
return brandId;
|
||||
}
|
||||
|
||||
public void setBrandId(Long brandId) {
|
||||
this.brandId = brandId;
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
/**
|
||||
* 查询单个产品进行修改时返回的结果
|
||||
*/
|
||||
public class PmsProductResult extends PmsProductParam {
|
||||
//商品所选分类的父id
|
||||
private Long cateParentId;
|
||||
|
||||
public Long getCateParentId() {
|
||||
return cateParentId;
|
||||
}
|
||||
|
||||
public void setCateParentId(Long cateParentId) {
|
||||
this.cateParentId = cateParentId;
|
||||
}
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
|
||||
/**
|
||||
* 商品分类对应属性信息
|
||||
*/
|
||||
public class ProductAttrInfo {//商品属性信息
|
||||
private Long attributeId;
|
||||
private Long attributeCategoryId;
|
||||
|
||||
public Long getAttributeId() {
|
||||
return attributeId;
|
||||
}
|
||||
|
||||
public void setAttributeId(Long attributeId) {
|
||||
this.attributeId = attributeId;
|
||||
}
|
||||
|
||||
public Long getAttributeCategoryId() {
|
||||
return attributeCategoryId;
|
||||
}
|
||||
|
||||
public void setAttributeCategoryId(Long attributeCategoryId) {
|
||||
this.attributeCategoryId = attributeCategoryId;
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.PmsProduct;
|
||||
import com.macro.mall.model.SmsFlashPromotionProductRelation;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 限时购及商品信息封装
|
||||
*/
|
||||
public class SmsFlashPromotionProduct extends SmsFlashPromotionProductRelation{
|
||||
@Getter
|
||||
@Setter
|
||||
private PmsProduct product;
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.SmsFlashPromotionSession;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
/**
|
||||
* 包含商品数量的场次信息
|
||||
*/
|
||||
public class SmsFlashPromotionSessionDetail extends SmsFlashPromotionSession {
|
||||
@Setter
|
||||
@Getter
|
||||
private Integer productCount;
|
||||
}
|
@ -1,32 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* 用户登录参数
|
||||
*/
|
||||
public class UmsAdminLoginParam {
|
||||
@ApiModelProperty(value = "用户名", required = true)
|
||||
@NotEmpty(message = "用户名不能为空")
|
||||
private String username;
|
||||
@ApiModelProperty(value = "密码", required = true)
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
private String password;
|
||||
|
||||
public String getUsername() {
|
||||
return username;
|
||||
}
|
||||
|
||||
public void setUsername(String username) {
|
||||
this.username = username;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
import org.hibernate.validator.constraints.Email;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
/**
|
||||
* 用户登录参数
|
||||
*/
|
||||
@Getter
|
||||
@Setter
|
||||
public class UmsAdminParam {
|
||||
@ApiModelProperty(value = "用户名", required = true)
|
||||
@NotEmpty(message = "用户名不能为空")
|
||||
private String username;
|
||||
@ApiModelProperty(value = "密码", required = true)
|
||||
@NotEmpty(message = "密码不能为空")
|
||||
private String password;
|
||||
@ApiModelProperty(value = "用户头像")
|
||||
private String icon;
|
||||
@ApiModelProperty(value = "邮箱")
|
||||
@Email(message = "邮箱格式不合法")
|
||||
private String email;
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickName;
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String note;
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
package com.macro.mall.dto;
|
||||
|
||||
import com.macro.mall.model.UmsPermission;
|
||||
import lombok.Getter;
|
||||
import lombok.Setter;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*ȨÏÞ±àÂë
|
||||
*/
|
||||
public class UmsPermissionNode extends UmsPermission {
|
||||
@Getter
|
||||
@Setter
|
||||
private List<UmsPermissionNode> children;
|
||||
}
|
@ -1,12 +0,0 @@
|
||||
package com.macro.mall.service;
|
||||
|
||||
import com.macro.mall.model.CmsPrefrenceArea;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 优选专区Service
|
||||
*/
|
||||
public interface CmsPrefrenceAreaService {
|
||||
List<CmsPrefrenceArea> listAll();
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
package com.macro.mall.service;
|
||||
|
||||
import com.macro.mall.model.CmsSubject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品专题Service
|
||||
*/
|
||||
public interface CmsSubjectService {
|
||||
/**
|
||||
* 查询所有专题
|
||||
*/
|
||||
List<CmsSubject> listAll();
|
||||
|
||||
/**
|
||||
* 分页查询专题
|
||||
*/
|
||||
List<CmsSubject> list(String keyword, Integer pageNum, Integer pageSize);
|
||||
}
|
@ -1,33 +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
|
||||
*/
|
||||
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,40 +0,0 @@
|
||||
package com.macro.mall.service;
|
||||
|
||||
import com.macro.mall.model.OmsOrderReturnReason;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 订单原因管理Service
|
||||
*/
|
||||
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);
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue