Commit 656e54e8 by zhouhb

[+]删除无用代码

1 parent 2c484470
Showing 230 changed files with 0 additions and 15903 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 \ 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 \ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots>
<root url="file://$MODULE_DIR$/src/main/webapp" relative="/" />
</webroots>
<sourceRoots>
<root url="file://$MODULE_DIR$/src/main/java" />
<root url="file://$MODULE_DIR$/src/main/resources" />
</sourceRoots>
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="Maven: cn.com.glsx.merchants:platform-merchants-api:1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: cn.com.glsx.framework:framework-core:2.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:javax.persistence-api:2.2" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct-jdk8:1.2.0.Final" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.2.0" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:3.2" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.7" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.9.2" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-common:1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.glsx:rest-admin-core:1.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: cn.hutool:hutool-all:5.0.7" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.23.2-GA" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
<orderEntry type="library" name="Maven: commons-lang:commons-lang:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.4" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.10" level="project" />
<orderEntry type="library" name="Maven: commons-httpclient:commons-httpclient:3.1" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.0.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.5" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.11" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.2" level="project" />
<orderEntry type="library" name="Maven: eu.bitwalker:UserAgentUtils:1.20" level="project" />
<orderEntry type="library" name="Maven: joda-time:joda-time:2.10.1" level="project" />
<orderEntry type="library" name="Maven: com.belerweb:pinyin4j:2.5.0" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.4.1.Final" level="project" />
<orderEntry type="library" name="Maven: commons-beanutils:commons-beanutils:1.9.3" level="project" />
<orderEntry type="library" name="Maven: commons-collections:commons-collections:3.2.2" level="project" />
<orderEntry type="library" name="Maven: com.github.dozermapper:dozer-spring-boot-starter:6.5.2" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.11.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.11.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.26" level="project" />
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
<orderEntry type="library" name="Maven: com.github.dozermapper:dozer-core:6.5.2" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.26" level="project" />
<orderEntry type="library" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" name="Maven: com.github.dozermapper:dozer-spring4:6.5.2" level="project" />
<orderEntry type="library" name="Maven: com.github.dozermapper:dozer-spring-boot-autoconfigure:6.5.2" level="project" />
<orderEntry type="library" name="Maven: com.glsx.biz:biz-base-service:3.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.glsx.biz:biz-base-common:3.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.glsx.biz:biz-common-core:3.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.0-api:1.0.0.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final" level="project" />
<orderEntry type="library" name="Maven: org.hibernate:hibernate-core:5.3.9.Final" level="project" />
<orderEntry type="library" name="Maven: antlr:antlr:2.7.7" level="project" />
<orderEntry type="library" name="Maven: org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec:1.1.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss:jandex:2.0.5.Final" level="project" />
<orderEntry type="library" name="Maven: javax.activation:javax.activation-api:1.2.0" level="project" />
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.common:hibernate-commons-annotations:5.0.4.Final" level="project" />
<orderEntry type="library" name="Maven: com.glsx.cloudframework:cloudframework-core:3.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: javax.inject:javax.inject:1" level="project" />
<orderEntry type="library" name="Maven: log4j:log4j:1.2.17" level="project" />
<orderEntry type="library" name="Maven: net.jcip:jcip-annotations:1.0" level="project" />
<orderEntry type="library" name="Maven: com.glsx.cloudframework:cloudframework-exception:3.0.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-base:3.2.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.0.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.18" level="project" />
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.04" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.0.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.0.1" level="project" />
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-web:3.2.0" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: cn.afterturn:easypoi-annotation:3.2.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:3.15" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-starter-rop:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-starter:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-access:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.oreframework:ore-util:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: gnu-regexp:gnu-regexp:1.1.4" level="project" />
<orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.7" level="project" />
<orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
<orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
<orderEntry type="library" name="Maven: cglib:cglib-nodep:2.2.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.2" level="project" />
<orderEntry type="library" name="Maven: com.google.zxing:core:3.3.1" level="project" />
<orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.1" level="project" />
<orderEntry type="library" name="Maven: com.beust:jcommander:1.72" level="project" />
<orderEntry type="library" name="Maven: com.github.jai-imageio:jai-imageio-core:1.3.1" level="project" />
<orderEntry type="library" name="Maven: org.oreframework:ore-context:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.common:ore-common-beanutils:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-web:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.oreframework:ore-web:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.common:ore-common-lang:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0.2" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-autoconfigure:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.8" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.8" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jetty:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlets:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-continuation:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-webapp:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-server:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-servlet:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:javax-websocket-server-impl:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-annotations:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-plus:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-commons:7.0" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-tree:7.0" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm-analysis:7.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:javax-websocket-client-impl:9.4.15.v20190215" level="project" />
<orderEntry type="library" name="Maven: javax.websocket:javax.websocket-api:1.1" level="project" />
<orderEntry type="library" name="Maven: org.mortbay.jasper:apache-el:8.5.35.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.zookeeper:zookeeper:3.4.6" level="project" />
<orderEntry type="library" name="Maven: jline:jline:0.9.94" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty:3.7.0.Final" level="project" />
<orderEntry type="library" name="Maven: com.github.sgroschupf:zkclient:0.1" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:4.0.0" level="project" />
<orderEntry type="library" name="Maven: com.bookegou:rop:1.1" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-log4j12:1.7.26" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.9.8" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.9.8" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.woodstox:woodstox-core:5.0.3" level="project" />
<orderEntry type="library" name="Maven: com.zbj.zop:rop-client:1.0.4" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-xc:1.9.5" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.5" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.13" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-starter-rop-swagger-ui:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.webjars:jquery:3.2.0" level="project" />
<orderEntry type="library" name="Maven: org.webjars:bootstrap:3.3.7" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.swagger:ore-swagger-rop:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.8.0" level="project" />
<orderEntry type="library" name="Maven: org.reflections:reflections:0.9.11" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-starter-redis:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.1.6.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.34.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.34.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.34.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.34.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.34.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.34.Final" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.2.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
<orderEntry type="library" name="Maven: org.oreframework:ore-redis:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: net.sf.json-lib:json-lib:jdk15:2.4" level="project" />
<orderEntry type="library" name="Maven: net.sf.ezmorph:ezmorph:1.0.5" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:kryo:4.0.2" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:reflectasm:1.11.3" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
<orderEntry type="library" name="Maven: com.esotericsoftware:minlog:1.3.0" level="project" />
<orderEntry type="library" name="Maven: de.javakaffee:kryo-serializers:0.42" level="project" />
<orderEntry type="library" name="Maven: redis.clients:jedis:2.9.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-pool2:2.6.1" level="project" />
<orderEntry type="library" name="Maven: cn.com.glsx.framework:framework-rop-extension:2.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-core:1.5.16" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.8" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.16" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.16" level="project" />
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-core:5.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.1.3.RELEASE" level="project" />
<orderEntry type="library" name="Maven: cn.com.glsx.framework:framework-dubbo-extension:2.0.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-starter-dubbo:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.apache.dubbo:dubbo:2.7.7" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.spring:spring-context-support:1.0.10" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.34.Final" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.middleware:metrics-core-api:2.0.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.middleware:metrics-core-impl:2.0.1" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.middleware:metrics-common:2.0.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-actuator:2.1.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.curator:curator-client:4.2.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.curator:curator-framework:4.2.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.curator:curator-recipes:4.2.0" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.16.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.4.0" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-starter-diamond:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.taobao.diamond:diamond-client:2.0.5.5" level="project" />
<orderEntry type="library" name="Maven: com.taobao.diamond:diamond-utils:2.0.5.5" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-lgpl:1.9.13" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-lgpl:1.9.13" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.boot:ore-boot-starter-nacos:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-client:1.3.3" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-common:1.3.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.11" level="project" />
<orderEntry type="library" name="Maven: com.alibaba.nacos:nacos-api:1.3.3" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" />
<orderEntry type="library" name="Maven: io.prometheus:simpleclient:0.5.0" level="project" />
<orderEntry type="library" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.76" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.1.3.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.1.4.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test:2.1.4.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.1.4.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.11.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.23.4" level="project" />
<orderEntry type="library" name="Maven: net.bytebuddy:byte-buddy:1.9.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.9.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.6.2" level="project" />
<orderEntry type="library" name="Maven: org.oreframework.common:ore-common-log:2.2.0-SNAPSHOT" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.30" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.projectlombok:lombok:1.18.6" level="project" />
<orderEntry type="library" scope="PROVIDED" name="Maven: org.mapstruct:mapstruct-processor:1.2.0.Final" level="project" />
</component>
</module>
\ No newline at end of file \ 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.model.response.MerchantSearchEntMicroResponse;
import cn.com.glsx.merchants.request.accounttype.AccountTypeSearchRequest;
import cn.com.glsx.merchants.request.menu.BuildMenuParam;
import cn.com.glsx.merchants.request.merchant.*;
import cn.com.glsx.merchants.request.role.RoleSearchRequest;
import cn.com.glsx.merchants.response.*;
import cn.com.glsx.merchants.service.MerchantService;
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.apache.commons.lang.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户接口
* @date 2021/7/21 16:52
*/
@Slf4j
@Api("商户接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantController {
@Autowired
private MerchantService merchantService;
/**
* 保存商户基础信息
*
* @param merchantSaveRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.saveMerchant", needInSession = NeedInSessionType.NO)
@ApiOperation("保存商户基础信息")
public RopResponse<Integer> saveMerchant(MerchantSaveRequest merchantSaveRequest) {
try {
Integer merchant = merchantService.saveMerchant(merchantSaveRequest);
return RopResponse.success(merchant);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__saveMerchant__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.merchant.saveMerchantAuto", needInSession = NeedInSessionType.NO)
@ApiOperation("保存商户基础信息脚本测试")
public RopResponse<Integer> saveMerchantAuto(BuildMenuParam merchantSaveRequest) {
/**
* timestamp: 1648198769743
* appKey: 48e5e13229b82c1b4e6e8c96151f0637
* v: 1.0.0
* source: glsx
* format: json
* isloginName: 0
* bussinessBegintime:
* bussinessEndtime:
* merchantName: 性能测试1
* merchantAbbreviation:
* merchantType:
* merchantOrgcode:
* merchantLegalPerson:
* merchantLegalPersonPhone: 12245457878
* residentContact:
* residentPhone:
* merchantLoginAccount: pp211
* merchantLoginPassword: a123456
* merchantAccountLevel: 1
* effectiveTime:
* merchantModel: 2
* channelId: 1
* businessType: 1,2,3,4,5,6
* accounttypeId: 2
* merchantBrandListJson: []
* method: merchants.api.merchant.saveMerchant
* status: 1
* sign: 2198C1C6567D159D46B177F167AF9426DCF1CE0
*/
String param = merchantSaveRequest.getUrl();
//父商户
MerchantSaveRequest parent = new MerchantSaveRequest();
parent.setMerchantName(merchantSaveRequest.getUrl() + "p");
String tel = getTel();
parent.setIsloginName((byte)0);
parent.setMerchantLegalPersonPhone(tel);
parent.setMerchantLoginAccount(tel);
parent.setMerchantLoginPassword("a" + tel);
parent.setMerchantAccountLevel(1);
parent.setMerchantModel(2);
parent.setChannelId(1);
parent.setBusinessType("1,2,3,4,5,6");
parent.setAccounttypeId(Arrays.asList(2));
parent.setStatus((byte)1);
Integer parentId = merchantService.saveMerchant(parent);
//查询商户详情
MerchantDetailRequest merchantDetailRequest = new MerchantDetailRequest();
merchantDetailRequest.setId(parentId);
MerchantRopResponse merchantDetail = merchantService.findMerchantDetail(merchantDetailRequest);
/**
* 修改权限
* timestamp: 1648198807437
* appKey: 48e5e13229b82c1b4e6e8c96151f0637
* v: 1.0.0
* source: glsx
* format: json
* merchantId: 42722
* accountTypes: [{"accountTypeId":"2","products":[{"productId":81,"functionIds":[],"menuIds":[]}]}]
* method: merchants.api.merchant.updatePermissions
* status: 2
* sign: BB37CFB3B39B18560BBE199B68813D35EA2FCB61
*/
MerchantTreeRopRequest merchantParent = new MerchantTreeRopRequest();
//merchantParent
merchantParent.setMerchantId(parentId);
merchantParent.setAccountTypes("[{\"accountTypeId\":\"2\",\"products\":[{\"productId\":81,\"functionIds\":[],\"menuIds\":[]}]}]");
merchantParent.setStatus(2);
merchantService.updatePermissions(merchantParent);
/**
* timestamp: 1648199002154
* appKey: 48e5e13229b82c1b4e6e8c96151f0637
* v: 1.0.0
* source: glsx
* format: json
* isloginName: 0
* bussinessBegintime:
* bussinessEndtime:
* merchantName: qqqqa
* merchantAbbreviation:
* merchantType:
* merchantOrgcode:
* merchantLegalPerson:
* merchantLegalPersonPhone: 12256569847
* residentContact:
* residentPhone:
* merchantLoginAccount: tyu
* merchantLoginPassword: a123456
* merchantAccountLevel: 4
* effectiveStarttime: Fri Mar 25 2022 08:00:00 GMT+0800 (中国标准时间)
* expireDate: Sat Mar 26 2022 08:00:00 GMT+0800 (中国标准时间)
* channelId: 1
* businessType: 1,2,3,4,5,6
* accounttypeId: 2
* merchantBrandListJson: []
* parentId: 42722
* merchantModel: 2
* method: merchants.api.merchant.saveMerchant
* status: 1
* sign: DFEB4B114F74673616599BA981F9B928C806A287
*/
//子商户
List<MerchantSaveRequest> list = new ArrayList<>();
for (int i = 0; i < 50; i++) {
MerchantSaveRequest saveRequest = new MerchantSaveRequest();
saveRequest.setIsloginName((byte)0);
saveRequest.setMerchantName(param + i);
saveRequest.setMerchantLegalPersonPhone(getTel());
saveRequest.setMerchantLoginAccount(param+i);
saveRequest.setMerchantLoginPassword("a123456");
saveRequest.setMerchantAccountLevel(4);
saveRequest.setEffectiveStarttime(new Date());
saveRequest.setExpireDate(DateUtils.addHours(new Date(), 30));
saveRequest.setChannelId(1);
saveRequest.setBusinessType("1,2,3,4,5,6");
saveRequest.setAccounttypeId(Arrays.asList(2));
saveRequest.setParentId(parentId);
saveRequest.setMerchantModel(2);
saveRequest.setStatus((byte)1);
Integer subMerchantId = merchantService.saveMerchant(saveRequest);
MerchantTreeRopRequest merchantTreeRequest = new MerchantTreeRopRequest();
/**
* timestamp: 1648199086038
* appKey: 48e5e13229b82c1b4e6e8c96151f0637
* v: 1.0.0
* source: glsx
* format: json
* merchantId: 42724
* accountTypes: [{"accountTypeId":"2","products":[{"productId":81,"functionIdList":[],"menuIdList":[]}]}]
* method: merchants.api.merchant.updatePermissions
* status: 2
* sign: CAF709032C69AF6F76993640100D7871A6945EB3
*/
merchantTreeRequest.setMerchantId(subMerchantId);
merchantTreeRequest.setAccountTypes("[{\"accountTypeId\":\"2\",\"products\":[{\"productId\":81,\"functionIdList\":[],\"menuIdList\":[]}]}]");
merchantTreeRequest.setStatus(2);
merchantService.updatePermissions(merchantTreeRequest);
}
return null;
}
public static void main(String[] args) {
Date date = DateUtils.addDays(new Date(), 30);
System.out.println(date);
}
private static String[] telFirst="134,135,136,137,138,139,150,151,152,157,158,159,130,131,132,155,156,133,153".split(",");
private static String getTel() {
int index=getNum(0,telFirst.length-1);
String first=telFirst[index];
String second=String.valueOf(getNum(1,888)+10000).substring(1);
String third=String.valueOf(getNum(1,9100)+10000).substring(1);
return first+second+third;
}
public static int getNum(int start,int end) {
return (int)(Math.random()*(end-start+1)+start);
}
/**
* 更新商户基础信息
*
* @param merchantUpdateRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.updateMerchant", needInSession = NeedInSessionType.NO)
@ApiOperation("更新商户基础信息")
public RopResponse<Boolean> updateMerchant(MerchantUpdateRequest merchantUpdateRequest) {
try {
merchantService.updateMerchant(merchantUpdateRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__updateMerchant__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 保存商户权限信息
*
* @param merchantTreeRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.savePermissions", needInSession = NeedInSessionType.NO)
@ApiOperation("保存商户权限信息")
@PostMapping
public RopResponse<Boolean> savePermissions(@RequestBody MerchantTreeRopRequest merchantTreeRequest) {
try {
merchantService.savePermissions(merchantTreeRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__savePermissions__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户详情
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findMerchantDetail", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户详情")
public RopResponse<MerchantRopResponse> findMerchantDetail(MerchantDetailRequest merchantDetailRequest) {
try {
MerchantRopResponse merchantResponse = merchantService.findMerchantDetail(merchantDetailRequest);
return RopResponse.success(merchantResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__updatePermissions__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 更新商户权限信息
*
* @param merchantTreeRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.updatePermissions", needInSession = NeedInSessionType.NO)
@ApiOperation("更新商户权限信息")
public RopResponse<Boolean> updatePermissions(@RequestBody MerchantTreeRopRequest merchantTreeRequest) {
try {
merchantService.updatePermissions(merchantTreeRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__updatePermissions__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户树
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findMerchantTree", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户树")
public RopResponse<List<MerchantTreeRopResponse>> findMerchantTree(MerchantDetailRequest merchantDetailRequest) {
try {
List<MerchantTreeRopResponse> merchantResponse = merchantService.findMerchantTree(merchantDetailRequest);
return RopResponse.success(merchantResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__findMerchantTree__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户的菜单权限
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findPermissionsByMerId", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户的菜单权限")
public RopResponse<List<AccountTypeTreeRopResponse>> findPermissionsByMerId(MerchantDetailRequest merchantDetailRequest) {
try {
List<AccountTypeTreeRopResponse> merchantResponse = merchantService.findPermissionsByMerId(merchantDetailRequest);
return RopResponse.success(merchantResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__findMerchantTree__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 获取账户类型下产品菜单功能树
*
* @param accountTypeSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.accountTypeSearchRequest", needInSession = NeedInSessionType.NO)
@ApiOperation("获取账户类型下产品菜单功能树")
public RopResponse<List<AccountTypeTreeRopResponse>> accountTypeSearchRequest(AccountTypeSearchRequest accountTypeSearchRequest) {
try {
List<AccountTypeTreeRopResponse> merchantResponse = merchantService.findMenuFunTreeByAccountType(accountTypeSearchRequest);
return RopResponse.success(merchantResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__accountTypeSearchRequest__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 获取角色产品菜单功能树
*
* @param roleSearchRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findMenuFunTreeByRoleId", needInSession = NeedInSessionType.NO)
@ApiOperation("获取角色产品菜单功能树")
public RopResponse<List<AccountTypeTreeRopResponse>> findMenuFunTreeByRoleId(RoleSearchRequest roleSearchRequest) {
try {
List<AccountTypeTreeRopResponse> merchantResponse = merchantService.findMenuFunTreeByRoleId(roleSearchRequest);
return RopResponse.success(merchantResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__findMenuFunTreeByRoleId__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户的菜单权限树
*
* @param merchantDetailRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findMenuFunTreeByMerId", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户的菜单权限树")
public RopResponse<List<AccountTypeTreeRopResponse>> findMenuFunTreeByMerId(MerchantDetailRequest merchantDetailRequest) {
try {
List<AccountTypeTreeRopResponse> merchantResponse = merchantService.findMenuFunTreeByMerId(merchantDetailRequest);
return RopResponse.success(merchantResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__findMenuFunTreeByMerId__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 更新商户的有效期
*
* @param merchantUpdateValRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.updateValPerByMerId", needInSession = NeedInSessionType.NO)
@ApiOperation("更新商户的有效期")
public RopResponse<Boolean> updateValPerByMerId(MerchantUpdateValRequest merchantUpdateValRequest) {
try {
merchantService.updateValPerByMerId(merchantUpdateValRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__updateValPerByMerId__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户列表
*
* @param merchantSearchResquest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findMerchantByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户列表")
public RopResponse<Pagination<MerchantRopResponse>> findMerchantByPage(MerchantSearchResquest merchantSearchResquest) {
try {
Pagination<MerchantRopResponse> list = merchantService.findMerchantByPage(merchantSearchResquest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__merchantSearchResquest__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询所有商户
*
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findAllMerchant", needInSession = NeedInSessionType.NO)
@ApiOperation("查询所有商户")
public RopResponse<List<MerchantRopListRes>> findAllMerchant(MerchantFindRequest merchantFindRequest) {
try {
List<MerchantRopListRes> list = merchantService.findAllMerchant(merchantFindRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findAllMerchant__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询上下级商户详情
*
* @return
*/
@ServiceMethod(method = "merchants.api.menu.findSubordinateRelationship", needInSession = NeedInSessionType.NO)
@ApiOperation("查询上下级商户详情")
public RopResponse<MerchantRopResponse> findSubordinateRelationship(MerchantDetailRequest merchantDetailRequest) {
try {
MerchantRopResponse merchantRopResponse = merchantService.findSubordinateRelationship(merchantDetailRequest);
return RopResponse.success(merchantRopResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantMenuController__invoke__findSubordinateRelationship__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户基本信息
*
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findMerchantBaseInfo", needInSession = NeedInSessionType.NO)
@ApiOperation("查询商户基本信息")
public RopResponse<MerchantBaseInfoRopResponse> findMerchantBaseInfo(MerchantBaseInfoRequest merchantBaseInfoRequest) {
try {
MerchantBaseInfoRopResponse merchantRopResponse = merchantService.findMerchantBaseInfo(merchantBaseInfoRequest);
return RopResponse.success(merchantRopResponse);
} catch (RpcServiceException e) {
log.info("=======MerchantController__invoke__findMerchantBaseInfo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.merchant.updateMerchantDepth", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号修改商户层级关系(闭包)")
public RopResponse<Boolean> updateMerchantPath(MerchantUpdatePathRequest merchantUpdatePathRequest){
try {
merchantService.updateMerchantPath(merchantUpdatePathRequest);
return RopResponse.success(Boolean.TRUE);
}catch (RpcServiceException e){
log.info("MerchantController_updateMerchantPath_exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.merchant.updateAccessMode", needInSession = NeedInSessionType.NO)
@ApiOperation("修改商户接入模式")
public RopResponse<Boolean> accessMode(MerchantAccessMode merchantAccessMode){
try {
merchantService.updateAccessMode(merchantAccessMode);
return RopResponse.success(Boolean.TRUE);
}catch (RpcServiceException e){
log.info("MerchantController_updateMerchantPath_exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询商户信息(滴加企微管家)
*
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findMerchantInfoToDj", needInSession = NeedInSessionType.NO)
@ApiOperation("滴加企微管家查询商户基本信息")
public RopResponse<MerchantInfoDjRopResponse> findMerchantInfoToDj(MerchantBaseInfoRequest merchantBaseInfoRequest) {
try {
MerchantInfoDjRopResponse merchantInfoDjRopResponse = merchantService.findMerchantInfoToDj(merchantBaseInfoRequest);
return RopResponse.success(merchantInfoDjRopResponse);
} catch (RpcServiceException e) {
log.info("findMerchantInfoToDj_exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询企微关联-商户列表
*
* @return
*/
@ServiceMethod(method = "merchants.api.merchant.findEntMicroMerchantsByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("查询企微关联-商户列表")
public RopResponse<Pagination<MerchantSearchEntMicroResponse>> findEntMicroMerchantsByPage(MerchantSearchEntMicroRequest merchantSearchEntMicroRequest) {
try {
Pagination<MerchantSearchEntMicroResponse> response = merchantService.findEntMicroMerchantsByPage(merchantSearchEntMicroRequest);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("findEntMicroMerchantsByPage_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.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.model.response.MerchantSubListResponse;
import cn.com.glsx.merchants.request.accounttype.MerchantListByConditionRopRequest;
import cn.com.glsx.merchants.request.merchant.FindBySupMerchantNoRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest;
import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.request.staff.MerchantNoListByStaffPhone;
import cn.com.glsx.merchants.response.*;
import cn.com.glsx.merchants.service.OpenService;
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 org.springframework.validation.annotation.Validated;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/17 9:41
*/
@Slf4j
@Api("对外开发接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class OpenController {
@Autowired
private OpenService openService;
@ServiceMethod(method = "merchants.api.open.findMerchantDetailByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号查询商户详情")
public RopResponse<MerchantRopResponse> findMerchantDetailByMerchantNo(OpenMerchantDetailRequest openMerchantRequest) {
try {
MerchantRopResponse merchantRopResponse = openService.findMerchantDetailByMerchantNo(openMerchantRequest);
return RopResponse.success(merchantRopResponse);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantDetailByMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findSuperlativeMerchant", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号最上级工厂商户号")
public RopResponse<Integer> findSuperlativeMerchant(OpenMerchantDetailRequest openMerchantRequest) {
try {
Integer superlativeMerchant = openService.findSuperlativeMerchant(openMerchantRequest);
return RopResponse.success(superlativeMerchant);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findSuperlativeMerchant__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findSuperiorList", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户查询商户上级列表")
public RopResponse<List<MerchantRopResponse>> findSuperiorList(OpenMerchantLevelRequest openMerchantRequest) {
try {
List<MerchantRopResponse> superiorList = openService.findSuperiorList(openMerchantRequest);
return RopResponse.success(superiorList);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findSuperiorList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findMerchantList", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户名称和渠道类型查询商户列表")
public RopResponse<List<MerchantRopResponse>> findMerchantList(OpenMerchantListRequest openMerchantRequest) {
try {
List<MerchantRopResponse> superiorList = openService.findMerchantList(openMerchantRequest);
return RopResponse.success(superiorList);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findSuperiorList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findSubordinateListByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户查询商户下级列表")
public RopResponse<Pagination<MerchantRopResponse>> findSubordinateListByPage(OpenMerchantPageRequest openMerchantRequest) {
try {
Pagination<MerchantRopResponse> subordinateListByPage = openService.findSubordinateListByPage(openMerchantRequest);
return RopResponse.success(subordinateListByPage);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findSubordinateListByPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.checkBussinessAccount", needInSession = NeedInSessionType.NO)
@ApiOperation("用户登录校验")
public RopResponse<List<OpenUserResponse>> checkBussinessAccount(OpenCheckUserRequest openUserRequest) {
try {
List<OpenUserResponse> openUserResponse = openService.checkBussinessAccount(openUserRequest);
return RopResponse.success(openUserResponse);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__checkBussinessAccount__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findDataPermission", needInSession = NeedInSessionType.NO)
@ApiOperation("用户数据权限获取")
public RopResponse<List<Integer>> findDataPermission(OpenUserDataPermissionRequest openUserRequest) {
try {
List<Integer> dataPermission = openService.findDataPermission(openUserRequest);
return RopResponse.success(dataPermission);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findDataPermission__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findMenuFunPermission", needInSession = NeedInSessionType.NO)
@ApiOperation("用户菜单权限获取")
public RopResponse<List<AccountTypeTreeRopResponse>> findMenuFunPermission(OpenUserMenuPermissionRequest openUserRequest) {
try {
List<AccountTypeTreeRopResponse> menuFunPermission = openService.findMenuFunPermission(openUserRequest);
return RopResponse.success(menuFunPermission);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMenuFunPermission__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 保存或者更新商户信息接口(对外)
*
* @param merchantSaveRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.saveMerchant", needInSession = NeedInSessionType.NO)
@ApiOperation("保存或者更新商户信息接口(对外)")
public RopResponse<String> saveMerchant(MerchantSaveOpenRequest merchantSaveRequest) {
try {
String merchant = openService.saveMerchant(merchantSaveRequest);
return RopResponse.success(merchant);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__saveMerchant__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 企微关联商户
*
* @param relaevanceMerRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.relevanceMerchant", needInSession = NeedInSessionType.NO)
@ApiOperation("企微关联商户")
public RopResponse<Boolean> relevanceMerchant(RelaevanceMerRequest relaevanceMerRequest) {
try {
Boolean merchant = openService.relevanceMerchant(relaevanceMerRequest);
return RopResponse.success(merchant);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__relevanceMerchant__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 保存或者更新员工接口(对外)
*
* @param staffSaveOpenRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.saveStaff", needInSession = NeedInSessionType.NO)
@ApiOperation("保存或者更新员工接口(对外)")
public RopResponse<String> saveStaff(StaffSaveOpenRequest staffSaveOpenRequest) {
try {
String id = openService.saveStaff(staffSaveOpenRequest);
return RopResponse.success(id);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__saveStaff__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 同步企微员工
*
* @param staffSaveOpenRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.syncEntmicroStaff", needInSession = NeedInSessionType.NO)
@ApiOperation("同步企微员工")
public RopResponse<List<StaffResponse>> syncEntmicroStaff(SyncStaffOpenRequest staffSaveOpenRequest) {
try {
List<StaffResponse> merchantRopResponses = openService.syncEntmicroStaff(staffSaveOpenRequest);
return RopResponse.success(merchantRopResponses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__syncEntmicroStaff__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 查询最近的n家门店
*
* @param openProximityMerchantRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.proximityMerchantList", needInSession = NeedInSessionType.NO)
@ApiOperation("查询最近的n家门店")
public RopResponse<List<MerchantRopResponse>> proximityMerchantList(OpenProximityMerchantRequest openProximityMerchantRequest) {
try {
List<MerchantRopResponse> proximityMerchantList = openService.proximityMerchantList(openProximityMerchantRequest);
return RopResponse.success(proximityMerchantList);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__proximityMerchantList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 根据账户类型,层级查询商户列表
*
* @param merchantListOpenRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.findMerchantListByPage", needInSession = NeedInSessionType.NO)
@ApiOperation("根据账户类型,层级查询商户列表")
public RopResponse<Pagination<MerchantRopResponse>> findMerchantListByPage(MerchantListOpenRequest merchantListOpenRequest) {
try {
Pagination<MerchantRopResponse> subordinateListByPage = openService.findMerchantListByPage(merchantListOpenRequest);
return RopResponse.success(subordinateListByPage);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantListByPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 根据登录号查询员工详情
*
* @param staffSearchOpenRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.findStaffByAccount", needInSession = NeedInSessionType.NO)
@ApiOperation("根据登录号查询员工详情")
public RopResponse<StaffResponse> findStaffByAccount(StaffSearchOpenRequest staffSearchOpenRequest) {
try {
StaffResponse staffResponse = openService.findStaffByAccount(staffSearchOpenRequest);
return RopResponse.success(staffResponse);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke_findStaffByAccount__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 商户树查询
*
* @param merchantTreeOpenRequest 入参
* @return
*/
@ServiceMethod(method = "merchants.api.open.findMerchantTreeByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("商户树查询")
public RopResponse<List<MerchantTreeOpenResponse>> findMerchantTreeByMerchantNo(MerchantTreeOpenRequest merchantTreeOpenRequest) {
try {
List<MerchantTreeOpenResponse> merchantTreeByMerchantNo = openService.findMerchantTreeByMerchantNo(merchantTreeOpenRequest);
return RopResponse.success(merchantTreeByMerchantNo);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantTreeByMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.checkPhone", needInSession = NeedInSessionType.NO)
@ApiOperation("手机号校验")
public RopResponse<List<OpenUserResponse>> checkPhone(OpenCheckPhoneRequest openCheckPhoneRequest) {
try {
List<OpenUserResponse> openUserResponse = openService.checkPhone(openCheckPhoneRequest);
return RopResponse.success(openUserResponse);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__checkPhone__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findBySapCode", needInSession = NeedInSessionType.NO)
@ApiOperation("根据sapCode查询商户")
public RopResponse<MerchantRopResponse> findBySapCode(OpenSapSearchRequest openSapSearchRequest) {
try {
MerchantRopResponse openUserResponse = openService.findBySapCode(openSapSearchRequest);
return RopResponse.success(openUserResponse);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findBySapCode__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.userLogin", needInSession = NeedInSessionType.NO)
@ApiOperation("用户登录")
public RopResponse<Boolean> userLogin(UserLoginRequest userLoginRequest) {
try {
openService.userLogin(userLoginRequest);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.updateMd5Password", needInSession = NeedInSessionType.NO)
@ApiOperation("md5")
public RopResponse<Boolean> updateMd5Password(AbstractRopRequest abstractRopRequest) {
try {
openService.updateMd5Password();
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findUserById", needInSession = NeedInSessionType.NO)
@ApiOperation("查询账户")
public RopResponse<List<OpenUserResponse>> findUserById(UserRequest userRequest) {
try {
return RopResponse.success(openService.findUserById(userRequest));
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.checkUniquenessAccount", needInSession = NeedInSessionType.NO)
@ApiOperation("用户登录名校验")
public RopResponse<OpenUserResponse> checkUniquenessAccount(OpenLoginAccountRequest openLoginAccountRequest) {
try {
return RopResponse.success(openService.checkUniquenessAccount(openLoginAccountRequest));
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.checkUniquenessPhone", needInSession = NeedInSessionType.NO)
@ApiOperation("用户登录手机号校验")
public RopResponse<OpenUserResponse> checkUniquenessPhone(OpenLoginAccountRequest openLoginAccountRequest) {
try {
return RopResponse.success(openService.checkUniquenessPhone(openLoginAccountRequest));
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.updatePassword", needInSession = NeedInSessionType.NO)
@ApiOperation("密码修改")
public RopResponse<Boolean> updatePassword(UpdatePasswordOpenRequest updatePasswordOpenRequest) {
try {
return RopResponse.success(openService.updatePassword(updatePasswordOpenRequest));
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__userLogin__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.getAccountInfoByUuid", needInSession = NeedInSessionType.NO)
@ApiOperation("根据uuid获取账户信息")
public RopResponse<OpenUserResponse> getAccountInfoByUuid(AccountInfoOpenRequest accountInfoOpenRequest) {
try {
OpenUserResponse openUserResponse = openService.getAccountInfoByUuid(accountInfoOpenRequest.getUuid());
return RopResponse.success(openUserResponse);
} catch (RpcServiceException e) {
log.info("根据uuid获取账户信息异常:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findStaffListByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号查询员工列表")
public RopResponse<List<StaffResponse>> findStaffListByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
try {
List<StaffResponse> list = openService.findStaffListByMerchantNo(staffListOpenRequest);
return RopResponse.success(list);
} catch (RpcServiceException e) {
log.info("根据商户号查询员工列表异常:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findLoginInfoByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号获取登录信息")
public RopResponse<OpenUserResponse> findLoginInfoByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
try {
OpenUserResponse openUserResponse = openService.findLoginInfoByMerchantNo(staffListOpenRequest);
return RopResponse.success(openUserResponse);
} catch (RpcServiceException e) {
log.info("根据商户号查询员工列表异常:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.confirmPermissions")
@ApiOperation("根据uuid,menuId查询是否存在该权限")
public RopResponse<Boolean> confirmPermissionsByUuidAndMenuId(ConfirmPermissionsRequest confirmPermissionsRequest) {
log.info("根据uuid,menuId查询是否存在该权限入参:{}", confirmPermissionsRequest);
try {
Boolean bl = openService.confirmPermissionsByUuidAndMenuId(confirmPermissionsRequest);
return RopResponse.success(bl);
} catch (RpcServiceException e) {
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.updateMerchantByMerchantNo")
@ApiOperation("根据商户号修改商户信息(企微名称)")
public RopResponse<Boolean> updateMerchantByMerchantNo(@Validated UpdateMerchantByMerchantNoRequest updateMerchantByMerchantNoReq) {
try {
Boolean bl = openService.updateMerchantByMerchantNo(updateMerchantByMerchantNoReq);
return RopResponse.success(bl);
} catch (RpcServiceException e) {
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findSubMerchantbySupMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号查询商户下一级列表")
public RopResponse<List<MerchantSubListResponse>> findSubMerchantbySupMerchantNo(OpenMerchantDetailRequest openMerchantDetailRequest) {
try {
List<MerchantSubListResponse> responses = openService.findSubMerchantbySupMerchantNo(openMerchantDetailRequest);
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findSubMerchantbySupMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findJoinEntMicroStaffByMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户号查询已加入企微员工")
public RopResponse<List<MerchantStaffResponse>> findJoinEntMicroStaffByMerchantNo(OpenFindEntMicroStaffByMerchantNoRequest request) {
try {
List<MerchantStaffResponse> responses = openService.findJoinEntMicroStaffByMerchantNo(request);
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findJoinEntMicroStaffByMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findMerchantNoList", needInSession = NeedInSessionType.NO)
@ApiOperation("根据条件查询商户号集合")
public RopResponse<List<Integer>> findMerchantNoList(MerchantNosRopRequest request) {
try {
List<Integer> responses = openService.findMerchantNoList(request);
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantNoList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findMerchantNoListByMerAccTypeId", needInSession = NeedInSessionType.NO)
@ApiOperation("根据商户层级查询商户号集合")
public RopResponse<List<MerchantListByConditionRopResponse>> findMerchantNoListByMerAccTypeId(MerchantListByConditionRopRequest request) {
try {
List<MerchantListByConditionRopResponse> responses = openService.findMerchantNoListByMerAccTypeId(request);
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantNoListByMerAccTypeId__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.findMerchantBySupMerchantNo", needInSession = NeedInSessionType.NO)
@ApiOperation("根据上级查询商户号集合")
public RopResponse<List<MerchantNoNameRopResponse>> findMerchantBySupMerchantNo(FindBySupMerchantNoRopRequest ropRequest) {
try {
List<MerchantNoNameRopResponse> responses = openService.findMerchantBySupMerchantNo(ropRequest);
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantBySupMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.open.merchantNoListByStaffPhone", needInSession = NeedInSessionType.NO)
@ApiOperation("根据手机查询商户号")
public RopResponse<List<Integer>> merchantNoListByStaffPhone(MerchantNoListByStaffPhone ropRequest) {
try {
List<Integer> responses = openService.merchantNoListByStaffPhone(ropRequest.getStaffPhone());
return RopResponse.success(responses);
} catch (RpcServiceException e) {
log.info("=======OpenController__invoke__findMerchantBySupMerchantNo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}
\ No newline at end of file \ No newline at end of file
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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ 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 \ No newline at end of file
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.model.request.MerchantBrandRequest;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.merchants.request.file.FileSaveRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.persistence.Column;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class MerchantSaveRequest 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 = "营业范围", required = true)
private String businessScope;
/**
* 自定义营业范围
*/
@ApiModelProperty(notes = "自定义营业范围")
private String businessScopeCustomize;
/**
* 品牌
*/
@ApiModelProperty(notes = "品牌", required = true)
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 String merchantFiles;
/**
* 门店模式
*/
@ApiModelProperty(notes = "门店模式", required = true)
private Integer merchantModel;
/**
* 商户有效开始时间
*/
@ApiModelProperty(notes = "商户有效开始时间")
private Date effectiveStarttime;
/**
* 商户过期时间
*/
@ApiModelProperty(notes = "商户过期时间")
private Date expireDate;
@ApiModelProperty(notes = "sapCode")
private String sapCode;
@ApiModelProperty(notes = "经营业务类型, 多个时','分割")
private String businessType;
@ApiModelProperty(notes = "主营品牌Obj, json")
private String merchantBrandListJson;
@ApiModelProperty(notes = "省编码")
private String provinceCode;
@ApiModelProperty(notes = "省名称")
private String provinceName;
@ApiModelProperty(notes = "市编码")
private String cityCode;
@ApiModelProperty(notes = "市名称")
private String cityName;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
/**
* 商户关联企微-商户查询
*/
@Data
public class MerchantSearchEntMicroRequest extends DefaultRequest {
@ApiModelProperty(notes = "父商户号", required = true)
private Integer parentMerchantNo;
/**
* 商户名字
*/
@ApiModelProperty(notes = "商户名字")
private String merchantName;
@NotNull
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import com.rop.RopRequest;
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/22 11:47
*/
@Data
public class MerchantSearchResquest extends DefaultRequest {
@ApiModelProperty(notes = "商户名称")
private String merchantName;
@ApiModelProperty(notes = "账户层级")
private Integer merchantAccountLevel;
@ApiModelProperty(notes = "账户状态 2:已发布")
private Byte status;
@ApiModelProperty(notes = "渠道id")
private Integer channelId;
@ApiModelProperty(notes = "登录名")
private String merchantLoginAccount;
@ApiModelProperty(notes = "手机号")
private String merchantLegalPersonPhone;
@ApiModelProperty(notes = "账户类型")
private List<Integer> accounttypeId;
/**
* 门店模式
*/
@ApiModelProperty(notes = "门店模式")
private Integer merchantModel;
/**
* 企微号
*/
@ApiModelProperty(notes = "企微号")
private String entmicroName;
/**
* 是否关联企微
*/
@ApiModelProperty(notes = "是否关联企微 1:已关联 2:未关联")
private Integer isRelevance;
@NotNull
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
@ApiModelProperty(notes = "父商户")
private String parentMerchant;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantNo;
/**
* 父商户号
*/
@ApiModelProperty(notes = "父商户号")
private Integer parentMerchantNo;
public Integer getSuperMerchantNo(){
return super.getMerchantNo();
}
}
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: 商户树请求
* @date 2021/7/22 9:34
*/
@Data
public class MerchantTreeRopRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "商户id", required = true)
private Integer merchantId;
private Integer status;
private String accountTypes;
}
package cn.com.glsx.merchants.request.merchant;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MerchantUpdatePathRequest extends AbstractRopRequest {
@ApiModelProperty(value = "商户号source")
private String merchantNoSource;
@ApiModelProperty(value = "商户号target")
private String merchantNoTarget;
}
package cn.com.glsx.merchants.request.merchant;
import cn.com.glsx.merchants.model.request.MerchantBrandRequest;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class MerchantUpdateRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "商户id", required = true)
private Integer id;
/**
* 商户名称
*/
@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 = "营业范围", required = true)
private String businessScope;
/**
* 品牌
*/
@ApiModelProperty(notes = "品牌", required = true)
private String merchantBrand;
/**
* 登录账户
*/
@ApiModelProperty(notes = "登录账户", required = true)
private String merchantLoginAccount;
/**
* 登录密码
*/
@ApiModelProperty(notes = "登录密码", required = true)
private String merchantLoginPassword;
/**
* 渠道id
*/
@ApiModelProperty(notes = "渠道id", required = true)
private Integer channelId;
/**
* 驻点联系人
*/
@ApiModelProperty(notes = "驻点联系人")
private String residentContact;
/**
* 驻点联系电话
*/
@ApiModelProperty(notes = "驻点联系电话")
private String residentPhone;
/**
* 商户标签
*/
@ApiModelProperty(notes = "商户标签")
private Byte merchantLabel;
/**
* 区域
*/
@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 = "保存状态 1.草稿 2.发布 3.注销 4.过期", required = true)
private Integer effectiveTime;
/**
* 账户类型
*/
@ApiModelProperty(notes = "账户类型", required = true)
private List<Integer> accounttypeId;
/**
* 文件数据
*/
@ApiModelProperty(notes = "文件数据", required = true)
private String merchantFiles;
/**
* 自定义营业范围
*/
@ApiModelProperty(notes = "自定义营业范围")
private String businessScopeCustomize;
/**
* 门店模式
*/
@ApiModelProperty(notes = "门店模式", required = true)
private Integer merchantModel;
/**
* 商户有效开始时间
*/
@ApiModelProperty(notes = "商户有效开始时间")
private Date effectiveStarttime;
/**
* 商户过期时间
*/
@ApiModelProperty(notes = "商户过期时间")
private Date expireDate;
@ApiModelProperty(notes = "sapCode")
private String sapCode;
@ApiModelProperty(notes = "经营业务类型, 多个时','分割")
private String businessType;
@ApiModelProperty(notes = "主营品牌Obj, json串")
private String merchantBrandListJson;
@ApiModelProperty(notes = "省编码")
private String provinceCode;
@ApiModelProperty(notes = "省名称")
private String provinceName;
@ApiModelProperty(notes = "市编码")
private String cityCode;
@ApiModelProperty(notes = "市名称")
private String cityName;
}
\ No newline at end of file \ No newline at end of file
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;
import java.util.Date;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 11:14
*/
@Data
public class MerchantUpdateValRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "商户id", required = true)
private Integer id;
@ApiModelProperty(notes = "有效期", required = true)
private Integer effectiveTime;
/**
* 商户有效开始时间
*/
@ApiModelProperty(notes = "商户有效开始时间")
private Date effectiveStarttime;
/**
* 商户过期时间
*/
@ApiModelProperty(notes = "商户过期时间")
private Date expireDate;
}
package cn.com.glsx.merchants.request.merchant;
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: 对外开发接口
* @date 2021/9/17 9:55
*/
@Data
public class OpenMerchantPageRequest extends DefaultRequest {
/**
* 商户层级
*/
@ApiModelProperty(notes = "商户层级")
private Integer merchantLevel;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户名称")
private String merchantName;
/**
* 是否加入企微(0:未加入,1:已加入)
*/
@ApiModelProperty(notes = "是否加入企微")
private Integer isEntmicro;
@NotNull
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
}
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: 对外开发接口
* @date 2021/9/17 9:55
*/
@Data
public class OpenMerchantRequest extends DefaultRequest {
/**
* 商户名称
*/
@ApiModelProperty(notes = "商户名称")
private String merchantName;
/**
* 1.广联 2.广汇
*/
@ApiModelProperty(notes = "渠道类型 1.广联 2.广汇")
private Integer channelType;
/**
* 商户层级
*/
@ApiModelProperty(notes = "商户层级")
private Integer merchantLevel;
/**
* 商户号
*/
@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;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品树
* @date 2021/7/22 9:39
*/
@Data
public class ProductTreeRopRequest implements Serializable {
@ApiModelProperty(notes = "产品id", required = true)
private Integer productId;
@ApiModelProperty(notes = "菜单id", required = true)
private List<Integer> menuIds;
@ApiModelProperty(notes = "功能", required = true)
private List<FunctionTreeRopRequest> functionIds;
}
package cn.com.glsx.merchants.request.mission;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionDateRequest;
import cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class CreatedMissionRopRequest extends DefaultRequest implements Serializable {
/**
* 业务场景
*/
@ApiModelProperty(notes = "业务场景", required = true)
private Integer businessScene;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号", required = true)
private Integer merchantId;
/**
* 活动id
*/
@ApiModelProperty(notes = "活动id", required = true)
private Integer activityId;
/**
* 指定人群
*/
@ApiModelProperty(notes = "指定人群", required = true)
private String crowd;
/**
* 发放渠道
*/
@ApiModelProperty(notes = "发放渠道", required = true)
private Integer channel;
/**
* 备注
*/
@ApiModelProperty(notes = "备注")
private String remark;
@ApiModelProperty(notes = "开始时间")
private String startTime;
@ApiModelProperty(notes = "结束时间")
private String endTime;
/**
* 商户名
*/
@ApiModelProperty(notes = "商户名")
private String merchantName;
/**
* 活动名称
*/
@ApiModelProperty(notes = "活动名称")
private String activityName;
/**
* 活动image地址
*/
@ApiModelProperty(notes = "活动image地址")
private String activityImage;
/**
* 1.员工发起提现 2.运营从后台核销
*/
@ApiModelProperty(notes = "1.员工发起提现 2.运营从后台核销")
private Integer withdrawalFlag;
/**
* 子任务列表
*/
private List<PlatformMerchantMissionDateRequest> missionDateList;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.mission;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class MissionDetailRopRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "任务id", required = true)
private Integer id;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.mission;
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 MissionPageRopRequest extends DefaultRequest implements Serializable {
@NotNull
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
/**
* 商户名
*/
@ApiModelProperty(notes = "商户名")
private String merchantName;
/**
* 业务场景
*/
@ApiModelProperty(notes = "业务场景")
private Integer businessScene;
/**
* 活动名称
*/
@ApiModelProperty(notes = "活动名称")
private String activityName;
/**
* 活动状态
*/
@ApiModelProperty(notes = "活动状态")
private Integer activityStatus;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.mission;
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 MissionStaffLinkRequest extends DefaultRequest implements Serializable {
/**
* 任务id
*/
@ApiModelProperty(notes = "任务id",required = true)
@NotNull
private Integer missionId;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.mission;
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 MissionStaffPageRopRequest extends DefaultRequest implements Serializable {
@NotNull
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
/**
* 任务id
*/
@ApiModelProperty(notes = "任务id",required = true)
@NotNull
private Integer missionId;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.mission;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionDateRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class UpdateMissionRopRequest extends DefaultRequest implements Serializable {
private Integer id;
/**
* 业务场景
*/
@ApiModelProperty(notes = "业务场景", required = true)
private Integer businessScene;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号", required = true)
private Integer merchantId;
/**
* 活动id
*/
@ApiModelProperty(notes = "活动id", required = true)
private Integer activityId;
/**
* 指定人群
*/
@ApiModelProperty(notes = "指定人群", required = true)
private String crowd;
/**
* 发放渠道
*/
@ApiModelProperty(notes = "发放渠道", required = true)
private Integer channel;
/**
* 备注
*/
@ApiModelProperty(notes = "备注")
private String remark;
@ApiModelProperty(notes = "开始时间")
private String startTime;
@ApiModelProperty(notes = "结束时间")
private String endTime;
/**
* 商户名
*/
@ApiModelProperty(notes = "商户名")
private String merchantName;
/**
* 活动名称
*/
@ApiModelProperty(notes = "活动名称")
private String activityName;
/**
* 活动image地址
*/
@ApiModelProperty(notes = "活动image地址")
private String activityImage;
/**
* 1.员工发起提现 2.运营从后台核销
*/
@ApiModelProperty(notes = "1.员工发起提现 2.运营从后台核销")
private Integer withdrawalFlag;
/**
* 子任务列表
*/
private List<PlatformMerchantMissionDateRequest> missionDateList;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.mission;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class UpdateStatusMissionRopRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "任务id", required = true)
private Integer id;
@ApiModelProperty(notes = "任务状态 1.发布 2.结束 3.删除", required = true)
private Integer activityStatus;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
@Data
@ApiModel("获取账户信息")
public class AccountInfoOpenRequest extends AbstractRopRequest {
@ApiModelProperty(value = "uuid")
private String uuid;
}
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("ConfirmPermissionsRequest")
public class ConfirmPermissionsRequest extends AbstractRopRequest {
@ApiModelProperty(value = "uuid")
private String uuid;
@ApiModelProperty(value = "菜单id")
private Integer menuId;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
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/9/26 14:59
*/
@Data
public class MerchantListOpenRequest extends DefaultRequest {
/**
* 父商户号
*/
@ApiModelProperty(notes = "父商户号")
private Integer parentId;
/**
* 商户层级
*/
@ApiModelProperty(notes = "商户层级")
private List<Integer> merchantAccountLevel;
/**
* 账户类型
*/
@ApiModelProperty(notes = "账户类型")
private List<Integer> accounttypeId;
/**
* 渠道类型
*/
@ApiModelProperty(notes = "渠道类型")
private Integer channelType;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
/**
* 商户名称
*/
@ApiModelProperty(notes = "商户名称")
private String merchantName;
@NotNull
@ApiModelProperty(notes = "分页数", required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", required = true)
private Integer pageNum;
@ApiModelProperty(value = "多个商户号适用参数,','分割")
private String merchantNoStrSet;
@ApiModelProperty(value = "商户号or商户名")
private String merchantNoOrName;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树查询
* @date 2021/7/20 10:33
*/
@Data
public class MerchantTreeOpenRequest extends DefaultRequest {
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
/**
* 是否展示自己
*/
@ApiModelProperty(notes = "是否展示自己, 默认展示")
private Boolean flag;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外用户入参
* @date 2021/9/17 10:11
*/
@Data
public class OpenCheckPhoneRequest extends DefaultRequest {
/**
* 手机号
*/
@ApiModelProperty(notes = "手机号")
private String phone;
// @ApiModelProperty(notes = "产品code")
private String productCode;
}
package cn.com.glsx.merchants.request.open;
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: 对外用户入参
* @date 2021/9/17 10:11
*/
@Data
public class OpenCheckUserRequest extends DefaultRequest {
/**
* 用户名
*/
@ApiModelProperty(notes = "用户名")
@NotNull
private String loginAccout;
/**
* 密码
*/
@ApiModelProperty(notes = "密码")
@NotNull
private String loginPassword;
/**
* 渠道类型
*/
@ApiModelProperty(notes = "渠道类型")
private String channelType;
/**
* 是否校验渠道
*/
@ApiModelProperty(notes = "是否校验渠道")
private Boolean isCheckChannel;
@ApiModelProperty(notes = "sessionId")
@NotNull
private String sessionId;
/**
* 是否用md5算法检验
*/
@ApiModelProperty(notes = "是否用md5算法检验")
private Boolean idMd5;
@ApiModelProperty(notes = "产品code")
private String productCode;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class OpenFindEntMicroStaffByMerchantNoRequest extends DefaultRequest {
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号",required = true)
private Integer merchantNo;
}
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/12/17 13:39
*/
@Data
public class OpenLoginAccountRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "登录账号")
private String account;
@ApiModelProperty(notes = "登录手机号")
private String phone;
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外开发接口
* @date 2021/9/17 9:55
*/
@Data
public class OpenMerchantDetailRequest extends DefaultRequest {
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号",required = true)
private Integer merchantId;
/**
* 商户列表层级
*/
@ApiModelProperty(notes = "商户下拉列表层级")
private Integer depth;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外开发接口
* @date 2021/9/17 9:55
*/
@Data
public class OpenMerchantLevelRequest extends DefaultRequest {
/**
* 商户层级
*/
@ApiModelProperty(notes = "商户层级")
private Integer merchantLevel;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Set;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外开发接口
* @date 2021/9/17 9:55
*/
@Data
public class OpenMerchantListRequest extends DefaultRequest {
/**
* 商户名称
*/
@ApiModelProperty(notes = "商户名称")
private String merchantName;
/**
* 1.广联 2.广汇
*/
@ApiModelProperty(notes = "渠道类型 1.广联 2.广汇")
private Integer channelType;
@ApiModelProperty(name = "accountType", notes = "账户类型id, 多个时','分割", dataType = "String", example = "1")
private String accountType;
@ApiModelProperty(name = "merchantNoStr", notes = "商户号, 多个时','分割")
private String merchantNoStr;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/26 14:04
*/
@Data
public class OpenProximityMerchantRequest extends DefaultRequest {
/**
* 商户号
*/
private Integer merchantId;
/**
* 经度
*/
private Float lng;
/**
* 纬度
*/
private Float lat;
/**
* 门店数量
*/
private Integer storeCount=10;
/**
* 商户名称
*/
private String merchantName;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/10/14 20:43
*/
@Data
public class OpenSapSearchRequest extends DefaultRequest {
private String sapCode;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外用户入参
* @date 2021/9/17 10:11
*/
@Data
public class OpenUserDataPermissionRequest extends DefaultRequest {
/**
* 1.商户 2.类型
*/
@ApiModelProperty(notes = "用户类型,1.商户 2.员工")
private Byte userType;
/**
* 用户名
*/
@ApiModelProperty(notes = "用户名")
private String loginAccout;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外用户入参
* @date 2021/9/17 10:11
*/
@Data
public class OpenUserMenuPermissionRequest extends DefaultRequest {
/**
* 1.商户 2.类型
*/
@ApiModelProperty(notes = "用户类型,1.商户 2.员工")
private Byte userType;
/**
* 用户名
*/
@ApiModelProperty(notes = "用户名")
private String loginAccout;
/**
* 产品编码
*/
@ApiModelProperty(notes = "产品编码")
private String productCode;
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
/**
* 是否是管理员
*/
@ApiModelProperty(notes = "是否是管理员")
private Boolean isAdmin;
}
package cn.com.glsx.merchants.request.open;
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/22 17:03
*/
@Data
public class RelaevanceMerRequest extends DefaultRequest {
/**
* 商户号
*/
@ApiModelProperty(notes = "商户号")
private Integer merchantId;
/**
* 企微id
*/
@ApiModelProperty(notes = "企微id")
private String entmicroId;
/**
* 企微号
*/
@ApiModelProperty(notes = "企微号")
private String entmicroName;
}
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("根据商户号查询员工列表param")
public class StaffListOpenRequest extends AbstractRopRequest {
@ApiModelProperty(value = "商户号")
private String merchantNo;
@ApiModelProperty(value = "产品code")
private String productCode;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 入参
* @date 2021/7/22 13:47
*/
@Data
public class StaffSaveOpenRequest extends DefaultRequest {
/**
* 员工姓名
*/
@ApiModelProperty(notes = "员工姓名")
private String staffName;
/**
* 职务
*/
@ApiModelProperty(notes = "职务")
private String staffJob;
/**
* 密码
*/
@ApiModelProperty(notes = "密码")
private String password;
/**
* 手机号
*/
@ApiModelProperty(notes = "手机号")
private String staffPhone;
/**
* 商户id
*/
@ApiModelProperty(notes = "商户id")
private Integer merchantId;
/**
* 邮箱
*/
@ApiModelProperty(notes = "邮箱")
private String staffEmail;
/**
* 企微号
*/
@ApiModelProperty(notes = "企微号")
private String entmicroName;
/**
* 员工id
*/
@ApiModelProperty(notes = "员工id")
private String entmicroId;
/**
* 手机号
*/
@ApiModelProperty(notes = "登录账号", required = true)
private String loginAccount;
private String merchantFileRequest;
/**
* 所属企微
*/
private String belongingEntmicroName;
private String type;
private Integer oldMerchantId;
private String oldPhone;
}
package cn.com.glsx.merchants.request.open;
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/26 18:21
*/
@Data
public class StaffSearchOpenRequest extends DefaultRequest {
/**
* 登录账号
*/
@ApiModelProperty(notes = "登录账号")
private String account;
/**
* 商户号
*/
private Integer merchantId;
}
package cn.com.glsx.merchants.request.open;
import cn.com.glsx.merchants.request.DefaultRequest;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/23 16:19
*/
@Data
public class SyncStaffOpenRequest extends DefaultRequest {
private String data;
private List<StaffSaveOpenRequest> list;
}
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@Data
public class UpdateMerchantByMerchantNoRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "商户号", required = true)
@NotEmpty
private String merchantNo;
@ApiModelProperty(notes = "企业微信名称")
private String entmicroName;
}
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/12/17 13:43
*/
@Data
public class UpdatePasswordOpenRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "用户名")
private String userAccount;
/**
* 用户uuid
*/
@ApiModelProperty(notes = "用户uuid")
private String uuid;
/**
* 旧密码
*/
@ApiModelProperty(notes = "旧密码")
private String oldPassword;
/**
* 新密码
*/
@ApiModelProperty(notes = "新密码")
private String newPassword;
}
package cn.com.glsx.merchants.request.open;
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/10/22 14:21
*/
@Data
public class UserLoginRequest extends AbstractRopRequest {
@ApiModelProperty(notes = "登录号")
@NotNull
private String loginAccout;
@ApiModelProperty(notes = "商户号")
@NotNull
private Integer merchantId;
/**
* sessionId
*/
@ApiModelProperty(notes = "sessionId")
@NotNull
private String sessionId;
}
package cn.com.glsx.merchants.request.open;
import com.rop.AbstractRopRequest;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/11/30 21:16
*/
@Data
public class UserRequest extends AbstractRopRequest {
@NotNull
private String createdBy;
}
package cn.com.glsx.merchants.request.product;/**
* @author zhouhaibao
* @date 2021/7/9
*/
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 zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/9 11:02
*/
@Data
public class ProductDeleteRequest extends DefaultRequest implements Serializable {
/**
* 产品名称
*/
@ApiModelProperty(notes = "产品id", required = true)
@NotNull
private Integer id;
}
package cn.com.glsx.merchants.request.product;
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 zhouhaibao
* @version 1.0
* @description: 产品请求体
* @date 2021/7/9 10:10
*/
@Data
public class ProductSaveRequest extends DefaultRequest implements Serializable {
/**
* 产品名称
*/
@ApiModelProperty(notes = "产品名称", required = true)
@NotNull
private String productName;
/**
* 产品类型取字典数据
*/
@ApiModelProperty(notes = "产品类型", required = true)
@NotNull
private Integer productType;
/**
* 产品简介
*/
@ApiModelProperty(notes = "产品简介")
private String productDetail;
/**
* 产品地址
*/
@ApiModelProperty(notes = "产品地址", required = true)
private String productAddress;
/**
* 创建人
*/
@ApiModelProperty(notes = "创建人", required = true)
private Integer createdBy;
}
package cn.com.glsx.merchants.request.product;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;
/**
* @author Lichongyuan
* @Description: 根据产品id查询菜单功能树
* @date 2021/7/28 14:20
*/
@Data
public class ProductSearchByIdRequest extends AbstractRopRequest implements Serializable {
/**
* 产品id
*/
@ApiModelProperty(notes = "产品id", required = true)
@NotNull
private List<Integer> productId;
/**
* 账户类型id
*/
@ApiModelProperty(notes = "产品id")
private Integer accountTypeId;
}
package cn.com.glsx.merchants.request.product;
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 zhouhaibao
* @version 1.0
* @description: 产品分页入参
* @date 2021/7/9 10:57
*/
@Data
public class ProductSearchRequest extends DefaultRequest implements Serializable {
/**
* 产品名称
*/
@ApiModelProperty(name = "productName", notes = "产品名称", dataType = "String")
private String productName;
@ApiModelProperty(name = "pageSize", notes = "分页数", dataType = "Integer", required = true)
@NotNull
private Integer pageSize;
@ApiModelProperty(name = "pageNum", notes = "当前页", dataType = "Integer", required = true)
@NotNull
private Integer pageNum;
}
package cn.com.glsx.merchants.request.product;
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 zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/9 10:56
*/
@Data
public class ProductUpdateRequest extends DefaultRequest implements Serializable {
/**
* 产品id
*/
@ApiModelProperty(name = "id", notes = "产品id",dataType = "Integer", required = true)
@NotNull
private Integer id;
/**
* 产品名称
*/
@ApiModelProperty(name = "productName", notes = "产品名称",dataType = "String")
private String productName;
/**
* 产品类型取字典数据
*/
@ApiModelProperty(name = "productType", notes = "产品类型",dataType = "Integer")
private Integer productType;
/**
* 产品编号
*/
@ApiModelProperty(name = "productCode", notes = "产品编号",dataType = "String")
private String productCode;
/**
* 产品简介
*/
@ApiModelProperty(name = "productDetail", notes = "产品简介",dataType = "String")
private String productDetail;
/**
* 产品地址
*/
@ApiModelProperty(name = "productAddress", notes = "产品地址",dataType = "String")
private String productAddress;
}
package cn.com.glsx.merchants.request.role;
import cn.com.glsx.merchants.request.ProductRequest;
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 RoleAccountTypeRequest implements Serializable {
/**
* 账户类型id
*/
@ApiModelProperty(name = "accounttypeId", notes = "账户类型id", dataType = "Integer")
private Integer accounttypeId;
/**
* 产品列表
*/
@ApiModelProperty(name = "productList", notes = "产品列表", dataType = "List")
private List<ProductRequest> productList;
}
package cn.com.glsx.merchants.request.role;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class RoleDeleteRequest extends DefaultRequest {
@NotNull
@ApiModelProperty(notes = "id", name = "id", dataType = "Integer", required = true)
private Integer id;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.role;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class RoleInsertRequest extends DefaultRequest {
/**
* 角色名称
*/
@NotNull
@ApiModelProperty(notes = "角色名称", name = "roleName", required = true)
private String roleName;
/**
* 角色描述
*/
@ApiModelProperty(notes = "角色描述", name = "roleDescription")
private String roleDescription;
/**
* 所属商户id
*/
@NotNull
@ApiModelProperty(name = "merchantId", notes = "所属商户id", dataType = "Integer", required = true)
private Integer merchantId;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "状态", dataType = "Byte", name = "delFlag", required = true)
private Byte delFlag;
/**
* 创建时间
*/
private Integer createdBy;
/**
* 创建账户
*/
private String createdAccount;
/**
* 更新人
*/
private Integer updatedBy;
/**
* 更新账户
*/
private String updatedAccount;
/**
* 角色关联账户类型列表
*/
@ApiModelProperty(name = "requestList", notes = "角色关联账户类型数据列表", dataType = "String", required = true)
private String requestList;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.role;
import cn.com.glsx.merchants.request.DefaultRequest;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class RoleListSearchRequest extends DefaultRequest {
/**
* 角色名称
*/
@ApiModelProperty(notes = "角色名称", name = "roleName", dataType = "String")
private String roleName;
/**
* 所属商户id
*/
@ApiModelProperty(notes = "所属商户id", name = "merchantId", dataType = "Integer")
private Integer merchantId;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "0=正常,-1=删除 1.草稿", 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 \ No newline at end of file
package cn.com.glsx.merchants.request.role;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class RoleSearchRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "角色id", name = "id", dataType = "Integer")
private Integer id;
@ApiModelProperty(notes = "状态", dataType = "Byte", name = "delFlag")
private Byte delFlag;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.role;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
@Data
public class RoleUpdateRequest extends DefaultRequest {
@NotNull
@ApiModelProperty(notes = "id", name = "id", dataType = "Integer", required = true)
private Integer id;
/**
* 角色名称
*/
@NotNull
@ApiModelProperty(notes = "角色名称", name = "roleName", required = true)
private String roleName;
/**
* 角色描述
*/
@ApiModelProperty(notes = "角色描述", name = "roleDescription")
private String roleDescription;
/**
* 所属商户id
*/
@NotNull
@ApiModelProperty(name = "merchantId", notes = "所属商户id", dataType = "Integer", required = true)
private Integer merchantId;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "状态", dataType = "Byte", name = "delFlag", required = true)
private Byte delFlag;
/**
* 创建时间
*/
private Integer createdBy;
/**
* 更新人
*/
private Integer updatedBy;
/**
* 创建账户
*/
private String createdAccount;
/**
* 更新账户
*/
private String updatedAccount;
/**
* 角色关联账户类型列表
*/
@ApiModelProperty(name = "requestList", notes = "角色关联账户类型数据列表", dataType = "String", required = true)
private String requestList;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.request.score;
import cn.com.glsx.merchants.request.DefaultRequest;
import lombok.Data;
import java.util.List;
/**
* @ClassName MerchantScoreUpdateRopRequest
* @Description
* @Author lichongyuan
* @Date 2022/11/24
*/
@Data
public class MerchantScoreUpdateRopRequest extends DefaultRequest {
private List<Integer> idList;
}
package cn.com.glsx.merchants.request.score;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @ClassName MerchantStaffScoreSearchRopRequest
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Data
public class MerchantStaffScoreSearchRopRequest extends DefaultRequest {
/**
* 员工名称
*/
@ApiModelProperty("员工名称")
private String staffName;
/**
* 员工手机号
*/
@ApiModelProperty("员工手机号")
private String staffPhone;
/**
* 部门名称
*/
@ApiModelProperty("部门名称")
private String department;
/**
* 业务场景
*/
@ApiModelProperty("业务场景")
private Integer businessScene;
/**
* 所属门店名
*/
@ApiModelProperty("所属门店名")
private String merchantName;
/**
* 所属活动名
*/
@ApiModelProperty("所属活动名")
private String activityName;
/**
* 所属渠道
*/
@ApiModelProperty("所属渠道 1 广联 2 服务商 3 门店")
private Integer channel;
/**
* 所属任务名
*/
@ApiModelProperty("所属任务名")
private String missionName;
/**
* 奖励开始时间
*/
@ApiModelProperty("奖励开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date rewardBeginTime;
/**
* 奖励结束时间
*/
@ApiModelProperty("奖励结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date rewardEndTime;
@NotNull
@ApiModelProperty(notes = "分页数", name = "pageSize",required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", name = "pageNum",required = true)
private Integer pageNum;
@ApiModelProperty("是否支持提现 1.员工发起提现 2.运营从后台核销")
private Integer isWithdrawal;
@ApiModelProperty("是否核销 1核销 2 未核销")
private Integer exchangeStatus;
@ApiModelProperty("核销开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date exchangeBeginTime;
@ApiModelProperty("核销结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date exchangeEndTime;
}
package cn.com.glsx.merchants.request.staff;
import com.rop.AbstractRopRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MerchantNoListByStaffPhone extends AbstractRopRequest {
@ApiModelProperty(value = "员工手机号", required = true)
private String staffPhone;
}
package cn.com.glsx.merchants.request.staff;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/22 13:59
*/
@Data
public class MerchantUserRopRequest {
/**
* 用户名
*/
@ApiModelProperty(notes = "用户名", required = true)
private String loginAccout;
/**
* 密码
*/
@ApiModelProperty(notes = "密码", required = true)
private String loginPassword;
}
package cn.com.glsx.merchants.request.staff;
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.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 入参
* @date 2021/7/22 13:47
*/
@Data
public class StaffDeleteRequest extends DefaultRequest {
/**
* id
*/
@ApiModelProperty(notes = "员工id", required = true)
private Integer id;
}
package cn.com.glsx.merchants.request.staff;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/8/2 12:44
*/
@Data
public class StaffExportRequest extends DefaultRequest {
@ApiModelProperty(notes = "员工状态")
private Integer status;
@ApiModelProperty(notes = "员工姓名")
private String staffName;
@ApiModelProperty(notes = "员工手机号")
private String staffPhone;
@ApiModelProperty(notes = "创建人")
private String createdName;
@ApiModelProperty(notes = "商户id")
private Integer merchantId;
@ApiModelProperty(notes = "角色id")
private Integer roleId;
}
package cn.com.glsx.merchants.request.staff;
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/22 14:50
*/
@Data
public class StaffListRequest extends DefaultRequest {
/**
* 商户id
*/
@ApiModelProperty(notes = "商户id", required = true)
private Integer merchantId;
/**
* 商户id
*/
@ApiModelProperty(notes = "关键字")
private String keyword;
}
package cn.com.glsx.merchants.request.staff;
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/22 14:57
*/
@Data
public class StaffPageRequest extends DefaultRequest {
@ApiModelProperty(notes = "员工状态, 0:启用, 2: 禁用, 3: 关联企微, 4: 不关联企微")
private Integer status;
@ApiModelProperty(notes = "员工姓名")
private String staffName;
@ApiModelProperty(notes = "员工手机号")
private String staffPhone;
@ApiModelProperty(notes = "创建人")
private String createdName;
@ApiModelProperty(notes = "商户id")
private Integer merchantId;
@ApiModelProperty(notes = "角色id")
private Integer roleId;
@NotNull
@ApiModelProperty(notes = "分页数", name = "pageSize", dataType = "Integer")
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", name = "pageNum", dataType = "Integer")
private Integer pageNum;
}
package cn.com.glsx.merchants.request.staff;
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 StaffRoleInsertBatchRequest extends DefaultRequest {
@ApiModelProperty(notes = "员工ids")
private List<Integer> staffIds;
@ApiModelProperty(notes = "角色id")
private Integer roleId;
}
package cn.com.glsx.merchants.request.staff;
import cn.com.glsx.merchants.request.DefaultRequest;
import cn.com.glsx.merchants.request.file.FileSaveRequest;
import com.rop.annotation.IgnoreSign;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 入参
* @date 2021/7/22 13:47
*/
@Data
public class StaffSaveRequest extends DefaultRequest {
/**
* 员工姓名
*/
@ApiModelProperty(notes = "员工姓名", required = true)
private String staffName;
/**
* 职务
*/
@ApiModelProperty(notes = "职务", required = true)
private String staffJob;
/**
* 密码
*/
@ApiModelProperty(notes = "密码", required = true)
private String password;
/**
* 可见下级商户id
*/
@ApiModelProperty(notes = "可见下级商户id", required = true)
private String visibleInferiorMer;
/**
* 手机号
*/
@ApiModelProperty(notes = "手机号", required = true)
private String staffPhone;
/**
* 商户id
*/
@ApiModelProperty(notes = "商户id", required = true)
private Integer merchantId;
/**
* 邮箱
*/
@ApiModelProperty(notes = "邮箱", required = true)
private String staffEmail;
/**
* 角色id
*/
@ApiModelProperty(notes = "角色id", required = true)
private List<Integer> roleIds;
private String merchantFileRequest;
@ApiModelProperty(notes = "员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」")
private String staffLabel;
@ApiModelProperty(notes = "0-其他、1-销售部、2-售后部、3-客服部、4-续保部")
private Integer department;
}
package cn.com.glsx.merchants.request.staff;
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:
* @date 2021/7/22 14:50
*/
@Data
public class StaffSearchRequest extends DefaultRequest {
/**
* id
*/
@ApiModelProperty(notes = "员工id", required = true)
private Integer id;
}
package cn.com.glsx.merchants.request.staff;
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.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 入参
* @date 2021/7/22 13:47
*/
@Data
public class StaffUpdateRequest extends DefaultRequest {
/**
* 员工姓名
*/
@ApiModelProperty(notes = "员工姓名", required = true)
private String staffName;
/**
* id
*/
@ApiModelProperty(notes = "员工id", required = true)
private Integer id;
/**
* 职务
*/
@ApiModelProperty(notes = "职务", required = true)
private String staffJob;
/**
* 可见下级商户id
*/
@ApiModelProperty(notes = "可见下级商户id", required = true)
private String visibleInferiorMer;
/**
* 手机号
*/
@ApiModelProperty(notes = "手机号", required = true)
private String staffPhone;
/**
* 密码
*/
@ApiModelProperty(notes = "密码", required = true)
private String password;
/**
* 商户id
*/
@ApiModelProperty(notes = "商户id", required = true)
private Integer merchantId;
/**
* 邮箱
*/
@ApiModelProperty(notes = "邮箱", required = true)
private String staffEmail;
/**
* 角色id
*/
@ApiModelProperty(notes = "角色id", required = true)
private List<Integer> roleIds;
private String merchantFileRequest;
@ApiModelProperty(notes = "员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」")
private String staffLabel;
@ApiModelProperty(notes = "1-销售部、2-售后部、3-客服部、4-续保部")
private Integer department;
}
package cn.com.glsx.merchants.request.staff;
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 StaffUpdateStatusBatchRequest extends DefaultRequest {
@ApiModelProperty(notes = "staffId:员工id,status: 0启用 2禁用")
private List<MerchantStatus> list;
@Data
public static class MerchantStatus{
/**
* 员工id
*/
private Integer staffId;
/**
* 状态 0.启用 2.禁用
*/
private Integer status;
}
}
package cn.com.glsx.merchants.request.staff;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/10/13 19:22
*/
@Data
public class StaffUpdateStatusRequest extends DefaultRequest {
/**
* id
*/
@ApiModelProperty(notes = "员工id", required = true)
private Integer id;
/**
* 状态
*/
@ApiModelProperty(notes = "状态 0.启用 2.禁用", required = true)
private Integer status;
}
package cn.com.glsx.merchants.request.staff;
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 StaffUpdateValRequest extends DefaultRequest implements Serializable {
@ApiModelProperty(notes = "员工id", required = true)
private Integer id;
@ApiModelProperty(notes = "状态", required = true)
private Integer effectiveTime;
}
package cn.com.glsx.merchants.request.user;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户用户
* @date 2021/7/29 9:10
*/
@Data
public class MerchantUser {
private Integer id;
private String username;
private String realname;
private String source;
private Integer merchantId;
}
package cn.com.glsx.merchants.request.user;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外用户入参
* @date 2021/9/17 10:11
*/
@Data
public class OpenUserRequest extends DefaultRequest {
/**
* 1.商户 2.类型
*/
@ApiModelProperty(notes = "用户类型,1.员工 2.商户")
private Byte userType;
/**
* 用户名
*/
@ApiModelProperty(notes = "用户名")
private String loginAccout;
/**
* 密码
*/
@ApiModelProperty(notes = "密码")
private String loginPassword;
/**
* 渠道编码
*/
@ApiModelProperty(notes = "渠道编码")
private String channelCode;
/**
* 产品编码
*/
@ApiModelProperty(notes = "产品编码")
private String productCode;
}
package cn.com.glsx.merchants.request.withdrawal;
import cn.com.glsx.merchants.request.DefaultRequest;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import java.util.Date;
/**
* @ClassName MerchantStaffWithdrawalRopRequest
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Data
public class MerchantStaffWithdrawalSearchRopRequest extends DefaultRequest {
/**
* 员工名称
*/
@ApiModelProperty("员工名称")
private String staffName;
/**
* 员工手机号
*/
@ApiModelProperty("员工手机号")
private String staffPhone;
@ApiModelProperty("状态值 1 待审核 2 到账中 3 已到账 4 提现失败 ")
private Integer status;
@ApiModelProperty("所属商户")
private String merchantName;
/**
* 审核开始时间
*/
@ApiModelProperty("奖励开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date reviewBeginTime;
/**
* 审核结束时间
*/
@ApiModelProperty("奖励结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date reviewEndTime;
/**
* 提现开始时间
*/
@ApiModelProperty("奖励开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date withdrawalBeginTime;
/**
* 提现结束时间
*/
@ApiModelProperty("奖励结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date withdrawalEndTime;
@NotNull
@ApiModelProperty(notes = "分页数", name = "pageSize",required = true)
private Integer pageSize;
@NotNull
@ApiModelProperty(notes = "当前页", name = "pageNum",required = true)
private Integer pageNum;
}
package cn.com.glsx.merchants.request.withdrawal;
import cn.com.glsx.merchants.request.DefaultRequest;
import lombok.Data;
import java.util.List;
/**
* @ClassName MerchantStaffWithdrawalUpdateRopRequest
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Data
public class MerchantStaffWithdrawalUpdateRopRequest extends DefaultRequest {
private List<Integer> idList;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品菜单关系响应数据
* @date 2021/7/16 16:50
*/
@Data
public class AccountProductRelationResponse {
/**
* 产品id
*/
@ApiModelProperty(name = "productId", notes = "产品id", dataType = "Integer")
private Integer productId;
/**
* 产品名
*/
@ApiModelProperty(name = "productName", notes = "产品名", dataType = "String")
private String productName;
/**
* 回选全部菜单id列表
*/
@ApiModelProperty(name = "menuIdList", notes = "回选全部菜单id列表", dataType = "List")
private List<Integer> menuIdList;
/**
* 回选功能id列表
*/
@ApiModelProperty(name = "functionIdList", notes = "回选功能id列表", dataType = "List")
private List<Integer> functionIdList;
}
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class AccountTypeResponse implements Serializable {
@ApiModelProperty(notes = "id", name = "id", dataType = "Integer")
private Integer id;
/**
* 账户类型名称
*/
@ApiModelProperty(notes = "账户类型名称", name = "accounttypeName", dataType = "String")
private String accounttypeName;
/**
* 描述
*/
@ApiModelProperty(notes = "描述", name = "accounttypeDetail", dataType = "Integer")
private String accounttypeDetail;
/**
* 创建人
*/
@ApiModelProperty(notes = "创建人id", name = "createdBy", dataType = "Integer")
private Integer createdBy;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(notes = "创建时间", name = "createdTime", dataType = "Date")
private Date createdTime;
/**
* 更新人
*/
@ApiModelProperty(notes = "更新人id", name = "updatedBy", dataType = "Integer")
private Integer updatedBy;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(notes = "更新时间", name = "updatedTime", dataType = "Date")
private Date updatedTime;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "状态", name = "delFlag", dataType = "Byte")
private Byte delFlag;
/**
* 账户状态
*/
@ApiModelProperty(name = "statusName", notes = "账户状态", dataType = "String", required = true, example = "1")
private String statusName;
/**
* 账户类型编码
*/
@ApiModelProperty(notes = "账户类型编码", name = "accounttypeCode", dataType = "String")
private String accounttypeCode;
/**
* 创建账户
*/
@ApiModelProperty(notes = "创建账户", name = "createdAccount", dataType = "String")
private String createdAccount;
/**
* 更新账户
*/
@ApiModelProperty(notes = "更新账户", name = "updatedAccount", dataType = "String")
private String updatedAccount;
/**
* 账户类型功能列表
*/
@ApiModelProperty(notes = "账户类型功能列表", name = "responseList", dataType = "List")
private List<AccountProductRelationResponse> responseList;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 账户类型
* @date 2021/7/22 9:38
*/
@Data
public class AccountTypeTreeRopResponse {
@ApiModelProperty(name = "accounttypeId", notes = "账户类型id", dataType = "Integer", required = true, example = "1",value = "账户类型id")
private Integer accounttypeId;
@ApiModelProperty(name = "products", notes = "产品", dataType = "List", required = true, example = "1",value = "产品")
private List<ProductTreeRopResponse> products;
@ApiModelProperty(name = "accounttypeName", notes = "账户类型", dataType = "Integer", required = true, example = "1",value = "账户类型id")
private String accounttypeName;
private List<MerchantProTreeRopResponse> merchantProTreeResponses;
}
package cn.com.glsx.merchants.response;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/8/1 10:17
*/
@Data
public class CarbrandResponse {
private Integer id;
private String label;
private String logoUrl;
private List<CarbrandResponse> children;
}
package cn.com.glsx.merchants.response;
import lombok.Data;
import java.io.Serializable;
@Data
public class ChannelResponse implements Serializable {
private int id;
private String channelName;
private String channelUrl;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class DictDataResponse implements Serializable {
@ApiModelProperty(name = "id", notes = "字典主键", dataType = "Integer", required = true, example = "1",value = "字典主键")
private Long id;
/**
* 字典排序
*/
@ApiModelProperty(name = "dictSort", notes = "字典排序", dataType = "Integer", required = true, example = "1",value = "字典主键")
private Integer dictSort;
/**
* 字典标签
*/
@ApiModelProperty(name = "dictLabel", notes = "字典标签", dataType = "String", required = true, example = "1",value = "字典主键")
private String dictLabel;
/**
* 字典键值
*/
@ApiModelProperty(name = "dictValue", notes = "字典键值", dataType = "String", required = true, example = "1",value = "字典主键")
private Integer dictValue;
/**
* 字典类型
*/
@ApiModelProperty(name = "dictType", notes = "字典类型", dataType = "String", required = true, example = "1",value = "字典主键")
private String dictType;
@ApiModelProperty(name = "enableStatus", notes = "是否启用", dataType = "Integer", required = true, example = "1",value = "字典主键")
private Integer enableStatus;
/**
* 备注
*/
@ApiModelProperty(name = "remark", notes = "备注", dataType = "String", required = true, example = "1",value = "字典主键")
private String remark;
@ApiModelProperty(name = "createdDate", notes = "创建时间", dataType = "String", required = true, example = "1",value = "字典主键")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdDate;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
@Data
public class DictTypeResponse implements Serializable {
/**
* 字典主键
*/
@ApiModelProperty(name = "id", notes = "字典主键", dataType = "Integer", required = true, example = "1",value = "字典主键")
private Long id;
/**
* 字典名称
*/
@ApiModelProperty(name = "dictName", notes = "字典名称", dataType = "String", required = true, example = "assas",value = "字典名称")
private String dictName;
/**
* 字典类型
*/
@ApiModelProperty(name = "dictType", notes = "字典类型", dataType = "Integer", required = true, example = "assas",value = "字典类型")
private String dictType;
/**
* 备注
*/
@ApiModelProperty(name = "remark", notes = "备注", dataType = "String", required = true, example = "assas",value = "备注")
private String remark;
@ApiModelProperty(name = "enableStatus", notes = "是否启用", dataType = "Integer", required = true, example = "assas",value = "字典类型")
private Integer enableStatus;
@ApiModelProperty(name = "createdDate", notes = "创建时间", dataType = "Date", required = true, example = "assas",value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdDate;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* ExampleResponse
* @author alvin.zengqi
* @version [版本号, 2019-09-02]
* @see [相关类/方法]
* @since [产品/模块版本]
*/
@ApiModel(description = "响应值示例")
public class ExampleResponse
{
@ApiModelProperty(name = "field1", notes = "字段1", dataType = "string", required = true, example = "aaaaa")
private String field1 = "1";
@ApiModelProperty(name = "field2", notes = "字段2", dataType = "string", required = true, example = "bbbbb", value = "字段2")
private String field2 = "2";
public void setField1(String field1) {
this.field1 = field1;
}
public String getField2() {
return field2;
}
public void setField2(String field2) {
this.field2 = field2;
}
/**
* 得到属性字符串
*
* @return String 属性字符串
*/
public String toString()
{
return ToStringBuilder.reflectionToString(this);
}
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @author Lichongyuan
* @version 1.0
* @description: ${todo}
* @date 2021/7/16 15:52
*/
@Data
public class FileResponse {
@ApiModelProperty(name = "id", notes = "文件id",dataType = "Integer")
private Integer id;
/**
* 图片路径
*/
@ApiModelProperty(name = "fileUrl", notes = "图片路径",dataType = "String")
private String fileUrl;
/**
* 1.门店照片 2.菜单图片素材 3.头像
*/
@ApiModelProperty(name = "fileType", notes = "文件类型",dataType = "Byte")
private Byte fileType;
/**
* 创建人
*/
@ApiModelProperty(name = "createdBy", notes = "创建人",dataType = "Integer")
private Integer createdBy;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdTime", notes = "创建时间",dataType = "Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 更新人
*/
@ApiModelProperty(name = "updatedBy", notes = "更新人",dataType = "Integer")
private Integer updatedBy;
/**
* 更新时间
*/
@ApiModelProperty(name = "updatedTime", notes = "更新时间",dataType = "Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
/**
* 是否删除:0=正常,-1=删除
*/
@ApiModelProperty(name = "delFlag", notes = "是否删除",dataType = "Byte")
private Byte delFlag;
/**
* 图片名称
*/
@ApiModelProperty(name = "fileName", notes = "图片名称",dataType = "String")
private String fileName;
/**
* 业务id(商户id)/人员id
*/
@ApiModelProperty(name = "bussinessId", notes = "业务id",dataType = "Integer")
private Integer bussinessId;
}
package cn.com.glsx.merchants.response;
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 FunctionRelationResponse 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.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author zhouhaibao
* @version 1.0
* @description:
* @date 2021/7/12 13:39
*/
@Data
public class FunctionResponse {
@ApiModelProperty(name = "id", notes = "功能id", dataType = "Integer", required = true, example = "1",value = "功能id")
private Integer id;
/**
* 功能名称
*/
@ApiModelProperty(name = "functionName", notes = "功能名称", dataType = "String", required = true, example = "添加",value = "功能名称")
private String functionName;
/**
* 功能属性名称
*/
@ApiModelProperty(name = "functionAttributeName", notes = "功能属性名称", dataType = "String", required = true, example = "1",value = "功能属性名称")
private String functionAttributeName;
/**
* 1.输入 2.按钮 3.单选
*/
@ApiModelProperty(name = "functionType", notes = "功能类型", dataType = "Integer", required = true, example = "1",value = "功能类型")
private Integer functionType;
/**
* 功能值
*/
@ApiModelProperty(name = "functionValue", notes = "功能值", dataType = "String", required = true, example = "1",value = "功能值")
private String functionValue;
/**
* 所属菜单id
*/
@ApiModelProperty(name = "menuId", notes = "所属菜单id", dataType = "Integer", required = true, example = "1",value = "所属菜单id")
private Integer menuId;
/**
* 所属客户群(字段数据关联)
*/
@ApiModelProperty(name = "ownedCusgroupType", notes = "所属客户群类型", dataType = "Integer", required = true, example = "1",value = "所属客户群")
private Integer ownedCusgroupType;
/**
* 所属客户群体值(字段数据关联)
*/
@ApiModelProperty(name = "ownedCusgroupValue", notes = "所属客户群体值", dataType = "String", required = true, example = "1",value = "所属客户群体值")
private String ownedCusgroupValue;
/**
* 排序
*/
@ApiModelProperty(name = "sort", notes = "排序", dataType = "Integer", required = true, example = "1",value = "排序")
private Integer sort;
/**
* 创建人
*/
@ApiModelProperty(name = "createdBy", notes = "创建人", dataType = "Integer", required = true, example = "1",value = "创建人")
private Integer createdBy;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdTime", notes = "创建时间", dataType = "Date", required = true, example = "1",value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 是否删除:0=正常,-1=删除
*/
@ApiModelProperty(name = "delFlag", notes = "是否删除", dataType = "Byte")
private Byte delFlag;
/**
* 所属菜单名称
*/
@ApiModelProperty(name = "menuName", notes = "所属菜单名称", dataType = "String", value = "所属菜单名称")
private String menuName;
/**
* 所属菜单url
*/
@ApiModelProperty(name = "menuUrl", notes = "所属菜单url", dataType = "String",value = "所属菜单url")
private String menuUrl;
/**
* 所属产品名称
*/
@ApiModelProperty(name = "productName", notes = "所属产品名称", dataType = "String",value = "所属产品名称")
private String productName;
/**
*所属客户群体名称
*/
@ApiModelProperty(name = "ownedGroupName", notes = "所属客户群体名称", dataType = "String",value = "所属客户群体名称")
private String ownedGroupName;
/**
* 所属产品id
*/
@ApiModelProperty(name = "productId", notes = "所属产品id", dataType = "Integer",value = "所属产品id")
private Integer productId;
/**
* 功能类型名称
*/
@ApiModelProperty(name = "functionTypeName", notes = "功能类型名称", dataType = "String",value = "功能类型名称")
private String functionTypeName;
/**
* 所属商户/门店
*/
@ApiModelProperty(name = "ownedMerchant", notes = "所属商户/门店", dataType = "String",value = "所属商户/门店")
private String ownedMerchant;
/**
* 更新时间
*/
@ApiModelProperty(name = "updatedTime", notes = "更新时间", dataType = "Date",value = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 功能
* @date 2021/7/22 9:41
*/
@Data
public class FunctionTreeRopResponse {
@ApiModelProperty(name = "functionvalue", notes = "功能值", dataType = "String", required = true, example = "1",value = "产品id")
private String functionvalue;
@ApiModelProperty(name = "functionId", notes = "功能id", dataType = "Integer", required = true, example = "1",value = "功能id")
private Integer functionId;
@ApiModelProperty(name = "mendId", notes = "父菜单id", dataType = "Integer", required = true, example = "1",value = "父菜单id")
private Integer mendId;
}
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/14 16:20
*/
@Data
public class LogResponse {
/**
* 主键
*/
@ApiModelProperty(name = "id", notes = "主键", dataType = "Integer")
private Integer id;
/**
* 模块名称
*/
@ApiModelProperty(name = "module", notes = "模块名称", dataType = "String")
private String module;
/**
* 执行方法
*/
@ApiModelProperty(name = "processed", notes = "执行方法", dataType = "String")
private String processed;
/**
* 操作类型
*/
@ApiModelProperty(name = "action", notes = "操作类型", dataType = "String")
private String action;
/**
* 操作人
*/
@ApiModelProperty(name = "operator", notes = "操作人", dataType = "String")
private String operator;
/**
* 操作姓名
*/
@ApiModelProperty(name = "userName", notes = "操作姓名", dataType = "String")
private String userName;
/**
* ip
*/
@ApiModelProperty(name = "ip", notes = "ip", dataType = "String")
private String ip;
/**
* 操作结果
*/
@ApiModelProperty(name = "result", notes = "操作结果", dataType = "String")
private String result;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdTime", notes = "创建时间", dataType = "Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 产品名称
*/
@ApiModelProperty(name = "productName", notes = "productName")
private String productName;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
* @Title: LoginResponse.java
* @Description:
* @author Alvin
* @date 2019年9月22日 下午3:48:18
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@ApiModel(description = "响应值示例")
@Data
public class LoginResponse {
/**
* 会话ID
*/
@ApiModelProperty(name = "sessionId", notes = "会话ID", dataType = "string", required = true, example = "asdfasdf23423432432")
private String sessionId;
/**
* 登录名
*/
@ApiModelProperty(name = "merchantName", notes = "登录名", dataType = "string", required = true, example = "asdfasdf23423432432")
private String merchantName;
/**
* 账户层级
*/
@ApiModelProperty(name = "accountLevel", notes = "账户层级", dataType = "string", required = true, example = "asdfasdf23423432432")
private Integer accountLevel;
/**
* 商户ID
*/
@ApiModelProperty(name = "merchantId", notes = "商户ID", dataType = "string", required = true, example = "asdfasdf23423432432")
private Integer merchantId;
/**
* 商户状态
*/
@ApiModelProperty(name = "status", notes = "商户状态", dataType = "string", required = true, example = "asdfasdf23423432432")
private Integer status;
}
package cn.com.glsx.merchants.response;
import cn.com.glsx.merchants.model.response.MerchantProductMenuResponse;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class MenuResponse implements Serializable {
/**
* 菜单id
*/
@ApiModelProperty(name = "id", notes = "菜单id", dataType = "Integer", required = true, example = "1", value = "菜单id")
private Integer id;
/**
* 菜单名称
*/
@ApiModelProperty(name = "menuName", notes = "菜单名称", dataType = "string", required = true, example = "滴加", value = "菜单名称")
private String menuName;
/**
* 菜单编号
*/
@ApiModelProperty(name = "menuCode", notes = "菜单编码", dataType = "string", required = true, example = "滴加", value = "菜单编码")
private String menuCode;
/**
* 菜单路由
*/
@ApiModelProperty(name = "menuUrl", notes = "菜单路由", dataType = "Integer", required = true, example = "/menu/add", value = "菜单路由")
private String menuUrl;
/**
* 所属产品Name
*/
@ApiModelProperty(name = "productName", notes = "所属产品Name", dataType = "string", required = true, example = "滴加", value = "菜单编码")
private String productName;
/**
* 父name
*/
@ApiModelProperty(name = "parentName", notes = "父name", dataType = "string", required = true, example = "滴加", value = "菜单编码")
private String parentName;
/**
* 父id
*/
@ApiModelProperty(name = "parentId", notes = "父菜单", dataType = "Integer", required = true, example = "1212", value = "父菜单")
private Integer parentId;
/**
* 所属产品id
*/
@ApiModelProperty(name = "productId", notes = "所属产品id", dataType = "Integer", required = true, example = "1212", value = "所属产品id")
private Integer productId;
/**
* 排序
*/
@ApiModelProperty(name = "sort", notes = "排序", dataType = "Integer", required = true, example = "1212", value = "排序")
private Integer sort;
/**
* 创建人
*/
@ApiModelProperty(name = "createdBy", notes = "创建人", dataType = "Integer", required = true, value = "创建人")
private Integer createdBy;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdTime", notes = "创建时间", dataType = "Date", required = true, value = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 更新人
*/
@ApiModelProperty(name = "updatedBy", notes = "更新人", dataType = "Integer", required = true, value = "更新人")
private Integer updatedBy;
/**
* 更新时间
*/
@ApiModelProperty(name = "updatedTime", notes = "更新时间", dataType = "Date", required = true, value = "更新时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
/**
* 是否删除:0=正常,-1=删除
*/
@ApiModelProperty(name = "delFlag", notes = "是否删除", dataType = "string", required = true, example = "1212", value = "是否删除")
private Byte delFlag;
/**
* 子菜单
*/
@ApiModelProperty(name = "childlist", notes = "子菜单", dataType = "List", required = true, example = "1212", value = "子菜单")
private List<MerchantProductMenuResponse> childlist;
/**
* 菜单图片id:菜单图片id(file的id)
*/
@ApiModelProperty(name = "iconId", notes = "菜单图片id", dataType = "Integer", required = true, example = "12", value = "菜单图片id")
private Integer iconId;
/**
* 菜单位置:1.左 2.上
*/
@ApiModelProperty(name = "iconId", notes = "菜单位置", dataType = "Integer", required = true, example = "12", value = "菜单位置")
private Integer menuPosition;
/**
* 所属客户群 1.账户类型 2.商户层级 3.商户id 4.账户角色
*/
@ApiModelProperty(notes = "所属客户群")
private Integer ownedCusgroupType;
/**
* 所属客户群体值
*/
@ApiModelProperty(notes = "所属客户群体值")
private String ownedCusgroupValue;
/**
* 所属商户/门店
*/
@ApiModelProperty(notes = "所属商户/门店")
private String ownedMerchant;
/**
* 特殊菜单标识 0 否 1 是
*/
@ApiModelProperty(notes = "特殊菜单标识 0 否 1 是")
private Byte isSpecial;
/**
* 排序位置(列表排序值的返显)
*/
@ApiModelProperty(notes = "排序位置(列表排序值的返显)")
private String sortPosition;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
public class MerchantAccessModeResponse {
}
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/23 17:18
*/
@Data
public class MerchantBaseInfoRopResponse {
private Integer id;
@ApiModelProperty(notes = "商户号")
private String merchantName;
@ApiModelProperty(notes = "企微号")
private String entmicroName;
@ApiModelProperty(notes = "商户号")
private Integer merchantNo;
@ApiModelProperty(notes = "所属企业")
private String parentName;
@ApiModelProperty(notes = "企微员工数")
private int entMicroEmployeeCount;
@ApiModelProperty(notes = "商户模式")
private String merchantModelName;
@ApiModelProperty(notes = "门店数")
private int numberStores;
@ApiModelProperty(notes = "有效期")
private String effectiveTimeName;
private List<StoreRopResponse> stores;
@ApiModelProperty(value = "sapCode")
private String sapCode;
@ApiModelProperty(value = "渠道id")
private Integer channelId;
@ApiModelProperty(notes = "主营品牌, 同一车系','分割, 不同车系';'分割")
private String merchantBrandMain;
@ApiModelProperty(notes = "经营业务类型, 多个时','分割")
private String businessType;
@ApiModelProperty(notes = "经营业务类型, 多个时','分割")
private String businessTypeName;
@ApiModelProperty(notes = "营业开始时间")
private String bussinessBegintime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(notes = "营业结束时间")
private String bussinessEndtime;
@ApiModelProperty(notes = "商户地址")
private String merchantAddress;
@ApiModelProperty(notes = "商户地址全部")
private String merchantFullAddress;
@ApiModelProperty(notes = "经度")
private Float lng;
@ApiModelProperty(notes = "维度")
private Float lat;
@ApiModelProperty(notes = "省编码")
private String provinceCode;
@ApiModelProperty(notes = "省名称")
private String provinceName;
@ApiModelProperty(notes = "市编码")
private String cityCode;
@ApiModelProperty(notes = "市名称")
private String cityName;
/**
* 驻点联系人
*/
@ApiModelProperty(notes = "驻点联系人")
private String residentContact;
/**
* 驻点联系电话
*/
@ApiModelProperty(notes = "驻点联系电话")
private String residentPhone;
@ApiModelProperty(name = "merchantBrandName", notes = "品牌", dataType = "String", required = true, example = "1")
private String merchantBrandName;
}
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class MerchantInfoDjRopResponse {
@ApiModelProperty(name = "id", notes = "商户id", dataType = "Integer", required = true, example = "1", value = "商户id")
private Integer id;
/**
* 商户号
*/
@ApiModelProperty(name = "merchantNo", notes = "商户号", dataType = "Integer", required = true, example = "1")
private Integer merchantNo;
/**
* 商户名称
*/
@ApiModelProperty(notes = "商户名称")
private String merchantName;
/**
* 品牌
*/
@ApiModelProperty(name = "merchantBrand", notes = "品牌", dataType = "String", required = true, example = "1")
private String merchantBrand;
/**
* 营业开始时间
*/
@ApiModelProperty(name = "businessBeginTime", notes = "营业开始时间", dataType = "Date", required = true, example = "1")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String businessBeginTime;
/**
* 营业结束时间
*/
@ApiModelProperty(name = "businessEndTime", notes = "营业结束时间", dataType = "Date", required = true, example = "1")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String businessEndTime;
@ApiModelProperty(name = "businessType", notes = "经营业务类型',(英文)'分割: 1.整车/新车,2.保养,3,维修,4,汽车金融,5,零配件/精品,6,车险,7,二手车,8,改装")
private String businessType;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/10/20 18:54
* @Version 1.0
*/
@Data
public class MerchantListByConditionRopResponse implements Serializable {
@ApiModelProperty("商户号")
private Integer merchantId;
@ApiModelProperty("商户名")
private String merchantName;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @Author Hayreal
* @Description TODO
* @date 2022/11/22 11:47
* @Version 1.0
*/
@Data
public class MerchantNoNameRopResponse implements Serializable {
@ApiModelProperty(notes = "商户号")
private Integer merchantNo;
@ApiModelProperty(notes = "商户名")
private String merchantName;
}
package cn.com.glsx.merchants.response;
import cn.com.glsx.merchants.model.response.MerchantProTreeResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author Lichongyuan
* @Description:
* @date 2021/7/28 14:50
*/
@Data
@Api("菜单功能树")
public class MerchantProTreeRopResponse {
@ApiModelProperty(name = "id", notes = "节点id", dataType = "Integer", required = true, example = "1")
private Integer id;
@ApiModelProperty(name = "label", notes = "节点名称", dataType = "String", required = true, example = "1")
private String label;
@ApiModelProperty(name = "value", notes = "节点值", dataType = "String", required = true, example = "1")
private String value;
@ApiModelProperty(name = "logo", notes = "节点标识", dataType = "String", required = true, example = "1")
private String logo;
@ApiModelProperty(name = "disabled", notes = "disabled")
private Boolean disabled;
@ApiModelProperty(name = "parentId", notes = "父id", dataType = "Integer", required = true, example = "1")
private Integer parentId;
@ApiModelProperty(name = "menuUrl", notes = "菜单url", dataType = "String", required = true, example = "1")
private String menuUrl;
@ApiModelProperty(name = "functionUrl", notes = "功能标记", dataType = "String", required = true, example = "1")
private String functionUrl;
@ApiModelProperty(name = "superParentId", notes = "爷id", dataType = "Integer", required = true, example = "1")
private Integer superParentId;
@ApiModelProperty(name = "rootIds", notes = "祖上节点", dataType = "Integer", required = true, example = "1")
private String rootIds;
private List<MerchantProTreeResponse> children;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/10/12 11:41
*/
@Data
public class MerchantRopListRes {
@ApiModelProperty(name = "id", notes = "商户id", dataType = "Integer", required = true, example = "1", value = "商户id")
private Integer id;
/**
* 商户名称
*/
@ApiModelProperty(name = "id", notes = "商户名称", dataType = "String", required = true, example = "1", value = "商户id")
private String merchantName;
}
package cn.com.glsx.merchants.response;
import cn.com.glsx.merchants.dto.MerchantBrandDTO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
@Data
@ApiModel(description = "商户")
public class MerchantRopResponse {
@ApiModelProperty(name = "id", notes = "商户id", dataType = "Integer", required = true, example = "1", value = "商户id")
private Integer id;
/**
* 商户名称
*/
@ApiModelProperty(name = "id", notes = "商户名称", dataType = "String", required = true, example = "1", value = "商户id")
private String merchantName;
/**
* 营业范围
*/
@ApiModelProperty(name = "businessScope", notes = "营业范围", dataType = "String", required = true, example = "1", value = "商户id")
private String businessScope;
/**
* 品牌
*/
@ApiModelProperty(name = "merchantBrand", notes = "品牌", dataType = "String", required = true, example = "1", value = "商户id")
private String merchantBrand;
/**
* 商户简称
*/
@ApiModelProperty(name = "merchantAbbreviation", notes = "商户简称", dataType = "String", required = true, example = "1", value = "商户简称")
private String merchantAbbreviation;
/**
* 1.个体户 2.企业
*/
@ApiModelProperty(name = "merchantType", notes = "1.个体户 2.企业", dataType = "Integer", required = true, example = "1")
private Byte merchantType;
/**
* 组织机构代码
*/
@ApiModelProperty(name = "merchantOrgcode", notes = "组织机构代码", dataType = "String", required = true, example = "1")
private String merchantOrgcode;
/**
* 商户地址
*/
@ApiModelProperty(name = "merchantAddress", notes = "商户地址", dataType = "String", required = true, example = "1")
private String merchantAddress;
/**
* 法定联系人
*/
@ApiModelProperty(name = "merchantLegalPerson", notes = "法定联系人", dataType = "String", required = true, example = "1")
private String merchantLegalPerson;
/**
* 联系电话
*/
@ApiModelProperty(name = "merchantLegalPersonPhone", notes = "联系电话", dataType = "String", required = true, example = "1")
private String merchantLegalPersonPhone;
/**
* 电话是否可作为登录名
*/
@ApiModelProperty(name = "isloginName", notes = "电话是否可作为登录名", dataType = "Integer", required = true, example = "1")
private Byte isloginName;
/**
* 登录账户
*/
@ApiModelProperty(name = "merchantLoginAccount", notes = "登录账户", dataType = "String", required = true, example = "1")
private String merchantLoginAccount;
/**
* 1.工厂 2.省代 3.市代 4.门店
*/
@ApiModelProperty(name = "merchantAccountLevel", notes = "账户层级", dataType = "Integer", required = true, example = "1")
private Byte merchantAccountLevel;
/**
* 创建人
*/
@ApiModelProperty(name = "createdBy", notes = "创建人", dataType = "Integer", required = true, example = "1")
private Integer createdBy;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdTime", notes = "创建时间", dataType = "date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 更新时间
*/
@ApiModelProperty(name = "updatedTime", notes = "更新时间", dataType = "date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
/**
* 渠道id
*/
@ApiModelProperty(name = "channelId", notes = "渠道id", dataType = "Integer", required = true, example = "1")
private Integer channelId;
/**
* 驻点联系人
*/
@ApiModelProperty(name = "residentContact", notes = "驻点联系人", dataType = "String", required = true, example = "1")
private String residentContact;
/**
* 驻点联系电话
*/
@ApiModelProperty(name = "residentPhone", notes = "驻点联系电话", dataType = "String", required = true, example = "1")
private String residentPhone;
/**
* 密码
*/
@ApiModelProperty(name = "merchantLoginPassword", notes = "密码", dataType = "String", required = true, example = "1")
private String merchantLoginPassword;
/**
* 区域
*/
@ApiModelProperty(name = "areaCode", notes = "区域", dataType = "Integer", required = true, example = "1")
private Byte areaCode;
/**
* 营业开始时间
*/
@ApiModelProperty(name = "bussinessBegintime", notes = "营业开始时间", dataType = "Date", required = true, example = "1")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String bussinessBegintime;
/**
* 营业结束时间
*/
@ApiModelProperty(name = "bussinessEndtime", notes = "营业结束时间", dataType = "Date", required = true, example = "1")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String bussinessEndtime;
/**
* 商户过期时间
*/
@ApiModelProperty(name = "expireDate", notes = "商户过期时间", dataType = "Date", required = true, example = "1")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date expireDate;
/**
* 1.草稿 2.发布 3.注销 4.过期
*/
@ApiModelProperty(name = "status", notes = "商户状态", dataType = "Integer", required = true, example = "1")
private Byte status;
/**
* 渠道名称
*/
@ApiModelProperty(name = "accountTypeNames", notes = "渠道名称", dataType = "String", required = true, example = "1")
private String accountTypeNames;
/**
* 账户类型id
*/
@ApiModelProperty(name = "accountType", notes = "账户类型id", dataType = "String", required = true, example = "1")
private String accountType;
/**
* 父商户
*/
@ApiModelProperty(name = "parentMerchant", notes = "父商户", dataType = "String", required = true, example = "1")
private String parentMerchant;
/**
* 商户号
*/
@ApiModelProperty(name = "merchantNo", notes = "商户号", dataType = "Integer", required = true, example = "1")
private Integer merchantNo;
/**
* 父id
*/
@ApiModelProperty(name = "parentId", notes = "父id", dataType = "Integer", required = true, example = "1")
private Integer parentId;
/**
* 账户层级
*/
@ApiModelProperty(name = "accountLevelName", notes = "账户层级", dataType = "String", required = true, example = "1")
private String accountLevelName;
/**
* 账户状态
*/
@ApiModelProperty(name = "statusName", notes = "账户状态", dataType = "String", required = true, example = "1")
private String statusName;
/**
* 营业范围
*/
@ApiModelProperty(name = "businessScopName", notes = "营业范围", dataType = "String", required = true, example = "1")
private String businessScopName;
/**
* 品牌
*/
@ApiModelProperty(name = "merchantBrandName", notes = "品牌", dataType = "String", required = true, example = "1")
private String merchantBrandName;
/**
* 企业类型
*/
@ApiModelProperty(name = "merchantTypeName", notes = "品牌", dataType = "String", required = true, example = "1")
private String merchantTypeName;
/**
* 自定义营业范围
*/
@ApiModelProperty(name = "businessScopeCustomize", notes = "自定义营业范围", dataType = "String", required = true, example = "1")
private String businessScopeCustomize;
/**
* 有效期
*/
@ApiModelProperty(name = "effectiveTimeName", notes = "有效期", dataType = "String", required = true, example = "1")
private String effectiveTimeName;
/**
* 渠道名称
*/
@ApiModelProperty(name = "channelName", notes = "渠道名称", dataType = "String", required = true, example = "1")
private String channelName;
/**
* 商户地址全部
*/
@ApiModelProperty(name = "merchantFullAddress", notes = "商户地址全部", dataType = "String", required = true, example = "1")
private String merchantFullAddress;
/**
* 有效时间
*/
@ApiModelProperty(name = "effectiveTime", notes = "有效时间", dataType = "Integer", required = true, example = "1")
private Integer effectiveTime;
/**
* 门店数量
*/
@ApiModelProperty(name = "numberOfStores", notes = "门店数量", dataType = "Integer", required = true, example = "1")
private Long numberOfStores;
/**
* 子商户数量
*/
@ApiModelProperty(name = "numberOfSubMerchants", notes = "子商户数量", dataType = "Integer", required = true, example = "1")
private Long numberOfSubMerchants;
/**
* 经度
*/
private Float lng;
/**
* 纬度
*/
private Float lat;
/**
* 关联关系
*/
private List<AccountTypeTreeRopResponse> accountTypes;
/**
* 文件
*/
private List<FileResponse> merchantFileResponses;
/**
* 门店模式
*/
@ApiModelProperty(notes = "门店模式")
private Integer merchantModel;
/**
* 门店模式名称
*/
@ApiModelProperty(notes = "门店模式名称")
private String merchantModelName;
/**
* 企微id
*/
@ApiModelProperty(notes = "企微id")
private String entmicroId;
/**
* 企微号
*/
@ApiModelProperty(notes = "企微号")
private String entmicroName;
/**
* 1.广联 2.广汇
*/
@ApiModelProperty(notes = "1.广联 2.广汇")
private Integer channelType;
/**
* sapCode
*/
@ApiModelProperty(notes = "sap代码")
private String sapCode;
/**
* 商户有效开始时间
*/
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
@ApiModelProperty(notes = "商户有效开始时间")
private Date effectiveStarttime;
/**
* 距离
*/
@ApiModelProperty(notes = "距离")
private double distance;
@ApiModelProperty(notes = "是否嘀加渠道")
private Boolean djBl;
@ApiModelProperty(notes = "接入模式: 0.自建应用模式,3.应用代开发模式")
private Integer accessMode;
@ApiModelProperty(notes = "接入模式")
private String accessModeName;
@ApiModelProperty(notes = "是否可编辑[接入模式], true, false")
private Boolean hasAccessMode;
@ApiModelProperty(notes = "主营品牌 一级")
private String merchantBrandCars;
@ApiModelProperty(notes = "主营品牌, 同一车系','分割, 不同车系';'分割")
private String merchantBrandMain;
@ApiModelProperty(notes = "经营业务类型, 多个时','分割")
private String businessType;
@ApiModelProperty(notes = "经营业务类型, 多个时','分割")
private String businessTypeName;
@ApiModelProperty(notes = "省编码")
private String provinceCode;
@ApiModelProperty(notes = "省名称")
private String provinceName;
@ApiModelProperty(notes = "市编码")
private String cityCode;
@ApiModelProperty(notes = "市名称")
private String cityName;
@ApiModelProperty(notes = "车品牌树状Obj")
private List<MerchantBrandDTO> brandTreeList;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
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/20 10:33
*/
@Data
public class MerchantTreeOpenResponse implements Serializable {
@ApiModelProperty(notes = "商户号")
private Integer id;
private String label;
@ApiModelProperty(notes = "商户账户类型")
private Integer merchantAccountLevel;
@ApiModelProperty(notes = "企微名")
private String entmicroName;
@ApiModelProperty(notes = "商户名")
private String merchantName;
private List<MerchantTreeOpenResponse> children;
}
package cn.com.glsx.merchants.response;
import cn.com.glsx.merchants.model.response.MerchantTreeResponse;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户树查询
* @date 2021/7/20 10:33
*/
@Data
public class MerchantTreeRopResponse {
private Integer id;
private String label;
private List<MerchantTreeResponse> children;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: 返回用户体
* @date 2021/7/22 14:42
*/
@Data
public class MerchantUserRopResponse {
/**
* 用户名
*/
@ApiModelProperty(name = "loginAccout", notes = "用户名", dataType = "String")
private String loginAccout;
/**
* 密码
*/
@ApiModelProperty(name = "loginPassword", notes = "密码", dataType = "String")
private String loginPassword;
}
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 对外用户返回体
* @date 2021/9/17 10:14
*/
@Data
public class OpenUserResponse {
/**
* id
*/
@ApiModelProperty(name = "id", notes = "用户id")
private Integer id;
/**
* 1.员工 2.商户
*/
@ApiModelProperty(name = "userType", notes = "登录类型 1.商户 2.员工")
private Byte userType;
/**
* 用户名
*/
@ApiModelProperty(name = "loginAccout", notes = "用户名")
private String loginAccout;
/**
* 姓名
*/
@ApiModelProperty(name = "userName", notes = "姓名")
private String userName;
/**
* 密码
*/
private String loginPassword;
/**
* 渠道编码
*/
private String channelCode;
/**
* 登录名
*/
@ApiModelProperty(name = "merchantName", notes = "登录名")
private String merchantName;
/**
* 业务id
*/
private Integer bussinessId;
/**
* 账号类型
*/
private Integer accountType;
/**
* 账号状态
*/
private Integer delFlag;
/**
* 商户层级
*/
@ApiModelProperty(name = "accountLevel", notes = "商户层级")
private Integer accountLevel;
/**
* 商户状态
*/
@ApiModelProperty(name = "状态", notes = "状态")
private Integer status;
@ApiModelProperty(name = "merchantId", notes = "商户Id")
private Integer merchantId;
@ApiModelProperty(name = "merchantNo", notes = "商户号")
private Integer merchantNo;
@ApiModelProperty(name = "openId", notes = "openId")
private String openId;
@ApiModelProperty(notes = "手机号")
private String phone;
/**
* 渠道类型
*/
@ApiModelProperty(notes = "渠道类型")
private String channelType;
@ApiModelProperty(notes = "是否是关联员")
private Boolean isAdmin;
@ApiModelProperty(notes = "员工角色是否是超级管理员")
private Boolean isMerchantStaffAdmin;
@ApiModelProperty(notes = "商户模式 1.集团版 2.门店版")
private Integer merchantModel;
/**
* sap代码
*/
@ApiModelProperty(notes = "sap代码")
private String sapCode;
/**
* 员工企微id
*/
@ApiModelProperty(notes = "员工企微id")
private String entmicroId;
/**
* 用户唯一uuid
*/
@ApiModelProperty(notes = "uuid")
private String uuid;
/**
* 用户头像
*/
@ApiModelProperty(notes = "staffAvatar")
private String staffAvatar;
@ApiModelProperty(notes = "商户账户类型id")
private String merchantAccountTypeIds;
@ApiModelProperty(notes = "账户类型名称")
private List<String> accountTypeName;
@ApiModelProperty(notes = "创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
@ApiModelProperty(notes = "商户账户类型id,List")
private List<String> merchantAccountList;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品菜单关系响应数据
* @date 2021/7/16 16:50
*/
@Data
public class ProductRelationResponse {
/**
* 产品id
*/
@ApiModelProperty(name = "productId", notes = "产品id", dataType = "Integer")
private Integer productId;
/**
* 产品名
*/
@ApiModelProperty(name = "productName", notes = "产品名", dataType = "String")
private String productName;
/**
* 回选id列表
*/
@ApiModelProperty(name = "idList", notes = "回选id列表", dataType = "List")
private List<Integer> idList;
}
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品返回体
* @date 2021/7/9 10:04
*/
@Data
@ApiModel(description = "产品")
public class ProductResponse {
/**
* 产品名称
*/
@ApiModelProperty(name = "id", notes = "产品id", dataType = "string", required = true, example = "1",value = "产品名称")
private Integer id;
/**
* 产品名称
*/
@ApiModelProperty(name = "productName", notes = "产品名称", dataType = "string", required = true, example = "滴加",value = "产品名称")
private String productName;
/**
* 产品类型取字典数据
*/
@ApiModelProperty(name = "productType", notes = "产品类型取字典数据", dataType = "Integer", required = true, example = "1")
private Integer productType;
/**
* 产品类型名称
*/
@ApiModelProperty(name = "productTypeName", notes = "产品类型名称", dataType = "String", required = true, example = "1")
private String productTypeName;
/**
* 产品编号
*/
@ApiModelProperty(name = "productCode", notes = "产品编号", dataType = "string", required = true, example = "xxxxx")
private String productCode;
/**
* 产品简介
*/
@ApiModelProperty(name = "productDetail", notes = "产品简介", dataType = "string", required = true, example = "xxxxx")
private String productDetail;
/**
* 产品地址
*/
@ApiModelProperty(name = "productAddress", notes = "productAddress", dataType = "string", required = true, example = "xxxxx")
private String productAddress;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdTime", notes = "创建时间", dataType = "date", required = true, example = "2019-09-03")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 是否删除:0=正常,-1=删除
*/
@ApiModelProperty(name = "delFlag", notes = "是否删除", dataType = "date", required = true, example = "0")
private Byte delFlag;
}
package cn.com.glsx.merchants.response;
import cn.com.glsx.merchants.model.response.FunctionTreeResponse;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 产品树
* @date 2021/7/22 9:39
*/
@Data
public class ProductTreeRopResponse {
@ApiModelProperty(name = "productId", notes = "产品id", dataType = "Integer", required = true, example = "1",value = "产品id")
private Integer productId;
@ApiModelProperty(name = "menuIds", notes = "菜单id", dataType = "List", required = true,value = "菜单id")
private List<Integer> menuIds;
@ApiModelProperty(name = "functionIds", notes = "功能", dataType = "Object", required = true,value = "功能")
private List<FunctionTreeRopResponse> functionIds;
}
package cn.com.glsx.merchants.response;
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 RoleAccountTypeResponse implements Serializable {
/**
* 账户类型id
*/
@ApiModelProperty(name = "accounttypeId", notes = "账户类型id", dataType = "Integer")
private Integer accounttypeId;
/**
* 产品列表
*/
@ApiModelProperty(name = "productList", notes = "产品列表", dataType = "List")
private List<ProductRelationResponse> productList;
}
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class RoleResponse implements Serializable {
@ApiModelProperty(name = "id", notes = "id", dataType = "Integer")
private Integer id;
/**
* 角色名称
*/
@ApiModelProperty(name = "roleName", notes = "角色名称", dataType = "String")
private String roleName;
/**
* 角色编码
*/
@ApiModelProperty(name = "roleCode", notes = "角色编码", dataType = "String")
private String roleCode;
/**
* 角色描述
*/
@ApiModelProperty(name = "roleDescription", notes = "角色描述", dataType = "String")
private String roleDescription;
/**
* 所属商户id
*/
@ApiModelProperty(name = "merchantId", notes = "所属商户id", dataType = "Integer")
private Integer merchantId;
/**
* 商户名称
*/
@ApiModelProperty(name = "merchantName", notes = "商户名称", dataType = "String")
private String merchantName;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdBy", notes = "创建人id", dataType = "Integer")
private Integer createdBy;
/**
* 是否删除:0=正常,-1=删除 1.草稿
*/
@ApiModelProperty(notes = "状态", dataType = "Byte", name = "delFlag", required = true)
private Byte delFlag;
/**
* 账户状态
*/
@ApiModelProperty(name = "statusName", notes = "账户状态", dataType = "String", required = true, example = "1")
private String statusName;
/**
* 创建时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(name = "createdTime", notes = "创建时间", dataType = "Date")
private Date createdTime;
/**
* 更新人
*/
@ApiModelProperty(name = "updatedBy", notes = "更新人id", dataType = "Integer")
private Integer updatedBy;
/**
* 更新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
@ApiModelProperty(name = "updatedTime", notes = "更新时间", dataType = "Date")
private Date updatedTime;
/**
* 创建账户
*/
@ApiModelProperty(name = "createdAccount", notes = "创建账户", dataType = "String")
private String createdAccount;
/**
* 更新账户
*/
@ApiModelProperty(name = "updatedAccount", notes = "更新账户", dataType = "String")
private String updatedAccount;
private boolean isDefalutRole;
/**
* 角色关联账户类型列表
*/
@ApiModelProperty(name = "responseList", notes = "角色关联账户类型数据列表", dataType = "List")
private List<RoleAccountTypeResponse> responseList;
private static final long serialVersionUID = 1L;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class StaffExportResponse implements Serializable {
/**
* 员工姓名
*/
@Excel(name = "序号", orderNum="1")
private int num;
/**
* 员工姓名
*/
@Excel(name = "员工姓名", orderNum="2")
private String staffName;
/**
* 员工编码
*/
@Excel(name = "员工编码", orderNum="3")
private String staffCode;
/**
* 角色名称
*/
@Excel(name = "角色名称", orderNum="4")
private String roleName;
/**
* 状态
*/
@Excel(name = "状态", orderNum="5")
private String statusName;
/**
* 手机号
*/
@Excel(name = "登录手机号", orderNum="6")
private String staffPhone;
/**
* 商户
*/
@Excel(name = "商户名", orderNum="8")
private String merchantName;
/**
* 创建时间
*/
@ExcelIgnore
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
/**
* 创建时间
*/
@Excel(name = "更新时间", orderNum="9")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String createDate;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import cn.com.glsx.merchants.model.response.AccountTypeTreeResponse;
import cn.com.glsx.merchants.model.response.MerchantFileResponse;
import cn.com.glsx.merchants.model.response.MerchantUserResponse;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@Data
public class StaffResponse implements Serializable {
@ApiModelProperty(name = "id", notes = "员工id", dataType = "Integer")
private Integer id;
/**
* 员工姓名
*/
@ApiModelProperty(name = "staffName", notes = "员工姓名", dataType = "String")
private String staffName;
/**
* 职务
*/
@ApiModelProperty(name = "staffJob", notes = "职务", dataType = "String")
private String staffJob;
/**
* 手机号
*/
@ApiModelProperty(name = "staffPhone", notes = "手机号", dataType = "String")
private String staffPhone;
/**
* 可见下级商户id
*/
@ApiModelProperty(name = "visibleInferiorMer", notes = "可见下级商户id", dataType = "String")
private String visibleInferiorMer;
/**
* 创建人
*/
@ApiModelProperty(name = "createdBy", notes = "创建人", dataType = "Integer")
private Integer createdBy;
/**
* 创建时间
*/
@ApiModelProperty(name = "createdTime", notes = "创建时间", dataType = "Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createdTime;
/**
* 创建时间
*/
@ApiModelProperty(name = "updatedTime", notes = "更新时间", dataType = "Date")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date updatedTime;
/**
* 商户id
*/
@ApiModelProperty(name = "merchantId", notes = "商户id", dataType = "Integer")
private Integer merchantId;
/**
* 邮箱
*/
@ApiModelProperty(name = "staffEmail", notes = "邮箱", dataType = "String")
private String staffEmail;
/**
* 员工编码
*/
@ApiModelProperty(name = "staffCode", notes = "员工编码", dataType = "String")
private String staffCode;
/**
* 创建账户
*/
@ApiModelProperty(name = "createdAccount", notes = "创建账户", dataType = "String")
private String createdAccount;
/**
* 员工状态
*/
@ApiModelProperty(name = "statusName", notes = "员工状态", dataType = "String")
private String statusName;
/**
* 角色id
*/
@ApiModelProperty(name = "roleIds", notes = "角色id", dataType = "List")
private List<Integer> roleIds;
/**
* 密码
*/
@ApiModelProperty(name = "password", notes = "密码", dataType = "String")
private String password;
/**
* 商户
*/
@ApiModelProperty(name = "merchantName", notes = "商户", dataType = "String")
private String merchantName;
/**
* 角色名称
*/
@ApiModelProperty(name = "roleName", notes = "商户", dataType = "String")
private String roleName;
/**
* 有效期
*/
@ApiModelProperty(notes = "有效期")
private Integer effectiveTime;
/**
* 状态
*/
@ApiModelProperty(notes = "状态")
private Integer status;
private String visibleInferiorMerName;
/**
* 文件
*/
private MerchantFileResponse merchantFileResponse;
/**
* 账号
*/
private MerchantUserResponse merchantUserResponse;
/**
* 员工权限
*/
private List<AccountTypeTreeResponse> accountTypeTreeResponseList;
/**
* 企微号
*/
@ApiModelProperty(notes = "企微号", dataType = "String")
private String entmicroName;
/**
* 所属企微
*/
@ApiModelProperty(notes = "所属企微", dataType = "String")
private String belongingEntmicroName;
/**
* 员工oneid
*/
@ApiModelProperty(notes = "员工oneid", dataType = "String")
private String uuid;
/**
* 微信
*/
//微信小程序openId
@ApiModelProperty(notes = "微信小程序openId", dataType = "String")
private String weChatOpenId;
//微信unionId
@ApiModelProperty(notes = "微信unionId", dataType = "String")
private String weChatUnionId;
//微信昵称
@ApiModelProperty(notes = "微信昵称", dataType = "String")
private String weChatNickName;
//微信头像
@ApiModelProperty(notes = "微信头像", dataType = "String")
private String weChatAvatarUrl;
//小程序appid
@ApiModelProperty(notes = "小程序appid", dataType = "String")
private String weChatAppId;
//微信手机号
@ApiModelProperty(notes = "微信手机号", dataType = "String")
private String weChatPhone;
@ApiModelProperty(notes = "员工标签:0-「1.0新车权益销售」,1-「1.1次新车精品升级」,2-「1.2次新车线上转化」,3-「1.3存量用户众筹」", dataType = "String")
private String staffLabel;
@ApiModelProperty(notes = "0-其他、1-销售部、2-售后部、3-客服部、4-续保部", dataType = "Integer")
private Integer department;
}
\ No newline at end of file \ No newline at end of file
package cn.com.glsx.merchants.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/23 17:20
*/
@Data
public class StoreRopResponse {
@ApiModelProperty(notes = "门店名称")
private String merchantName;
@ApiModelProperty(notes = "有效开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date starttime;
@ApiModelProperty(notes = "有效结束时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date endtime;
}
package cn.com.glsx.merchants.response;
import io.swagger.annotations.ApiModelProperty;
/**
* @Title: UploadFileResponse.java
* @Description: 上传文件响应结果
* @author Alvin
* @date 2020年11月11日 下午2:55:51
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2020
*/
public class UploadFileResponse {
@ApiModelProperty("文件存储路径")
private String filePath;
@ApiModelProperty("文件访问链接")
private String fileUrl;
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getFileUrl() {
return fileUrl;
}
public void setFileUrl(String fileUrl) {
this.fileUrl = fileUrl;
}
}
package cn.com.glsx.merchants.response.score;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName MerchantStaffScoreListRpcResponse
* @Description
* @Author lichongyuan
* @Date 2022/10/12
*/
@Data
public class MerchantStaffScoreListRopResponse implements Serializable {
@ApiModelProperty(example = "id")
private Integer id;
/**
* 员工名称
*/
@ApiModelProperty(example = "员工名称")
private String staffName;
/**
* 员工手机号
*/
@ApiModelProperty(example = "员工手机号")
private String staffPhone;
@ApiModelProperty(example = "奖励积分值")
private BigDecimal rewardScore;
/**
* 业务场景
*/
@ApiModelProperty(example = "业务场景")
private Integer businessScene;
/**
* 所属门店名
*/
@ApiModelProperty(example = "所属门店名")
private String merchantName;
/**
* 所属活动名
*/
@ApiModelProperty(example = "所属活动名")
private String activityName;
/**
* 所属渠道
*/
@ApiModelProperty(example = "所属渠道")
private Integer channel;
/**
* 所属任务名
*/
@ApiModelProperty(example = "所属任务名")
private String missionName;
/**
* 奖励开始时间
*/
@ApiModelProperty(example = "奖励开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date rewardTime;
/**
* 积分类型 0收益 -1 提现
*/
@ApiModelProperty(example = "积分类型 0收益 -1 提现")
private Integer type;
/**
* 明细名称
*/
@ApiModelProperty(example = "明细名称")
private String infoName;
@ApiModelProperty(example = "是否支持提现 1.是 2.否")
private Integer isWithdrawal;
@ApiModelProperty(example = "是否核销 1 已核销 2 未核销")
private Integer exchangeStatus;
@ApiModelProperty(example = "核销开始时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date exchangeTime;
@ApiModelProperty(example = "核销人")
private String exchangeStaff;
}
package cn.com.glsx.merchants.response.withdrawal;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName MerchantStaffWithdrawalListRpcResponse
* @Description
* @Author lichongyuan
* @Date 2022/10/11
*/
@ApiModel(description = "")
@Data
public class MerchantStaffWithdrawalListRopResponse implements Serializable {
/**
* id
*/
@ApiModelProperty(example = "id")
private Integer id;
/**
* 员工id
*/
@ApiModelProperty(example = "员工id")
private Integer staffId;
/**
* 员工id
*/
@ApiModelProperty(example = "员工名称")
private String staffName;
/**
* 员工id
*/
@ApiModelProperty(example = "员工电话")
private String staffPhone;
/**
* 提现积分
*/
@ApiModelProperty(example = "提现积分")
private BigDecimal withdrawalScore;
/**
* 提现金额
*/
@ApiModelProperty(example = "提现金额")
private BigDecimal withdrawalAmount;
/**
* 状态
*/
@ApiModelProperty(example = "状态")
private Integer status;
/**
* 审核人
*/
@ApiModelProperty(example = "审核人")
private String reviewer;
/**
* 提现时间
*/
@ApiModelProperty(example = "提现时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date withdrawalTime;
/**
* 审核时间
*/
@ApiModelProperty(example = "审核时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date reviewTime;
/**
* 到账时间
*/
@ApiModelProperty(example = "到账时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date successTime;
@ApiModelProperty(example = "微信头像")
private String wechatAvatarUrl;
@ApiModelProperty(example = "微信手机号")
private String wechatPhone;
@ApiModelProperty(example = "微信名称")
private String wechatNickName;
@ApiModelProperty(example = "微信openid")
private String wechatOpenId;
@ApiModelProperty("所属商户")
private String merchantName;
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.contants.Contants;
import cn.com.glsx.merchants.model.request.MerchantUserRequest;
import cn.com.glsx.merchants.model.response.MerchantUserResponse;
import cn.com.glsx.merchants.remote.MerchantUserRemote;
import cn.com.glsx.merchants.request.example.LoginRequest;
import cn.com.glsx.merchants.response.LoginResponse;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import com.rop.AbstractRopRequest;
import com.rop.session.SimpleSession;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.rop.session.RopSessionManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.UUID;
/**
* @author zhouhaibao
* @version 1.0
* @description: 用户登录
* @date 2021/7/14 17:32
*/
@Service
@Slf4j
public class LoginService {
@Autowired
private MerchantUserRemote merchantUserRemote;
@Autowired
private RopSessionManager ropSessionManager;
/**
* 用户登录
*
* @param request 用户信息
*/
@SysLog(value = "用户登录", action = OperateType.LOGIN, module = "用户登录模块")
public LoginResponse login(LoginRequest request) {
//1. 校验用户名和密码
MerchantUserRequest merchantUserRequest = new MerchantUserRequest();
merchantUserRequest.setLoginAccout(request.getUserName());
merchantUserRequest.setLoginPassword(request.getPassword());
RpcResponse<MerchantUserResponse> booleanRpcResponse = merchantUserRemote.checkAccountAndPassword(merchantUserRequest);
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
//2. 保存session信息
SimpleSession session = new SimpleSession();
session.setAttribute(Contants.USER_ACCOUNT, request.getUserName());
session.setAttribute(Contants.USER_ID, booleanRpcResponse.getResult().getId());
session.setAttribute(Contants.USER_NAME, booleanRpcResponse.getResult().getUserName());
String sessionId = UUID.randomUUID().toString();
request.getRopRequestContext().addSession(sessionId, session);
ropSessionManager.addSession(sessionId, session);
LoginResponse response = new LoginResponse();
response.setSessionId(sessionId);
MerchantUserResponse result = booleanRpcResponse.getResult();
response.setMerchantId(result.getBussinessId());
response.setAccountLevel(result.getAccountLevel());
response.setStatus(result.getStatus());
response.setMerchantName(result.getMerchantName());
return response;
}
/**
* 用户退出登录
*/
@SysLog(value = "用户登出", action = OperateType.LOGOUT, module = "用户登录模块")
public void logout(AbstractRopRequest request) {
request.getRopRequestContext().removeSession();
ropSessionManager.removeSession(request.getRopRequestContext().getSessionId());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.enums.BusinessExceptionEnum;
import cn.com.glsx.merchants.enums.CommonStatusEnum;
import cn.com.glsx.merchants.model.request.AccountFunctionRelationRequest;
import cn.com.glsx.merchants.model.request.MerchantAccountTypeRequest;
import cn.com.glsx.merchants.model.response.AccountFunctionRelationResponse;
import cn.com.glsx.merchants.model.response.AccountTreeResponse;
import cn.com.glsx.merchants.model.response.MerchantAccountTypeResponse;
import cn.com.glsx.merchants.remote.MerchantAccountTypeRemote;
import cn.com.glsx.merchants.request.FunctionRequest;
import cn.com.glsx.merchants.request.ProductRequest;
import cn.com.glsx.merchants.request.accounttype.*;
import cn.com.glsx.merchants.response.AccountProductRelationResponse;
import cn.com.glsx.merchants.response.AccountTypeResponse;
import cn.com.glsx.merchants.util.Pagination;
import com.github.dozermapper.core.Mapper;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import com.glsx.plat.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author zhouhaibao
* @version 1.0
* @description: 账户类型service
* @date 2021/7/12 17:00
*/
@Slf4j
@Service
public class MerchantAccountTypeService {
@Resource
private MerchantAccountTypeRemote accountTypeRemote;
@Autowired
private Mapper dozerMapper;
/**
* id获取账户类型详情
*
* @param id
* @return
*/
public AccountTypeResponse getAccountTypeDetail(Integer id) {
RpcResponse<MerchantAccountTypeResponse> response = accountTypeRemote.getByIdRemote(id);
if(response.isSuccess()){
AccountTypeResponse accountTypeResponse = new AccountTypeResponse();
dozerMapper.map(response.getResult(), accountTypeResponse);
this.responseDataTransfer(accountTypeResponse, response.getResult().getFunctionList());
return accountTypeResponse;
}
throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
}
/**
* 获取账户类型分页数据
*
* @param request
* @return
*/
public Pagination<AccountTypeResponse> getAccountTypePage(AccountTypeListSearchRequest request) {
RpcPagination<MerchantAccountTypeRequest> pagination =
ConvertRequest.convertPage(request, new MerchantAccountTypeRequest());
RpcResponse<RpcPagination<MerchantAccountTypeResponse>> response =
accountTypeRemote.getAccountTypePageRemote(pagination);
if(response.isSuccess()){
Pagination<AccountTypeResponse> res = ConvertResponse.convertPage(response.getResult(), AccountTypeResponse.class);
res.getData().stream().forEach(index -> index.setStatusName(CommonStatusEnum.getText(index.getDelFlag())));
return res;
}
throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
}
/**
* 获取账户类型数据列表
*
* @param request
* @return
*/
public List<AccountTypeResponse> getAccountTypeList(AccountTypeListSearchRequest request) {
MerchantAccountTypeRequest typeRequest = new MerchantAccountTypeRequest();
typeRequest.setAccounttypeName(request.getAccounttypeName());
typeRequest.setDelFlag(request.getDelFlag());
RpcResponse<List<MerchantAccountTypeResponse>> response =
accountTypeRemote.getAccountTypeListRemote(typeRequest);
if(response.isSuccess()){
return ConvertResponse.convertList(response.getResult(), AccountTypeResponse.class);
}
throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
}
/**
* id删除账户类型
*
* @param request
* @return
*/
@SysLog(value = "删除账户类型数据", action = OperateType.DELETE, module = "账户类型管理")
public Boolean delete(AccountTypeDeleteRequest request) {
MerchantAccountTypeRequest typeRequest = new MerchantAccountTypeRequest();
dozerMapper.map(request, typeRequest);
RpcResponse<Boolean> response = accountTypeRemote.deleteRemote(typeRequest);
if(response.isSuccess()){
return response.getResult();
}
throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
}
/**
* 新增账户类型数据
*
* @param request
* @return
*/
@SysLog(value = "保存账户类型数据", action = OperateType.ADD, module = "账户类型管理")
public Boolean insert(AccountTypeInsertRequest request) {
RpcResponse<List<MerchantAccountTypeResponse>> rpc = accountTypeRemote.getListByNameRemote(request.getAccounttypeName());
if(!rpc.isSuccess()){
throw new RpcServiceException(rpc.getException().getErrId(),rpc.getMessage());
}
if(CollectionUtils.isNotEmpty(rpc.getResult())){
throw new RpcServiceException(BusinessExceptionEnum.ACCOUNT_NAME_EXIT);
}
MerchantAccountTypeRequest typeRequest = new MerchantAccountTypeRequest();
dozerMapper.map(request, typeRequest);
this.dataTransfer(typeRequest, request.getRequestList()); //数据转换
RpcResponse<Boolean> response = accountTypeRemote.insertRemote(typeRequest);
if(response.isSuccess()){
return response.getResult();
}
throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
}
/**
* 获取账户类型下产品菜单功能树
*
* @param request
* @return
*/
public List<AccountTreeResponse> getProductTreeList(AccountTypeSearchRequest request) {
String[] split = request.getIds().split(",");
List<Integer> strings = new ArrayList<>();
for (String s : split) {
strings.add(Integer.parseInt(s));
}
RpcResponse<List<AccountTreeResponse>> response =
accountTypeRemote.getProductTreeListByTypeId(strings, request.getAccountLevel(), request.getMerchantId());
if(response.isSuccess()){
return response.getResult();
}
throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
}
/**
* 更新账户类型数据
*
* @param request
* @return
*/
@SysLog(value = "更新账户类型数据", action = OperateType.EDIT, module = "账户类型管理")
public Boolean update(AccountTypeUpdateRequest request) {
RpcResponse<List<MerchantAccountTypeResponse>> rpcAccountList = accountTypeRemote.getListByNameRemote(request.getAccounttypeName());
if(!rpcAccountList.isSuccess()){
throw new RpcServiceException(rpcAccountList.getException().getErrId(),rpcAccountList.getMessage());
}
List<MerchantAccountTypeResponse> list = rpcAccountList.getResult();
if(CollectionUtils.isNotEmpty(list)){
if(list.size() > 1 || !(list.get(0).getId().equals(request.getId()))){
throw new RpcServiceException(BusinessExceptionEnum.ACCOUNT_NAME_EXIT);
}
}
MerchantAccountTypeRequest typeRequest = new MerchantAccountTypeRequest();
dozerMapper.map(request, typeRequest);
//数据转换
this.dataTransfer(typeRequest, request.getRequestList());
RpcResponse<Boolean> response = accountTypeRemote.updateRemote(typeRequest);
if(response.isSuccess()){
return response.getResult();
}
throw new RpcServiceException(response.getException().getErrId(),response.getMessage());
}
/**
* 响应返回给前端数据转换
* @param response
* @param functionList
*/
private void responseDataTransfer(AccountTypeResponse response, List<AccountFunctionRelationResponse> functionList){
if(CollectionUtils.isEmpty(functionList)){
return;
}
//根据产品id分组
Map<Integer, List<AccountFunctionRelationResponse>> map =
functionList.stream().collect(Collectors.groupingBy(AccountFunctionRelationResponse::getProductId));
List<AccountProductRelationResponse> responseList = new ArrayList<>();
for(Integer key : map.keySet()){
AccountProductRelationResponse relationResponse = new AccountProductRelationResponse();
relationResponse.setProductId(key);
List<AccountFunctionRelationResponse> list = map.get(key);
relationResponse.setProductName(list.get(0).getProductName());
List<Integer> menuIdList = new ArrayList<>();
List<Integer> functionIdList = new ArrayList<>();
list.stream().forEach(index ->{
if(index.getFunctionId() != null && index.getFunctionId() > 0){
functionIdList.add(index.getFunctionId());
String value = index.getFunctionValue();
if(StringUtils.isNotEmpty(value)){
String[] arr = value.split(";");
int size = arr.length;
for (int i = 0; i < size; i++) {
functionIdList.add(Integer.valueOf(arr[i].split(":")[0]));
}
}
} else{
menuIdList.add(index.getMenuId());
}
});
relationResponse.setFunctionIdList(functionIdList);
relationResponse.setMenuIdList(menuIdList);
responseList.add(relationResponse);
}
response.setResponseList(responseList);
}
/**
* 保存数据转换
* @param typeRequest 请求保存的数据
* @param requestList 前端传送产品菜单数据
*/
private void dataTransfer(MerchantAccountTypeRequest typeRequest, List<ProductRequest> requestList){
if(CollectionUtils.isEmpty(requestList)){
return;
}
List<AccountFunctionRelationRequest> functionList = new ArrayList<>();
requestList.stream().forEach(index ->{
List<Integer> menuIdList = index.getMenuIdList();
List<FunctionRequest> functionIdList = index.getFunctionIdList();
if(CollectionUtils.isNotEmpty(menuIdList)){
menuIdList.stream().forEach(menuId ->{
AccountFunctionRelationRequest relation = new AccountFunctionRelationRequest();
relation.setProductId(index.getProductId());
relation.setMenuId(menuId);
functionList.add(relation);
});
}
if(CollectionUtils.isNotEmpty(functionIdList)){
functionIdList.stream().forEach(function ->{
AccountFunctionRelationRequest relation = new AccountFunctionRelationRequest();
relation.setProductId(index.getProductId());
relation.setMenuId(function.getMenuId());
relation.setFunctionId(function.getId());
relation.setFunctionValue(function.getFunctionValue());
functionList.add(relation);
});
}
if(index.getProductId()!=null){
AccountFunctionRelationRequest relation = new AccountFunctionRelationRequest();
relation.setProductId(index.getProductId());
functionList.add(relation);
}
});
typeRequest.setFunctionList(functionList);
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.response.MerchantChannelResponse;
import cn.com.glsx.merchants.remote.MerchantRemote;
import cn.com.glsx.merchants.response.CarbrandResponse;
import cn.com.glsx.merchants.response.ChannelResponse;
import cn.com.glsx.merchants.response.MerchantTreeRopResponse;
import com.glsx.biz.common.base.entity.CarBrandSelected;
import com.glsx.biz.common.base.entity.Carbrand;
import com.glsx.biz.common.base.service.CarbrandService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户公共服务
* @date 2021/8/1 10:20
*/
@Service
public class MerchantCommonService {
@Autowired
private CarbrandService carbrandService;
@Autowired
private MerchantRemote merchantRemote;
public List<CarbrandResponse> getCarbrandTree() {
List<Carbrand> parentCarbrandList = carbrandService.getParentCarbrandList();
List<Carbrand> allList = carbrandService.getAllList();
List<CarbrandResponse> collect = parentCarbrandList.stream().map(index -> {
CarbrandResponse carbrandResponse = new CarbrandResponse();
carbrandResponse.setId(index.getBid());
carbrandResponse.setLabel(index.getBrand());
List<CarbrandResponse> childrens = allList.stream().filter(child -> child.getParentId().equals(index.getBid())).map(in -> {
CarbrandResponse carbrandResponse1 = new CarbrandResponse();
carbrandResponse1.setId(in.getBid());
carbrandResponse1.setLabel(in.getBrand());
return carbrandResponse1;
}).collect(Collectors.toList());
carbrandResponse.setChildren(childrens);
return carbrandResponse;
}).collect(Collectors.toList());
return collect;
}
public List<CarbrandResponse> getCarbrandTreeNew() {
List<CarBrandSelected> carInfoCompleteForSelected = carbrandService.getCarInfoCompleteForSelected();
List<CarbrandResponse> list = new ArrayList<>(carInfoCompleteForSelected.size());
carInfoCompleteForSelected.forEach(v-> {
CarbrandResponse response = new CarbrandResponse();
response.setId(v.getId());
response.setLabel(v.getName());
response.setLogoUrl(v.getLogoUrl());
if(v.getChilds() != null){
// 改为获取一二级品牌
List<CarbrandResponse> collect = v.getChilds().stream().map(x -> {
CarbrandResponse sub = new CarbrandResponse();
sub.setId(x.getId());
sub.setLabel(x.getName());
return sub;
}).collect(Collectors.toList());
if (collect.size() > 0){
response.setChildren(collect);
}else {
System.out.println(v.getId());
}
}
list.add(response);
});
return list;
}
public List<ChannelResponse> findAllChannel() {
RpcResponse<List<MerchantChannelResponse>> allChannel = merchantRemote.findAllChannel();
if (allChannel.isSuccess()) {
return ConvertResponse.convertList(allChannel.getResult(), ChannelResponse.class);
}
throw new RpcServiceException(allChannel.getException().getErrId(), allChannel.getMessage());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.MerchantDictDataRequest;
import cn.com.glsx.merchants.model.response.MerchantDictDataResponse;
import cn.com.glsx.merchants.remote.MerchantDictDataRemote;
import cn.com.glsx.merchants.request.dictdata.*;
import cn.com.glsx.merchants.response.DictDataResponse;
import cn.com.glsx.merchants.util.Pagination;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/13 11:02
*/
@Service
@Slf4j
public class MerchantDictDataService {
@Autowired
private MerchantDictDataRemote merchantDictDataRemote;
@Autowired
private MerchantUserService merchantUserService;
@SysLog(value = "保存字典数据", action = OperateType.ADD, module = "字典数据模块")
public void saveDictData(DictDataSaveRequest dictDataSaveRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantDictDataRemote.saveMerchantDictDataRemote(ConvertRequest.convertRequest(dictDataSaveRequest, new MerchantDictDataRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
@SysLog(value = "更新字典数据", action = OperateType.EDIT, module = "字典数据模块")
public void updateDictData(DictDataUpdateRequest DictDataUpdateRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantDictDataRemote.updateMerchantDictDataRemote(ConvertRequest.convertRequest(DictDataUpdateRequest, new MerchantDictDataRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
public Pagination<DictDataResponse> findDictData(DictDataListSearchRequest DictDataListSearchRequest) {
RpcPagination<MerchantDictDataRequest> merchantDictDataRequestRpcPagination = ConvertRequest.convertPage(DictDataListSearchRequest, new MerchantDictDataRequest());
MerchantDictDataRequest condition = merchantDictDataRequestRpcPagination.getCondition();
condition.setDictType(DictDataListSearchRequest.getDictType());
condition.setDictLabel(DictDataListSearchRequest.getDictName());
merchantDictDataRequestRpcPagination.setCondition(condition);
RpcResponse<RpcPagination<MerchantDictDataResponse>> merProductByPageRemote = merchantDictDataRemote.findMerchantDictDataRemote(merchantDictDataRequestRpcPagination);
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), DictDataResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
@SysLog(value = "删除字典数据", action = OperateType.DELETE, module = "字典数据模块")
public void deleteDictData(DictDataDeleteRequest DictDataDeleteRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantDictDataRemote.deleteMerchantDictDataRemote(ConvertRequest.convertRequest(DictDataDeleteRequest, new MerchantDictDataRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
public List<DictDataResponse> findAllDictData(DictDataSearchRequest dictDataSearchRequest) {
RpcResponse<List<MerchantDictDataResponse>> merProductByPageRemote = merchantDictDataRemote.findAllRemote(ConvertRequest.convertRequest(dictDataSearchRequest, new MerchantDictDataRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertList(merProductByPageRemote.getResult(), DictDataResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.MerchantDictTypeRequest;
import cn.com.glsx.merchants.model.response.MerchantDictTypeResponse;
import cn.com.glsx.merchants.remote.MerchantDictTypeRemote;
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.util.Pagination;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author zhouhaibao
* @version 1.0
* @description: 字典类型服务类
* @date 2021/7/13 10:35
*/
@Service
@Slf4j
public class MerchantDictTypeService {
@Autowired
private MerchantDictTypeRemote merchantDictTypeRemote;
@Autowired
private MerchantUserService merchantUserService;
@SysLog(value = "新增字典类型", action = OperateType.ADD,module = "字典类型管理")
public void saveDictType(DictTypeSaveRequest dictTypeSaveRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantDictTypeRemote.saveMerchantDictTypeRemote(ConvertRequest.convertRequest(dictTypeSaveRequest, new MerchantDictTypeRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
@SysLog(value = "更新字典类型", action = OperateType.EDIT, module = "字典类型管理")
public void updateDictType(DictTypeUpdateRequest dictTypeUpdateRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantDictTypeRemote.updateMerchantDictTypeRemote(ConvertRequest.convertRequest(dictTypeUpdateRequest, new MerchantDictTypeRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
public Pagination<DictTypeResponse> findDictType(DictTypeListSearchRequest dictTypeListSearchRequest) {
RpcResponse<RpcPagination<MerchantDictTypeResponse>> merProductByPageRemote = merchantDictTypeRemote.findMerchantDictTypeRemote(ConvertRequest.convertPage(dictTypeListSearchRequest, new MerchantDictTypeRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), DictTypeResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
@SysLog(value = "更新字典类型", action = OperateType.DELETE, module = "字典类型管理")
public void deleteDictType(DictTypeDeleteRequest dictTypeDeleteRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantDictTypeRemote.deleteMerchantDictTypeRemote(ConvertRequest.convertRequest(dictTypeDeleteRequest, new MerchantDictTypeRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.MerchantFileRequest;
import cn.com.glsx.merchants.model.response.MerchantFileResponse;
import cn.com.glsx.merchants.remote.MerchantFileRemote;
import cn.com.glsx.merchants.request.file.FileSearchRequest;
import cn.com.glsx.merchants.response.FileResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author Lichongyuan
* @version 1.0
* @description: ${todo}
* @date 2021/7/16 15:30
*/
@Service
@Slf4j
public class MerchantFileService {
@Autowired
private MerchantFileRemote merchantFileRemote;
public List<FileResponse> findMerchantFile(FileSearchRequest fileSearchRequest){
//入参集合转化
RpcResponse<List<MerchantFileResponse>> merchantFileRemoteRpc =
merchantFileRemote.findMerchantFileRemote(ConvertRequest.convertRequest(fileSearchRequest, new MerchantFileRequest()));
//判断调用远程是否成功
if (merchantFileRemoteRpc.isSuccess()) {
//出参集合转化
return ConvertResponse.convertList(merchantFileRemoteRpc.getResult(), FileResponse.class);
}
//自定义异常信息
throw new RpcServiceException(merchantFileRemoteRpc.getException().getErrId(), merchantFileRemoteRpc.getMessage());
}
}
package cn.com.glsx.merchants.service;/**
* @author zhouhaibao
* @date 2021/7/12
*/
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.MerchantProductFunctionRequest;
import cn.com.glsx.merchants.model.response.MerchantProductFunctionResponse;
import cn.com.glsx.merchants.remote.MerchantProductFunctionRemote;
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.util.Pagination;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/12 11:40
*/
@Service
@Slf4j
public class MerchantFunctionService {
@Autowired
private MerchantProductFunctionRemote merchantProductFunctionRemote;
@SysLog(value = "保存功能", action = OperateType.ADD, module = "功能模块")
public void saveMerchantFunction(FunctionSaveRequest functionSaveRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductFunctionRemote.saveMerchantProductFunctionRemote(ConvertRequest.convertRequest(functionSaveRequest, new MerchantProductFunctionRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
public static void main(String[] args) {
FunctionSaveRequest functionSaveRequest = new FunctionSaveRequest();
functionSaveRequest.setProductId(123);
MerchantProductFunctionRequest merchantProductFunctionRequest = ConvertRequest.convertRequest(functionSaveRequest, new MerchantProductFunctionRequest());
System.out.println(merchantProductFunctionRequest);
}
@SysLog(value = "修改功能", action = OperateType.EDIT, module = "功能模块")
public void updateMerchantFunction(FunctionUpdateRequest functionUpdateRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductFunctionRemote.updateMerchantProductFunctionRemote(ConvertRequest.convertRequest(functionUpdateRequest, new MerchantProductFunctionRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
public Pagination<FunctionResponse> findMerchantFunction(FunctionListSearchRequest functionListSearchRequest) {
RpcResponse<RpcPagination<MerchantProductFunctionResponse>> merProductByPageRemote = merchantProductFunctionRemote.findMerProFunctionByPageRemote(ConvertRequest.convertPage(functionListSearchRequest, new MerchantProductFunctionRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), FunctionResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
public void deleteMerchantFunction(FunctionDeleteRequest functionDeleteRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductFunctionRemote.deleteMerchantProductFunctionRemote(ConvertRequest.convertRequest(functionDeleteRequest, new MerchantProductFunctionRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.MerchantLogRequest;
import cn.com.glsx.merchants.model.response.MerchantLogResponse;
import cn.com.glsx.merchants.remote.MerchantLogRemote;
import cn.com.glsx.merchants.request.log.LogRequest;
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.util.Pagination;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author zhouhaibao
* @version 1.0
* @description: 日志服务
* @date 2021/7/14 16:27
*/
@Service
@Slf4j
public class MerchantLogService {
@Autowired
private MerchantLogRemote merchantLogRemote;
public MerchantLogResponse saveMerchantLog(LogRequest logRequest) {
RpcResponse<MerchantLogResponse> booleanRpcResponse = merchantLogRemote.saveMerchantLogRemote(ConvertRequest.convertRequest(logRequest, new MerchantLogRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
} else {
return booleanRpcResponse.getResult();
}
}
public void updateMerchantLog(LogRequest logRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantLogRemote.updateMerchantLogRemote(ConvertRequest.convertRequest(logRequest, new MerchantLogRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
public Pagination<LogResponse> findLog(LogSearchRequest logSearchRequest) {
RpcResponse<RpcPagination<MerchantLogResponse>> merProductByPageRemote = merchantLogRemote.findMerchantLogRemote(ConvertRequest.convertPage(logSearchRequest, new MerchantLogRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), LogResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
public Pagination<LogResponse> findMerchantAndStaffLog(MerchantAndStaffLogRopRequest ropRequest) {
RpcResponse<RpcPagination<MerchantLogResponse>> merProductByPageRemote = merchantLogRemote.findMerchantLogForScrm(ConvertRequest.convertPage(ropRequest, new MerchantLogRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), LogResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.BuildMenuRpcParam;
import cn.com.glsx.merchants.model.request.MerchantProductMenuRequest;
import cn.com.glsx.merchants.model.response.MerchantProductMenuResponse;
import cn.com.glsx.merchants.remote.MerchantProductMenuRemote;
import cn.com.glsx.merchants.request.menu.*;
import cn.com.glsx.merchants.response.MenuResponse;
import cn.com.glsx.merchants.util.Pagination;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户菜单service
* @date 2021/7/12 10:33
*/
@Service
@Slf4j
public class MerchantMenuService {
@Autowired
private MerchantProductMenuRemote merchantProductMenuRemote;
public List<MenuResponse> findMerProMenuTreeRemote(MenuSearchRequest menuSearchRequest) {
RpcResponse<List<MerchantProductMenuResponse>> merProMenuTreeRemote = merchantProductMenuRemote.findMerProMenuTreeRemote(ConvertRequest.convertRequest(menuSearchRequest, new MerchantProductMenuRequest()));
if (merProMenuTreeRemote.isSuccess()) {
List<MenuResponse> menuResponseList = ConvertResponse.convertList(merProMenuTreeRemote.getResult(), MenuResponse.class);
return menuResponseList;
}
throw new RpcServiceException(merProMenuTreeRemote.getException().getErrId(),merProMenuTreeRemote.getMessage());
}
@SysLog(value = "保存菜单", action = OperateType.ADD, module = "菜单模块")
public void saveMerchantProductMenuRemote(MenuSaveRequest menuSaveRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.saveMerchantProductMenuRemote(ConvertRequest.convertRequest(menuSaveRequest, new MerchantProductMenuRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
public Pagination<MenuResponse> findMerProMenuByPageRemote(MenuListSearchRequest menuListSearchRequest) {
RpcResponse<RpcPagination<MerchantProductMenuResponse>> merProductByPageRemote = merchantProductMenuRemote.findMerProMenuByPageRemote(ConvertRequest.convertPage(menuListSearchRequest, new MerchantProductMenuRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), MenuResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(),merProductByPageRemote.getMessage());
}
@SysLog(value = "更新菜单", action = OperateType.EDIT, module = "菜单模块")
public void updateMerchantProductMenuRemote(MenuUpdateRequest menuUpdateRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.updateMerchantProductMenuRemote(ConvertRequest.convertRequest(menuUpdateRequest, new MerchantProductMenuRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
@SysLog(value = "删除菜单", action = OperateType.DELETE, module = "菜单模块")
public void deleteMerchantProductMenuRemote(MenuDeleteRequest menuDeleteRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.deleteMerchantProductMenuRemote(ConvertRequest.convertRequest(menuDeleteRequest, new MerchantProductMenuRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
@Deprecated
public void buildMenuAndFunction(BuildMenuParam param) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.buildMenuAndFunction(ConvertRequest.convertRequest(param, new BuildMenuRpcParam()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
public void rebuildVersionMenu(BuildMenuParam param) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.rebuildVersionMenu(ConvertRequest.convertRequest(param, new BuildMenuRpcParam()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
public void buildVersionMenuFunctionNew(BuildMenuParam param) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.buildVersionMenuFunctionNew(ConvertRequest.convertRequest(param, new BuildMenuRpcParam()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
public void updateVersionMenuAndFunction(BuildMenuParam param) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.updateVersionMenuAndFunction(ConvertRequest.convertRequest(param, new BuildMenuRpcParam()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
public void deleteVersionMenuAndFunction(BuildMenuParam param) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductMenuRemote.deleteVersionMenuAndFunction(ConvertRequest.convertRequest(param, new BuildMenuRpcParam()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.request.mission.*;
import cn.com.glsx.merchants.util.Pagination;
import cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionInfoRequest;
import cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantMissionListRequest;
import cn.com.glsx.stoassistant.model.request.mission.PlatformMerchantStaffMissionRequest;
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 cn.com.glsx.stoassistant.remote.PlatformMerchantMissionRemote;
import cn.com.glsx.stoassistant.remote.PlatformMerchantStaffMissionRemote;
import com.rop.AbstractRopRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class MerchantMissionService {
@Autowired
private PlatformMerchantMissionRemote platformMerchantMissionRemote;
@Autowired
private PlatformMerchantStaffMissionRemote platformMerchantStaffMissionRemote;
public Boolean createMission(CreatedMissionRopRequest createdMissionRopRequest) {
PlatformMerchantMissionInfoRequest param = ConvertRequest.convertRequest(createdMissionRopRequest, new PlatformMerchantMissionInfoRequest());
RpcResponse<Boolean> rpcResponse = platformMerchantMissionRemote.createMission(param);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public Boolean updateMission(UpdateMissionRopRequest updateMissionRopRequest) {
PlatformMerchantMissionInfoRequest param = ConvertRequest.convertRequest(updateMissionRopRequest, new PlatformMerchantMissionInfoRequest());
RpcResponse<Boolean> rpcResponse = platformMerchantMissionRemote.updateMission(param);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public Boolean updateStatusMission(UpdateStatusMissionRopRequest updateStatusMissionRopRequest) {
PlatformMerchantMissionInfoRequest param = ConvertRequest.convertRequest(updateStatusMissionRopRequest, new PlatformMerchantMissionInfoRequest());
RpcResponse<Boolean> rpcResponse = platformMerchantMissionRemote.updateStatusMission(param);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public PlatformMerchantMissionInfoResponse findMissionDeail(MissionDetailRopRequest missionDetailRopRequest) {
PlatformMerchantMissionInfoRequest param = ConvertRequest.convertRequest(missionDetailRopRequest, new PlatformMerchantMissionInfoRequest());
RpcResponse<PlatformMerchantMissionInfoResponse> rpcResponse = platformMerchantMissionRemote.findMissionDeail(param);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public Pagination<PlatformMerchantMissionInfoResponse> findMissionList(MissionPageRopRequest missionDetailRopRequest) {
RpcPagination<PlatformMerchantMissionListRequest> param = ConvertRequest.convertPage(missionDetailRopRequest, new PlatformMerchantMissionListRequest());
RpcResponse<RpcPagination<PlatformMerchantMissionInfoResponse>> rpcResponse = platformMerchantMissionRemote.findMissionList(param);
if (rpcResponse.isSuccess()) {
return ConvertResponse.convertPage(rpcResponse.getResult(), PlatformMerchantMissionInfoResponse.class);
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public Pagination<PlatformMerchantStaffMissionDetailResponse> findStaffMissionPageList(MissionStaffPageRopRequest missionDetailRopRequest) {
RpcPagination<PlatformMerchantStaffMissionRequest> param = ConvertRequest.convertPage(missionDetailRopRequest, new PlatformMerchantStaffMissionRequest());
RpcResponse<RpcPagination<PlatformMerchantStaffMissionDetailResponse>> rpcResponse = platformMerchantStaffMissionRemote.findStaffMissionPageList(param);
if (rpcResponse.isSuccess()) {
return ConvertResponse.convertPage(rpcResponse.getResult(), PlatformMerchantStaffMissionDetailResponse.class);
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public String getStaffMissionLink(MissionStaffLinkRequest missionStaffLinkRequest) {
PlatformMerchantStaffMissionRequest param = ConvertRequest.convertRequest(missionStaffLinkRequest, new PlatformMerchantStaffMissionRequest());
RpcResponse<String> rpcResponse = platformMerchantStaffMissionRemote.getStaffMissionLink(param);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public PlatformMerchantMissionListResponse staticMission(AbstractRopRequest abstractRopRequest) {
RpcResponse<PlatformMerchantMissionListResponse> rpcResponse = platformMerchantMissionRemote.staticMission();
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.MerchantProductRequest;
import cn.com.glsx.merchants.model.response.MerchantProTreeResponse;
import cn.com.glsx.merchants.model.response.MerchantProductResponse;
import cn.com.glsx.merchants.remote.MerchantProductRemote;
import cn.com.glsx.merchants.request.product.ProductSaveRequest;
import cn.com.glsx.merchants.request.product.ProductSearchByIdRequest;
import cn.com.glsx.merchants.request.product.ProductSearchRequest;
import cn.com.glsx.merchants.request.product.ProductUpdateRequest;
import cn.com.glsx.merchants.response.MerchantProTreeRopResponse;
import cn.com.glsx.merchants.response.ProductResponse;
import cn.com.glsx.merchants.util.Pagination;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/9 10:02
*/
@Service
@Slf4j
public class MerchantProductService {
@Autowired
private MerchantProductRemote merchantProductRemote;
public List<ProductResponse> findProduct() {
RpcResponse<List<MerchantProductResponse>> merProductListRemote = merchantProductRemote.findMerProductListRemote();
if (merProductListRemote.isSuccess()) {
List<ProductResponse> productResponses = ConvertResponse.convertList(merProductListRemote.getResult(), ProductResponse.class);
return productResponses;
}
throw new RpcServiceException(merProductListRemote.getException().getErrId(),merProductListRemote.getMessage());
}
@SysLog(value = "新增产品", action = OperateType.ADD, module = "产品模块")
public void saveProduct(ProductSaveRequest productSearchRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductRemote.saveMerchantProductRemote(ConvertRequest.convertRequest(productSearchRequest, new MerchantProductRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
public Pagination<ProductResponse> findProductByPage(ProductSearchRequest productSearchRequest) {
RpcResponse<RpcPagination<MerchantProductResponse>> merProductByPageRemote = merchantProductRemote.findMerProductByPageRemote(ConvertRequest.convertPage(productSearchRequest,new MerchantProductRequest()));
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), ProductResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(),merProductByPageRemote.getMessage());
}
@SysLog(value = "修改产品", action = OperateType.EDIT, module = "产品模块")
public void updateProduct(ProductUpdateRequest productUpdateRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantProductRemote.updateProductRemote(ConvertRequest.convertRequest(productUpdateRequest, new MerchantProductRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(),booleanRpcResponse.getMessage());
}
}
public List<MerchantProTreeRopResponse> findMenuFunByProductId(ProductSearchByIdRequest productSearchByIdRequest) {
RpcResponse<List<MerchantProTreeResponse>> mListRpcResponseRemote =
merchantProductRemote.findMenuFunByProductIdRemote(productSearchByIdRequest.getProductId(),productSearchByIdRequest.getAccountTypeId());
if (mListRpcResponseRemote.isSuccess()){
return ConvertResponse.convertList(mListRpcResponseRemote.getResult(), MerchantProTreeRopResponse.class);
}
throw new RpcServiceException(mListRpcResponseRemote.getException().getErrId(),mListRpcResponseRemote.getMessage());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.enums.BusinessExceptionEnum;
import cn.com.glsx.merchants.enums.CommonStatusEnum;
import cn.com.glsx.merchants.model.request.MerchantRoleRequest;
import cn.com.glsx.merchants.model.request.RoleAccountRelationRequest;
import cn.com.glsx.merchants.model.request.RoleFunctionRelationRequest;
import cn.com.glsx.merchants.model.response.MerchantRoleResponse;
import cn.com.glsx.merchants.model.response.RoleAccountRelationResponse;
import cn.com.glsx.merchants.model.response.RoleFunctionRelationResponse;
import cn.com.glsx.merchants.remote.MerchantRoleRemote;
import cn.com.glsx.merchants.request.FunctionRequest;
import cn.com.glsx.merchants.request.ProductRequest;
import cn.com.glsx.merchants.request.role.*;
import cn.com.glsx.merchants.response.ProductRelationResponse;
import cn.com.glsx.merchants.response.RoleAccountTypeResponse;
import cn.com.glsx.merchants.response.RoleResponse;
import cn.com.glsx.merchants.util.Pagination;
import com.alibaba.fastjson.JSON;
import com.github.dozermapper.core.Mapper;
import com.glsx.plat.common.annotation.SysLog;
import com.glsx.plat.common.enums.OperateType;
import com.glsx.plat.common.utils.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author zhouhaibao
* @version 1.0
* @description: 角色管理service
* @date 2021/7/12 17:00
*/
@Slf4j
@Service
public class MerchantRoleService {
@Autowired
private Mapper dozerMapper;
@Resource
private MerchantRoleRemote roleRemote;
/**
* id获取角色管理详情
*
* @param id
* @return
*/
public RoleResponse getById(Integer id) {
RpcResponse<MerchantRoleResponse> response = roleRemote.getByIdRemote(id);
if (response.isSuccess()) {
RoleResponse roleResponse = new RoleResponse();
dozerMapper.map(response.getResult(), roleResponse);
this.responseDataTransfer(roleResponse, response.getResult().getAccountList());
return roleResponse;
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
/**
* 响应返回给前端数据转换
*
* @param roleResponse
* @param accountList
*/
private void responseDataTransfer(RoleResponse roleResponse, List<RoleAccountRelationResponse> accountList) {
if (CollectionUtils.isEmpty(accountList)) {
return;
}
List<RoleAccountTypeResponse> responseList = new ArrayList<>();
for (RoleAccountRelationResponse accountRelationResponse : accountList) {
//角色与角色关系数据封装
RoleAccountTypeResponse roleAccountType = new RoleAccountTypeResponse();
roleAccountType.setAccounttypeId(accountRelationResponse.getAccounttypeId()); //角色id封装
//角色与角色子级关系数据封装
List<RoleFunctionRelationResponse> functionList = accountRelationResponse.getFunctionList();
if (CollectionUtils.isNotEmpty(functionList)) {
List<ProductRelationResponse> productList = new ArrayList<>(); //子级数据封装对象new
//根据产品id分组
Map<Integer, List<RoleFunctionRelationResponse>> functionMap =
functionList.stream().collect(Collectors.groupingBy(RoleFunctionRelationResponse::getProductId));
//分组后遍历封装子级关系数据
for (Integer key : functionMap.keySet()) {
ProductRelationResponse relationResponse = new ProductRelationResponse();
relationResponse.setProductId(key); //产品id
List<RoleFunctionRelationResponse> list = functionMap.get(key);
relationResponse.setProductName(list.get(0).getProductName());
List<Integer> idList = new ArrayList<>();
list.stream().forEach(index -> {
//功能封装
if (index.getFuncitonId() != null && index.getFuncitonId() > 0) {
idList.add(index.getFuncitonId());
String value = index.getFunctionValue();
if (StringUtils.isNotEmpty(value)) {
String[] arr = value.split(";");
int size = arr.length;
for (int i = 0; i < size; i++) {
idList.add(Integer.valueOf(arr[i].split(":")[0]));
}
}
} else { //菜单封装
idList.add(index.getMenuId());
}
});
relationResponse.setIdList(idList);
productList.add(relationResponse); //子级菜单数据set
}
roleAccountType.setProductList(productList); //逐级封装返回
}
responseList.add(roleAccountType);
}
roleResponse.setResponseList(responseList);
}
/**
* 获取角色管理分页数据
*
* @param request
* @return
*/
public Pagination<RoleResponse> getRolePage(RoleListSearchRequest request) {
RpcPagination<MerchantRoleRequest> pagination =
ConvertRequest.convertPage(request, new MerchantRoleRequest());
RpcResponse<RpcPagination<MerchantRoleResponse>> response =
roleRemote.getRolePageRemote(pagination);
if (response.isSuccess()) {
Pagination<RoleResponse> res = ConvertResponse.convertPage(response.getResult(), RoleResponse.class);
res.getData().stream().forEach(index -> index.setStatusName(CommonStatusEnum.getText(index.getDelFlag())));
return res;
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
/**
* 获取角色数据列表
*
* @param request
* @return
*/
public List<RoleResponse> getRoleList(RoleSearchRequest request) {
MerchantRoleRequest typeRequest = new MerchantRoleRequest();
typeRequest.setMerchantId(request.getId());
typeRequest.setDelFlag(request.getDelFlag());
RpcResponse<List<MerchantRoleResponse>> response =
roleRemote.getRoleListRemote(typeRequest);
if (response.isSuccess()) {
return ConvertResponse.convertList(response.getResult(), RoleResponse.class);
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
/**
* id删除角色管理
*
* @param request
* @return
*/
@SysLog(value = "删除角色数据", action = OperateType.DELETE, module = "角色管理")
public Boolean delete(RoleDeleteRequest request) {
MerchantRoleRequest typeRequest = new MerchantRoleRequest();
dozerMapper.map(request, typeRequest);
RpcResponse<Boolean> response = roleRemote.deleteRemote(typeRequest);
if (response.isSuccess()) {
return response.getResult();
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
/**
* 新增角色管理数据
*
* @param request
* @return
*/
@SysLog(value = "保存角色数据", action = OperateType.ADD, module = "角色管理")
public Boolean insert(RoleInsertRequest request) {
RpcResponse<List<MerchantRoleResponse>> rpc = roleRemote.getListByNameRemote(
request.getRoleName(), request.getMerchantId());
if (!rpc.isSuccess()) {
throw new RpcServiceException(rpc.getException().getErrId(), rpc.getMessage());
}
if (CollectionUtils.isNotEmpty(rpc.getResult())) {
throw new RpcServiceException(BusinessExceptionEnum.ROLE_NAME_EXIT);
}
MerchantRoleRequest roleRequest = new MerchantRoleRequest();
dozerMapper.map(request, roleRequest);
List<RoleAccountTypeRequest> requestList = JSON.parseArray(request.getRequestList(), RoleAccountTypeRequest.class);
this.dataTransfer(roleRequest, requestList);
RpcResponse<Boolean> response = roleRemote.insertRemote(roleRequest);
if (response.isSuccess()) {
return response.getResult();
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
/**
* 更新角色管理数据
*
* @param request
* @return
*/
@SysLog(value = "更新角色数据", action = OperateType.EDIT, module = "角色管理")
public Boolean update(RoleUpdateRequest request) {
RpcResponse<List<MerchantRoleResponse>> rpcRoleList = roleRemote.getListByNameRemote(
request.getRoleName(), request.getMerchantId());
if (!rpcRoleList.isSuccess()) {
throw new RpcServiceException(rpcRoleList.getException().getErrId(), rpcRoleList.getMessage());
}
List<MerchantRoleResponse> list = rpcRoleList.getResult();
if (CollectionUtils.isNotEmpty(list)) {
if (list.size() > 1 || !(list.get(0).getId().equals(request.getId()))) {
throw new RpcServiceException(BusinessExceptionEnum.ROLE_NAME_EXIT);
}
}
MerchantRoleRequest roleRequest = new MerchantRoleRequest();
dozerMapper.map(request, roleRequest);
List<RoleAccountTypeRequest> requestList = JSON.parseArray(request.getRequestList(), RoleAccountTypeRequest.class);
this.dataTransfer(roleRequest, requestList);
RpcResponse<Boolean> response = roleRemote.updateRemote(roleRequest);
if (response.isSuccess()) {
return response.getResult();
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
/**
* 保存数据转换
*
* @param roleRequest 请求保存的数据
* @param requestList 前端传送产品菜单数据
*/
private void dataTransfer(MerchantRoleRequest roleRequest, List<RoleAccountTypeRequest> requestList) {
if (CollectionUtils.isEmpty(requestList)) {
return;
}
List<RoleAccountRelationRequest> accountList = new ArrayList<>();
int len = requestList.size();
for (int i = 0; i < len; i++) {
RoleAccountTypeRequest roleAccountType = requestList.get(i);
RoleAccountRelationRequest relationRequest = new RoleAccountRelationRequest();
relationRequest.setAccounttypeId(roleAccountType.getAccounttypeId());
List<ProductRequest> productList = roleAccountType.getProductList();
if (CollectionUtils.isEmpty(productList)) {
accountList.add(relationRequest);
continue;
}
List<RoleFunctionRelationRequest> functionList = new ArrayList<>();
productList.stream().forEach(index -> {
List<Integer> menuIdList = index.getMenuIdList();
List<FunctionRequest> functionIdList = index.getFunctionIdList();
if (CollectionUtils.isNotEmpty(menuIdList)) {
menuIdList.stream().forEach(menuId -> {
RoleFunctionRelationRequest relation = new RoleFunctionRelationRequest();
relation.setProductId(index.getProductId());
relation.setMenuId(menuId);
functionList.add(relation);
});
}
if (CollectionUtils.isNotEmpty(functionIdList)) {
functionIdList.stream().forEach(function -> {
RoleFunctionRelationRequest relation = new RoleFunctionRelationRequest();
relation.setProductId(index.getProductId());
relation.setMenuId(function.getMenuId());
relation.setFuncitonId(function.getId());
relation.setFunctionValue(function.getFunctionValue());
functionList.add(relation);
});
}
if (CollectionUtils.isEmpty(menuIdList) && CollectionUtils.isEmpty(functionIdList) && index.getProductId() != null) {
RoleFunctionRelationRequest relation = new RoleFunctionRelationRequest();
relation.setProductId(index.getProductId());
functionList.add(relation);
}
});
relationRequest.setFunctionList(functionList);
accountList.add(relationRequest);
}
roleRequest.setAccountList(accountList); //账户角色数据列表set
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.*;
import cn.com.glsx.merchants.model.request.MerchantBrandRequest;
import cn.com.glsx.merchants.model.response.*;
import cn.com.glsx.merchants.remote.MerchantRemote;
import cn.com.glsx.merchants.request.accounttype.AccountTypeSearchRequest;
import cn.com.glsx.merchants.request.merchant.*;
import cn.com.glsx.merchants.request.role.RoleSearchRequest;
import cn.com.glsx.merchants.response.*;
import cn.com.glsx.merchants.util.Pagination;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 商户服务
* @date 2021/7/21 17:06
*/
@Service
public class MerchantService {
@Autowired
private MerchantRemote merchantRemote;
@Autowired
private MerchantUserService merchantUserService;
/**
* 保存商户
*
* @param merchantSaveRequest 入参
*/
public Integer saveMerchant(MerchantSaveRequest merchantSaveRequest) {
RpcResponse<Integer> booleanRpcResponse = merchantRemote.saveMerchantRemote(converMerchant(merchantSaveRequest));
if (booleanRpcResponse.isSuccess()) {
return booleanRpcResponse.getResult();
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
private MerchantRequest converMerchant(MerchantSaveRequest merchantSaveRequest) {
MerchantRequest merchantRequest = ConvertRequest.convertRequest(merchantSaveRequest, new MerchantRequest());
String merchantFiles = merchantSaveRequest.getMerchantFiles();
String merchantBrandListJson = merchantSaveRequest.getMerchantBrandListJson();
if(StringUtils.isNotEmpty(merchantBrandListJson))
merchantRequest.setMerchantBrandList(JSONObject.parseArray(merchantBrandListJson, MerchantBrandRequest.class));
if (StringUtils.isNotEmpty(merchantFiles)) {
merchantRequest.setMerchantFiles(JSONObject.parseArray(merchantFiles, MerchantFileRequest.class));
}
return merchantRequest;
}
private MerchantRequest converUpdateMerchant(MerchantUpdateRequest merchantUpdateRequest) {
MerchantRequest merchantRequest = ConvertRequest.convertRequest(merchantUpdateRequest, new MerchantRequest());
String merchantFiles = merchantUpdateRequest.getMerchantFiles();
String merchantBrandListJson = merchantUpdateRequest.getMerchantBrandListJson();
if(StringUtils.isNotEmpty(merchantBrandListJson))
merchantRequest.setMerchantBrandList(JSONObject.parseArray(merchantBrandListJson, MerchantBrandRequest.class));
if (StringUtils.isNotEmpty(merchantFiles)) {
merchantRequest.setMerchantFiles(JSONObject.parseArray(merchantFiles, MerchantFileRequest.class));
}
return merchantRequest;
}
/**
* 更新商户
*
* @param merchantUpdateRequest 入参
*/
public void updateMerchant(MerchantUpdateRequest merchantUpdateRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantRemote.updateMerchantRemote(converUpdateMerchant(merchantUpdateRequest));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 保存商户权限
*
* @param merchantTreeRequest 入参
*/
public void savePermissions(MerchantTreeRopRequest merchantTreeRequest) {
MerchantTreeRequest merchantTree = ConvertRequest.convertRequest(merchantTreeRequest, new MerchantTreeRequest());
String accountTypes = merchantTreeRequest.getAccountTypes();
if (StringUtils.isNotEmpty(accountTypes)) {
merchantTree.setAccountTypes(JSONObject.parseArray(accountTypes, AccountTypeTreeRequest.class));
}
RpcResponse<Boolean> booleanRpcResponse = merchantRemote.savePermissionsRemote(merchantTree);
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 更新商户权限
*
* @param merchantTreeRequest 入参
*/
public void updatePermissions(MerchantTreeRopRequest merchantTreeRequest) {
MerchantTreeRequest merchantTree = ConvertRequest.convertRequest(merchantTreeRequest, new MerchantTreeRequest());
String accountTypes = merchantTreeRequest.getAccountTypes();
if (StringUtils.isNotEmpty(accountTypes)) {
merchantTree.setAccountTypes(JSONObject.parseArray(accountTypes, AccountTypeTreeRequest.class));
}
RpcResponse<Boolean> booleanRpcResponse = merchantRemote.updatePermissionsRemote(merchantTree);
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 查询商户详情
*
* @param merchantDetailRequest
* @return
*/
public MerchantRopResponse findMerchantDetail(MerchantDetailRequest merchantDetailRequest) {
RpcResponse<MerchantResponse> merchantDetailRemote = merchantRemote.findMerchantDetailRemote(ConvertRequest.convertRequest(merchantDetailRequest, new MerchantRequest()));
if (merchantDetailRemote.isSuccess()) {
return ConvertResponse.convertObject(merchantDetailRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(merchantDetailRemote.getException().getErrId(), merchantDetailRemote.getMessage());
}
/**
* 查询商户树
*
* @param merchantDetailRequest 入参
* @return
*/
public List<MerchantTreeRopResponse> findMerchantTree(MerchantDetailRequest merchantDetailRequest) {
RpcResponse<List<MerchantTreeResponse>> merchantDetailRemote = merchantRemote.findMerchantTreeRemote(ConvertRequest.convertRequest(merchantDetailRequest, new MerchantRequest()));
if (merchantDetailRemote.isSuccess()) {
return ConvertResponse.convertList(merchantDetailRemote.getResult(), MerchantTreeRopResponse.class);
}
throw new RpcServiceException(merchantDetailRemote.getException().getErrId(), merchantDetailRemote.getMessage());
}
/**
* 查询商户的菜单权限
*
* @param merchantDetailRequest 入参
* @return
*/
public List<AccountTypeTreeRopResponse> findPermissionsByMerId(MerchantDetailRequest merchantDetailRequest) {
RpcResponse<List<AccountTypeTreeResponse>> merchantDetailRemote = merchantRemote.findPermissionsByMerId(merchantDetailRequest.getId());
if (merchantDetailRemote.isSuccess()) {
return ConvertResponse.convertList(merchantDetailRemote.getResult(), AccountTypeTreeRopResponse.class);
}
throw new RpcServiceException(merchantDetailRemote.getException().getErrId(), merchantDetailRemote.getMessage());
}
/**
* 查询商户的菜单权限树
*
* @param merchantDetailRequest 入参
* @return
*/
public List<AccountTypeTreeRopResponse> findMenuFunTreeByMerId(MerchantDetailRequest merchantDetailRequest) {
RpcResponse<List<AccountTypeTreeResponse>> merchantDetailRemote = merchantRemote.findMenuFunTreeByMerId(merchantDetailRequest.getId(), merchantDetailRequest.getAccountlevel(), merchantDetailRequest.getParentId());
if (merchantDetailRemote.isSuccess()) {
return ConvertResponse.convertList(merchantDetailRemote.getResult(), AccountTypeTreeRopResponse.class);
}
throw new RpcServiceException(merchantDetailRemote.getException().getErrId(), merchantDetailRemote.getMessage());
}
/**
* 更新商户的有效期
*
* @param merchantUpdateValRequest 入参
* @return
*/
public void updateValPerByMerId(MerchantUpdateValRequest merchantUpdateValRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantRemote.updateValPerByMerId(ConvertRequest.convertRequest(merchantUpdateValRequest, new MerchantRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 查询商户的列表
*
* @param merchantSearchResquest 入参
* @return
*/
public Pagination<MerchantRopResponse> findMerchantByPage(MerchantSearchResquest merchantSearchResquest) {
RpcPagination<MerchantRequest> merchantRequestRpcPagination = ConvertRequest.convertPage(merchantSearchResquest, new MerchantRequest());
MerchantRequest condition = merchantRequestRpcPagination.getCondition();
Integer superMerchantNo = merchantSearchResquest.getSuperMerchantNo();
condition.setSuperMerchantNo(superMerchantNo);
RpcResponse<RpcPagination<MerchantResponse>> merProductByPageRemote = merchantRemote.findMerchantByPageRemote(merchantRequestRpcPagination);
if (merProductByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merProductByPageRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(merProductByPageRemote.getException().getErrId(), merProductByPageRemote.getMessage());
}
/**
* 查询所有商户
*
* @return
*/
public List<MerchantRopListRes> findAllMerchant(MerchantFindRequest merchantFindRequest) {
RpcResponse<List<MerchantResponse>> allMerchantRemote = merchantRemote.findAllMerchantRemote(ConvertRequest.convertRequest(merchantFindRequest, new MerchantRequest()));
if (allMerchantRemote.isSuccess()) {
return ConvertResponse.convertList(allMerchantRemote.getResult(), MerchantRopListRes.class);
}
throw new RpcServiceException(allMerchantRemote.getException().getErrId(), allMerchantRemote.getMessage());
}
/**
* 查询上下级商户
*
* @return
*/
public MerchantRopResponse findSubordinateRelationship(MerchantDetailRequest merchantDetailRequest) {
RpcResponse<MerchantResponse> allMerchantRemote = merchantRemote.findSubordinateRelationshipRemote(ConvertRequest.convertRequest(merchantDetailRequest, new MerchantRequest()));
if (allMerchantRemote.isSuccess()) {
return ConvertResponse.convertObject(allMerchantRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(allMerchantRemote.getException().getErrId(), allMerchantRemote.getMessage());
}
public List<AccountTypeTreeRopResponse> findMenuFunTreeByAccountType(AccountTypeSearchRequest accountTypeSearchRequest) {
String[] split = accountTypeSearchRequest.getIds().split(",");
List<Integer> strings = new ArrayList<>();
for (String s : split) {
strings.add(Integer.parseInt(s));
}
RpcResponse<List<AccountTypeTreeResponse>> response =
merchantRemote.findMenuFunTreeByAccountType(strings, accountTypeSearchRequest.getAccountLevel(), accountTypeSearchRequest.getMerchantId());
if (response.isSuccess()) {
return ConvertResponse.convertList(response.getResult(), AccountTypeTreeRopResponse.class);
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
public List<AccountTypeTreeRopResponse> findMenuFunTreeByRoleId(RoleSearchRequest roleSearchRequest) {
RpcResponse<List<AccountTypeTreeResponse>> response =
merchantRemote.findMenuFunTreeByRoleId(roleSearchRequest.getId());
if (response.isSuccess()) {
return ConvertResponse.convertList(response.getResult(), AccountTypeTreeRopResponse.class);
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
public MerchantBaseInfoRopResponse findMerchantBaseInfo(MerchantBaseInfoRequest merchantBaseInfoRequest) {
RpcResponse<MerchantBaseInfoResponse> merchantBaseInfo = merchantRemote.findMerchantBaseInfo(merchantBaseInfoRequest.getMerchantId());
if (merchantBaseInfo.isSuccess()) {
return ConvertResponse.convertObject(merchantBaseInfo.getResult(), MerchantBaseInfoRopResponse.class);
}
throw new RpcServiceException(merchantBaseInfo.getException().getErrId(), merchantBaseInfo.getMessage());
}
public void updateMerchantPath(MerchantUpdatePathRequest merchantUpdatePathRequest) {
MerchantUpdatePathApiRequest pathApiRequest = new MerchantUpdatePathApiRequest();
BeanUtils.copyProperties(merchantUpdatePathRequest, pathApiRequest);
RpcResponse<Boolean> rpcResponse = merchantRemote.merchantUpdatePath(pathApiRequest);
if(!rpcResponse.isSuccess()){
RpcServiceException exception = rpcResponse.getException();
if(null != exception)
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
throw new RpcServiceException(rpcResponse.getError().getValue(), rpcResponse.getError().getDisplayName());
}
}
public void updateAccessMode(MerchantAccessMode merchantAccessMode) {
MerchantApiAccessMode apiAccessMode = new MerchantApiAccessMode();
BeanUtils.copyProperties(merchantAccessMode, apiAccessMode);
RpcResponse<Boolean> rpcResponse = merchantRemote.updateAccessMode(apiAccessMode);
if (rpcResponse.isFailed()) {
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
public MerchantInfoDjRopResponse findMerchantInfoToDj(MerchantBaseInfoRequest merchantBaseInfoRequest) {
RpcResponse<MerchantInfoApiDjRopResponse> rpcResponse = merchantRemote.findMerchantInfoToDj(merchantBaseInfoRequest.getMerchantId());
if (rpcResponse.isSuccess()) {
return ConvertResponse.convertObject(rpcResponse.getResult(), MerchantInfoDjRopResponse.class);
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public Pagination<MerchantSearchEntMicroResponse> findEntMicroMerchantsByPage(MerchantSearchEntMicroRequest merchantSearchEntMicroRequest) {
RpcPagination<MerchantEntMicroPageRequest> remoteRequest = ConvertRequest.convertPage(merchantSearchEntMicroRequest, new MerchantEntMicroPageRequest());
RpcResponse<RpcPagination<MerchantSearchEntMicroResponse>> response = merchantRemote.findEntMicroMerchantsByPage(remoteRequest);
if (response.isSuccess()) {
return ConvertResponse.convertPage(response.getResult(), MerchantSearchEntMicroResponse.class);
}
throw new RpcServiceException(response.getException().getErrId(), response.getMessage());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
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.util.ScorePagination;
import cn.com.glsx.stoassistant.model.request.score.MerchantScoreUpdateRpcRequest;
import cn.com.glsx.stoassistant.model.request.score.MerchantStaffScoreSearchRpcRequest;
import cn.com.glsx.stoassistant.model.response.score.MerchantStaffScoreListRpcResponse;
import cn.com.glsx.stoassistant.model.response.score.MerchantStaffScorePageRpcResponse;
import cn.com.glsx.stoassistant.remote.MerchantStaffScoreRemote;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName MerchantStaffScoreService
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Service
public class MerchantStaffScoreService {
@Autowired
private MerchantStaffScoreRemote merchantStaffScoreRemote;
/**
* 获取积分收益列表
* @param request
* @return
*/
public ScorePagination<MerchantStaffScoreListRopResponse> getScorePage(MerchantStaffScoreSearchRopRequest request) {
RpcPagination<MerchantStaffScoreSearchRpcRequest> param = ConvertRequest.convertPage(request, new MerchantStaffScoreSearchRpcRequest());
param.getCondition().setMerchantId(request.getMerchantNo());
RpcResponse<MerchantStaffScorePageRpcResponse> rpcResponse = merchantStaffScoreRemote.getPage(param);
if (rpcResponse.isSuccess()) {
ScorePagination<MerchantStaffScoreListRopResponse> response = convertScorePage(rpcResponse.getResult(), MerchantStaffScoreListRopResponse.class);
return response;
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
/**
* 积分列表分页转换
*
* @return 新分页参数
*/
private static <E, T> ScorePagination<T> convertScorePage(MerchantStaffScorePageRpcResponse response, Class<T> clazz) {
RpcPagination<MerchantStaffScoreListRpcResponse> list = response.getPagination();
ScorePagination pagination = new ScorePagination();
BeanUtils.copyProperties(response, pagination);
pagination.setPageNum(list.getPageNum());
List<T> newList = ConvertResponse.convertList(list.getList(), clazz);
pagination.setData(newList);
pagination.setCount((int) list.getTotal());
pagination.setPageSize(list.getPageSize());
pagination.setTotalScore(response.getTotalScore().toString());
return pagination;
}
/**
* 导出收益列表
* @param request
* @return
*/
public String exportList(MerchantStaffScoreSearchRopRequest request) {
MerchantStaffScoreSearchRpcRequest param = ConvertRequest.convertRequest(request, new MerchantStaffScoreSearchRpcRequest());
param.setMerchantId(request.getMerchantNo());
RpcResponse<String> rpcResponse = merchantStaffScoreRemote.exportList(param);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
/**
* 批量核销积分
* @param request
*/
public void scoreExchange(MerchantScoreUpdateRopRequest request) {
MerchantScoreUpdateRpcRequest rpcRequest = ConvertRequest.convertRequest(request, new MerchantScoreUpdateRpcRequest());
rpcRequest.setIdList(request.getIdList());
RpcResponse<Boolean> rpcResponse = merchantStaffScoreRemote.scoreExchange(rpcRequest);
if (rpcResponse.isFailed()) {
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
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.util.WithdrawalPagination;
import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalInsertRpcRequest;
import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest;
import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalListRpcResponse;
import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantStaffWithdrawalPageRpcResponse;
import cn.com.glsx.stoassistant.remote.MerchantStaffWithdrawalRemote;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @ClassName MerchantStaffWithdrawalService
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Service
public class MerchantStaffWithdrawalService {
@Autowired
private MerchantStaffWithdrawalRemote merchantStaffWithdrawalRemote;
/**
* 获取提现管理列表
*
* @param request
* @return
*/
public WithdrawalPagination<MerchantStaffWithdrawalListRopResponse> getWithdrawalPage(MerchantStaffWithdrawalSearchRopRequest request) {
RpcPagination<MerchantStaffWithdrawalSearchRpcRequest> param = ConvertRequest.convertPage(request, new MerchantStaffWithdrawalSearchRpcRequest());
param.getCondition().setMerchantId(request.getMerchantNo());
RpcResponse<MerchantStaffWithdrawalPageRpcResponse> rpcResponse = merchantStaffWithdrawalRemote.getPage(param);
if (rpcResponse.isSuccess()) {
WithdrawalPagination<MerchantStaffWithdrawalListRopResponse> pagination = convertWithdrawalPage(rpcResponse.getResult(), MerchantStaffWithdrawalListRopResponse.class);
return pagination;
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
/**
* 提现列表分页转换
*
* @return 新分页参数
*/
private static <E, T> WithdrawalPagination<T> convertWithdrawalPage(MerchantStaffWithdrawalPageRpcResponse response, Class<T> clazz) {
RpcPagination<MerchantStaffWithdrawalListRpcResponse> list = response.getPagination();
WithdrawalPagination pagination = new WithdrawalPagination();
BeanUtils.copyProperties(response, pagination);
pagination.setReceivedAmount(response.getReceivedAmount());
pagination.setReceivingAmount(response.getReceivingAmount());
pagination.setReviewingAmount(response.getReviewingAmount());
pagination.setFailureAmount(response.getFailureAmount());
pagination.setTotalAmount(response.getTotalAmount());
pagination.setPageNum(list.getPageNum());
List<T> newList = ConvertResponse.convertList(list.getList(), clazz);
pagination.setData(newList);
pagination.setCount((int) list.getTotal());
pagination.setPageSize(list.getPageSize());
return pagination;
}
/**
* 批量提现审核
*/
public void batchWithdrawal(MerchantStaffWithdrawalUpdateRopRequest request) {
MerchantStaffWithdrawalInsertRpcRequest param = ConvertRequest.convertRequest(request, new MerchantStaffWithdrawalInsertRpcRequest());
param.setMerchantId(request.getMerchantNo());
param.setIdList(request.getIdList());
RpcResponse<Boolean> rpcResponse = merchantStaffWithdrawalRemote.batchWithdrawal(param);
if (rpcResponse.isFailed()) {
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
/**
* 导出提现列表
* @param request
* @return
*/
public String exportList(MerchantStaffWithdrawalSearchRopRequest request) {
MerchantStaffWithdrawalSearchRpcRequest param = ConvertRequest.convertRequest(request, new MerchantStaffWithdrawalSearchRpcRequest());
param.setMerchantId(request.getMerchantNo());
RpcResponse<String> rpcResponse = merchantStaffWithdrawalRemote.exportList(param);
if (rpcResponse.isSuccess()) {
return rpcResponse.getResult();
}
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
package cn.com.glsx.merchants.service;
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.user.MerchantUser;
import com.rop.AbstractRopRequest;
import com.rop.session.SimpleSession;
import lombok.extern.slf4j.Slf4j;
import org.oreframework.boot.autoconfigure.rop.session.RopSessionManager;
import org.oreframework.boot.autoconfigure.rop.util.RopThreadLocal;
import org.oreframework.boot.security.cas.User;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* @author zhouhaibao
* @version 1.0
* @description: 用户信息管理
* @date 2021/7/14 14:45
*/
@Service
@Slf4j
public class MerchantUserService {
/**
* 获取用户信息
*
* @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) {
user.setUsername((String) session.getAttribute(Contants.USER_ACCOUNT));
user.setRealname((String) session.getAttribute(Contants.USER_NAME));
user.setId((Integer) session.getAttribute(Contants.USER_ID));
} else {
throw new RpcServiceException(DefaultErrorEnum.SERVER_ERROR);
}
merchantUser.setSource(Contants.SYSTEM_SOURCE_USER);
} else {
merchantUser.setSource(Contants.SYSTEM_SOURCE_OPERATION);
}
BeanUtils.copyProperties(user, merchantUser);
return merchantUser;
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.contants.Contants;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.*;
import cn.com.glsx.merchants.model.request.merchant.FindBySupMerchantNoRpcRequest;
import cn.com.glsx.merchants.model.request.merchant.MerchantListByConditionRpcRequest;
import cn.com.glsx.merchants.model.response.*;
import cn.com.glsx.merchants.remote.MerchantRemote;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import cn.com.glsx.merchants.remote.MerchantUserRemote;
import cn.com.glsx.merchants.request.accounttype.MerchantListByConditionRopRequest;
import cn.com.glsx.merchants.request.file.FileSaveRequest;
import cn.com.glsx.merchants.request.merchant.FindBySupMerchantNoRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantNosRopRequest;
import cn.com.glsx.merchants.request.merchant.MerchantSaveOpenRequest;
import cn.com.glsx.merchants.request.merchant.OpenMerchantPageRequest;
import cn.com.glsx.merchants.request.open.*;
import cn.com.glsx.merchants.request.open.MerchantListOpenRequest;
import cn.com.glsx.merchants.response.*;
import cn.com.glsx.merchants.util.ListUtils;
import cn.com.glsx.merchants.util.Pagination;
import com.alibaba.fastjson.JSONObject;
import com.rop.RopRequestContext;
import com.rop.session.SimpleSession;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.compress.utils.Lists;
import org.apache.commons.lang.StringUtils;
import org.oreframework.boot.autoconfigure.rop.session.RopSessionManager;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.xml.crypto.Data;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/9/17 9:52
*/
@Service
public class OpenService {
@Autowired
private MerchantRemote merchantRemote;
@Autowired
private MerchantUserRemote merchantUserRemote;
@Autowired
private MerchantStaffRemote merchantStaffRemote;
@Autowired
private RopSessionManager ropSessionManager;
public MerchantRopResponse findMerchantDetailByMerchantNo(OpenMerchantDetailRequest openMerchantRequest) {
RpcResponse<MerchantResponse> merchantDetailByMerchantNoRemote = merchantRemote.findMerchantDetailByMerchantNoRemote(openMerchantRequest.getMerchantId());
if (merchantDetailByMerchantNoRemote.isSuccess()) {
return ConvertResponse.convertObject(merchantDetailByMerchantNoRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(merchantDetailByMerchantNoRemote.getException().getErrId(), merchantDetailByMerchantNoRemote.getMessage());
}
public Integer findSuperlativeMerchant(OpenMerchantDetailRequest openMerchantRequest) {
RpcResponse<Integer> superlativeMerchantRemote = merchantRemote.findSuperlativeMerchantRemote(ConvertRequest.convertRequest(openMerchantRequest, new MerchantOpenRequest()));
if (superlativeMerchantRemote.isSuccess()) {
return superlativeMerchantRemote.getResult();
}
throw new RpcServiceException(superlativeMerchantRemote.getException().getErrId(), superlativeMerchantRemote.getMessage());
}
public List<MerchantRopResponse> findSuperiorList(OpenMerchantLevelRequest openMerchantRequest) {
RpcResponse<List<MerchantResponse>> merchantListRemote = merchantRemote.findSuperiorListRemote(ConvertRequest.convertRequest(openMerchantRequest, new MerchantOpenRequest()));
if (merchantListRemote.isSuccess()) {
return ConvertResponse.convertList(merchantListRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(merchantListRemote.getException().getErrId(), merchantListRemote.getMessage());
}
public List<MerchantRopResponse> findMerchantList(OpenMerchantListRequest openMerchantRequest) {
RpcResponse<List<MerchantResponse>> merchantListRemote = merchantRemote.findMerchantListRemote(ConvertRequest.convertRequest(openMerchantRequest, new MerchantOpenRequest()));
if (merchantListRemote.isSuccess()) {
return ConvertResponse.convertList(merchantListRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(merchantListRemote.getException().getErrId(), merchantListRemote.getMessage());
}
public Pagination<MerchantRopResponse> findSubordinateListByPage(OpenMerchantPageRequest openMerchantRequest) {
RpcResponse<RpcPagination<MerchantResponse>> subordinateListByPageRemote = merchantRemote.findSubordinateListByPageRemote(ConvertRequest.convertPage(openMerchantRequest, new MerchantOpenRequest()));
if (subordinateListByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(subordinateListByPageRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(subordinateListByPageRemote.getException().getErrId(), subordinateListByPageRemote.getMessage());
}
/**
* 用户登录保存登录信息
*
* @param openUserRequest
* @return
*/
public List<OpenUserResponse> checkBussinessAccount(OpenCheckUserRequest openUserRequest) {
RpcResponse<List<MerchantUserResponse>> merchantUserResponseRpcResponse = merchantUserRemote.checkBussinessAccount(ConvertRequest.convertRequest(openUserRequest, new MerchantUserRequest()));
if (merchantUserResponseRpcResponse.isSuccess()) {
List<MerchantUserResponse> result = merchantUserResponseRpcResponse.getResult();
if(result.size() > 0){
SimpleSession session = new SimpleSession();
session.setAttribute(Contants.USER_ACCOUNT, openUserRequest.getLoginAccout());
session.setAttribute(Contants.USER_NAME, result.get(0).getUserName());
RopRequestContext ropRequestContext = openUserRequest.getRopRequestContext();
ropRequestContext.addSession(openUserRequest.getSessionId(), session);
ropSessionManager.addSession(openUserRequest.getSessionId(), session);
}
return ConvertResponse.convertList(merchantUserResponseRpcResponse.getResult(), OpenUserResponse.class);
}
throw new RpcServiceException(merchantUserResponseRpcResponse.getException().getErrId(), merchantUserResponseRpcResponse.getMessage());
}
public List<Integer> findDataPermission(OpenUserDataPermissionRequest openUserRequest) {
RpcResponse<List<Integer>> dataPermission = merchantUserRemote.findDataPermission(ConvertRequest.convertRequest(openUserRequest, new MerchantUserRequest()));
if (dataPermission.isSuccess()) {
return dataPermission.getResult();
}
throw new RpcServiceException(dataPermission.getException().getErrId(), dataPermission.getMessage());
}
public List<AccountTypeTreeRopResponse> findMenuFunPermission(OpenUserMenuPermissionRequest openUserRequest) {
RpcResponse<List<AccountTypeTreeResponse>> menuFunPermission = merchantUserRemote.findMenuFunPermission(ConvertRequest.convertRequest(openUserRequest, new MerchantUserRequest()));
if (menuFunPermission.isSuccess()) {
return ConvertResponse.convertList(menuFunPermission.getResult(), AccountTypeTreeRopResponse.class);
}
throw new RpcServiceException(menuFunPermission.getException().getErrId(), menuFunPermission.getMessage());
}
public String saveMerchant(MerchantSaveOpenRequest merchantSaveRequest) {
List<FileSaveRequest> merchantFiles = merchantSaveRequest.getMerchantFiles();
MerchantRequest merchantRequest = ConvertRequest.convertRequest(merchantSaveRequest, new MerchantRequest());
if (CollectionUtils.isNotEmpty(merchantFiles)) {
List<MerchantFileRequest> collect = merchantFiles.stream().map(index -> {
MerchantFileRequest merchantFileRequest = new MerchantFileRequest();
BeanUtils.copyProperties(index, merchantFileRequest);
return merchantFileRequest;
}).collect(Collectors.toList());
merchantRequest.setMerchantFiles(collect);
}
RpcResponse<String> booleanRpcResponse = merchantRemote.saveOrUpdateMerchantRemote(merchantRequest);
if (booleanRpcResponse.isSuccess()) {
return booleanRpcResponse.getResult();
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
public Boolean relevanceMerchant(RelaevanceMerRequest relaevanceMerRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantRemote.relevanceMerchantRemote(ConvertRequest.convertRequest(relaevanceMerRequest, new MerchantOpenRequest()));
if (booleanRpcResponse.isSuccess()) {
return booleanRpcResponse.getResult();
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
public String saveStaff(StaffSaveOpenRequest staffSaveOpenRequest) {
MerchantStaffRequest merchantStaffRequest = ConvertRequest.convertRequest(staffSaveOpenRequest, new MerchantStaffRequest());
if (StringUtils.isNotEmpty(staffSaveOpenRequest.getMerchantFileRequest())) {
MerchantFileRequest merchantFileRequest = new MerchantFileRequest();
merchantFileRequest.setFileUrl(staffSaveOpenRequest.getMerchantFileRequest());
merchantStaffRequest.setMerchantFileRequest(merchantFileRequest);
}
RpcResponse<String> booleanRpcResponse = merchantStaffRemote.saveOrUpdateStaffRemote(merchantStaffRequest);
if (booleanRpcResponse.isSuccess()) {
return booleanRpcResponse.getResult();
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
public List<StaffResponse> syncEntmicroStaff(SyncStaffOpenRequest staffSaveOpenRequest) {
String data = staffSaveOpenRequest.getData();
List<StaffSaveOpenRequest> list = StringUtils.isEmpty(staffSaveOpenRequest.getData())
? staffSaveOpenRequest.getList()
: JSONObject.parseArray(data, StaffSaveOpenRequest.class);
//list.forEach(x -> BeanUtils.copyProperties(staffSaveOpenRequest, x));
RpcResponse<List<MerchantStaffResponse>> listRpcResponse = merchantStaffRemote.syncEntmicroStaff(ConvertRequest.convertListRequest(list, MerchantStaffRequest.class));
if (listRpcResponse.isSuccess()) {
return ConvertResponse.convertList(listRpcResponse.getResult(), StaffResponse.class);
}
throw new RpcServiceException(listRpcResponse.getException().getErrId(), listRpcResponse.getMessage());
}
public List<MerchantRopResponse> proximityMerchantList(OpenProximityMerchantRequest openProximityMerchantRequest) {
RpcResponse<List<MerchantResponse>> subordinateListByPageRemote = merchantRemote.findProximityMerchantListRemote(ConvertRequest.convertRequest(openProximityMerchantRequest, new MerchantOpenRequest()));
if (subordinateListByPageRemote.isSuccess()) {
return ConvertResponse.convertList(subordinateListByPageRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(subordinateListByPageRemote.getException().getErrId(), subordinateListByPageRemote.getMessage());
}
public Pagination<MerchantRopResponse> findMerchantListByPage(MerchantListOpenRequest merchantListOpenRequest) {
cn.com.glsx.merchants.model.request.MerchantListOpenRequest openRequest = buildOpenRequest(merchantListOpenRequest);
RpcResponse<RpcPagination<MerchantResponse>> merchantListByPageRemote = merchantRemote.findMerchantListByPageRemote(ConvertRequest.convertPage(merchantListOpenRequest, openRequest));
if (merchantListByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(merchantListByPageRemote.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(merchantListByPageRemote.getException().getErrId(), merchantListByPageRemote.getMessage());
}
private cn.com.glsx.merchants.model.request.MerchantListOpenRequest buildOpenRequest(MerchantListOpenRequest merchantListOpenRequest){
cn.com.glsx.merchants.model.request.MerchantListOpenRequest openRequest = new cn.com.glsx.merchants.model.request.MerchantListOpenRequest();
String merchantNoStrSet = merchantListOpenRequest.getMerchantNoStrSet();
Set<Integer> merchantNoSet = new HashSet<>();
if(null != merchantListOpenRequest.getMerchantId())
merchantNoSet.add(merchantListOpenRequest.getMerchantId());
if(StringUtils.isNotEmpty(merchantNoStrSet)){
String[] split = merchantNoStrSet.split(",");
for (String merchantNo : split) {
merchantNoSet.add(Integer.valueOf(merchantNo));
}
}
if (CollectionUtils.isNotEmpty(merchantNoSet)) openRequest.setMerchantNoSet(merchantNoSet);
return openRequest;
}
public StaffResponse findStaffByAccount(StaffSearchOpenRequest staffSearchOpenRequest) {
RpcResponse<MerchantStaffResponse> staffByAccount = merchantStaffRemote.findStaffByAccount(ConvertRequest.convertRequest(staffSearchOpenRequest, new StaffOpenRequest()));
if (staffByAccount.isSuccess()) {
return ConvertResponse.convertObject(staffByAccount.getResult(), StaffResponse.class);
}
throw new RpcServiceException(staffByAccount.getException().getErrId(), staffByAccount.getMessage());
}
public List<MerchantTreeOpenResponse> findMerchantTreeByMerchantNo(MerchantTreeOpenRequest merchantTreeOpenRequest) {
RpcResponse<List<MerchantTreeResponse>> merchantTreeByMerchantNoRemote = merchantRemote.findMerchantTreeByMerchantNoRemote(merchantTreeOpenRequest.getMerchantId(), merchantTreeOpenRequest.getFlag());
if (merchantTreeByMerchantNoRemote.isSuccess()) {
return ConvertResponse.convertList(merchantTreeByMerchantNoRemote.getResult(), MerchantTreeOpenResponse.class);
}
throw new RpcServiceException(merchantTreeByMerchantNoRemote.getException().getErrId(), merchantTreeByMerchantNoRemote.getMessage());
}
public List<OpenUserResponse> checkPhone(OpenCheckPhoneRequest openCheckPhoneRequest) {
RpcResponse<List<MerchantUserResponse>> merchantUserResponseRpcResponse = merchantUserRemote.checkPhone(ConvertRequest.convertRequest(openCheckPhoneRequest, new MerchantUserRequest()));
if (merchantUserResponseRpcResponse.isSuccess()) {
return ConvertResponse.convertList(merchantUserResponseRpcResponse.getResult(), OpenUserResponse.class);
}
throw new RpcServiceException(merchantUserResponseRpcResponse.getException().getErrId(), merchantUserResponseRpcResponse.getMessage());
}
public MerchantRopResponse findBySapCode(OpenSapSearchRequest openSapSearchRequest) {
RpcResponse<MerchantResponse> bySapCode = merchantRemote.findBySapCode(openSapSearchRequest.getSapCode());
if (bySapCode.isSuccess()) {
return ConvertResponse.convertObject(bySapCode.getResult(), MerchantRopResponse.class);
}
throw new RpcServiceException(bySapCode.getException().getErrId(), bySapCode.getMessage());
}
public void userLogin(UserLoginRequest userLoginRequest) {
SimpleSession session = new SimpleSession();
session.setAttribute(Contants.USER_ACCOUNT, userLoginRequest.getLoginAccout());
session.setAttribute(Contants.MERCHANT_ID, userLoginRequest.getMerchantId());
RopRequestContext ropRequestContext = userLoginRequest.getRopRequestContext();
ropRequestContext.addSession(userLoginRequest.getSessionId(), session);
ropSessionManager.addSession(userLoginRequest.getSessionId(), session);
}
public Boolean updateMd5Password() {
RpcResponse<Boolean> booleanRpcResponse = merchantUserRemote.updateMd5Password();
if (booleanRpcResponse.isSuccess()) {
return booleanRpcResponse.getResult();
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
public List<OpenUserResponse> findUserById(UserRequest userRequest) {
RpcResponse<List<MerchantUserResponse>> bySapCode = merchantUserRemote.findUserById(ListUtils.stringToList(userRequest.getCreatedBy(), ','));
if (bySapCode.isSuccess()) {
return ConvertResponse.convertList(bySapCode.getResult(), OpenUserResponse.class);
}
throw new RpcServiceException(bySapCode.getException().getErrId(), bySapCode.getMessage());
}
public OpenUserResponse checkUniquenessAccount(OpenLoginAccountRequest openLoginAccountRequest) {
RpcResponse<MerchantUserResponse> booleanRpcResponse = merchantUserRemote.checkAccount(openLoginAccountRequest.getAccount());
if (booleanRpcResponse.isSuccess()) {
return ConvertResponse.convertObject(booleanRpcResponse.getResult(), OpenUserResponse.class);
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
public OpenUserResponse checkUniquenessPhone(OpenLoginAccountRequest openLoginAccountRequest) {
RpcResponse<MerchantUserResponse> booleanRpcResponse = merchantUserRemote.checkUniquenessPhone(openLoginAccountRequest.getPhone(), openLoginAccountRequest.getMerchantId());
if (booleanRpcResponse.isSuccess()) {
return ConvertResponse.convertObject(booleanRpcResponse.getResult(), OpenUserResponse.class);
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
public Boolean updatePassword(UpdatePasswordOpenRequest updatePasswordOpenRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantUserRemote.updatePassword(ConvertRequest.convertRequest(updatePasswordOpenRequest, new UpdatePasswordRequest()));
if (booleanRpcResponse.isSuccess()) {
return booleanRpcResponse.getResult();
}
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
public OpenUserResponse getAccountInfoByUuid(String uuid) {
RpcResponse<MerchantUserResponse> rpcResponse = merchantUserRemote.getAccountInfoByUuid(uuid);
if(rpcResponse.isSuccess())
return ConvertResponse.convertObject(rpcResponse.getResult(), OpenUserResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<StaffResponse> findStaffListByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
RpcResponse<List<MerchantStaffResponse>> rpcResponse = merchantStaffRemote.findStaffListByMerchantNo(staffListOpenRequest.getMerchantNo());
if(rpcResponse.isSuccess())
return ConvertResponse.convertList(rpcResponse.getResult(), StaffResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public OpenUserResponse findLoginInfoByMerchantNo(StaffListOpenRequest staffListOpenRequest) {
RpcResponse<MerchantUserResponse> rpcResponse = merchantUserRemote.findLoginInfoByMerchantNo(ConvertRequest.convertRequest(staffListOpenRequest, new MerchantLoginIngoRequest()));
if(rpcResponse.isSuccess())
return ConvertResponse.convertObject(rpcResponse.getResult(), OpenUserResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public Boolean confirmPermissionsByUuidAndMenuId(ConfirmPermissionsRequest confirmPermissionsRequest) {
RpcResponse<Boolean> rpcResponse = merchantUserRemote.confirmPermissionsByUuidAndMenuId(ConvertRequest.convertRequest(confirmPermissionsRequest, new ConfirmPermissionsRpcRequest()));
if(rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public Boolean updateMerchantByMerchantNo(UpdateMerchantByMerchantNoRequest updateMerchantByMerchantNoReq) {
UpdateMerchantByMerchantNoRpcRequest updateMerchantByMerchantNoRpcRequest = ConvertRequest.convertRequest(updateMerchantByMerchantNoReq, new UpdateMerchantByMerchantNoRpcRequest());
RpcResponse<Boolean> rpcResponse = merchantRemote.updateMerchantByMerchantNo(updateMerchantByMerchantNoRpcRequest);
if(rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<MerchantSubListResponse> findSubMerchantbySupMerchantNo(OpenMerchantDetailRequest openMerchantDetailRequest) {
RpcResponse<List<MerchantSubListResponse>> rpcResponse = merchantRemote.findSubMerchantbySupMerchant(openMerchantDetailRequest.getMerchantId(),openMerchantDetailRequest.getDepth());
if (rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<MerchantStaffResponse> findJoinEntMicroStaffByMerchantNo(OpenFindEntMicroStaffByMerchantNoRequest request) {
FindEntMicroStaffByMerchantNoRequest remoteRequest = ConvertRequest.convertRequest(request,new FindEntMicroStaffByMerchantNoRequest());
RpcResponse<List<MerchantStaffResponse>> rpcResponse = merchantRemote.findJoinEntMicroStaffByMerchantNo(remoteRequest);
if (rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<Integer> findMerchantNoList(MerchantNosRopRequest request) {
MerchantNoByConditionRpcRequest remoteRequest = ConvertRequest.convertRequest(request,new MerchantNoByConditionRpcRequest());
RpcResponse<List<Integer>> rpcResponse = merchantRemote.findMerchantNoListByCondition(remoteRequest);
if (rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<MerchantListByConditionRopResponse> findMerchantNoListByMerAccTypeId(MerchantListByConditionRopRequest request) {
MerchantListByConditionRpcRequest remoteRequest = ConvertRequest.convertRequest(request,new MerchantListByConditionRpcRequest());
RpcResponse<List<MerchantListByConditionRpcResponse>> rpcResponse = merchantRemote.MerchantListByMerAccountType(remoteRequest);
if (rpcResponse.isSuccess())
return ConvertResponse.convertList(rpcResponse.getResult(),MerchantListByConditionRopResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<MerchantNoNameRopResponse> findMerchantBySupMerchantNo(FindBySupMerchantNoRopRequest ropRequest){
FindBySupMerchantNoRpcRequest remoteRequest = ConvertRequest.convertRequest(ropRequest,new FindBySupMerchantNoRpcRequest());
RpcResponse<List<MerchantNoNameRpcResponse>> rpcResponse = merchantRemote.findMerchantBySupMerchantNo(remoteRequest);
if (rpcResponse.isSuccess())
return ConvertResponse.convertList(rpcResponse.getResult(),MerchantNoNameRopResponse.class);
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
public List<Integer> merchantNoListByStaffPhone(String staffPhone) {
RpcResponse<List<Integer>> rpcResponse = merchantStaffRemote.merchantNoListByStaffPhone(staffPhone);
if (rpcResponse.isSuccess())
return rpcResponse.getResult();
throw new RpcServiceException(rpcResponse.getException().getErrId(), rpcResponse.getMessage());
}
}
package cn.com.glsx.merchants.service;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.merchants.config.SystemProperty;
import cn.com.glsx.merchants.convert.ConvertRequest;
import cn.com.glsx.merchants.convert.ConvertResponse;
import cn.com.glsx.merchants.model.request.StaffBatchRequest;
import cn.com.glsx.merchants.model.request.MerchantFileRequest;
import cn.com.glsx.merchants.model.request.MerchantStaffRequest;
import cn.com.glsx.merchants.model.response.MerchantStaffResponse;
import cn.com.glsx.merchants.remote.MerchantStaffRemote;
import cn.com.glsx.merchants.request.staff.*;
import cn.com.glsx.merchants.response.StaffExportResponse;
import cn.com.glsx.merchants.response.StaffResponse;
import cn.com.glsx.merchants.util.ExcelUtiles;
import cn.com.glsx.merchants.util.FileUploadServerData;
import cn.com.glsx.merchants.util.FileUploadUtil;
import cn.com.glsx.merchants.util.Pagination;
import com.alibaba.fastjson.JSONObject;
import com.glsx.cloudframework.core.util.StringUtil;
import com.glsx.plat.common.utils.DateUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: 员工服务
* @date 2021/7/22 14:04
*/
@Service
@Slf4j
public class StaffService {
@Autowired
private MerchantStaffRemote merchantStaffRemote;
@Autowired
private SystemProperty systemProperty;
/**
* 保存员工
*
* @param staffSaveRequest 入参
*/
public void saveStaff(StaffSaveRequest staffSaveRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantStaffRemote.saveStaffRemote(converRequest(staffSaveRequest));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
private MerchantStaffRequest converRequest(StaffSaveRequest staffSaveRequest) {
MerchantStaffRequest merchantStaffRequest = ConvertRequest.convertRequest(staffSaveRequest, new MerchantStaffRequest());
String merchantFileRequest = staffSaveRequest.getMerchantFileRequest();
if (!StringUtil.isBlank(merchantFileRequest)) {
merchantStaffRequest.setMerchantFileRequest(JSONObject.parseObject(merchantFileRequest, MerchantFileRequest.class));
}
return merchantStaffRequest;
}
private MerchantStaffRequest converRequest(StaffUpdateRequest staffUpdateRequest) {
MerchantStaffRequest merchantStaffRequest = ConvertRequest.convertRequest(staffUpdateRequest, new MerchantStaffRequest());
String merchantFileRequest = staffUpdateRequest.getMerchantFileRequest();
if (merchantFileRequest != null) {
merchantStaffRequest.setMerchantFileRequest(JSONObject.parseObject(merchantFileRequest, MerchantFileRequest.class));
}
return merchantStaffRequest;
}
/**
* 更新员工
*
* @param staffUpdateRequest 入参
*/
public void updateStaff(StaffUpdateRequest staffUpdateRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantStaffRemote.updateStaffRemote(converRequest(staffUpdateRequest));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 删除员工
*
* @param staffDeleteRequest 入参
*/
public void deleteStaff(StaffDeleteRequest staffDeleteRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantStaffRemote.deleteStaffRemote(ConvertRequest.convertRequest(staffDeleteRequest, new MerchantStaffRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 查询员工详情
*
* @param staffSearchRequest 入参
*/
public StaffResponse findMerchantStaffDetail(StaffSearchRequest staffSearchRequest) {
RpcResponse<MerchantStaffResponse> merchantDetailRemote = merchantStaffRemote.findMerchantStaffDetailRemote(ConvertRequest.convertRequest(staffSearchRequest, new MerchantStaffRequest()));
if (merchantDetailRemote.isSuccess()) {
return ConvertResponse.convertObject(merchantDetailRemote.getResult(), StaffResponse.class);
}
throw new RpcServiceException(merchantDetailRemote.getException().getErrId(), merchantDetailRemote.getMessage());
}
/**
* 根据条件查询员工
*
* @param staffListRequest 入参
*/
public List<StaffResponse> findMerchantStaffList(StaffListRequest staffListRequest) {
RpcResponse<List<MerchantStaffResponse>> merchantDetailRemote = merchantStaffRemote.findMerchantStaffListRemote(ConvertRequest.convertRequest(staffListRequest, new MerchantStaffRequest()));
if (merchantDetailRemote.isSuccess()) {
return ConvertResponse.convertList(merchantDetailRemote.getResult(), StaffResponse.class);
}
throw new RpcServiceException(merchantDetailRemote.getException().getErrId(), merchantDetailRemote.getMessage());
}
/**
* 根据员工分页列表
*
* @param staffPageRequest 入参
*/
public Pagination<StaffResponse> findStaffByPage(StaffPageRequest staffPageRequest) {
RpcResponse<RpcPagination<MerchantStaffResponse>> staffByPageRemote = merchantStaffRemote.findStaffByPageRemote(ConvertRequest.convertPage(staffPageRequest, new MerchantStaffRequest()));
if (staffByPageRemote.isSuccess()) {
return ConvertResponse.convertPage(staffByPageRemote.getResult(), StaffResponse.class);
}
throw new RpcServiceException(staffByPageRemote.getException().getErrId(), staffByPageRemote.getMessage());
}
/**
* 导出员工
*
* @param staffExportRequest 入参
* @return
*/
public String exportData(StaffExportRequest staffExportRequest) {
MerchantStaffRequest merchantStaffRequest = ConvertRequest.convertRequest(staffExportRequest, new MerchantStaffRequest());
log.info("请求入参{}", merchantStaffRequest);
RpcResponse<List<MerchantStaffResponse>> listRpcResponse = merchantStaffRemote.exportStaffRemote(ConvertRequest.convertRequest(staffExportRequest, new MerchantStaffRequest()));
if (listRpcResponse.isSuccess()) {
List<StaffExportResponse> staffResponses = ConvertResponse.convertList(listRpcResponse.getResult(), StaffExportResponse.class);
staffResponses.forEach(index -> {
index.setCreateDate(DateUtils.format(index.getUpdatedTime(), DateUtils.NORMAL_DATE_TIME_PATTERN));
});
int num = 0;
for (StaffExportResponse index : staffResponses) {
index.setCreateDate(DateUtils.format(index.getUpdatedTime(), DateUtils.NORMAL_DATE_TIME_PATTERN));
index.setNum(num + 1);
num++;
}
String time = new Date().getTime() + "";
String filename = "员工列表" + time;
byte[] bytes = ExcelUtiles.exportGoodsExcel(staffResponses, StaffExportResponse.class);
FileUploadServerData fileUploadServerData = FileUploadUtil.uploadToFileSystem(systemProperty.getUploadFileUrl(), filename, bytes, "xlsx");
return fileUploadServerData.getUrl();
}
throw new RpcServiceException(listRpcResponse.getException().getErrId(), listRpcResponse.getMessage());
}
/**
* 更新员工的有效期
*
* @param staffUpdateValRequest 入参
* @return
*/
public void updateValPerByStaffId(StaffUpdateValRequest staffUpdateValRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantStaffRemote.updateValPerByStaffId(ConvertRequest.convertRequest(staffUpdateValRequest, new MerchantStaffRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 更新员工状态
*
* @param staffUpdateStatusRequest 入参
*/
public void updateStatus(StaffUpdateStatusRequest staffUpdateStatusRequest) {
RpcResponse<Boolean> booleanRpcResponse = merchantStaffRemote.updateStaffRemote(ConvertRequest.convertRequest(staffUpdateStatusRequest, new MerchantStaffRequest()));
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 批量分配员工角色
* @param staffRoleInsertBatchRequest 入参
*/
public void addRoleBatch(StaffRoleInsertBatchRequest staffRoleInsertBatchRequest) {
StaffBatchRequest remoteRequest = ConvertRequest.convertRequest(staffRoleInsertBatchRequest, new StaffBatchRequest());
RpcResponse<Boolean> booleanRpcResponse = merchantStaffRemote.addStaffRoleIdsBatch(remoteRequest);
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
/**
* 批量更新员工状态
* @param staffUpdateStatusBatchRequest 入参
*/
public void updateStatusBatch(StaffUpdateStatusBatchRequest staffUpdateStatusBatchRequest) {
List<StaffUpdateStatusBatchRequest.MerchantStatus> list = staffUpdateStatusBatchRequest.getList();
ArrayList<Integer> staffids = new ArrayList<>();
Integer status = list.stream().findFirst().get().getStatus();
list.forEach(x -> staffids.add(x.getStaffId()));
StaffBatchRequest remoteRequest = new StaffBatchRequest();
remoteRequest.setStatus(status);
remoteRequest.setStaffIds(staffids);
RpcResponse<Boolean> booleanRpcResponse = merchantStaffRemote.updateStaffStatusBatch(remoteRequest);
if (booleanRpcResponse.isFailed()) {
throw new RpcServiceException(booleanRpcResponse.getException().getErrId(), booleanRpcResponse.getMessage());
}
}
}
package cn.com.glsx.merchants.util;
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.ExcelImportUtil;
import cn.afterturn.easypoi.excel.entity.ExportParams;
import cn.afterturn.easypoi.excel.entity.ImportParams;
import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult;
import cn.com.glsx.framework.core.exception.ServiceException;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.usermodel.Workbook;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.util.List;
@Slf4j
public class ExcelUtiles {
/**
* 转换文件内容为流数据
*
* @param content
* @return
*/
public static ByteArrayInputStream parseContentToStream(byte[] content) {
ByteArrayInputStream inputStream = new ByteArrayInputStream(content);
ImportParams parmas = new ImportParams();
parmas.setNeedVerfiy(true);
return inputStream;
}
/**
* 校验参数
*
* @return
*/
public static ImportParams verify() {
ImportParams parmas = new ImportParams();
parmas.setNeedVerfiy(false);
return parmas;
}
/**
* 不校验参数
*
* @return
*/
public static ImportParams unVerify() {
ImportParams parmas = new ImportParams();
parmas.setNeedVerfiy(false);
return parmas;
}
public static byte[] exportGoodsExcel(List<?> list, Class<?> pojoClass) {
ExportParams exportParams = new ExportParams();
exportParams.setCreateHeadRows(true);
exportParams.setType(ExcelType.HSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, pojoClass, list);
byte[] barray = null;
if (workbook != null) {
try {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
workbook.write(bos);
barray = bos.toByteArray();
} catch (Exception e) {
log.info("excel导出异常===msg:" + e.getMessage());
throw new ServiceException("excel异常");
}
}
return barray;
}
public static <T> ExcelImportResult<T> importExcel(byte[] content, Class<T> pojoClass) {
ByteArrayInputStream fileInputStream = ExcelUtiles.parseContentToStream(content);
ExcelImportResult<T> excelModulList = null;
try {
excelModulList = ExcelImportUtil.importExcelMore(fileInputStream, pojoClass, ExcelUtiles.verify());
} catch (Exception e) {
log.info("excel导入异常===msg:" + e.getMessage());
throw new ServiceException("excel异常");
}
return excelModulList;
}
}
package cn.com.glsx.merchants.util;
import javax.servlet.http.HttpServletRequest;
import java.io.Serializable;
@SuppressWarnings("serial")
public class FileUploadServerData implements Serializable {
public static final int UPLOAD_SUCCSSS = 0; // "上传文件成功!",
public static final int UPLOAD_FAILURE = 1; // "上传文件失败!"),
//private static final int UPLOAD_TYPE_ERROR = 2; // "上传文件类型错误!"),
//private static final int UPLOAD_OVERSIZE = 3; // "上传文件过大!"),
//private static final int UPLOAD_ZEROSIZE = 4; // "上传文件为空!"),
//private static final int UPLOAD_NOTFOUND = 5; // "上传文件路径错误!")
private Integer status = 0;
private String message = "";
private String url = "";
private String systemSign;
private String filePath;
private String param1;
private String param2;
private String param3;
private String secureUrl;
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
public String getSystemSign() {
return systemSign;
}
public void setSystemSign(String systemSign) {
this.systemSign = systemSign;
}
public String getFilePath() {
return filePath;
}
public void setFilePath(String filePath) {
this.filePath = filePath;
}
public String getParam1() {
return param1;
}
public void setParam1(String param1) {
this.param1 = param1;
}
public String getParam2() {
return param2;
}
public void setParam2(String param2) {
this.param2 = param2;
}
public String getParam3() {
return param3;
}
public void setParam3(String param3) {
this.param3 = param3;
}
public String getSecureUrl() {
return secureUrl;
}
public void setSecureUrl(String secureUrl) {
this.secureUrl = secureUrl;
}
@Override
public String toString() {
return "FileUploadServerData{" +
"status=" + status +
", message='" + message + '\'' +
", url='" + url + '\'' +
", systemSign='" + systemSign + '\'' +
", filePath='" + filePath + '\'' +
", param1='" + param1 + '\'' +
", param2='" + param2 + '\'' +
", param3='" + param3 + '\'' +
", secureUrl='" + secureUrl + '\'' +
'}';
}
public FileUploadServerData() {
}
public FileUploadServerData(HttpServletRequest request) {
this.systemSign = request.getParameter("systemSign");
this.filePath = request.getParameter("filePath");
this.param1 = request.getParameter("param1");
this.param2 = request.getParameter("param2");
this.param3 = request.getParameter("param3");
}
}
package cn.com.glsx.merchants.util;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import java.util.Arrays;
import java.util.List;
/**
* @author wangxw
* @version 1.0.0
* @ClassName FileUploadUtil.java
* @description: 文件上传操作类
* @createTime 2019年11月24日 14:29:00
*/
@Component
public class FileUploadUtil {
public static final String EXCEL_TYPE_COMPLETE = "xlsx,xls,csv";
/**
* 校验文件类型
*
* @param fileType
* @return
* @Author zhaojp
* @Date 2019年12月19日 14:11:37
**/
public static boolean verifyFileType(String fileType) {
if (StringUtils.isBlank(fileType)) {
return false;
}
List<String> fileTypes = Arrays.asList(EXCEL_TYPE_COMPLETE.split(","));
return fileTypes.contains(fileType);
}
/**
* 将文件上传至文件服务器
*
* @param uploadData
* @param fileType
* @return
*/
public static FileUploadServerData uploadToFileSystem(String url, String fileName, byte[] uploadData, String fileType) {
RestTemplate restTemplate = new RestTemplate();
MultiValueMap<String, String> form = new LinkedMultiValueMap<String, String>();
form.add("systemSign", "biz");
form.add("filePath", "");
// fileName由服务端指定
form.add("param1", fileName);
form.add("param2", "");
form.add("param3", "");
form.add("files", fileType + "@" + Base64.encodeBase64String(uploadData));
return restTemplate.postForObject(url, form, FileUploadServerData.class);
}
/**
* 获取文件的名称
*
* @param fileName 文件名 如 开发手册.pdf
* @return 文件名称 如:开发手册
*/
public static String getFilePreName(String fileName) {
if (fileName.contains(".")) {
int pointIndex = fileName.lastIndexOf(".");
return fileName.substring(0, pointIndex);
}
return fileName;
}
/**
* 获取文件的类型
*
* @param fileName 文件名 如:开发手册.pdf
* @return 文件后缀:.pdf
*/
public static String getFileTypeByFileName(String fileName) {
if (fileName.contains(".")) {
int pointIndex = fileName.lastIndexOf(".");
return fileName.substring(pointIndex);
}
return "";
}
}
package cn.com.glsx.merchants.util;/**
* @author zhouhaibao
* @date 2021/8/20
*/
import javax.servlet.http.HttpServletRequest;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/8/20 10:09
*/
public class IpUtils {
public static String getIpAddr(HttpServletRequest request) {
String ip = request.getHeader("x-forwarded-for");
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Forwarded-For");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("WL-Proxy-Client-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_CLIENT_IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("HTTP_X_FORWARDED_FOR");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getHeader("X-Real-IP");
}
if (ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) {
ip = request.getRemoteAddr();
}
if (ip != null) {
String[] ss = ip.split(",");
if (ss.length > 0) {
return ss[0];
}
}
return ip;
}
}
package cn.com.glsx.merchants.util;
import com.glsx.plat.common.utils.StringUtils;
import java.util.ArrayList;
import java.util.List;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/8/5 13:38
*/
public class ListUtils {
public static String listToString(List list, char separator) {
StringBuilder sb = new StringBuilder();
for (int i = 0; i < list.size(); i++) {
sb.append(list.get(i)).append(separator);
}
return sb.toString().substring(0, sb.toString().length() - 1);
}
public static List<Integer> stringToList(String liststring, char separator) {
List<Integer> list = new ArrayList<>();
if (StringUtils.isNotEmpty(liststring)) {
String[] split = liststring.split(String.valueOf(separator));
for (int i = 0; i < split.length; i++) {
String s = split[i];
list.add(Integer.parseInt(s));
}
}
return list;
}
}
package cn.com.glsx.merchants.util;
import cn.com.glsx.merchants.dto.ProductDTO;
import com.alibaba.fastjson.JSON;
import java.util.*;
public class LocalTest {
public static void main(String[] args) {
//1: 商户,2:门店
List<String> list = Arrays.asList("嘀加企微管家SCRM-门店版", "嘀加企微管家SCRM-集团版");
//营销素材功能Map
Map<String, String> yxMap = new HashMap<>();
yxMap.put("新增营销素材", "/material/addMaterial");
yxMap.put("详情", "/material/materialDetail");
yxMap.put("修改", null);
yxMap.put("置顶", null);
yxMap.put("删除", null);
yxMap.put("编辑", "/material/addMaterial");
yxMap.put("禁用", null);
yxMap.put("删除营销素材", null);
//朋友圈营销Map
/*Map<String, String> pyqMap = new HashMap<>();
pyqMap.put("编辑朋友圈", "/friendGroup/friendGroupAdd");
pyqMap.put("详情", "/friendGroup/friendGroupDetail");*/
//SOP Map
Map<String, String> sopMap = new HashMap<>();
sopMap.put("创建SOP", "/sop/editSop");
sopMap.put("管理SOP", "/sop/sopList");
sopMap.put("分析SOP", "/sop/sopAnalysisList");
sopMap.put("结束SOP", null);
sopMap.put("编辑SOP", "/sop/editSop");
//人群 Map
/*Map<String, String> rqMap = new HashMap<>();
rqMap.put("查看详情", "/crowdManage/crowdDetail/:id");
rqMap.put("新建人群", "/crowdManage/crowdAdd");
rqMap.put("客户列表", "/clientDataOverview/group/:id/:crowdType");*/
//审批配置 Map
/*Map<String, String> spMap = new HashMap<>();
spMap.put("审批模板创建指引", "/approvalConfig/createGuide");*/
//基本信息
Map<String, String> jbMap = new HashMap<>();
jbMap.put("修改企业信息", "/baseInfo/editInfo");
List<ProductDTO> dtos = new ArrayList<>();
for (String s : list) {
List<ProductDTO.FunctionDTO> functionDTOList = new ArrayList<>();
ProductDTO dto = new ProductDTO();
dto.setProductName(s);
List<ProductDTO.MenuDTO> menuDTOS = new ArrayList<>();
dto.setMenuDTOS(menuDTOS);
ProductDTO.MenuDTO oriMenu = new ProductDTO.MenuDTO();
oriMenu.setMenuName("营销转化");
oriMenu.setType("Y");
/*ProductDTO.MenuDTO oriMenu1 = new ProductDTO.MenuDTO();
oriMenu1.setMenuName("客户管理");
oriMenu1.setType("Y");*/
/*ProductDTO.MenuDTO oriMenu2 = new ProductDTO.MenuDTO();
oriMenu2.setMenuName("系统设置");
oriMenu2.setType("Y");*/
ProductDTO.MenuDTO oriMenu3 = new ProductDTO.MenuDTO();
oriMenu3.setMenuName("基本信息");
oriMenu3.setType("Y");
//营销素材 菜单
ProductDTO.MenuDTO addYxMenu = new ProductDTO.MenuDTO();
addYxMenu.setMenuName("营销素材");
addYxMenu.setType("N");
addYxMenu.setParentName(oriMenu.getMenuName());
addYxMenu.setIsSpecial((byte)1);
addYxMenu.setMenuUrl("/material/index");
addYxMenu.setOwnedCusgroupType(4);
addYxMenu.setOwnedCusgroupValue("2");
//营销素材 功能
yxMap.forEach((k, v) -> {
ProductDTO.FunctionDTO f1 = new ProductDTO.FunctionDTO();
f1.setMenuName(addYxMenu.getMenuName());
f1.setFunctionName(k);
f1.setFunctionAttributeName(v);
f1.setFunctionType(3);
f1.setOwnedCusgroupType(4);
f1.setOwnedCusgroupValue("2");
functionDTOList.add(f1);
});
//朋友圈营销 菜单
/*ProductDTO.MenuDTO addPYQYXMenu = new ProductDTO.MenuDTO();
addPYQYXMenu.setMenuName("朋友圈营销-脚本");
addPYQYXMenu.setType("N");
addPYQYXMenu.setParentName(oriMenu.getMenuName());
addPYQYXMenu.setIsSpecial((byte)1);
addPYQYXMenu.setMenuUrl("/friendGroup/index");
addPYQYXMenu.setOwnedCusgroupType(4);
addPYQYXMenu.setOwnedCusgroupValue("2");*/
//朋友圈营销 功能
/*pyqMap.forEach((k, v) -> {
ProductDTO.FunctionDTO f = new ProductDTO.FunctionDTO();
f.setMenuName(addPYQYXMenu.getMenuName());
f.setFunctionName(k);
f.setFunctionAttributeName(v);
f.setFunctionType(3);
f.setOwnedCusgroupType(4);
f.setOwnedCusgroupValue("2");
functionDTOList.add(f);
});*/
//营销SOP 菜单
ProductDTO.MenuDTO addSOPMenu = new ProductDTO.MenuDTO();
addSOPMenu.setMenuName("营销SOP");
addSOPMenu.setType("N");
addSOPMenu.setParentName(oriMenu.getMenuName());
addSOPMenu.setIsSpecial((byte)1);
addSOPMenu.setMenuUrl("/sop/index");
addSOPMenu.setOwnedCusgroupType(4);
addSOPMenu.setOwnedCusgroupValue("2");
//营销SOP 功能
sopMap.forEach((k, v) -> {
ProductDTO.FunctionDTO f = new ProductDTO.FunctionDTO();
f.setMenuName(addSOPMenu.getMenuName());
f.setFunctionName(k);
f.setFunctionAttributeName(v);
f.setFunctionType(3);
f.setOwnedCusgroupType(4);
f.setOwnedCusgroupValue("2");
functionDTOList.add(f);
});
//人群管理 菜单
/*ProductDTO.MenuDTO addRQMenu = new ProductDTO.MenuDTO();
addRQMenu.setMenuName("人群管理");
addRQMenu.setType("N");
addRQMenu.setParentName(oriMenu1.getMenuName());
addRQMenu.setIsSpecial((byte)1);
addRQMenu.setMenuUrl("/crowdManage/index");
addRQMenu.setOwnedCusgroupType(4);
addRQMenu.setOwnedCusgroupValue("2");
//人群管理 功能
rqMap.forEach((k, v) -> {
ProductDTO.FunctionDTO f = new ProductDTO.FunctionDTO();
f.setMenuName(addRQMenu.getMenuName());
f.setFunctionName(k);
f.setFunctionAttributeName(v);
f.setFunctionType(3);
f.setOwnedCusgroupType(4);
f.setOwnedCusgroupValue("2");
functionDTOList.add(f);
});*/
//审批配置 菜单
/*ProductDTO.MenuDTO addSPMenu = new ProductDTO.MenuDTO();
addSPMenu.setMenuName("审批配置");
addSPMenu.setType("N");
addSPMenu.setParentName(oriMenu2.getMenuName());
addSPMenu.setIsSpecial((byte)1);
addSPMenu.setMenuUrl("/approvalConfig/index");
addSPMenu.setOwnedCusgroupType(4);
addSPMenu.setOwnedCusgroupValue("2");*/
//审批配置 功能
/*spMap.forEach((k, v) -> {
ProductDTO.FunctionDTO f = new ProductDTO.FunctionDTO();
f.setMenuName(addSPMenu.getMenuName());
f.setFunctionName(k);
f.setFunctionAttributeName(v);
f.setFunctionType(3);
f.setOwnedCusgroupType(4);
f.setOwnedCusgroupValue("2");
functionDTOList.add(f);
});*/
//基本信息 功能
jbMap.forEach((k, v) -> {
ProductDTO.FunctionDTO f = new ProductDTO.FunctionDTO();
f.setMenuName(oriMenu3.getMenuName());
f.setFunctionName(k);
f.setFunctionAttributeName(v);
f.setFunctionType(3);
f.setOwnedCusgroupType(4);
f.setOwnedCusgroupValue("1,2");
functionDTOList.add(f);
});
dto.setFunctionDTOList(functionDTOList);
menuDTOS.add(oriMenu);
//menuDTOS.add(oriMenu1);
//menuDTOS.add(oriMenu2);
menuDTOS.add(oriMenu3);
menuDTOS.add(addYxMenu);
//menuDTOS.add(addPYQYXMenu);
menuDTOS.add(addSOPMenu);
//menuDTOS.add(addRQMenu);
//menuDTOS.add(addSPMenu);
dtos.add(dto);
}
System.out.println(JSON.toJSONString(dtos));
}
}
package cn.com.glsx.merchants.util;
import lombok.Data;
import java.util.List;
/**
* 分页对象
*/
@Data
public class Pagination<T> {
private Integer pageSize;
private Integer pageNum;
private Integer count;
private List<T> data;
}
package cn.com.glsx.merchants.util;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @ClassName ScorePagination
* @Description 积分分页对象
* @Author lichongyuan
* @Date 2022/10/12
*/
@Data
public class ScorePagination<T> extends Pagination<T> {
@ApiModelProperty(example = "累计发放奖励")
private String totalScore;
}
package cn.com.glsx.merchants.util;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
/**
* @ClassName WithdrawalPagination
* @Description 提现分页对象
* @Author lichongyuan
* @Date 2022/10/12
*/
@Data
public class WithdrawalPagination<T> extends Pagination<T> {
@ApiModelProperty(example = "累计金额")
private String totalAmount;
@ApiModelProperty(example = "待审核")
private String reviewingAmount;
@ApiModelProperty(example = "到账中")
private String receivingAmount;
@ApiModelProperty(example = "已到账")
private String receivedAmount;
@ApiModelProperty(example = "到账失败")
private String failureAmount;
}
# framework-archetype-rop
开放平台项目骨架
一、项目结构说明:
└─src
├─main
├─java
├─cn.com.glsx.merchants.config 配置层
├─cn.com.glsx.merchants.controller 控制层
├─cn.com.glsx.merchants.request 请求实体
├─cn.com.glsx.merchants.response 响应实体
└─cn.com.glsx.merchants.Main.java 程序入口
├─resources 资源文件目录
├─config
└─application.properties 应用配置文件
└─logback.xml 日志配置文件
└─webapp web前端文件目录
└─WEB-INF
└─bin shell脚本文件(包含启动、停止、重启等)
└─test 测试目录
├─java
└─cn.com.glsx.merchants 测试代码
└─resources 测试资源目录
└─pom.xml pom文件
二、使用说明:
1、运行项目前需在配置中心创建配置信息,配置内容参考三配置说明:
1.1> dataId : application.properties --> ore.diamond.dataId + ore.diamond.env
1.2> group : application.properties --> ore.diamond.group
1.3> content : 参考三配置说明
三、配置说明:
#----------------------------------------------------------------------------------------------------------
# dubbo配置(调用dubbo服务需配置)
# dubbo应用名称
ore.dubbo.application.name=gop-merchants
# dubbo应用所有者
ore.dubbo.application.owner=deployer name
# dubbo服务注册地址
ore.dubbo.registry.address=zookeeper://192.168.3.206:2181
# dubbo服务注册超时时间
ore.dubbo.registry.timeout=30000
# 默认协议:dubbo
ore.dubbo.protocol.name=dubbo
# dubbo服务扫描包路径
ore.dubbo.scan=cn.com.glsx.merchants
# dubbo服务监控
ore.dubbo.monitor.protocol=registry
# dubbo服务统计
ore.dubbo.consumer.filter=metrics
#----------------------------------------------------------------------------------------------------------
# rop 注解驱动配置
ore.rop.annotation-driven.thread-ferry-class=
ore.rop.annotation-driven.sign-enable=true
ore.rop.annotation-driven.ext-error-base-name=i18n/rop/sampleRopError
ore.rop.annotation-driven.core-pool-size=200
ore.rop.annotation-driven.max-pool-size=500
ore.rop.annotation-driven.keep-alive-seconds=300
ore.rop.annotation-driven.queue-capacity=50
ore.rop.annotation-driven.service-timeout-seconds=120
# 文件上传大小限制
ore.rop.annotation-driven.upload-file-max-size=9999999
# 文件上传支持的文件格式
ore.rop.annotation-driven.upload-file-types=png,gif,jpg
ore.rop.annotation-driven.formatting-conversion-service=
# 默认本地Map缓存会话,只支持单节点
ore.rop.annotation-driven.session-manager=
# 配置为ropSessionManager,则采用Redis缓存会话,支持集群(另外需要增加redis配置)
#ore.rop.annotation-driven.session-manager=ropSessionManager
ore.rop.annotation-driven.app-secret-manager=
ore.rop.annotation-driven.service-access-controller=
ore.rop.annotation-driven.invoke-times-controller=
# rop 系统参数配置
ore.rop.sysparams.appkey-param-name=appKey
ore.rop.sysparams.sessionid-param-name=sessionId
ore.rop.sysparams.method-param-name=method
ore.rop.sysparams.version-param-name=v
ore.rop.sysparams.format-param-name=format
ore.rop.sysparams.locale-param-name=locale
ore.rop.sysparams.sign-param-name=sign
ore.rop.sysparams.jsonp-param-name=jsonp
# 会话过期时间,默认1800秒
#rop.session.timeout=1800
# 开启跨域
ore.adapter.cross-domain=true
# 允许跨域域名,多个以英文逗号分隔
ore.adapter.allowed-origins=http://ip:port
# rop 秘钥对(appKey=secret)
48e5e13229b82c1b4e6e8c96151f0637=c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b
#----------------------------------------------------------------------------------------------------------
# redis缓存
ore.redis.hostName=192.168.0.100
ore.redis.port=6379
ore.redis.password=
ore.redis.pool.maxActive=600
ore.redis.pool.maxWait=10000
ore.redis.pool.maxTotal=300
ore.redis.pool.maxIdle=300
ore.redis.pool.minIdle=0
ore.redis.timeout=30000
# 逐出扫描的时间间隔(毫秒) 如果为负数,则不运行逐出线程, 默认-1
ore.redis.betweenEvictionRunsMillis=30000
#----------------------------------------------------------------------------------------------------------
# rop swagger配置
# 是否启用swagger-rop,默认为true(生产环境不开启)
swagger.rop.enable=true
# rop 接口 appKey,默认48e5e13229b82c1b4e6e8c96151f0637
swagger.rop.appKey=48e5e13229b82c1b4e6e8c96151f0637
# rop 接口 secret,默认c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b
swagger.rop.secret=c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b
┌------------------------------------------------------------┐
使用说明:
1、接口方法上添加Swagger注解@ApiOperation(value = "查询**", notes = "根据**查询**", httpMethod="GET")[非必须]
2、接口参数属性添加Swagger注解@ApiModelProperty(value = "参数名称", required=true)[非必须]
└------------------------------------------------------------┘
# rop swagger api访问地址(v2版本界面)
http://localhost:rop server port/gop-merchants/swagger-ui/v2/index.html
# rop swagger api访问地址(v3版本界面)
http://localhost:rop server port/gop-merchants/swagger-ui/v3/index.html
#----------------------------------------------------------------------------------------------------------
# 分布式文件系统FastDFS配置
# tracker服务地址列表(格式ip1:host1,ip2:host2......)
ore.fastdfs.tracker-servers=common.fdfs.glsx.com:22122
# 文件访问域名
ore.fastdfs.server-url=http://qcimg01.glsx.net:7060/
┌------------------------------------------------------------┐
使用说明:
1、在pom中添加如下依赖
<dependency>
<groupId>org.oreframework.boot</groupId>
<artifactId>ore-boot-starter-fastdfs</artifactId>
</dependency>
2、注入调用客户端
@Autowired
private DefaultFastDFSClient fastDFSClient;
3、调用上传
String fastDFSClient.uploadFile(byte[] fileContent, String extName)
└------------------------------------------------------------┘
\ No newline at end of file \ No newline at end of file
server.port=8082
server.servlet.context-path=/rop-merchants
server.servlet.application-display-name=rop-merchants
logging.config=classpath:logback.xml
logging.path=/data/java_log/jetty/rop-merchants/rop-merchants.log
logging.level.root=INFO
ore.starter.class-name=Main
# diamond config
ore.diamond.group=common-service
ore.diamond.dataId=rop-merchants
ore.diamond.env=release
<?xml version="1.0" encoding="UTF-8" ?>
<configuration scan="true" scanPeriod="60 seconds" debug="false">
<property resource="config/application.properties" />
<property name="APP_NAME" value="${server.display-name}" />
<property name="LOG_PATH" value="${logging.path}" />
<property name="LOG_LEVEL" value="${logging.level}" />
<contextName>${APP_NAME}</contextName>
<turboFilter class="org.oreframework.boot.logging.logback.OreBootTurboFilter">
<Marker>oreframework</Marker>
</turboFilter>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="org.oreframework.commons.log.OrePatternLayout">
<pattern>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [${APP_NAME}] [%traceid] [%thread] %-5level [%logger{36}.%method %line] - %msg%n</pattern>
</pattern>
</layout>
</appender>
<appender name="FILE"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- <Encoding> Label Old version of this label can not be used -->
<!-- <Encoding>UTF-8</Encoding> -->
<File>${LOG_PATH}</File>
<!-- <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> -->
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<FileNamePattern>${LOG_PATH}.%d{yyyy-MM-dd}.%i</FileNamePattern>
<MaxHistory>15</MaxHistory>
<maxFileSize>200MB</maxFileSize>
</rollingPolicy>
<layout class="org.oreframework.commons.log.OrePatternLayout">
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [${APP_NAME}] [%traceid] [%thread] %-5level [%logger{36}.%method %line] - %msg%n</pattern>
</layout>
<!-- 根据文件大小滚动,不支持 SizeBasedTriggeringPolicy 这种配置-->
<!-- <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
<MaxFileSize>200MB</MaxFileSize>
</triggeringPolicy> -->
</appender>
<root level="${LOG_LEVEL}">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>
\ No newline at end of file \ No newline at end of file
#!/bin/bash
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/classes
SERVER_NAME=`sed '/application.name/!d;s/.*=//' classes/config/application.properties | tr -d '\r'`
#LOGS_FILE=`sed '/log4j.appender.logToFile.File/!d;s/.*=//' classes/log4j.properties | tr -d '\r'`
LOGS_FILE=`sed '/name="LOG_PATH"/!d;s/.*value="\(.*\)".*/\1/g' classes/logback.xml`
if [ -z "$SERVER_NAME" ]; then
SERVER_NAME=`hostname`
fi
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$CONF_DIR" |awk '{print $2}'`
if [ -z "$PIDS" ]; then
echo "ERROR: The $SERVER_NAME does not started!"
exit 1
fi
LOGS_DIR=""
if [ -n "$LOGS_FILE" ]; then
LOGS_DIR=`dirname $LOGS_FILE`
else
LOGS_DIR=$DEPLOY_DIR/logs
fi
if [ ! -d $LOGS_DIR ]; then
mkdir $LOGS_DIR
fi
DUMP_DIR=$LOGS_DIR/dump
if [ ! -d $DUMP_DIR ]; then
mkdir $DUMP_DIR
fi
DUMP_DATE=`date +%Y%m%d%H%M%S`
DATE_DIR=$DUMP_DIR/$DUMP_DATE
if [ ! -d $DATE_DIR ]; then
mkdir $DATE_DIR
fi
echo -e "Dumping the $SERVER_NAME ...\c"
for PID in $PIDS ; do
jstack $PID > $DATE_DIR/jstack-$PID.dump 2>&1
echo -e ".\c"
jinfo $PID > $DATE_DIR/jinfo-$PID.dump 2>&1
echo -e ".\c"
jstat -gcutil $PID > $DATE_DIR/jstat-gcutil-$PID.dump 2>&1
echo -e ".\c"
jstat -gccapacity $PID > $DATE_DIR/jstat-gccapacity-$PID.dump 2>&1
echo -e ".\c"
jmap $PID > $DATE_DIR/jmap-$PID.dump 2>&1
echo -e ".\c"
jmap -heap $PID > $DATE_DIR/jmap-heap-$PID.dump 2>&1
echo -e ".\c"
jmap -histo $PID > $DATE_DIR/jmap-histo-$PID.dump 2>&1
echo -e ".\c"
if [ -r /usr/sbin/lsof ]; then
/usr/sbin/lsof -p $PID > $DATE_DIR/lsof-$PID.dump
echo -e ".\c"
fi
done
if [ -r /bin/netstat ]; then
/bin/netstat -an > $DATE_DIR/netstat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/iostat ]; then
/usr/bin/iostat > $DATE_DIR/iostat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/mpstat ]; then
/usr/bin/mpstat > $DATE_DIR/mpstat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/vmstat ]; then
/usr/bin/vmstat > $DATE_DIR/vmstat.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/free ]; then
/usr/bin/free -t > $DATE_DIR/free.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/sar ]; then
/usr/bin/sar > $DATE_DIR/sar.dump 2>&1
echo -e ".\c"
fi
if [ -r /usr/bin/uptime ]; then
/usr/bin/uptime > $DATE_DIR/uptime.dump 2>&1
echo -e ".\c"
fi
echo "OK!"
echo "DUMP: $DATE_DIR"
#!/bin/bash
ENV=$1
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
cd `dirname $0`
./stop.sh
./start.sh $ENV
\ No newline at end of file \ No newline at end of file
#!/bin/bash
cd `dirname $0`
if [ "$1" = "start" ]; then
ENV=$2
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
./start.sh $ENV
else
if [ "$1" = "stop" ]; then
./stop.sh
else
if [ "$1" = "debug" ]; then
ENV=$2
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
./start.sh $ENV debug
else
if [ "$1" = "restart" ]; then
ENV=$2
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
./restart.sh $ENV
else
if [ "$1" = "dump" ]; then
./dump.sh
else
echo "ERROR: Please input argument: start or stop or debug or restart or dump"
exit 1
fi
fi
fi
fi
fi
#!/bin/bash
JAVA_HOME="/app/soft/jdk1.8.0_20"
ENV=$1
if [ -z "$ENV" ]; then
echo "ERROR:PLEASE SPEC ENV ARGS,SUCH AS dev,test,beta,release.. "
echo "app exit"
exit 1
fi
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/classes
SERVER_NAME=`sed '/server.display-name/!d;s/.*=//' classes/config/application.properties | tr -d '\r'`
SERVER_PORT=`sed '/server.port/!d;s/.*=//' classes/config/application.properties | tr -d '\r'`
LOGS_FILE=`sed '/logging.path/!d;s/.*=//' classes/config/application.properties | tr -d '\r'`
if [ -z "$SERVER_NAME" ]; then
SERVER_NAME=`hostname`
fi
echo "server name is $SERVER_NAME"
echo "server port is $SERVER_PORT"
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$CONF_DIR" |awk '{print $2}'`
if [ -n "$PIDS" ]; then
echo "ERROR: The $SERVER_NAME already started!"
echo "PID: $PIDS"
exit 1
fi
if [ -n "$SERVER_PORT" ]; then
SERVER_PORT_COUNT=`netstat -tln | grep $SERVER_PORT | wc -l`
if [ $SERVER_PORT_COUNT -gt 0 ]; then
echo "ERROR: The $SERVER_NAME port $SERVER_PORT already used!"
exit 1
fi
fi
LOGS_DIR=""
if [ -n "$LOGS_FILE" ]; then
LOGS_DIR=`dirname $LOGS_FILE`
else
LOGS_DIR=$DEPLOY_DIR/logs
fi
if [ ! -d $LOGS_DIR ]; then
mkdir $LOGS_DIR
fi
STDOUT_FILE=$LOGS_DIR/stdout.log
LIB_DIR=$DEPLOY_DIR/lib
LIB_JARS=`ls $LIB_DIR|grep .jar|awk '{print "'$LIB_DIR'/"$0}'|tr "\n" ":"`
JAVA_OPTS=" -Djava.awt.headless=true -Djava.net.preferIPv4Stack=true "
JAVA_DEBUG_OPTS=""
if [ "$2" = "debug" ]; then
JAVA_DEBUG_OPTS=" -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n "
fi
JAVA_JMX_OPTS=""
if [ "$2" = "jmx" ]; then
JAVA_JMX_OPTS=" -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false "
fi
JAVA_MEM_OPTS=""
BITS=`file $JAVA_HOME/bin/java | grep 64-bit`
if [ -n "$BITS" ]; then
JAVA_MEM_OPTS=" -server -Xmx1g -Xms1g -Xmn256m -XX:PermSize=128m -Xss256k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSCompactAtFullCollection -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 "
else
JAVA_MEM_OPTS=" -server -Xms1024m -Xmx1024m -XX:PermSize=128m -XX:SurvivorRatio=2 -XX:+UseParallelGC "
fi
echo -e "Starting the $SERVER_NAME ...\c"
nohup $JAVA_HOME/bin/java $JAVA_OPTS $JAVA_MEM_OPTS $JAVA_DEBUG_OPTS $JAVA_JMX_OPTS -classpath $CONF_DIR:$LIB_JARS org.oreframework.boot.bootstrap.OreBootApplication env=$ENV > $STDOUT_FILE 2>&1 &
COUNT=0
while [ $COUNT -lt 1 ]; do
echo -e ".\c"
sleep 1
if [ -n "$SERVER_PORT" ]; then
COUNT=`netstat -an | grep $SERVER_PORT | wc -l`
else
COUNT=`ps --no-heading -C java -f --width 1000 | grep "$DEPLOY_DIR" | awk '{print $2}' | wc -l`
fi
if [ $COUNT -gt 0 ]; then
break
fi
done
echo "OK!"
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$DEPLOY_DIR" | awk '{print $2}'`
echo "PID: $PIDS"
echo "STDOUT: $STDOUT_FILE"
#!/bin/bash
cd `dirname $0`
BIN_DIR=`pwd`
cd ..
DEPLOY_DIR=`pwd`
CONF_DIR=$DEPLOY_DIR/classes
SERVER_NAME=`sed '/application.name/!d;s/.*=//' classes/config/application.properties | tr -d '\r'`
if [ -z "$SERVER_NAME" ]; then
SERVER_NAME=`hostname`
fi
PIDS=`ps --no-heading -C java -f --width 1000 | grep "$CONF_DIR" |awk '{print $2}'`
if [ -z "$PIDS" ]; then
echo "ERROR: The $SERVER_NAME does not started!"
exit 1
fi
#if [ "$1" != "skip" ]; then
#$BIN_DIR/dump.sh
#fi
echo -e "Stopping the $SERVER_NAME ...\c"
for PID in $PIDS ; do
kill $PID > /dev/null 2>&1
done
COUNT=0
while [ $COUNT -lt 1 ]; do
echo -e ".\c"
sleep 1
COUNT=1
for PID in $PIDS ; do
PID_EXIST=`ps --no-heading -p $PID`
if [ -n "$PID_EXIST" ]; then
COUNT=0
break
fi
done
done
echo "OK!"
echo "PID: $PIDS"
package cn.com.glsx.merchants;
import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;
/**
* @Title: IpConfiguration.java
* @Description:
* @author Alvin
* @date 2019年9月3日 上午11:05:17
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@Component
public class IpConfiguration implements ApplicationListener<WebServerInitializedEvent> {
private int serverPort;
@Override
public void onApplicationEvent(WebServerInitializedEvent event) {
serverPort = event.getWebServer().getPort();
}
public int getPort(){
return serverPort;
}
}
package cn.com.glsx.merchants.controller;
import java.net.URI;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.commons.lang.StringUtils;
import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.DefaultUriBuilderFactory;
import org.springframework.web.util.UriBuilder;
import cn.com.glsx.merchants.IpConfiguration;
import com.rop.utils.RopUtils;
/**
* @author Alvin
* @version V1.0
* @Title: BaseControllerTest.java
* @Description:
* @date 2019年9月3日 上午9:32:12
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class BaseControllerTest {
String url = "http://localhost:";
@Value("${server.servlet.context-path}")
String contextPath;
@Autowired
private IpConfiguration ip;
final String appKey = "48e5e13229b82c1b4e6e8c96151f0637";
final String secret = "c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b";
@Before
public void setUp() {
url = url.concat(String.valueOf(ip.getPort())).concat(contextPath).concat("/router");
}
public String get(MultiValueMap<String, String> paramsMap) throws Exception {
return get(paramsMap, String.class);
}
public <T> T get(MultiValueMap<String, String> paramsMap, Class<T> responseType) throws Exception {
MultiValueMap<String, String> params = getSysParams();
params.putAll(paramsMap);
for (Entry<String, String> entry : params.toSingleValueMap().entrySet()) {
if (StringUtils.isEmpty(entry.getValue())) {
params.remove(entry.getKey());
}
}
String sign = RopUtils.sign(params.toSingleValueMap(), secret);
params.add("sign", sign);
RestTemplate rest = new RestTemplate();
RopUriTemplateHandler uriTemplateHandler = new RopUriTemplateHandler(url);
uriTemplateHandler.setDefaultUriVariables(params.toSingleValueMap());
rest.setUriTemplateHandler(uriTemplateHandler);
return rest.getForObject(url, responseType, params.toSingleValueMap());
}
public String getByHeader(MultiValueMap<String, String> paramsMap) throws Exception {
MultiValueMap<String, String> params = getSysParams();
params.putAll(paramsMap);
for (Entry<String, String> entry : params.toSingleValueMap().entrySet()) {
if (StringUtils.isEmpty(entry.getValue())) {
params.remove(entry.getKey());
}
}
String sign = RopUtils.sign(params.toSingleValueMap(), secret);
RestTemplate rest = new RestTemplate();
RopUriTemplateHandler uriTemplateHandler = new RopUriTemplateHandler(url);
uriTemplateHandler.setDefaultUriVariables(params.toSingleValueMap());
rest.setUriTemplateHandler(uriTemplateHandler);
url=url+"?"+getUrlParamsByMap(params);
HttpHeaders headers = new HttpHeaders();
headers.add("TGT", "1aaf2f5b-bbdf-42b3-83bb-fd3992f0e7e7");
String s = rest.postForObject(url, new HttpEntity<String>(headers), String.class);
return s;
}
public static String getUrlParamsByMap(MultiValueMap<String, String> map) {
if (map == null) {
return "";
}
StringBuffer sb = new StringBuffer();
for (Entry<String, String> entry : map.toSingleValueMap().entrySet()) {
sb.append(entry.getKey() + "=" + entry.getValue());
sb.append("&");
}
String s = sb.toString();
if (s.endsWith("&")) {
s = s.substring(0, s.length() - 1);
}
return s;
}
public String post(MultiValueMap<String, String> paramsMap) throws Exception {
return post(paramsMap, String.class);
}
public <T> T post(MultiValueMap<String, String> paramsMap, Class<T> responseType) throws Exception {
MultiValueMap<String, String> params = getSysParams();
params.putAll(paramsMap);
for (Entry<String, String> entry : params.toSingleValueMap().entrySet()) {
if (StringUtils.isEmpty(entry.getValue())) {
params.remove(entry.getKey());
}
}
String sign = RopUtils.sign(params.toSingleValueMap(), secret);
params.add("sign", sign);
return new RestTemplate().postForObject(url, params, responseType);
}
public String upload(MultiValueMap<String, String> paramsMap, MultiValueMap<String, String> fileParamsMap) throws Exception {
return upload(paramsMap, fileParamsMap, String.class);
}
public <T> T upload(MultiValueMap<String, String> paramsMap, MultiValueMap<String, String> fileParamsMap, Class<T> responseType) throws Exception {
MultiValueMap<String, String> params = getSysParams();
params.putAll(paramsMap);
for (Entry<String, String> entry : params.toSingleValueMap().entrySet()) {
if (StringUtils.isEmpty(entry.getValue())) {
params.remove(entry.getKey());
}
}
String sign = RopUtils.sign(params.toSingleValueMap(), secret);
params.add("sign", sign);
params.putAll(fileParamsMap);
return new RestTemplate().postForObject(url, params, responseType);
}
public MultiValueMap<String, String> getSysParams() {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(16);
params.add("appKey", appKey);
params.add("format", "json");
return params;
}
class RopUriTemplateHandler extends DefaultUriBuilderFactory {
public RopUriTemplateHandler(String baseUriTemplate) {
super(baseUriTemplate);
}
@Override
public URI expand(String uriTemplate, Map<String, ?> uriVars) {
UriBuilder builder = uriString(uriTemplate);
if (uriVars != null && !uriVars.isEmpty()) {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>();
for (Entry<String, ?> entry : uriVars.entrySet()) {
params.add(entry.getKey(), entry.getValue().toString());
}
builder.queryParams(params);
}
return builder.build(uriVars);
}
}
}
package cn.com.glsx.merchants.controller;
import java.net.URL;
import java.util.Base64;
import cn.com.glsx.merchants.model.request.MerchantRequest;
import cn.com.glsx.merchants.remote.MerchantRemote;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import com.rop.request.UploadFile;
/**
* @Title: ExampleControllerTest.java
* @Description:
* @author Alvin
* @date 2019年9月3日 上午9:33:00
* @version V1.0
* @Company: didihu.com.cn
* @Copyright Copyright (c) 2018
*/
public class ExampleControllerTest extends BaseControllerTest {
@Autowired
private MerchantRemote merchantRemote;
@Test
public void testGetExample() throws Exception{
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "merchants.api.example");
params.add("name", "alvin");
System.out.println(get(params));
}
@Test
public void testPostExample() throws Exception{
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "merchants.api.example");
params.add("name", "alvin");
System.out.println(post(params));
}
@Test
public void testComplexRequest() throws Exception{
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "merchants.api.example.complex");
params.add("name", "alvin");
params.add("age", "18");
params.add("data", "18");
params.add("hobby[0]", "编程");
params.add("hobby[1]", "打球");
params.add("address.province", "广东省");
params.add("address.city", "深圳市");
params.add("address.area", "南山区");
params.add("workExperiences[0].company", "深圳广联赛讯股份有限公司");
params.add("workExperiences[0].address.province", "广东省");
params.add("workExperiences[0].address.city", "深圳市");
params.add("workExperiences[0].address.streets[0].no", "3370号");
params.add("workExperiences[0].address.streets[0].name", "留仙大道");
params.add("workExperiences[0].startTime", "2010-11-11 00:00:00");
params.add("workExperiences[0].endTime", "2020-11-11 00:00:00");
System.out.println(post(params));
}
@Test
public void testUpload() throws Exception{
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "merchants.api.example.upload");
ClassPathResource resource = new ClassPathResource("logo.png");
UploadFile uploadFile = new UploadFile(resource.getFile());
MultiValueMap<String, String> fileParams = new LinkedMultiValueMap<String, String>(4);
fileParams.add("file", "png@" + Base64.getEncoder().encodeToString(uploadFile.getContent()));
System.out.println(upload(params, fileParams));
}
@Test
public void test() throws Exception{
MerchantRequest merchantRequest=new MerchantRequest();
merchantRequest.setSource("OP");
System.out.println(merchantRemote.findAllMerchantRemote(merchantRequest));
}
}
package cn.com.glsx.merchants.controller;/**
* @author zhouhaibao
* @date 2021/7/28
*/
import cn.com.glsx.merchants.enums.StaffDepartmentEnum;
import com.alibaba.fastjson.JSONObject;
import org.junit.Test;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import javax.xml.crypto.Data;
/**
* @author zhouhaibao
* @version 1.0
* @description: TODO
* @date 2021/7/28 15:59
*/
public class StaffControllerTest extends BaseControllerTest {
@Test
public void Test01() throws Exception{
System.out.println(StaffDepartmentEnum.getDepartmentName(2));
}
@Test
public void testGetExample() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "merchants.api.staff.saveStaff");
params.add("name", "alvin");
params.add("staffName", "贤心");
params.add("staffJob", "jkl");
params.add("password", "3");
params.add("visibleInferiorMer", "1");
params.add("staffPhone", "18873336682");
params.add("merchantId", "31");
params.add("staffEmail", "952643348@qq.com");
params.add("roleIds[0]", "342");
MultiValueMap<String, String> newa = new LinkedMultiValueMap<String, String>(4);
newa.add("fileUrl", "http://jhjhjhhj");
newa.add("fileName", "dfdfddssd");
params.add("merchantFileRequest", JSONObject.toJSONString(newa));
System.out.println(post(params));
}
@Test
public void testPostExample() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(4);
params.add("v", "1.0.0");
params.add("method", "merchants.api.staff.saveStaff");
params.add("name", "alvin");
params.add("staffName", "贤心");
params.add("staffJob", "jkl");
params.add("password", "3");
params.add("visibleInferiorMer", "1");
params.add("staffPhone", "18873336682");
params.add("merchantId", "31");
params.add("staffEmail", "952643348@qq.com");
params.add("roleIds[0]", "342");
System.out.println(post(params));
}
@Test
public void testMerchantListPage() throws Exception {
MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>(10);
params.add("v", "1.0.0");
params.add("method", "merchants.api.open.findMerchantListByPage");
params.add("merchantAccountLevel[0]", "2");
params.add("merchantAccountLevel[1]", "3");
params.add("accounttypeId[0]","6");
params.add("channelType","1");
params.add("pageSize","10");
params.add("pageNum","1");
System.out.println(post(params));
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!