Commit 656e54e8 by zhouhb

[+]删除无用代码

1 parent 2c484470
Showing 230 changed files with 0 additions and 4904 deletions
# 标准 Readme
<p align="center">
<img src="https://img.shields.io/badge/SNAPSHOT-1.0-green.svg" alt="Downloads">
<img src="https://img.shields.io/badge/JDK-1.8+-green.svg" alt="Build Status">
<img src="https://img.shields.io/badge/dubbo-2.7.7-blue.svg" alt="Coverage Status">
<img src="https://img.shields.io/badge/Spring%20Boot-2.1.4-blue.svg" alt="Downloads">
<img src="https://img.shields.io/badge/Spring-5.1.3-blue.svg" alt="Downloads">
<img src="https://img.shields.io/badge/ore%20SNAPSHOT-2.2.0-green.svg" alt="Build Status">
</p>
## 内容列表
- [需求背景](#需求背景)
- [架构图](#架构图)
- [工程结构](#工程结构)
- [安装](#安装)
- [如何使用服务](#如何使用服务)
- [关键设计](#关键设计)
- [版本迭代](#版本迭代)
- [接口列表](#接口列表)
## 需求背景
> 需求背景表述。。
需求......
## 架构图
![](https://qcwx.glsx.com.cn/upload/biz/CONSTRUCT-1000000000001.png)
## 工程结构
```
platform-merchents
├── platform-merchents-api -- api接口
├── platform-merchents-container -- 服务
```
## 安装
应用打包部署。
```sh
$ npm install --global standard-readme-spec
```
### 如何使用服务
`描述如何使用该服务的信息`
### 关键设计
`描述项目的关键设计信息`
## 版本迭代
### v1.0.0(20210721)
- 实现xxx
- 优化xxx
- 支持xxx
```sh
$ standard-readme-spec
# Prints out the standard-readme spec
```
### v1.0.1(20210721)
- 实现xxx
- 优化xxx
- 支持xxx
```sh
$ standard-readme-spec
# Prints out the standard-readme spec
```
### 接口列表
- 1.1 xxxx
- 1.2 xxxx
- 2.1 xxxx
## 维护者
[@Platfrom-merchants](svn://192.168.3.233/common-service/trunk/src/platform-merchants)
\ No newline at end of file
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>cn.com.glsx.framework</groupId>
<artifactId>framework-rop</artifactId>
<version>2.0.0-SNAPSHOT</version>
</parent>
<groupId>cn.com.glsx.merchants</groupId>
<artifactId>rop-merchants</artifactId>
<version>1.0-SNAPSHOT</version>
<name>rop-merchants</name>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>cn.com.glsx.merchants</groupId>
<artifactId>platform-merchants-api</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--引用GSON,用于打印-->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.7</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
</dependency>
<dependency>
<groupId>com.glsx</groupId>
<artifactId>rest-admin-common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.github.dozermapper</groupId>
<artifactId>dozer-spring-boot-starter</artifactId>
<version>6.5.2</version>
</dependency>
<dependency>
<groupId>com.glsx.biz</groupId>
<artifactId>biz-base-service</artifactId>
<version>3.0.0-SNAPSHOT</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-base</artifactId>
<version>3.2.0</version>
<exclusions>
<exclusion>
<artifactId>slf4j-api</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-web</artifactId>
<version>3.2.0</version>
</dependency>
<dependency>
<groupId>cn.afterturn</groupId>
<artifactId>easypoi-annotation</artifactId>
<version>3.2.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.15</version>
</dependency>
<!--门店助手-->
<dependency>
<groupId>cn.com.glsx.stoassistant</groupId>
<artifactId>rpc-scrm-stoassistant-api</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
package cn.com.glsx.merchants;
import org.oreframework.boot.main.AbsOreBootStarter;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
/**
* @Title: Main.java
* @Description:
* @author deployer name
* @version V1.0
* @Company: Didihu.com.cn
* @Copyright Copyright (c) 2015
*/
@SpringBootApplication(scanBasePackages = {"cn.com.glsx.*"})
@ServletComponentScan
@EnableAspectJAutoProxy
public class Main extends AbsOreBootStarter {
@Override
public void run(String[] args)
{
SpringApplication.run(Main.class, args);
}
public static void main(String[] args)
{
Main main = new Main();
main.run(args);
}
}
package cn.com.glsx.merchants.config;
import cn.com.glsx.merchants.remote.*;
import cn.com.glsx.stoassistant.remote.MerchantStaffScoreRemote;
import cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote;
import cn.com.glsx.stoassistant.remote.PlatformMerchantMissionRemote;
import cn.com.glsx.stoassistant.remote.PlatformMerchantStaffMissionRemote;
import com.glsx.biz.common.base.service.CarbrandService;
import org.oreframework.boot.autoconfigure.dubbo.reference.ReferenceBuilderFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* Dubbo服务注册配置
*/
@Configuration
public class DubboConfig {
@Autowired
private ReferenceBuilderFactory factory;
@Bean
public MerchantProductRemote getMerchantProductRemote() {
return factory.builder(MerchantProductRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantProductMenuRemote getMerchantProductMenuRemote() {
return factory.builder(MerchantProductMenuRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantDictTypeRemote getMerchantDictTypeRemote() {
return factory.builder(MerchantDictTypeRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantDictDataRemote getMerchantDictDataRemote() {
return factory.builder(MerchantDictDataRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantProductFunctionRemote getMerchantProductFunctionRemote() {
return factory.builder(MerchantProductFunctionRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantLogRemote getMerchantLogRemote() {
return factory.builder(MerchantLogRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantUserRemote getMerchantUserRemote() {
return factory.builder(MerchantUserRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantFileRemote getMerchantFileRemote() {
return factory.builder(MerchantFileRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantAccountTypeRemote getMerchantAccountTypeRemote() {
return factory.builder(MerchantAccountTypeRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantRoleRemote getMerchantRoleRemote() {
return factory.builder(MerchantRoleRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantRemote getMerchantRemote() {
return factory.builder(MerchantRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public MerchantStaffRemote getMerchantStaffRemote() {
return factory.builder(MerchantStaffRemote.class).check(false).timeout(30000).version("2.0.0").build();
}
@Bean
public CarbrandService getCarbrandService(){
return factory.builder(CarbrandService.class).check(false).timeout(30000).version("2.2.0").build();
}
@Bean
public MerchantStaffScoreRemote getMerchantStaffScoreRemote(){
return factory.builder(MerchantStaffScoreRemote.class).check(false).timeout(30000).version("1.0.0").build();
}
@Bean
public MerchantStaffWithdrawalRemote getMerchantStaffWithdrawalRemote(){
return factory.builder(MerchantStaffWithdrawalRemote.class).check(false).timeout(30000).version("1.0.0").build();
}
@Bean
public PlatformMerchantMissionRemote getPlatformMerchantMissionRemote(){
return factory.builder(PlatformMerchantMissionRemote.class).check(false).timeout(30000).version("1.0.0").build();
}
@Bean
public PlatformMerchantStaffMissionRemote getPlatformMerchantStaffMissionRemote(){
return factory.builder(PlatformMerchantStaffMissionRemote.class).check(false).timeout(30000).version("1.0.0").build();
}
}
package cn.com.glsx.merchants.config;
import cn.com.glsx.merchants.contants.Contants;
import cn.com.glsx.merchants.model.response.MerchantLogResponse;
import cn.com.glsx.merchants.request.log.LogRequest;
import cn.com.glsx.merchants.request.user.MerchantUser;
import cn.com.glsx.merchants.service.MerchantLogService;
import cn.com.glsx.merchants.service.MerchantUserService;
import cn.com.glsx.merchants.util.IpUtils;
import com.glsx.plat.common.annotation.SysLog;
import com.google.gson.*;
import com.rop.AbstractRopRequest;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.time.DurationFormatUtils;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.aspectj.lang.reflect.MethodSignature;
import org.slf4j.MDC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Method;
/**
* @author zhouhaibao
* @version 1.0
* @description: 操作日志统一处理
* @date 2021/7/13 10:00
*/
@Slf4j
@Aspect
@Component
public class SysLogAspect {
@Autowired
private MerchantLogService merchantLogService;
@Autowired
private MerchantUserService merchantUserService;
@Pointcut("@annotation(com.glsx.plat.common.annotation.SysLog)")
public void logPointCut() {
}
@Before("logPointCut()")
public void webpre(JoinPoint joinPoint) {
// 处理日志
try {
saveSysLog(joinPoint);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 打印方法执行时间
*/
@Around("logPointCut()")
public Object timeAround(ProceedingJoinPoint jp) throws Throwable {
long beginTime = System.currentTimeMillis();
//执行方法,执行失败后会抛出异常,也就不会打印执行时间
Object result = jp.proceed();
//执行时长(毫秒)
long time = System.currentTimeMillis() - beginTime;
MethodSignature methodSignature = (MethodSignature) jp.getSignature();
Object target = jp.getTarget();
Method method = methodSignature.getMethod();
//获取注解上的文字
SysLog sysLog = method.getAnnotation(SysLog.class);
String methodName = methodSignature.getName();
if (sysLog.printSpendTime()) {
log.info(target.getClass().getName() + "." + methodName + " 执行耗时:" + DurationFormatUtils.formatDuration(time, "HH:mm:ss.S") + "; 精确时间为 :" + time + " ms");
}
return result;
}
/**
* 方法之后调用
*
* @param jp
* @param returnValue 方法返回值
*/
@AfterReturning(pointcut = "logPointCut()", returning = "returnValue")
public void doAfterReturning(JoinPoint jp, Object returnValue) {
log.info("Returning Args : {}", new Gson().toJson(returnValue));
// 处理完请求,返回内容
String logTraceId = MDC.get(Contants.MDC_LOG_DB_ID);
// 处理完请求,返回内容
/* RpcResponse rpcResponse=(RpcResponse)returnValue;
if(rpcResponse.isFailed()){
LogRequest logRequest = new LogRequest();
logRequest.setResult("失败");
logRequest.setId(Integer.parseInt(logTraceId));
merchantLogService.updateMerchantLog(logRequest);
}*/
}
/**
* 供后台和基础服务调用系统日志保存
*
* @param joinPoint
*/
public void saveSysLog(JoinPoint joinPoint) throws Exception {
//获取方法信息
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
// 获取accessToken的下表
Method method = methodSignature.getMethod();
// 日志标识
SysLog sysLogMark = method.getAnnotation(SysLog.class);
// 开始打印请求日志
// 获取 @WebLog 注解的描述信息
// 打印请求入参
Object[] args = joinPoint.getArgs();
AbstractRopRequest accessToken = (AbstractRopRequest) args[0];
HttpServletRequest httpServletRequest = (HttpServletRequest) accessToken.getRopRequestContext().getRawRequestObject();
String ip = IpUtils.getIpAddr(httpServletRequest);
// 插入日志
LogRequest logRequest = new LogRequest();
logRequest.setModule(sysLogMark.module());
logRequest.setAction(sysLogMark.value());
MerchantUser user = merchantUserService.getUser(accessToken);
logRequest.setUserName(user.getRealname());
logRequest.setOperator(user.getUsername());
logRequest.setIp(ip);
logRequest.setResult("成功");
logRequest.setProcessed(args[0].toString());
MerchantLogResponse merchantLogResponse = merchantLogService.saveMerchantLog(logRequest);
if (merchantLogResponse != null) {
MDC.put(Contants.MDC_LOG_DB_ID, merchantLogResponse.getId() + "");
}
}
}
package cn.com.glsx.merchants.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConfigurationProperties("system")
@Data
public class SystemProperty {
// 对应配置项:system.name
private String name;
private String uploadFileUrl;
}
package cn.com.glsx.merchants.config;
import cn.com.glsx.framework.core.enums.DefaultErrorEnum;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.contants.Contants;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.merchants.request.user.MerchantUser;
import cn.com.glsx.merchants.util.IpUtils;
import com.rop.AbstractRopRequest;
import com.rop.session.SimpleSession;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.oreframework.boot.autoconfigure.rop.util.RopThreadLocal;
import org.oreframework.boot.security.cas.User;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import javax.servlet.http.HttpServletRequest;
import java.lang.reflect.Field;
/**
* @author zhouhaibao
* @version 1.0
* @description: 用户信息统一处理
* @date 2021/7/30 10:00
*/
@Slf4j
@Aspect
@Component
public class UserAspect {
public void logPointCut() {
}
@Before("execution(* cn.com.glsx.merchants.service.*.*(..))")
public void webpre(JoinPoint joinPoint) {
// 处理用户信息
try {
setUser(joinPoint);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* 保存用户信息
*
* @param joinPoint
*/
public void setUser(JoinPoint joinPoint) throws Exception {
Object[] args = joinPoint.getArgs();
if (args != null && args.length != 0) {
Object object = args[0];
try {
if (object instanceof DefaultRequest) {
AbstractRopRequest accessToken = (AbstractRopRequest) object;
MerchantUser user = getUser(accessToken);
HttpServletRequest httpServletRequest = (HttpServletRequest) accessToken.getRopRequestContext().getRawRequestObject();
String ip = IpUtils.getIpAddr(httpServletRequest);
log.info("当前登录的ip{}", ip);
Class userCla = (Class) object.getClass();
Class superclass = userCla.getSuperclass();
Field field = superclass.getDeclaredField("createdBy");
Field field1 = superclass.getDeclaredField("createdAccount");
Field field2 = superclass.getDeclaredField("updatedBy");
Field field3 = superclass.getDeclaredField("updatedAccount");
Field field4 = superclass.getDeclaredField("source");
Field field5 = superclass.getDeclaredField("ip");
Field field6 = superclass.getDeclaredField("merchantNo");
field.setAccessible(true);
field.set(object, user.getId());
field3.setAccessible(true);
field3.set(object, user.getUsername());
field1.setAccessible(true);
field1.set(object, user.getUsername());
field2.setAccessible(true);
field2.set(object, user.getId());
field4.setAccessible(true);
field4.set(object, user.getSource());
field5.setAccessible(true);
field5.set(object, ip);
field6.setAccessible(true);
field6.set(object, user.getMerchantId());
}
} catch (NoSuchFieldException | IllegalAccessException e) {
e.printStackTrace();
throw new RpcServiceException(DefaultErrorEnum.SERVER_ERROR);
}
}
}
/**
* 获取用户信息
*
* @return
*/
public MerchantUser getUser(AbstractRopRequest abstractRopRequest) {
User user = RopThreadLocal.getUser();
MerchantUser merchantUser = new MerchantUser();
if (user == null) {
// 从session中拿
SimpleSession session = (SimpleSession) abstractRopRequest.getRopRequestContext().getSession();
user = new User();
if (session != null) {
log.info("当前登录的账户{}", (String) session.getAttribute(Contants.USER_ACCOUNT));
user.setUsername((String) session.getAttribute(Contants.USER_ACCOUNT));
user.setRealname((String) session.getAttribute(Contants.USER_NAME));
user.setId((Integer) session.getAttribute(Contants.USER_ID));
merchantUser.setSource(Contants.SYSTEM_SOURCE_USER);
merchantUser.setMerchantId((Integer) session.getAttribute(Contants.MERCHANT_ID));
} else {
user.setUsername("hei1001");
user.setRealname("admin");
user.setId(9);
merchantUser.setSource(Contants.SYSTEM_SOURCE_OPERATION);
//throw new RpcServiceException(DefaultErrorEnum.SERVER_ERROR);
}
} else {
merchantUser.setSource(Contants.SYSTEM_SOURCE_OPERATION);
}
BeanUtils.copyProperties(user, merchantUser);
log.info("登录的用户{}", merchantUser);
return merchantUser;
}
}
package cn.com.glsx.merchants.contants;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/14 17:54
*/
public class Contants {
public static final String USER_ACCOUNT="userAccount";
public static final String USER_NAME="userName";
public static final String USER_ID="userId";
/**
* 系统来源运营平台
*/
public static final String SYSTEM_SOURCE_OPERATION="OP";
/**
* 系统来源SCRM
*/
public static final String SYSTEM_SOURCE_USER="USER";
/**
* 日志入库MDC临时存储的日志id
*/
public final static String MDC_LOG_DB_ID = "LOG_DB_ID";
public static final String MERCHANT_ID = "merchant_id";
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.log.LogSearchRequest;
import cn.com.glsx.merchants.request.log.MerchantAndStaffLogRopRequest;
import cn.com.glsx.merchants.response.LogResponse;
import cn.com.glsx.merchants.service.MerchantLogService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author zhouhaibao
* @version 1.0
* @description: 日志服务
* @date 2021/7/16 10:49
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("日志服务")
@Slf4j
public class LogController {
@Autowired
private MerchantLogService merchantLogService;
/**
* 查询日志列表
*
* @param logSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findLog", needInSession = NeedInSessionType.NO)
@ApiOperation("查询字典类型")
public RopResponse<Pagination<LogResponse>> findLog(LogSearchRequest logSearchRequest) {
try {
Pagination<LogResponse> list = merchantLogService.findLog(logSearchRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======LogController__invoke_findLog__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户、员工操作日志列表
*
* @param ropRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findMerchantAndStaffLog", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户、员工操作日志列表")
public RopResponse<Pagination<LogResponse>> findMerchantAndStaffLog(MerchantAndStaffLogRopRequest ropRequest) {
try {
Pagination<LogResponse> list = merchantLogService.findMerchantAndStaffLog(ropRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======LogController__invoke_findMerchantAndStaffLog__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.request.example.*;
import cn.com.glsx.merchants.response.ProductResponse;
import cn.com.glsx.merchants.service.LoginService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.io.File;
import java.io.IOException;
import java.util.UUID;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.util.FileCopyUtils;
import cn.com.glsx.merchants.response.LoginResponse;
import cn.com.glsx.merchants.response.ExampleResponse;
import cn.com.glsx.merchants.response.UploadFileResponse;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import com.rop.session.SimpleSession;
/**
* @author zhouhaibao
* @version 1.0
* @description: 用户登录接口
* @date 2021/7/13 10:00
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("用户登录")
@Slf4j
public class LoginController {
@Autowired
private LoginService loginService;
/**
* 登录示例
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.example.login", needInSession = NeedInSessionType.NO)
@ApiOperation("登录")
public RopResponse<LoginResponse> login(LoginRequest request) {
try {
LoginResponse response = loginService.login(request);
// 创建会话
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======LoginController__invoke__findMerProMenuTreeRemote__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 登出示例
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.example.logout", needInSession = NeedInSessionType.YES)
@ApiOperation("登出")
public RopResponse<Boolean> logout(AbstractRopRequest request) {
loginService.logout(request);
// 删除会话
return RopResponse.success(true);
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.model.response.AccountTreeResponse;
import cn.com.glsx.merchants.request.accounttype.*;
import cn.com.glsx.merchants.response.AccountTypeResponse;
import cn.com.glsx.merchants.service.MerchantAccountTypeService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 账户类型接口
* @date 2021/7/13 10:00
*/
@Slf4j
@Api("账户类型接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantAccountTypeController {
@Autowired
private MerchantAccountTypeService accountTypeService;
/**
* 账户类型获取列表接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.accountype.list", needInSession = NeedInSessionType.NO)
@ApiOperation("账户类型获取列表接口")
public RopResponse<List<AccountTypeResponse>> getAccountTypeList(AccountTypeListSearchRequest request) {
try {
return RopResponse.success(accountTypeService.getAccountTypeList(request));
} catch (RpcServiceException e) {
log.info("=======MerchantAccountTypeController__invoke__getAccountTypeList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 账户类型获取分页数据接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.accountype.page", needInSession = NeedInSessionType.NO)
@ApiOperation("账户类型获取分页数据接口")
public RopResponse<Pagination<AccountTypeResponse>> getAccountTypePage(AccountTypeListSearchRequest request) {
try {
return RopResponse.success(accountTypeService.getAccountTypePage(request));
} catch (RpcServiceException e) {
log.info("=======MerchantAccountTypeController__invoke__getAccountTypePage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 根据id获取账户类型接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.accountype.getById", needInSession = NeedInSessionType.NO)
@ApiOperation("根据id获取账户类型接口")
public RopResponse<AccountTypeResponse> getById(AccountTypeSearchRequest request) {
try {
return RopResponse.success(accountTypeService.getAccountTypeDetail(request.getId()));
} catch (RpcServiceException e) {
log.info("=======MerchantAccountTypeController__invoke__getById__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 获取账户类型下产品菜单功能树
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.accountype.getProductTreeList", needInSession = NeedInSessionType.NO)
@ApiOperation("获取账户类型下产品菜单功能树")
public RopResponse<List<AccountTreeResponse>> getProductTreeList(AccountTypeSearchRequest request) {
try {
return RopResponse.success(accountTypeService.getProductTreeList(request));
} catch (RpcServiceException e) {
log.info("=======MerchantAccountTypeController__invoke__getById__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 根据id获取账户类型接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.accountype.deleteById", needInSession = NeedInSessionType.NO)
@ApiOperation("根据id获取账户类型接口")
public RopResponse<Boolean> deleteById(AccountTypeDeleteRequest request) {
try {
return RopResponse.success(accountTypeService.delete(request));
} catch (RpcServiceException e) {
log.info("=======MerchantAccountTypeController__invoke__deleteById__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 账户类型新增接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.accountype.insert", needInSession = NeedInSessionType.NO)
@ApiOperation("账户类型新增接口")
public RopResponse<Boolean> insert(AccountTypeInsertRequest request) {
try {
return RopResponse.success(accountTypeService.insert(request));
} catch (RpcServiceException e) {
log.info("=======MerchantAccountTypeController__invoke__insert__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 账户类型更新接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.accountype.update", needInSession = NeedInSessionType.NO)
@ApiOperation("账户类型更新接口")
public RopResponse<Boolean> update(AccountTypeUpdateRequest request) {
try {
return RopResponse.success(accountTypeService.update(request));
} catch (RpcServiceException e) {
log.info("=======MerchantAccountTypeController__invoke__update__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.merchants.request.accounttype.AccountTypeSearchRequest;
import cn.com.glsx.merchants.response.AccountTypeResponse;
import cn.com.glsx.merchants.response.CarbrandResponse;
import cn.com.glsx.merchants.response.ChannelResponse;
import cn.com.glsx.merchants.service.MerchantCommonService;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户公共服务
* @date 2021/8/1 10:16
*/
@Slf4j
@Api("商户公共服务")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantCommonController {
@Autowired
private MerchantCommonService merchantCommonService;
/**
* 获取车辆品牌树
*
* @param defaultRequest
* @return
*/
@ServiceMethod(method = "merchants.api.merchantCommon.getCarbrandTree", needInSession = NeedInSessionType.NO)
@ApiOperation("获取车辆品牌树")
public RopResponse<List<CarbrandResponse>> getCarbrandTree(DefaultRequest defaultRequest) {
try {
return RopResponse.success(merchantCommonService.getCarbrandTreeNew());
} catch (RpcServiceException e) {
log.info("=======MerchantCommonController__invoke__getCarbrandTree__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 获取车辆品牌树
*
* @param abstractRopRequest
* @return
*/
@ServiceMethod(method = "merchants.api.merchantCommon.findAllChannel", needInSession = NeedInSessionType.NO)
@ApiOperation("获取渠道列表")
public RopResponse<List<ChannelResponse>> findAllChannel(AbstractRopRequest abstractRopRequest) {
try {
return RopResponse.success(merchantCommonService.findAllChannel());
} catch (RpcServiceException e) {
log.info("=======MerchantCommonController__invoke__findAllChannel__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.dictdata.*;
import cn.com.glsx.merchants.response.DictDataResponse;
import cn.com.glsx.merchants.service.MerchantDictDataService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 10:00
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("字典数据接口")
@Slf4j
public class MerchantDictDataController {
@Autowired
private MerchantDictDataService merchantDictDataService;
/**
* 保存字典
*
* @param DictDataSaveRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.saveDictData", needInSession = NeedInSessionType.NO)
@ApiOperation("保存字典数据")
public RopResponse<Boolean> saveDictData(DictDataSaveRequest DictDataSaveRequest) {
try {
merchantDictDataService.saveDictData(DictDataSaveRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__saveDictData__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 更新字典
*
* @param DictDataUpdateRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.updateDictData", needInSession = NeedInSessionType.NO)
@ApiOperation("更新字典数据")
public RopResponse<Boolean> updateDictData(DictDataUpdateRequest DictDataUpdateRequest) {
try {
merchantDictDataService.updateDictData(DictDataUpdateRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__updateDictData__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 删除字典
*
* @param DictDataDeleteRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.deleteDictData", needInSession = NeedInSessionType.NO)
@ApiOperation("删除字典数据")
public RopResponse<Boolean> deleteDictData(DictDataDeleteRequest DictDataDeleteRequest) {
try {
merchantDictDataService.deleteDictData(DictDataDeleteRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__deleteDictData__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询字典列表
*
* @param DictDataListSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findDictData", needInSession = NeedInSessionType.NO)
@ApiOperation("查询字典数据列表")
public RopResponse<Pagination<DictDataResponse>> findDictData(DictDataListSearchRequest DictDataListSearchRequest) {
try {
Pagination<DictDataResponse> list = merchantDictDataService.findDictData(DictDataListSearchRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findDictData__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询所有字典
*
* @param dictDataSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findAllDictData", needInSession = NeedInSessionType.NO)
@ApiOperation("查询所有字典")
public RopResponse<List<DictDataResponse>> findAllDictData(DictDataSearchRequest dictDataSearchRequest) {
try {
List<DictDataResponse> list = merchantDictDataService.findAllDictData(dictDataSearchRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findAllDictData__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.dicttype.DictTypeDeleteRequest;
import cn.com.glsx.merchants.request.dicttype.DictTypeListSearchRequest;
import cn.com.glsx.merchants.request.dicttype.DictTypeSaveRequest;
import cn.com.glsx.merchants.request.dicttype.DictTypeUpdateRequest;
import cn.com.glsx.merchants.response.DictTypeResponse;
import cn.com.glsx.merchants.service.MerchantDictTypeService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 10:00
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("字典类型接口")
@Slf4j
public class MerchantDictTypeController {
@Autowired
private MerchantDictTypeService merchantDictTypeService;
/**
* 保存字典类型
*
* @param dictTypeSaveRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.saveDictType", needInSession = NeedInSessionType.NO)
@ApiOperation("保存字典类型")
public RopResponse<Boolean> saveDictType(DictTypeSaveRequest dictTypeSaveRequest) {
try {
merchantDictTypeService.saveDictType(dictTypeSaveRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__saveDictType__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 更新字典类型
*
* @param dictTypeUpdateRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.updateDictType", needInSession = NeedInSessionType.NO)
@ApiOperation("更新字典类型")
public RopResponse<Boolean> updateDictType(DictTypeUpdateRequest dictTypeUpdateRequest) {
try {
merchantDictTypeService.updateDictType(dictTypeUpdateRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__updateDictType__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 删除字典类型
*
* @param dictTypeDeleteRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.deleteDictType", needInSession = NeedInSessionType.NO)
@ApiOperation("删除字典类型")
public RopResponse<Boolean> deleteDictType(DictTypeDeleteRequest dictTypeDeleteRequest) {
try {
merchantDictTypeService.deleteDictType(dictTypeDeleteRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__deleteDictType__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询字典类型
*
* @param dictTypeListSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findDictType", needInSession = NeedInSessionType.NO)
@ApiOperation("查询字典类型")
public RopResponse<Pagination<DictTypeResponse>> findDictType(DictTypeListSearchRequest dictTypeListSearchRequest) {
try {
Pagination<DictTypeResponse> list = merchantDictTypeService.findDictType(dictTypeListSearchRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke_findDictType__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.file.FileSearchRequest;
import cn.com.glsx.merchants.response.FileResponse;
import cn.com.glsx.merchants.service.MerchantFileService;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author Administrator
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("文件管理接口")
@Slf4j
public class MerchantFileController {
@Autowired
private MerchantFileService merchantFileService;
/**
* 查询素材库
* @param fileSearchRequest
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findMerchantFile", needInSession = NeedInSessionType.NO)
@ApiOperation("查询素材库")
public RopResponse<List<FileResponse>> findMerchantFile(FileSearchRequest fileSearchRequest){
try {
List<FileResponse> fileResponseList = merchantFileService.findMerchantFile(fileSearchRequest);
return RopResponse.success(fileResponseList);
} catch (RpcServiceException e) {
log.info("=======MerchantFileController__invoke__findMerchantFile__exception:{}", e.getMessage());
return RopResponse.error(e.getError(),e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.function.FunctionDeleteRequest;
import cn.com.glsx.merchants.request.function.FunctionListSearchRequest;
import cn.com.glsx.merchants.request.function.FunctionSaveRequest;
import cn.com.glsx.merchants.request.function.FunctionUpdateRequest;
import cn.com.glsx.merchants.response.FunctionResponse;
import cn.com.glsx.merchants.service.MerchantFunctionService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author zhouhaibao
* @version 1.0
* @description: 功能模块
* @date 2021/7/12 11:39
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("功能接口")
@Slf4j
public class MerchantFunctionController {
@Autowired
private MerchantFunctionService merchantFunctionService;
/**
* 保存功能
*
* @param functionSaveRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.saveMerchantFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("保存功能")
public RopResponse<Boolean> saveMerchantFunction(FunctionSaveRequest functionSaveRequest) {
try {
merchantFunctionService.saveMerchantFunction(functionSaveRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__saveMerchantFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 修改功能
*
* @param functionUpdateRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.updateMerchantFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("修改功能")
public RopResponse<Boolean> updateMerchantFunction(FunctionUpdateRequest functionUpdateRequest) {
try {
merchantFunctionService.updateMerchantFunction(functionUpdateRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__updateMerchantFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询功能列表
*
* @param functionListSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findMerchantFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("查询功能列表")
public RopResponse<Pagination<FunctionResponse>> findMerchantFunction(FunctionListSearchRequest functionListSearchRequest) {
try {
Pagination<FunctionResponse> listPagination = merchantFunctionService.findMerchantFunction(functionListSearchRequest);
return RopResponse.success(listPagination);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findMerchantFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 删除功能信息
*
* @param functionDeleteRequest
* @return
*/
@ServiceMethod(method = "merchants.api.menu.deleteMerchantFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("删除功能信息")
public RopResponse<Boolean> deleteMerchantFunction(FunctionDeleteRequest functionDeleteRequest) {
try {
merchantFunctionService.deleteMerchantFunction(functionDeleteRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__deleteMerchantFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.enums.BusinessExceptionEnum;
import cn.com.glsx.merchants.request.menu.*;
import cn.com.glsx.merchants.response.MenuResponse;
import cn.com.glsx.merchants.service.MerchantMenuService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 菜单模块
* @date 2021/7/12 9:47
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("菜单接口")
@Slf4j
public class MerchantMenuController {
@Autowired
private MerchantMenuService merchantMenuService;
/**
* 查询菜单树
*
* @param menuSearchRequest 入参
* @return 菜单树结构
*/
@ServiceMethod(method = "merchants.api.menu.findMerProMenuTree", needInSession = NeedInSessionType.NO)
@ApiOperation("查询菜单树")
public RopResponse<List<MenuResponse>> findMerProMenuTree(MenuSearchRequest menuSearchRequest) {
try {
List<MenuResponse> menuResponseList = merchantMenuService.findMerProMenuTreeRemote(menuSearchRequest);
return RopResponse.success(menuResponseList);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findMerProMenuTree__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 保存菜单
*
* @param menuSaveRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.saveMerchantProductMenu", needInSession = NeedInSessionType.NO)
@ApiOperation("保存菜单")
public RopResponse<Boolean> saveMerchantProductMenu(MenuSaveRequest menuSaveRequest) {
try {
merchantMenuService.saveMerchantProductMenuRemote(menuSaveRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__saveMerchantProductMenu__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/*@ServiceMethod(method = "merchants.api.menu.buildMenuAndFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("构建版本菜单")
public RopResponse<Boolean> buildMenuAndFunction(BuildMenuParam param){
try {
if(!"Thomas".equals(param.getParam())){
throw new RpcServiceException("FBI警告", "不要乱搞");
}
merchantMenuService.buildMenuAndFunction(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__buildMenuAndFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}*/
/**
* 查询菜单列表
*
* @param menuListSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findMerProMenuByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("查询菜单列表")
public RopResponse<Pagination<MenuResponse>> findMerProMenuByPage(MenuListSearchRequest menuListSearchRequest) {
try {
Pagination<MenuResponse> list=merchantMenuService.findMerProMenuByPageRemote(menuListSearchRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findMerProMenuByPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 更新菜单
*
* @param menuUpdateRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.updateMerchantProductMenu", needInSession = NeedInSessionType.NO)
@ApiOperation("更新菜单")
public RopResponse<Boolean> updateMerchantProductMenu(MenuUpdateRequest menuUpdateRequest) {
try {
merchantMenuService.updateMerchantProductMenuRemote(menuUpdateRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__updateMerchantProductMenu__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 删除菜单
*
* @param menuDeleteRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.deleteMerchantProductMenu", needInSession = NeedInSessionType.NO)
@ApiOperation("删除菜单")
public RopResponse<Boolean> deleteMerchantProductMenu(MenuDeleteRequest menuDeleteRequest) {
try {
merchantMenuService.deleteMerchantProductMenuRemote(menuDeleteRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__deleteMerchantProductMenu__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.menu.rebuildVersionMenu", needInSession = NeedInSessionType.NO)
@ApiOperation("构建版本菜单--根据生产json重构菜单和功能")
public RopResponse<Boolean> rebuildVersionMenu(BuildMenuParam param){
try {
merchantMenuService.rebuildVersionMenu(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__rebuildVersionMenu__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.menu.buildVersionMenuFunctionNew", needInSession = NeedInSessionType.NO)
@ApiOperation("根据menuJson构建版本菜单-新增")
public RopResponse<Boolean> buildVersionMenuFunctionNew(BuildMenuParam param){
try {
merchantMenuService.buildVersionMenuFunctionNew(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__buildVersionMenuFunctionNew__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.menu.updateVersionMenuAndFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("根据menuJson构建版本菜单-修改")
public RopResponse<Boolean> updateVersionMenuAndFunction(BuildMenuParam param){
try {
merchantMenuService.updateVersionMenuAndFunction(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__updateVersionMenuAndFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.menu.deleteVersionMenuAndFunction", needInSession = NeedInSessionType.NO)
@ApiOperation("根据menuJson构建版本菜单-删除")
public RopResponse<Boolean> deleteVersionMenuAndFunction(BuildMenuParam param){
try {
merchantMenuService.deleteVersionMenuAndFunction(param);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__deleteVersionMenuAndFunction__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.mission.*;
import cn.com.glsx.merchants.service.MerchantMissionService;
import cn.com.glsx.merchants.util.Pagination;
import cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantMissionInfoResponse;
import cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantMissionListResponse;
import cn.com.glsx.stoassistant.model.response.mission.PlatformMerchantStaffMissionDetailResponse;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.env.Environment;
/**
* @ClassName MerchantStaffScoreController
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Slf4j
@Api("任务管理接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantMissionController {
@Autowired
private MerchantMissionService merchantMissionService;
@Autowired
private Environment environment;
/**
* 任务创建
*
* @param createdMissionRopRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.createMission", needInSession = NeedInSessionType.NO)
@ApiOperation("任务创建")
public RopResponse<Boolean> createMission(CreatedMissionRopRequest createdMissionRopRequest) {
try {
return RopResponse.success(merchantMissionService.createMission(createdMissionRopRequest));
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__createMission__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 任务更新
*
* @param updateMissionRopRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.updateMission", needInSession = NeedInSessionType.NO)
@ApiOperation("任务更新")
public RopResponse<Boolean> updateMission(UpdateMissionRopRequest updateMissionRopRequest) {
try {
return RopResponse.success(merchantMissionService.updateMission(updateMissionRopRequest));
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__updateMission__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 任务状态更新
*
* @param updateStatusMissionRopRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.updateStatusMission", needInSession = NeedInSessionType.NO)
@ApiOperation("任务状态更新")
public RopResponse<Boolean> updateMission(UpdateStatusMissionRopRequest updateStatusMissionRopRequest) {
try {
return RopResponse.success(merchantMissionService.updateStatusMission(updateStatusMissionRopRequest));
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__updateMission__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 任务详情
*
* @param missionDetailRopRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.findMissionDeail", needInSession = NeedInSessionType.NO)
@ApiOperation("任务详情")
public RopResponse<PlatformMerchantMissionInfoResponse> findMissionDeail(MissionDetailRopRequest missionDetailRopRequest) {
try {
return RopResponse.success(merchantMissionService.findMissionDeail(missionDetailRopRequest));
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__findMissionDeail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 任务列表查询
*
* @param missionDetailRopRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.findMissionList", needInSession = NeedInSessionType.NO)
@ApiOperation("任务列表查询")
public RopResponse<Pagination<PlatformMerchantMissionInfoResponse>> findMissionList(MissionPageRopRequest missionDetailRopRequest) {
try {
Pagination<PlatformMerchantMissionInfoResponse> productResponsePagination = merchantMissionService.findMissionList(missionDetailRopRequest);
return RopResponse.success(productResponsePagination);
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__findMissionList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 员工任务列表查询
*
* @param missionStaffPageRopRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.findStaffMissionPageList", needInSession = NeedInSessionType.NO)
@ApiOperation("员工任务列表查询")
public RopResponse<Pagination<PlatformMerchantStaffMissionDetailResponse>> findStaffMissionPageList(MissionStaffPageRopRequest missionStaffPageRopRequest) {
try {
Pagination<PlatformMerchantStaffMissionDetailResponse> productResponsePagination = merchantMissionService.findStaffMissionPageList(missionStaffPageRopRequest);
return RopResponse.success(productResponsePagination);
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__findStaffMissionPageList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 复制员工任务链接
*
* @param missionStaffLinkRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.getStaffMissionLink", needInSession = NeedInSessionType.NO)
@ApiOperation("复制员工任务链接")
public RopResponse<String> getStaffMissionLink(MissionStaffLinkRequest missionStaffLinkRequest) {
try {
String staffMissionLink = merchantMissionService.getStaffMissionLink(missionStaffLinkRequest);
String context=environment.getProperty("merchants.api.mission.context");
if(!StringUtils.isEmpty(context)){
staffMissionLink=context+" "+staffMissionLink;
}
return RopResponse.success(staffMissionLink);
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__getStaffMissionLink__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询任务总数
*
* @param abstractRopRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.mission.staticMission", needInSession = NeedInSessionType.NO)
@ApiOperation("查询任务总数")
public RopResponse<PlatformMerchantMissionListResponse> staticMission(AbstractRopRequest abstractRopRequest) {
try {
return RopResponse.success(merchantMissionService.staticMission(abstractRopRequest));
} catch (RpcServiceException e) {
log.info("=======MerchantMissionController__invoke__staticMission__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.product.*;
import cn.com.glsx.merchants.response.MerchantProTreeRopResponse;
import cn.com.glsx.merchants.response.ProductResponse;
import cn.com.glsx.merchants.service.MerchantProductService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.AbstractRopRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户平台产品
* @date 2021/7/9 9:45
*/
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
@Api("产品接口")
@Slf4j
public class MerchantProductController {
@Autowired
private MerchantProductService merchantProductService;
@ServiceMethod(method = "merchants.api.product.findProduct", needInSession = NeedInSessionType.NO)
@ApiOperation("获取所有产品")
public RopResponse<List<ProductResponse>> findProduct(AbstractRopRequest abstractRopRequest) {
try {
List<ProductResponse> list = merchantProductService.findProduct();
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantProductController__invoke__findProduct__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.product.saveProduct", needInSession = NeedInSessionType.NO)
@ApiOperation("新增产品")
public RopResponse<Boolean> saveProduct(ProductSaveRequest productSearchRequest) {
try {
merchantProductService.saveProduct(productSearchRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantProductController__invoke__productSearchRequest__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.product.updateProduct", needInSession = NeedInSessionType.NO)
@ApiOperation("修改产品")
public RopResponse<Boolean> updateProduct(ProductUpdateRequest productUpdateRequest) {
try {
merchantProductService.updateProduct(productUpdateRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantProductController__invoke__productSearchRequest__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.product.deleteProduct", needInSession = NeedInSessionType.NO)
@ApiOperation("删除产品")
public RopResponse<Boolean> deleteProduct(ProductDeleteRequest productDeleteRequest) {
return RopResponse.success(true);
}
@ServiceMethod(method = "merchants.api.product.findProductByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("获取产品列表")
public RopResponse<Pagination<ProductResponse>> findProductByPage(ProductSearchRequest productSearchRequest) {
try {
Pagination<ProductResponse> productByPage = merchantProductService.findProductByPage(productSearchRequest);
return RopResponse.success(productByPage);
} catch (RpcServiceException e) {
log.info("=======MerchantProductController__invoke__productSearchRequest__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 根据产品id查询菜单功能树
*
* @param productSearchByIdRequest
* @return
*/
@ServiceMethod(method = "merchants.api.product.findProductById", needInSession = NeedInSessionType.NO)
@ApiOperation("根据产品id查询菜单功能树")
public RopResponse<List<MerchantProTreeRopResponse>> findMenuFunByProductId(ProductSearchByIdRequest productSearchByIdRequest){
try {
List<MerchantProTreeRopResponse> merchantProductResponseList = merchantProductService.findMenuFunByProductId(productSearchByIdRequest);
return RopResponse.success(merchantProductResponseList);
} catch (RpcServiceException e) {
log.info("=======MerchantProductController__invoke__findProductById__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.role.*;
import cn.com.glsx.merchants.response.RoleResponse;
import cn.com.glsx.merchants.service.MerchantRoleService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 角色管理接口
* @date 2021/7/13 10:00
*/
@Slf4j
@Api("角色管理接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantRoleController {
@Autowired
private MerchantRoleService roleService;
/**
* 角色管理获取列表接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.role.list", needInSession = NeedInSessionType.NO)
@ApiOperation("角色管理获取列表接口")
public RopResponse<List<RoleResponse>> getRoleList(RoleSearchRequest request) {
try {
return RopResponse.success(roleService.getRoleList(request));
} catch (RpcServiceException e) {
log.info("=======MerchantRoleController__invoke__getRoleList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 角色管理获取分页数据接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.role.page", needInSession = NeedInSessionType.NO)
@ApiOperation("角色管理获取分页数据接口")
public RopResponse<Pagination<RoleResponse>> getRolePage(RoleListSearchRequest request) {
try {
return RopResponse.success(roleService.getRolePage(request));
} catch (RpcServiceException e) {
log.info("=======MerchantRoleController__invoke__getRolePage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 根据id获取角色管理接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.role.getById", needInSession = NeedInSessionType.NO)
@ApiOperation("根据id获取角色管理接口")
public RopResponse<RoleResponse> getById(RoleSearchRequest request) {
try {
return RopResponse.success(roleService.getById(request.getId()));
} catch (RpcServiceException e) {
log.info("=======MerchantRoleController__invoke__getById__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 根据id获取角色管理接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.role.deleteById", needInSession = NeedInSessionType.NO)
@ApiOperation("根据id获取角色管理接口")
public RopResponse<Boolean> deleteById(RoleDeleteRequest request) {
try {
return RopResponse.success(roleService.delete(request));
} catch (RpcServiceException e) {
log.info("=======MerchantRoleController__invoke__deleteById__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 角色管理新增接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.role.insert", needInSession = NeedInSessionType.NO)
@ApiOperation("角色管理新增接口")
public RopResponse<Boolean> insert(RoleInsertRequest request) {
try {
return RopResponse.success(roleService.insert(request));
} catch (RpcServiceException e) {
log.info("=======MerchantRoleController__invoke__insert__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
/**
* 角色管理更新接口
*
* @param request
* @return
*/
@ServiceMethod(method = "merchants.api.role.update", needInSession = NeedInSessionType.NO)
@ApiOperation("角色管理更新接口")
public RopResponse<Boolean> update(RoleUpdateRequest request) {
try {
return RopResponse.success(roleService.update(request));
} catch (RpcServiceException e) {
log.info("=======MerchantRoleController__invoke__update__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(),e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.score.MerchantScoreUpdateRopRequest;
import cn.com.glsx.merchants.request.score.MerchantStaffScoreSearchRopRequest;
import cn.com.glsx.merchants.response.score.MerchantStaffScoreListRopResponse;
import cn.com.glsx.merchants.service.MerchantStaffScoreService;
import cn.com.glsx.merchants.util.ScorePagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @ClassName MerchantStaffScoreController
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Slf4j
@Api("积分管理接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantStaffScoreController {
@Autowired
private MerchantStaffScoreService merchantStaffScoreService;
/**
* 收益列表接口
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.score.page", needInSession = NeedInSessionType.NO)
@ApiOperation("收益列表")
public RopResponse<ScorePagination<MerchantStaffScoreListRopResponse>> getScoreList(MerchantStaffScoreSearchRopRequest request) {
try {
ScorePagination<MerchantStaffScoreListRopResponse> scorePage = merchantStaffScoreService.getScorePage(request);
return RopResponse.success(scorePage);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffScoreController__invoke__getScoreList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 收益列表导出接口
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.score.exportList", needInSession = NeedInSessionType.NO)
@ApiOperation("收益列表导出接口")
public RopResponse<String> exportList(MerchantStaffScoreSearchRopRequest request) {
try {
String url = merchantStaffScoreService.exportList(request);
return RopResponse.success(url);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffScoreController__invoke__exportList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 批量核销积分
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.score.exchange", needInSession = NeedInSessionType.NO)
@ApiOperation("批量核销积分")
public RopResponse<Boolean> scoreExchange(MerchantScoreUpdateRopRequest request) {
try {
merchantStaffScoreService.scoreExchange(request);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffScoreController__invoke__scoreExchange__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalSearchRopRequest;
import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRopRequest;
import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse;
import cn.com.glsx.merchants.service.MerchantStaffWithdrawalService;
import cn.com.glsx.merchants.util.WithdrawalPagination;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @ClassName MerchantStaffWithdrawalController
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Slf4j
@Api("提现管理接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantStaffWithdrawalController {
@Autowired
private MerchantStaffWithdrawalService merchantStaffWithdrawalService;
/**
* 提现列表
*/
/**
* 提现列表
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.withdrawal.page", needInSession = NeedInSessionType.NO)
@ApiOperation("提现列表")
public RopResponse<WithdrawalPagination<MerchantStaffWithdrawalListRopResponse>> getWithdrawalPage(MerchantStaffWithdrawalSearchRopRequest request) {
try {
WithdrawalPagination<MerchantStaffWithdrawalListRopResponse> withdrawalPage = merchantStaffWithdrawalService.getWithdrawalPage(request);
return RopResponse.success(withdrawalPage);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__getWithdrawalPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 提现列表导出
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.withdrawal.exportList", needInSession = NeedInSessionType.NO)
@ApiOperation("提现列表导出")
public RopResponse<String> exportList(MerchantStaffWithdrawalSearchRopRequest request) {
try {
String url = merchantStaffWithdrawalService.exportList(request);
return RopResponse.success(url);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__exportList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 批量提现审核
*/
/**
* 批量提现审核
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.withdrawal.batchWithdrawal", needInSession = NeedInSessionType.NO)
@ApiOperation("批量提现审核")
public RopResponse<Boolean> batchWithdrawal(MerchantStaffWithdrawalUpdateRopRequest request) {
try {
merchantStaffWithdrawalService.batchWithdrawal(request);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__batchWithdrawal__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.staff.*;
import cn.com.glsx.merchants.response.StaffResponse;
import cn.com.glsx.merchants.service.StaffService;
import cn.com.glsx.merchants.util.Pagination;
import com.rop.annotation.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 13:45
*/
@Slf4j
@Api("员工接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class StaffController {
@Autowired
private StaffService staffService;
/**
* 保存员工
*
* @param staffSaveRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.saveStaff", needInSession = NeedInSessionType.NO)
@ApiOperation("保存员工")
public RopResponse<Boolean> saveStaff(StaffSaveRequest staffSaveRequest) {
try {
staffService.saveStaff(staffSaveRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__saveStaff__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 更新员工
*
* @param staffUpdateRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.updateStaff", needInSession = NeedInSessionType.NO)
@ApiOperation("更新员工")
public RopResponse<Boolean> updateStaff(StaffUpdateRequest staffUpdateRequest) {
try {
staffService.updateStaff(staffUpdateRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__updateStaff__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 更新员工状态
*
* @param staffUpdateStatusRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.updateStatus", needInSession = NeedInSessionType.NO)
@ApiOperation("更新员工状态")
public RopResponse<Boolean> updateStatus(StaffUpdateStatusRequest staffUpdateStatusRequest) {
try {
staffService.updateStatus(staffUpdateStatusRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__updateStaff__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 批量更新员工状态
*
* @param staffUpdateStatusBatchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.updateStatusBatch", needInSession = NeedInSessionType.NO)
@ApiOperation("批量更新员工状态")
public RopResponse<Boolean> updateStatusBatch(StaffUpdateStatusBatchRequest staffUpdateStatusBatchRequest) {
try {
staffService.updateStatusBatch(staffUpdateStatusBatchRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__updateStatusBatch__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 批量分配员工角色
*
* @param staffRoleInsertBatchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.addStaffRoleBatch", needInSession = NeedInSessionType.NO)
@ApiOperation("批量分配员工角色")
public RopResponse<Boolean> addStaffRoleBatch(StaffRoleInsertBatchRequest staffRoleInsertBatchRequest) {
try {
staffService.addRoleBatch(staffRoleInsertBatchRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__addStaffRoleBatch__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 删除员工
*
* @param staffDeleteRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.deleteStaff", needInSession = NeedInSessionType.NO)
@ApiOperation("删除员工")
public RopResponse<Boolean> deleteStaff(StaffDeleteRequest staffDeleteRequest) {
try {
staffService.deleteStaff(staffDeleteRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__deleteStaff__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询员工详情
*
* @param staffSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.staffSearchRequest", needInSession = NeedInSessionType.NO)
@ApiOperation("查询员工详情")
public RopResponse<StaffResponse> findMerchantStaffDetail(StaffSearchRequest staffSearchRequest) {
try {
StaffResponse staffResponse = staffService.findMerchantStaffDetail(staffSearchRequest);
return RopResponse.success(staffResponse);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__findMerchantStaffDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询员工列表
*
* @param staffListRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.findMerchantStaffList", needInSession = NeedInSessionType.NO)
@ApiOperation("查询员工列表")
public RopResponse<List<StaffResponse>> findMerchantStaffList(StaffListRequest staffListRequest) {
try {
List<StaffResponse> staffResponse = staffService.findMerchantStaffList(staffListRequest);
return RopResponse.success(staffResponse);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__findMerchantStaffList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询员工分页列表
*
* @param staffPageRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.findStaffByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("查询员工分页列表")
public RopResponse<Pagination<StaffResponse>> findStaffByPage(StaffPageRequest staffPageRequest) {
try {
Pagination<StaffResponse> list = staffService.findStaffByPage(staffPageRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findStaffByPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询员工分页列表
*
* @param staffExportRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.exportData", needInSession = NeedInSessionType.NO)
@ApiOperation("员工导出")
public RopResponse<String> exportData(StaffExportRequest staffExportRequest) {
try {
String url = staffService.exportData(staffExportRequest);
return RopResponse.success(url);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__exportData__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 更新员工的有效期
*
* @param staffUpdateValRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.updateValPerByStaffId", needInSession = NeedInSessionType.NO)
@ApiOperation("更新员工的有效期")
public RopResponse<Boolean> updateValPerByStaffId(StaffUpdateValRequest staffUpdateValRequest) {
try {
staffService.updateValPerByStaffId(staffUpdateValRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======StaffController__invoke__updateValPerByStaffId__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
package cn.com.glsx.merchants.convert;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import org.springframework.beans.BeanUtils;
import java.util.ArrayList;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 请求体转化
* @date 2021/7/9 11:38
*/
public class ConvertRequest {
/**
* 转化请求参数
*
* @param re 原入参
* @param newObj 转后后的参数
* @param <T> 泛型
* @return
*/
public static <T> T convertRequest(Object re, T newObj) {
BeanUtils.copyProperties(re, newObj);
return newObj;
}
/**
* 转化请求参数List
*
* @param list 原入参
* @param clazz 转后后的参数
* @param <T> 泛型
* @return
*/
public static <E, T> List<T> convertListRequest(List<E> list, Class<T> clazz) {
List<T> tList = new ArrayList<>();
list.forEach(index -> {
T target = BeanUtils.instantiateClass(clazz);
BeanUtils.copyProperties(index, target);
tList.add(target);
});
return tList;
}
/**
* 分页对象转化参数
*
* @param old 原入参
* @param t 转化后的参数
* @param <T> 泛型
* @return
*/
public static <T> RpcPagination<T> convertPage(Object old, T t) {
RpcPagination rpcPagination = new RpcPagination();
BeanUtils.copyProperties(old, rpcPagination);
BeanUtils.copyProperties(old, t);
rpcPagination.setCondition(t);
return rpcPagination;
}
}
package cn.com.glsx.merchants.convert;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.merchants.util.Pagination;
import lombok.Data;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.BeanUtils;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 返回体转化参数
* @date 2021/7/9 11:21
*/
@Data
public class ConvertResponse {
/**
* 转化集合
*
* @param input 原集合
* @param clazz 新集合类
* @param <T> 泛型
* @return
*/
public static <E, T> List<T> convertList(List<E> input, Class<T> clazz) {
List<T> output = Lists.newArrayList();
if (CollectionUtils.isNotEmpty(input)) {
for (E source : input) {
T target = BeanUtils.instantiateClass(clazz);
BeanUtils.copyProperties(source, target);
output.add(target);
}
}
return output;
}
/**
* 分页转换
*
* @param clazz 新集合类
* @param list 原集合
* @return 新分页参数
*/
public static <E, T> Pagination<T> convertPage(RpcPagination<E> list, Class<T> clazz) {
Pagination pagination = new Pagination();
pagination.setPageNum(list.getPageNum());
List<T> newList = convertList(list.getList(), clazz);
pagination.setData(newList);
pagination.setCount((int) list.getTotal());
pagination.setPageSize(list.getPageSize());
return pagination;
}
/**
* 转化类型
*
* @param object 原类
* @param clazz 新类
* @return
*/
public static <T> T convertObject(Object object, Class<T> clazz) {
if (object == null) {
return null;
}
T target = BeanUtils.instantiateClass(clazz);
BeanUtils.copyProperties(object, target);
return target;
}
}
package cn.com.glsx.merchants.enums;
import cn.com.glsx.framework.core.enums.ErrorEnum;
import java.util.HashMap;
import java.util.Map;
/**
* 商户平台业务异常编码
*
* @author zhouhaibao
* @date 2021/7/12
*/
public enum BusinessExceptionEnum implements ErrorEnum {
ACCOUNT_NAME_EXIT("13120001", "该名称已被使用,请修改"),
ROLE_NAME_EXIT("13120002", "该名称已被其他角色使用,请修改"),
;
private String value;
private String displayName;
static Map<String, BusinessExceptionEnum> enumMap = new HashMap();
BusinessExceptionEnum(String value, String displayName) {
this.value = value;
this.displayName = displayName;
}
public String getValue() {
return this.value;
}
public String getDisplayName() {
return this.displayName;
}
public static BusinessExceptionEnum getEnum(String value) {
return enumMap.get(value);
}
static {
BusinessExceptionEnum[] var0 = values();
int var1 = var0.length;
for (int var2 = 0; var2 < var1; ++var2) {
BusinessExceptionEnum code = var0[var2];
enumMap.put(code.getValue(), code);
}
}
}
package cn.com.glsx.merchants.request;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 登录信息
* @date 2021/7/16 16:50
*/
@Data
public class DefaultRequest extends AbstractRopRequest {
/**
* 创建者
*/
private Integer createdBy;
/**
* 创建人
*/
private String createdAccount;
/**
* 更新人
*/
private Integer updatedBy;
/**
* 更新人姓名
*/
private String updatedAccount;
/**
* 系统来源
*/
private String source;
/**
* ip
*/
private String ip;
/**
* 商户号
*/
private Integer merchantNo;
}
package cn.com.glsx.merchants.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhouhaibao
* @version 1.0
* @description: 功能关系请求
* @date 2021/7/16 16:50
*/
@Data
public class FunctionRequest implements Serializable {
/**
* 功能id
*/
@ApiModelProperty(name = "id", notes = "功能id", dataType = "Integer")
private Integer id;
/**
* 父级菜单id
*/
@ApiModelProperty(name = "menuId", notes = "父级菜单id", dataType = "Integer")
private Integer menuId;
/**
* 选中的功能值
*/
@ApiModelProperty(name = "functionValue", notes = "选中的功能值", dataType = "String")
private String functionValue;
}
package cn.com.glsx.merchants.request;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品菜单关系请求
* @date 2021/7/16 16:50
*/
@Data
public class ProductRequest implements Serializable {
/**
* 产品id
*/
@ApiModelProperty(name = "productId", notes = "产品id", dataType = "Integer")
private Integer productId;
/**
* 菜单id列表
*/
@ApiModelProperty(name = "menuIdList", notes = "菜单id列表", dataType = "List")
private List<Integer> menuIdList;
/**
* 选中的功能id列表
*/
@ApiModelProperty(name = "functionIdList", notes = "选中的功能id列表", dataType = "List")
private List<FunctionRequest> functionIdList;
}
package cn.com.glsx.merchants.request.accounttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class AccountTypeDeleteRequest extends DefaultRequest {
@NotNull
@ApiModelProperty(notes = "id", name = "id", dataType = "Integer", required = true)
private Integer id;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.accounttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.merchants.request.ProductRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
public class AccountTypeInsertRequest extends DefaultRequest {
/**
* 账户类型名称
*/
@NotNull
@ApiModelProperty(notes = "账户类型名称", required = true, name = "accounttypeName", dataType = "String")
private String accounttypeName;
/**
* 描述
*/
@ApiModelProperty(notes = "描述", name = "accounttypeDetail", dataType = "String")
private String accounttypeDetail;
/**
* 创建人
*/
private Integer createdBy;
/**
* 账户类型编码
*/
private String accounttypeCode;
/**
* 创建账户
*/
private String createdAccount;
/**
* 更新人
*/
private Integer updatedBy;
/**
* 更新账户
*/
private String updatedAccount;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "状态", dataType = "Byte", name = "delFlag", required = true)
private Byte delFlag;
/**
* 功能关系数据
*/
@ApiModelProperty(notes = "产品菜单关系数据列表", dataType = "List", name = "requestList", required = true)
private List<ProductRequest> requestList;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.accounttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
public class AccountTypeListSearchRequest extends DefaultRequest implements Serializable {
/**
* 账户类型名称
*/
@ApiModelProperty(notes = "账户类型名称", name = "accounttypeName", dataType = "String")
private String accounttypeName;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "状态", name = "delFlag", dataType = "Byte")
private Byte delFlag;
@NotNull
@ApiModelProperty(notes = "分页数", name = "pageSize", dataType = "Integer")
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", name = "pageNum", dataType = "Integer")
private Integer pageNum;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.accounttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class AccountTypeSearchRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "账户类型id", name = "id", dataType = "Integer")
private Integer id;
@ApiModelProperty(notes = "账户类型id列表", name = "id", dataType = "Integer")
private List<Integer> idList;
@ApiModelProperty(notes = "账户类型id", name = "id", dataType = "String")
private String ids;
@ApiModelProperty(notes = "商户id", name = "merchantId", dataType = "Integer")
private Integer merchantId;
@ApiModelProperty(notes = "accountLevel", name = "accountLevel", dataType = "Integer")
private Integer accountLevel;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.accounttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.merchants.request.ProductRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
@Data
public class AccountTypeUpdateRequest extends DefaultRequest {
@NotNull
@ApiModelProperty(notes = "id", name = "id", dataType = "Integer", required = true)
private Integer id;
/**
* 账户类型名称
*/
@NotNull
@ApiModelProperty(notes = "账户类型名称", required = true, name = "accounttypeName", dataType = "String")
private String accounttypeName;
/**
* 描述
*/
@ApiModelProperty(notes = "描述", name = "accounttypeDetail", dataType = "String")
private String accounttypeDetail;
/**
* 创建人
*/
private Integer createdBy;
/**
* 更新人
*/
private Integer updatedBy;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "状态", dataType = "Byte", name = "delFlag", required = true)
private Byte delFlag;
/**
* 账户类型编码
*/
private String accounttypeCode;
/**
* 创建账户
*/
private String createdAccount;
/**
* 更新账户
*/
private String updatedAccount;
/**
* 产品功能关系数据
*/
@ApiModelProperty(notes = "产品菜单关系数据列表", dataType = "List", name = "requestList", required = true)
private List<ProductRequest> requestList;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.accounttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/10/20 19:09
* @Version 1.0
*/
@Data
public class MerchantListByConditionRopRequest extends DefaultRequest {
@ApiModelProperty(value = "商户层级:1工厂 2省代 3市代 4门店",required = true)
private Integer merchantAccountType;
@ApiModelProperty("商户名")
private String merchantName;
}
package cn.com.glsx.merchants.request.dictdata;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class DictDataDeleteRequest extends DefaultRequest {
@ApiModelProperty(notes = "id", required = true)
@NotNull
private Long id;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.dictdata;
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 10:56
*/
@Data
public class DictDataListSearchRequest extends DefaultRequest {
@ApiModelProperty(notes = "分页数", required = true)
@NotNull
private Integer pageSize;
@ApiModelProperty(notes = "当前页", required = true)
@NotNull
private Integer pageNum;
/**
* 字典标签
*/
@ApiModelProperty(notes = "字典标签")
private String dictName;
/**
* 字典类型
*/
@ApiModelProperty(notes = "字典类型")
private String dictType;
@ApiModelProperty(notes = "是否启用")
private Integer enableStatus;
}
package cn.com.glsx.merchants.request.dictdata;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class DictDataSaveRequest extends DefaultRequest {
/**
* 字典排序
*/
@ApiModelProperty(notes = "字典排序", required = true)
@NotNull
private Integer dictSort;
/**
* 字典标签
*/
@ApiModelProperty(notes = "字典标签", required = true)
@NotNull
private String dictLabel;
/**
* 字典键值
*/
@ApiModelProperty(notes = "字典键值", required = true)
@NotNull
private String dictValue;
/**
* 字典类型
*/
@ApiModelProperty(notes = "字典类型", required = true)
@NotNull
private String dictType;
/**
* 是否启用
*/
@ApiModelProperty(notes = "是否启用", required = true)
@NotNull
private Integer enableStatus;
/**
* 备注
*/
@ApiModelProperty(notes = "备注")
private String remark;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.dictdata;
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 11:07
*/
@Data
public class DictDataSearchRequest extends DefaultRequest {
/**
* 字典类型
*/
@ApiModelProperty(notes = "dictType", required = true)
private String dictType;
}
package cn.com.glsx.merchants.request.dictdata;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class DictDataUpdateRequest extends DefaultRequest {
@ApiModelProperty(notes = "id", required = true)
@NotNull
private Long id;
/**
* 字典排序
*/
@ApiModelProperty(notes = "字典排序", required = true)
@NotNull
private Integer dictSort;
/**
* 字典标签
*/
@ApiModelProperty(notes = "字典标签", required = true)
@NotNull
private String dictLabel;
/**
* 字典键值
*/
@ApiModelProperty(notes = "字典键值", required = true)
@NotNull
private String dictValue;
/**
* 字典类型
*/
@ApiModelProperty(notes = "dictType", required = true)
@NotNull
private String dictType;
@ApiModelProperty(notes = "是否启用", required = true)
@NotNull
private Integer enableStatus;
/**
* 备注
*/
@ApiModelProperty(notes = "备注")
private String remark;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.dicttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 10:49
*/
@Data
public class DictTypeDeleteRequest extends DefaultRequest {
/**
* 字典主键
*/
@ApiModelProperty(notes = "字典主键", required = true)
@NotNull
private Long id;
}
package cn.com.glsx.merchants.request.dicttype;/**
* @author zhouhaibao
* @date 2021/7/12
*/
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/12 13:45
*/
@Data
public class DictTypeListSearchRequest extends DefaultRequest {
@ApiModelProperty(notes = "分页数", required = true)
@NotNull
private Integer pageSize;
@ApiModelProperty(notes = "当前页", required = true)
@NotNull
private Integer pageNum;
/**
* 字典名称
*/
@ApiModelProperty(notes = "字典名称")
private String dictName;
/**
* 字典类型
*/
@ApiModelProperty(notes = "字典类型")
private String dictType;
/**
* 启用状态
*/
@ApiModelProperty(notes = "启用状态")
private Integer enableStatus;
}
package cn.com.glsx.merchants.request.dicttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 10:32
*/
@Data
public class DictTypeSaveRequest extends DefaultRequest {
/**
* 字典名称
*/
@ApiModelProperty(notes = "字典名称", required = true)
@NotNull
private String dictName;
/**
* 字典类型
*/
@ApiModelProperty(notes = "字典类型", required = true)
@NotNull
private String dictType;
/**
* 备注
*/
@ApiModelProperty(notes = "备注")
private String remark;
@ApiModelProperty(notes = "是否启用", required = true)
@NotNull
private Integer enableStatus;
}
package cn.com.glsx.merchants.request.dicttype;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 10:32
*/
@Data
public class DictTypeUpdateRequest extends DefaultRequest {
/**
* 字典主键
*/
@ApiModelProperty(notes = "字典主键", required = true)
@NotNull
private Long id;
/**
* 字典名称
*/
@ApiModelProperty(notes = "字典名称", required = true)
@NotNull
private String dictName;
/**
* 字典类型
*/
@ApiModelProperty(notes = "字典类型", required = true)
@NotNull
private String dictType;
/**
* 备注
*/
@ApiModelProperty(notes = "备注")
private String remark;
@ApiModelProperty(notes = "是否启用", required = true)
@NotNull
private Integer enableStatus;
}
package cn.com.glsx.merchants.request.example;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import javax.validation.constraints.NotEmpty;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* @Title: Address.java
* @Description: 地址信息参数示例
* @author Alvin
* @date 2020年11月12日 下午3:08:28
* @version V2.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@ApiModel("地址信息")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "address")
public class Address {
@ApiModelProperty("省份")
@NotEmpty(message = "省份不能为空")
private String province;
@ApiModelProperty("城市")
private String city;
@ApiModelProperty("区域")
private String area;
@XmlElementWrapper(name = "streets")
@XmlElement(name = "street")
private List<Street> streets;
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public List<Street> getStreets() {
return streets;
}
public void setStreets(List<Street> streets) {
this.streets = streets;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.merchants.request.example;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 分页参数
* @date 2021/7/9 14:29
*/
@Data
public class BasePageRequest extends AbstractRopRequest {
}
package cn.com.glsx.merchants.request.example;
import io.swagger.annotations.ApiModelProperty;
import java.util.List;
import javax.validation.Valid;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.rop.AbstractRopRequest;
/**
* @Title: ExampleComplexRequest.java
* @Description: 复杂参数示例请求
* @author Alvin
* @date 2020年11月12日 下午2:06:55
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public class ExampleComplexRequest extends AbstractRopRequest{
@ApiModelProperty("姓名")
private String name;
@ApiModelProperty("年龄")
private Integer age;
@ApiModelProperty("兴趣爱好")
private List<String> hobby;
@ApiModelProperty("家庭住址")
@Valid
private Address address;
@ApiModelProperty("工作经历")
@Valid
private List<WorkExperience> workExperiences;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public List<String> getHobby() {
return hobby;
}
public void setHobby(List<String> hobby) {
this.hobby = hobby;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
public List<WorkExperience> getWorkExperiences() {
return workExperiences;
}
public void setWorkExperiences(List<WorkExperience> workExperiences) {
this.workExperiences = workExperiences;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.merchants.request.example;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.rop.AbstractRopRequest;
/**
* 例子参数实体类
*
* @author alvin.zengqi
* @version [版本号, 2019-09-02]
* @see [相关类/方法]
* @since [产品/模块版本]
*/
public class ExampleRequest extends AbstractRopRequest
{
@ApiModelProperty("姓名")
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
/**
* 得到属性字符串
* @return String 属性字符串
*/
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
\ No newline at end of file
package cn.com.glsx.merchants.request.example;
import javax.validation.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.builder.ToStringBuilder;
import com.rop.AbstractRopRequest;
/**
* @Title: LoginRequest.java
* @Description: 登录请求参数示例
* @author Alvin
* @date 2019年9月22日 下午3:47:04
* @version V2.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public class LoginRequest extends AbstractRopRequest {
/**
* 用户名
*/
@ApiModelProperty(notes = "账号", required = true)
@NotNull
private String userName;
/**
* 密码
*/
@ApiModelProperty(notes = "密码", required = true)
@NotNull
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;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.merchants.request.example;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品请求体
* @date 2021/7/9 10:10
*/
@Data
public class ProductRequest extends AbstractRopRequest {
/**
* 产品名称
*/
@ApiModelProperty(notes = "产品id")
private int id;
/**
* 产品名称
*/
@ApiModelProperty(notes = "产品名称", required = true)
@NotNull
private String productName;
/**
* 产品类型取字典数据
*/
@ApiModelProperty(notes = "产品类型", required = true)
@NotNull
private Integer productType;
/**
* 产品编号
*/
@ApiModelProperty(notes = "产品编号", required = true)
@NotNull
private String productCode;
/**
* 产品简介
*/
@ApiModelProperty(notes = "产品简介", required = true)
private String productDetail;
/**
* 产品地址
*/
@ApiModelProperty(notes = "产品地址", required = true)
private String productAddress;
/**
* 创建人
*/
@ApiModelProperty(notes = "创建人", required = true)
private Integer createdBy;
/**
* 更新人
*/
@ApiModelProperty(notes = "更新人", required = true)
private Integer updatedBy;
/**
* 是否删除:0=正常,-1=删除
*/
@ApiModelProperty(notes = "是否删除:0=正常,-1=删除", required = true)
private Byte delFlag;
}
package cn.com.glsx.merchants.request.example;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlRootElement;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* @Title: Street.java
* @Description: 街道信息参数示例
* @author Alvin
* @date 2020年11月12日 下午3:08:28
* @version V2.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement(name = "street")
public class Street {
@XmlAttribute
private String no;
@XmlAttribute
private String name;
public String getNo() {
return no;
}
public void setNo(String no) {
this.no = no;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.merchants.request.example;
import io.swagger.annotations.ApiModelProperty;
import com.rop.AbstractRopRequest;
import com.rop.request.UploadFile;
/**
* @Title: UploadFileRequest.java
* @Description: 上传文件请求参数示例
* @author Alvin
* @date 2020年11月11日 下午2:55:22
* @version V2.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public class UploadFileRequest extends AbstractRopRequest {
@ApiModelProperty("上传文件")
private UploadFile file;
public UploadFile getFile() {
return file;
}
public void setFile(UploadFile file) {
this.file = file;
}
}
package cn.com.glsx.merchants.request.example;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;
/**
* @Title: WorkExperience.java
* @Description: 工作经历请求参数示例
* @author Alvin
* @date 2020年11月12日 下午3:09:00
* @version V2.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
@ApiModel("工作经历")
public class WorkExperience {
@ApiModelProperty("公司名")
private String company;
@ApiModelProperty("公司地址")
@Valid
private Address address;
@ApiModelProperty("开始时间")
@NotNull
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date startTime;
@ApiModelProperty("截止时间")
@NotNull
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date endTime;
public String getCompany() {
return company;
}
public void setCompany(String company) {
this.company = company;
}
public Address getAddress() {
return address;
}
public void setAddress(Address address) {
this.address = address;
}
public Date getStartTime() {
return startTime;
}
public void setStartTime(Date startTime) {
this.startTime = startTime;
}
public Date getEndTime() {
return endTime;
}
public void setEndTime(Date endTime) {
this.endTime = endTime;
}
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
package cn.com.glsx.merchants.request.file;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/21 17:04
*/
@Data
public class FileSaveRequest extends DefaultRequest implements Serializable {
/**
* 图片路径
*/
@ApiModelProperty(notes = "图片路径")
private String fileUrl;
/**
* 图片名称
*/
@ApiModelProperty(notes = "图片名称")
private String fileName;
}
package cn.com.glsx.merchants.request.file;
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author Lichongyuan
* @version 1.0
* @description: ${todo}
* @date 2021/7/16 15:43
*/
@Data
public class FileSearchRequest extends DefaultRequest implements Serializable {
/**
* 1.门店照片 2.菜单图片素材 3.头像
*/
@ApiModelProperty(name = "fileType", notes = "文件类型", dataType = "Byte", required = true)
@NotNull
private Byte fileType;
}
package cn.com.glsx.merchants.request.function;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author Lichongyuan
* @Description: 功能删除入参
* @date 2021/7/29 16:56
*/
@Data
public class FunctionDeleteRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "id", required = true)
@NotNull
private Integer id;
}
package cn.com.glsx.merchants.request.function;/**
* @author zhouhaibao
* @date 2021/7/12
*/
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/12 13:45
*/
@Data
public class FunctionListSearchRequest extends DefaultRequest {
@ApiModelProperty(notes = "分页数",required = true)
@NotNull
private Integer pageSize;
@ApiModelProperty(notes = "当前页",required = true)
@NotNull
private Integer pageNum;
/**
* 功能名称
*/
@ApiModelProperty(notes = "功能名称")
private String functionName;
/**
* 菜单id
*/
@ApiModelProperty(notes = "菜单id")
private List<Integer> menuIds;
/**
* 产品id
*/
@ApiModelProperty(notes = "产品id")
private List<Integer> productId;
/**
* 所属客户群 1.账户类型 2.商户层级 3.商户id 4.账户角色
*/
@ApiModelProperty(notes = "所属客户群 1.账户类型 2.商户层级 3.商户id 4.账户角色")
private Integer ownedCusgroupType;
/**
* 所属客户群体值
*/
@ApiModelProperty(notes = "所属客户群体值")
private List<Integer> ownedCusGroupValues;
/**
* 功能类型
*/
@ApiModelProperty(notes = "功能类型")
private Integer functionType;
}
package cn.com.glsx.merchants.request.function;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
@Data
public class FunctionSaveRequest extends DefaultRequest implements Serializable {
/**
* 产品id
*/
@ApiModelProperty(notes = "产品id", required = true)
@NotNull
private Integer productId;
/**
* 功能名称
*/
@ApiModelProperty(notes = "功能名称", required = true)
@NotNull
private String functionName;
/**
* 功能属性地址
*/
@ApiModelProperty(notes = "功能属性地址(原功能属性名)", required = true)
private String functionAttributeName;
/**
* 1.输入 2.按钮 3.单选
*/
@ApiModelProperty(notes = "功能属性类型", required = true)
@NotNull
private Integer functionType;
/**
* 功能值
*/
@ApiModelProperty(notes = "功能值")
private String functionValue;
/**
* 所属菜单
*/
@ApiModelProperty(notes = "所属菜单", required = true)
@NotNull
private Integer menuId;
/**
* 所属客户群 1.账户类型 2.商户层级 3.商户id 4.账户角色
*/
@ApiModelProperty(notes = "所属客户群")
@NotNull
private Integer ownedCusgroupType;
/**
* 所属客户群体值
*/
@ApiModelProperty(notes = "所属客户群体值")
private String ownedCusgroupValue;
/**
* 排序
*/
@ApiModelProperty(notes = "排序")
private Integer sort;
/**
* 所属商户/门店
*/
@ApiModelProperty(notes = "所属商户/门店")
private String ownedMerchant;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.function;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
@Data
public class FunctionUpdateRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "功能id", required = true)
@NotNull
private Integer id;
/**
* 功能名称
*/
@ApiModelProperty(notes = "功能名称", required = true)
@NotNull
private String functionName;
/**
* 功能属性地址(原功能属性名)
*/
@ApiModelProperty(notes = "功能属性地址(原功能属性名)", required = true)
private String functionAttributeName;
/**
* 1.输入 2.按钮 3.单选
*/
@ApiModelProperty(notes = "功能类型", required = true)
@NotNull
private Integer functionType;
/**
* 功能值
*/
@ApiModelProperty(notes = "功能值")
private String functionValue;
/**
* 所属菜单
*/
@ApiModelProperty(notes = "所属菜单", required = true)
@NotNull
private Integer menuId;
/**
* 所属客户群 1.账户类型 2.商户层级 3.商户id 4.账户角色
*/
@ApiModelProperty(notes = "所属客户群",required = true)
@NotNull
private Integer ownedCusgroupType;
/**
* 所属客户群体值
*/
@ApiModelProperty(notes = "所属客户群体值")
private String ownedCusgroupValue;
/**
* 排序
*/
@ApiModelProperty(notes = "排序")
private Integer sort;
/**
* 所属商户/门店
*/
@ApiModelProperty(notes = "所属商户/门店")
private String ownedMerchant;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.log;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/14 16:20
*/
@Data
public class LogRequest extends AbstractRopRequest {
/**
* 模块名称
*/
@ApiModelProperty(notes = "模块名称")
private String module;
/**
* id
*/
@ApiModelProperty(notes = "id")
private int id;
/**
* 执行方法
*/
@ApiModelProperty(notes = "执行方法")
private String processed;
/**
* 操作类型
*/
@ApiModelProperty(notes = "操作类型")
private String action;
/**
* 操作人
*/
@ApiModelProperty(notes = "操作人")
private String operator;
/**
* 操作姓名
*/
@ApiModelProperty(notes = "操作姓名")
private String userName;
/**
* ip
*/
@ApiModelProperty(notes = "ip")
private String ip;
/**
* 操作结果
*/
@ApiModelProperty(notes = "操作结果")
private String result;
/**
* 创建时间
*/
@ApiModelProperty(notes = "创建时间")
private Date createdTime;
}
package cn.com.glsx.merchants.request.log;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 日志分页参数
* @date 2021/7/16 10:50
*/
@Data
public class LogSearchRequest extends DefaultRequest {
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
@ApiModelProperty(notes = "业务id", required = true)
private Integer bussinessId;
@ApiModelProperty(notes = "当前模块", required = true)
private String moduleName;
}
package cn.com.glsx.merchants.request.log;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/11/8 17:50
* @Version 1.0
*/
@Data
public class MerchantAndStaffLogRopRequest extends DefaultRequest {
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
@ApiModelProperty(notes = "商户号", required = true)
private Integer merchantNo;
}
package cn.com.glsx.merchants.request.menu;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class BuildMenuParam extends DefaultRequest {
@ApiModelProperty("菜单文档url")
private String url;
}
package cn.com.glsx.merchants.request.menu;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author Lichongyuan
* @Description: 菜单删除入参
* @date 2021/7/29 15:47
*/
@Data
public class MenuDeleteRequest extends DefaultRequest {
@ApiModelProperty(notes = "id", required = true)
@NotNull
private Integer id;
}
package cn.com.glsx.merchants.request.menu;
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/12 11:12
*/
@Data
public class MenuListSearchRequest extends DefaultRequest {
/**
* 产品名称
*/
@ApiModelProperty(notes = "产品名称")
private String menuName;
/**
* 多个产品id
*/
@ApiModelProperty(notes = "多个产品id")
private List<Integer> productIds;
@ApiModelProperty(notes = "分页数",required = true)
private Integer pageSize;
@ApiModelProperty(notes = "当前页",required = true)
private Integer pageNum;
@ApiModelProperty(notes = "父菜单",required = true)
private String parentName;
}
package cn.com.glsx.merchants.request.menu;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class MenuSaveRequest extends DefaultRequest {
/**
* 菜单名称
*/
@ApiModelProperty(notes = "菜单名称", required = true)
@NotNull
private String menuName;
/**
* 菜单路由
*/
@ApiModelProperty(notes = "菜单路由", required = true)
@NotNull
private String menuUrl;
/**
*菜单图片id
*/
@ApiModelProperty(notes = "菜单图片id")
private Integer iconId;
/**
* 父id
*/
@ApiModelProperty(notes = "父id")
private Integer parentId;
/**
* 所属产品id
*/
@ApiModelProperty(notes = "所属产品id", required = true)
@NotNull
private Integer productId;
/**
* 排序
*/
@ApiModelProperty(notes = "排序", required = true)
@NotNull
private Integer sort;
/**
* 菜单位置:1.左 2.上
*/
@ApiModelProperty(notes = "菜单位置",required = true)
@NotNull
private Integer menuPosition;
/**
* 所属客户群 1.账户类型 2.商户层级 3.商户id 4.账户角色(1.工厂 2.省代 3.市代(商户), 4: 门店)
*/
@ApiModelProperty(notes = "所属客户群")
private Integer ownedCusgroupType;
/**
* 所属客户群体值
*/
@ApiModelProperty(notes = "所属客户群体值")
private String ownedCusgroupValue;
/**
* 所属商户/门店
*/
@ApiModelProperty(notes = "所属商户/门店")
private String ownedMerchant;
/**
* 特殊菜单标识 0 否 1 是
*/
@ApiModelProperty(notes = "特殊菜单标识 0 否 1 是", required = true)
@NotNull
private Byte isSpecial;
}
\ No newline at end of file
package cn.com.glsx.merchants.request.menu;/**
* @author zhouhaibao
* @date 2021/7/12
*/
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/12 10:02
*/
@Data
public class MenuSearchRequest extends DefaultRequest {
/**
* 产品id
*/
@ApiModelProperty(notes = "产品id")
private Integer productId;
}
package cn.com.glsx.merchants.request.menu;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/12 11:17
*/
@Data
public class MenuUpdateRequest extends DefaultRequest {
/**
* 菜单id
*/
@ApiModelProperty(notes = "菜单id", required = true)
@NotNull
private Integer id;
/**
* 菜单名称
*/
@ApiModelProperty(notes = "菜单名称", required = true)
@NotNull
private String menuName;
/**
* 菜单路由
*/
@ApiModelProperty(notes = "菜单路由", required = true)
@NotNull
private String menuUrl;
/**
*菜单图片id
*/
@ApiModelProperty(notes = "菜单图片id")
private Integer iconId;
/**
* 父id
*/
@ApiModelProperty(notes = "父id")
private Integer parentId;
/**
* 所属产品id
*/
@ApiModelProperty(notes = "所属产品id", required = true)
@NotNull
private Integer productId;
/**
* 排序
*/
@ApiModelProperty(notes = "排序", required = true)
@NotNull
private Integer sort;
/**
* 菜单位置:1.左 2.上
*/
@ApiModelProperty(notes = "菜单位置",required = true)
@NotNull
private Integer menuPosition;
/**
* 所属客户群 1.账户类型 2.商户层级 3.商户id 4.账户角色
*/
@ApiModelProperty(notes = "所属客户群")
private Integer ownedCusgroupType;
/**
* 所属客户群体值
*/
@ApiModelProperty(notes = "所属客户群体值")
private String ownedCusgroupValue;
/**
* 所属商户/门店
*/
@ApiModelProperty(notes = "所属商户/门店")
private String ownedMerchant;
}
package cn.com.glsx.merchants.request.merchant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 账户类型
* @date 2021/7/22 9:38
*/
@Data
public class AccountTypeTreeRopRequest implements Serializable {
@ApiModelProperty(notes = "账户id", required = true)
private Integer accountTypeId;
@ApiModelProperty(notes = "产品", required = true)
private List<ProductTreeRopRequest> products;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/11/22 11:47
* @Version 1.0
*/
@Data
public class FindBySupMerchantNoRopRequest extends DefaultRequest {
@ApiModelProperty(value = "上级商户号",required = true)
private Integer supMerchantNo;
@ApiModelProperty(value = "商户层级 1:工厂 2:省代 3:市代 4:门店",required = true)
private Integer merchantAccountLevel;
}
package cn.com.glsx.merchants.request.merchant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhouhaibao
* @version 1.0
* @description: 功能
* @date 2021/7/22 9:41
*/
@Data
public class FunctionTreeRopRequest implements Serializable {
@ApiModelProperty(notes = "功能值")
private String functionvalue;
@ApiModelProperty(notes = "功能id", required = true)
private Integer functionId;
@ApiModelProperty(notes = "菜单id", required = true)
private Integer mendId;
}
package cn.com.glsx.merchants.request.merchant;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MerchantAccessMode extends AbstractRopRequest {
@ApiModelProperty(notes = "商户id", required = true)
private Integer id;
@ApiModelProperty(notes = "接入模式: 0.自建应用模式,3.应用待开发模式", required = true)
private Integer accessMode;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/23 18:04
*/
@Data
public class MerchantBaseInfoRequest extends DefaultRequest {
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
}
package cn.com.glsx.merchants.request.merchant;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class MerchantBrandRequest implements Serializable {
@ApiModelProperty(notes = "车系id", hidden = true)
private Integer cars;
@ApiModelProperty(notes = "车品牌id", hidden = true)
private List<Integer> merchantBrandId;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 11:14
*/
@Data
public class MerchantDetailRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "商户id", required = true)
private Integer id;
@ApiModelProperty(notes = "商户层级")
private Integer accountlevel;
@ApiModelProperty(notes = "父商户id")
private Integer parentId;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/29 10:09
*/
public class MerchantFindRequest extends DefaultRequest {
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @Author Hayreal
* @date 2022/9/21 18:15
* @Version 1.0
*/
@Data
public class MerchantNosRopRequest extends DefaultRequest {
@ApiModelProperty(notes = "商户等级,1.工厂 2.省代 3.市代 4.门店")
private Integer merchantAccountLevel;
@ApiModelProperty(notes = "商户模式,1.集团版 2.门店版")
private Integer merchantModel;
@ApiModelProperty(notes = "渠道,1.嘀加 2.广汇")
private Integer channelId;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.merchants.request.file.FileSaveRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class MerchantSaveOpenRequest extends DefaultRequest implements Serializable {
/**
* 商户名称
*/
@ApiModelProperty(notes = "商户名称", required = true)
private String merchantName;
/**
* 商户简称
*/
@ApiModelProperty(notes = "商户简称")
private String merchantAbbreviation;
/**
* 1.个体户 2.企业
*/
@ApiModelProperty(notes = "1.个体户 2.企业")
private Byte merchantType;
/**
* 组织机构代码
*/
@ApiModelProperty(notes = "组织机构代码")
private String merchantOrgcode;
/**
* 商户地址
*/
@ApiModelProperty(notes = "商户地址")
private String merchantAddress;
/**
* 法定联系人
*/
@ApiModelProperty(notes = "法定联系人")
private String merchantLegalPerson;
/**
* 联系电话
*/
@ApiModelProperty(notes = "联系电话", required = true)
private String merchantLegalPersonPhone;
/**
* 电话是否可作为登录名
*/
@ApiModelProperty(notes = "电话是否可作为登录名(1.是 0.否)", required = true)
private Byte isloginName;
/**
* 营业范围
*/
@ApiModelProperty(notes = "营业范围")
private String businessScope;
/**
* 自定义营业范围
*/
@ApiModelProperty(notes = "自定义营业范围")
private String businessScopeCustomize;
/**
* 品牌
*/
@ApiModelProperty(notes = "品牌")
private String merchantBrand;
/**
* 登录账户
*/
@ApiModelProperty(notes = "登录账户", required = true)
private String merchantLoginAccount;
/**
* 登录密码
*/
@ApiModelProperty(notes = "登录密码", required = true)
private String merchantLoginPassword;
/**
* 1.工厂 2.省代 3.市代 4.门店
*/
@ApiModelProperty(notes = "1.工厂 2.省代 3.市代 4.门店", required = true)
private Integer merchantAccountLevel;
@ApiModelProperty(notes = "父商户id")
private Integer parentId;
/**
* 渠道id
*/
@ApiModelProperty(notes = "渠道id", required = true)
private Integer channelId;
/**
* 驻点联系人
*/
@ApiModelProperty(notes = "驻点联系人")
private String residentContact;
/**
* 驻点联系电话
*/
@ApiModelProperty(notes = "驻点联系电话")
private String residentPhone;
/**
* 账户有效期
*/
@ApiModelProperty(notes = "账户有效期")
private Integer effectiveTime;
/**
* 区域
*/
@ApiModelProperty(notes = "区域")
private Byte areaCode;
/**
* 营业开始时间
*/
@ApiModelProperty(notes = "营业开始时间")
private String bussinessBegintime;
/**
* 营业结束时间
*/
@ApiModelProperty(notes = "营业结束时间")
private String bussinessEndtime;
/**
* 经度
*/
@ApiModelProperty(notes = "经度")
private Float lng;
/**
* 纬度
*/
@ApiModelProperty(notes = "纬度")
private Float lat;
/**
* 1.草稿 2.发布 3.注销 4.过期
*/
@ApiModelProperty(notes = "保存状态 1.草稿 2.发布 3.注销 4.过期", required = true)
private Byte status;
/**
* 账户类型
*/
@ApiModelProperty(notes = "账户类型", required = true)
private List<Integer> accounttypeId;
/**
* 文件数据
*/
@ApiModelProperty(notes = "文件数据")
private List<FileSaveRequest> merchantFiles;
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
/**
* 区域名称
*/
@ApiModelProperty(notes = "区域名称")
private String areaName;
/**
* sap代码
*/
@ApiModelProperty(notes = "sap代码")
private String sapCode;
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!