You've already forked FrameTour-BE
Compare commits
63 Commits
1059d30c21
...
52649e4e77
Author | SHA1 | Date | |
---|---|---|---|
52649e4e77 | |||
7f2c2ef22e | |||
f981791039 | |||
29f142f53f | |||
9f6a75cd50 | |||
762962512d | |||
aaf0eed197 | |||
00fbeedc56 | |||
5202ec3be1 | |||
d33aec9d4b | |||
fcde865a2d | |||
5b8d18d913 | |||
0275f4ca3b | |||
76b48e3071 | |||
5a85d2418d | |||
72d3530942 | |||
9e92be78ff | |||
68df668c00 | |||
ac99ede4b1 | |||
6f4c7f605a | |||
41269572c7 | |||
f797479515 | |||
9ed254c920 | |||
05412b2abf | |||
2a7b8664f8 | |||
d052ecbcdd | |||
c97c680ca9 | |||
91867300ed | |||
fe24c563a0 | |||
5942a9b728 | |||
a3bc9357b5 | |||
a96d9df7e6 | |||
0471d21e28 | |||
8b7e349d1c | |||
63f877535b | |||
bbf55e4e3e | |||
d4783c2a8f | |||
79906fbdef | |||
136445802d | |||
3cab5e531d | |||
fa481d52bb | |||
93c74e181a | |||
9a6a90b58e | |||
0ca7cd694e | |||
4d2a962bc6 | |||
f8de4abd09 | |||
563d83f849 | |||
74a8953c8f | |||
c72d598d4a | |||
1c443e136b | |||
554cd56c05 | |||
aa5f61f488 | |||
ed0397e9ca | |||
17b8ca110b | |||
e9f44dd851 | |||
1a1eb79914 | |||
587c9de5b2 | |||
727c9bacfa | |||
f0fd0db313 | |||
1282e175a1 | |||
49b750e1af | |||
eb61058fd1 | |||
477554cb35 |
3
.gitignore
vendored
3
.gitignore
vendored
@@ -2,4 +2,5 @@
|
||||
logs/
|
||||
target/
|
||||
|
||||
.claude
|
||||
.claude
|
||||
.vscode
|
105
pom.xml
105
pom.xml
@@ -19,21 +19,30 @@
|
||||
<java.version>21</java.version>
|
||||
<maven.compiler.source>21</maven.compiler.source>
|
||||
<maven.compiler.target>21</maven.compiler.target>
|
||||
<spring.cloud.alibaba.version>2023.0.1.2</spring.cloud.alibaba.version>
|
||||
<spring.cloud.version>2023.0.3</spring.cloud.version>
|
||||
<hutool-all.version>5.8.24</hutool-all.version>
|
||||
<mysql-connector.version>8.0.33</mysql-connector.version>
|
||||
<fastjson.version>1.2.83</fastjson.version>
|
||||
<knife4j-spring-boot-starter.version>2.0.7</knife4j-spring-boot-starter.version>
|
||||
<pagehelper.version>5.3.1</pagehelper.version>
|
||||
<!--跳过单元测试-->
|
||||
<skipTests>true</skipTests>
|
||||
</properties>
|
||||
<!-- OpenTelemetry -->
|
||||
<!-- Dependency Management -->
|
||||
<dependencyManagement>
|
||||
<dependencies>
|
||||
<!-- Spring Cloud BOM -->
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry.instrumentation</groupId>
|
||||
<artifactId>opentelemetry-instrumentation-bom</artifactId>
|
||||
<version>2.16.0</version>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-dependencies</artifactId>
|
||||
<version>${spring.cloud.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<!-- Spring Cloud Alibaba BOM -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-alibaba-dependencies</artifactId>
|
||||
<version>${spring.cloud.alibaba.version}</version>
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
@@ -66,6 +75,41 @@
|
||||
<artifactId>spring-boot-starter-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Nacos服务发现 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Nacos配置中心 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- OpenFeign -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-openfeign</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Spring Cloud Bootstrap -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-bootstrap</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Validation -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 引入redis,并且redis使用jedis连接 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
@@ -74,9 +118,9 @@
|
||||
|
||||
<!-- 引入mysql连接 -->
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>${mysql-connector.version}</version>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
<version>8.3.0</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
|
||||
@@ -123,24 +167,26 @@
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.3.3</version>
|
||||
</dependency>
|
||||
<!-- json处理工具 -->
|
||||
|
||||
<!-- Jackson JSON处理库 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>${fastjson.version}</version>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 引入commons-lang3 工具类 -->
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- 引入接口文档工具 -->
|
||||
<dependency>
|
||||
<groupId>com.github.xiaoymin</groupId>
|
||||
<artifactId>knife4j-spring-boot-starter</artifactId>
|
||||
<version>${knife4j-spring-boot-starter.version}</version>
|
||||
<version>3.18.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- pageHelper -->
|
||||
@@ -169,7 +215,7 @@
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-text</artifactId>
|
||||
<version>1.1</version>
|
||||
<version>1.11.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里云对象存储 -->
|
||||
@@ -210,9 +256,11 @@
|
||||
<version>4.16.19</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 阿里云媒体处理 -->
|
||||
<dependency>
|
||||
<groupId>io.opentelemetry.instrumentation</groupId>
|
||||
<artifactId>opentelemetry-spring-boot-starter</artifactId>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>mts20140618</artifactId>
|
||||
<version>5.0.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
@@ -273,6 +321,17 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>sonatype-nexus-staging</id>
|
||||
<name>Sonatype Nexus Staging</name>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
<releases>
|
||||
<enabled>true</enabled>
|
||||
</releases>
|
||||
<snapshots>
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
</project>
|
||||
|
@@ -3,8 +3,12 @@ package com.ycwl.basic;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
@EnableFeignClients
|
||||
@MapperScan(basePackages = "com.ycwl.basic.mapper")
|
||||
@MapperScan(basePackages = "com.ycwl.basic.*.mapper")
|
||||
public class Application {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package com.ycwl.basic.aspectj;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.ycwl.basic.annotation.IgnoreLogReq;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
@@ -67,10 +67,10 @@ public class RequestParameterAspectj {
|
||||
}
|
||||
|
||||
if (parameterUrlMap.isEmpty()) {
|
||||
LOGGER.info("当前请求的路径为-> {} 请求方式为-> {} 参数为-> {}", requestURI, method, JSON.toJSONString(parameterValueSet));
|
||||
LOGGER.info("当前请求的路径为-> {} 请求方式为-> {} 参数为-> {}", requestURI, method, JacksonUtil.toJSONString(parameterValueSet));
|
||||
} else {
|
||||
LOGGER.info("当前请求的路径为-> {} 请求方式为-> {} 参数为-> {} 路径传参为-> {}", requestURI, method,
|
||||
JSON.toJSONString(parameterValueSet), JSON.toJSONString(parameterUrlMap));
|
||||
JacksonUtil.toJSONString(parameterValueSet), JacksonUtil.toJSONString(parameterUrlMap));
|
||||
}
|
||||
}
|
||||
return joinPoint.proceed();
|
||||
|
@@ -133,8 +133,8 @@ public class OrderBiz {
|
||||
return priceObj;
|
||||
}
|
||||
|
||||
public OrderEntity hasTypeOrder(Long userId, Long scenicId, int orderType, Integer configId) {
|
||||
OrderEntity orderEntity = orderMapper.queryTypeOrder(userId, scenicId, orderType, configId);
|
||||
public OrderEntity hasTypeOrder(Long userId, Long faceId, Long scenicId, int orderType, Integer configId) {
|
||||
OrderEntity orderEntity = orderMapper.queryTypeOrder(userId, faceId, scenicId, orderType, configId);
|
||||
if (orderEntity == null) {
|
||||
return null;
|
||||
}
|
||||
@@ -152,6 +152,9 @@ public class OrderBiz {
|
||||
if (!isBuy) {
|
||||
if (goodsType == 0) {
|
||||
VideoEntity video = videoRepository.getVideo(goodsId);
|
||||
if (video == null) {
|
||||
return respVO;
|
||||
}
|
||||
TaskEntity task = videoTaskRepository.getTaskById(video.getTaskId());
|
||||
Long templateId = video.getTemplateId();
|
||||
// -1为整个模板购买
|
||||
@@ -243,8 +246,9 @@ public class OrderBiz {
|
||||
}
|
||||
});
|
||||
orderRepository.clearOrderCache(orderId); // 更新完了,清理下
|
||||
if (order.getCouponRecordId() != null) {
|
||||
couponBiz.userUseCoupon(order.getMemberId(), order.getFaceId(), order.getCouponRecordId(), orderId);
|
||||
Integer couponRecordId = order.getCouponRecordId();
|
||||
if (couponRecordId != null) {
|
||||
couponBiz.userUseCoupon(order.getMemberId(), order.getFaceId(), couponRecordId, orderId);
|
||||
}
|
||||
|
||||
//支付时间
|
||||
|
@@ -13,7 +13,7 @@ import com.ycwl.basic.repository.FaceRepository;
|
||||
import com.ycwl.basic.repository.PriceRepository;
|
||||
import com.ycwl.basic.repository.ScenicRepository;
|
||||
import com.ycwl.basic.repository.TemplateRepository;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Strings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@@ -72,7 +72,7 @@ public class PriceBiz {
|
||||
String[] goodsIds = priceConfig.getGoodsIds().split(",");
|
||||
return goodsList.stream().filter(goods -> {
|
||||
for (String goodsId : goodsIds) {
|
||||
if (StringUtils.equals(goods.getGoodsId().toString(), goodsId)) {
|
||||
if (Strings.CS.equals(goods.getGoodsId().toString(), goodsId)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -132,7 +132,7 @@ public class PriceBiz {
|
||||
// 查询用户是否有此类订单
|
||||
respVO.setBuy(false);
|
||||
if (userId != null) {
|
||||
OrderEntity orderEntity = orderBiz.hasTypeOrder(userId, scenicId, type, priceConfig.getId());
|
||||
OrderEntity orderEntity = orderBiz.hasTypeOrder(userId, faceId, scenicId, type, priceConfig.getId());
|
||||
if (orderEntity != null) {
|
||||
respVO.setOrderId(orderEntity.getId());
|
||||
respVO.setBuy(Integer.valueOf(1).equals(orderEntity.getStatus()));
|
||||
|
63
src/main/java/com/ycwl/basic/config/FeignConfig.java
Normal file
63
src/main/java/com/ycwl/basic/config/FeignConfig.java
Normal file
@@ -0,0 +1,63 @@
|
||||
package com.ycwl.basic.config;
|
||||
|
||||
import feign.Logger;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.codec.ErrorDecoder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class FeignConfig {
|
||||
|
||||
@Bean
|
||||
public Logger.Level feignLoggerLevel() {
|
||||
return Logger.Level.BASIC;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public RequestInterceptor requestInterceptor() {
|
||||
return requestTemplate -> {
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (attributes != null) {
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
|
||||
// 传递认证头
|
||||
String authorization = request.getHeader("Authorization");
|
||||
if (authorization != null) {
|
||||
requestTemplate.header("Authorization", authorization);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ErrorDecoder errorDecoder() {
|
||||
return new FeignErrorDecoder();
|
||||
}
|
||||
|
||||
public static class FeignErrorDecoder implements ErrorDecoder {
|
||||
private final ErrorDecoder defaultErrorDecoder = new Default();
|
||||
|
||||
@Override
|
||||
public Exception decode(String methodKey, feign.Response response) {
|
||||
log.error("Feign调用失败: method={}, status={}, reason={}",
|
||||
methodKey, response.status(), response.reason());
|
||||
|
||||
if (response.status() >= 400 && response.status() < 500) {
|
||||
// 4xx错误,客户端错误
|
||||
return new RuntimeException("客户端请求错误: " + response.reason());
|
||||
} else if (response.status() >= 500) {
|
||||
// 5xx错误,服务器错误
|
||||
return new RuntimeException("服务器内部错误: " + response.reason());
|
||||
}
|
||||
|
||||
return defaultErrorDecoder.decode(methodKey, response);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,74 +0,0 @@
|
||||
package com.ycwl.basic.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Profile;
|
||||
import springfox.documentation.builders.ApiInfoBuilder;
|
||||
import springfox.documentation.builders.ParameterBuilder;
|
||||
import springfox.documentation.builders.PathSelectors;
|
||||
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||
import springfox.documentation.schema.ModelRef;
|
||||
import springfox.documentation.service.ApiInfo;
|
||||
import springfox.documentation.service.Contact;
|
||||
import springfox.documentation.service.Parameter;
|
||||
import springfox.documentation.spi.DocumentationType;
|
||||
import springfox.documentation.spring.web.plugins.Docket;
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Swagger 配置类
|
||||
* 原生: /swagger-ui.html
|
||||
* 美化: /doc.html
|
||||
*/
|
||||
@Configuration
|
||||
@EnableSwagger2WebMvc
|
||||
@Profile({"test"})
|
||||
public class SwaggerConfig {
|
||||
|
||||
/**
|
||||
* Swagger 实例 Bean 是 Docket, 所以通过配置 Docket 实例来配置 Swagger
|
||||
*/
|
||||
@Bean
|
||||
public Docket docket() {
|
||||
|
||||
return new Docket(DocumentationType.SWAGGER_2)
|
||||
// 展示在 Swagger 页面上的自定义工程描述信息
|
||||
.apiInfo(apiInfo())
|
||||
// 选择展示哪些接口
|
||||
.select()
|
||||
//只有com.zcy.e.firstaid包内的才去展示
|
||||
.apis(RequestHandlerSelectors.basePackage("com.ycwl.basic.controller.mobile"))
|
||||
.paths(PathSelectors.any())
|
||||
.build()
|
||||
.globalOperationParameters(getGlobalRequestParameters());
|
||||
}
|
||||
|
||||
/**
|
||||
* Swagger 的描述信息
|
||||
*/
|
||||
public ApiInfo apiInfo() {
|
||||
|
||||
return new ApiInfoBuilder()
|
||||
.title("liuyin-re")
|
||||
.description("流影重构")
|
||||
.contact(new Contact("ycwl", "www.xxx.com", "xxxxxxxxx.com"))
|
||||
.version("1.0")
|
||||
.build();
|
||||
}
|
||||
|
||||
private List<Parameter> getGlobalRequestParameters() {
|
||||
List<Parameter> parameters = new ArrayList<>();
|
||||
parameters.add(new ParameterBuilder()
|
||||
.name("token")
|
||||
.description("登录令牌")
|
||||
.parameterType("header")
|
||||
.modelRef(new ModelRef("String"))
|
||||
.required(true)
|
||||
.build());
|
||||
return parameters;
|
||||
}
|
||||
|
||||
}
|
@@ -5,8 +5,6 @@ import com.ycwl.basic.annotation.IgnoreToken;
|
||||
import com.ycwl.basic.enums.BizCodeEnum;
|
||||
import com.ycwl.basic.storage.StorageFactory;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@@ -26,10 +24,10 @@ import java.util.UUID;
|
||||
@RestController
|
||||
@RequestMapping("/api/file/v1")
|
||||
@Slf4j
|
||||
@Api(tags = "文件接口")
|
||||
// 文件接口
|
||||
public class FileController {
|
||||
|
||||
@ApiOperation(value = "上传文件")
|
||||
// 上传文件
|
||||
@PostMapping("/upload")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> upload(@RequestParam(value = "file") MultipartFile file) throws IOException {
|
||||
@@ -39,7 +37,7 @@ public class FileController {
|
||||
return ApiResponse.success(url);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "删除文件")
|
||||
// 删除文件
|
||||
@PostMapping("/delete")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> delete(@RequestParam(value = "fileName") String fileName) throws IOException {
|
||||
|
@@ -1,6 +1,9 @@
|
||||
package com.ycwl.basic.controller.extern;
|
||||
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.ycwl.basic.annotation.IgnoreToken;
|
||||
import com.ycwl.basic.image.enhancer.adapter.BceImageEnhancer;
|
||||
import com.ycwl.basic.image.enhancer.entity.BceEnhancerConfig;
|
||||
import com.ycwl.basic.mapper.AioDeviceMapper;
|
||||
import com.ycwl.basic.mapper.MemberMapper;
|
||||
import com.ycwl.basic.model.aio.entity.AioDeviceBannerEntity;
|
||||
@@ -21,14 +24,19 @@ import com.ycwl.basic.service.aio.AioDeviceService;
|
||||
import com.ycwl.basic.service.mobile.GoodsService;
|
||||
import com.ycwl.basic.service.pc.FaceService;
|
||||
import com.ycwl.basic.service.pc.OrderService;
|
||||
import com.ycwl.basic.service.pc.ScenicService;
|
||||
import com.ycwl.basic.service.pc.SourceService;
|
||||
import com.ycwl.basic.storage.adapters.IStorageAdapter;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import com.ycwl.basic.utils.SnowFlakeUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import jakarta.servlet.ServletRequest;
|
||||
import jakarta.servlet.http.HttpServletRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Strings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -38,8 +46,10 @@ import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
@Slf4j
|
||||
@IgnoreToken
|
||||
@@ -58,6 +68,10 @@ public class AioDeviceController {
|
||||
private AioDeviceService aioDeviceService;
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
@Autowired
|
||||
private RedisTemplate<String, String> redisTemplate;
|
||||
@Autowired
|
||||
private SourceService sourceService;
|
||||
|
||||
@GetMapping("/info")
|
||||
public ApiResponse<AioDeviceInfoResp> getDeviceInfo(HttpServletRequest request) {
|
||||
@@ -106,15 +120,68 @@ public class AioDeviceController {
|
||||
memberEntity.setNickname("用户");
|
||||
memberMapper.add(memberEntity);
|
||||
FaceRecognizeResp resp = faceService.faceUpload(file, aioDevice.getScenicId(), memberEntity.getId());
|
||||
// 尝试超分
|
||||
new Thread(() -> {
|
||||
try {
|
||||
Thread.sleep(2000L);
|
||||
} catch (InterruptedException e) {
|
||||
return;
|
||||
}
|
||||
GoodsReqQuery query = new GoodsReqQuery();
|
||||
query.setSourceType(2);
|
||||
query.setFaceId(resp.getFaceId());
|
||||
List<GoodsDetailVO> sourcePhotoList = goodsService.sourceGoodsList(query);
|
||||
if (sourcePhotoList == null || sourcePhotoList.isEmpty()) {
|
||||
log.info("无源图片");
|
||||
redisTemplate.opsForValue().set("aio:faceId:"+resp.getFaceId().toString()+":pass", "1", 1, TimeUnit.DAYS);
|
||||
return;
|
||||
}
|
||||
log.info("超分开始!");
|
||||
sourcePhotoList.forEach(photo -> {
|
||||
if (StringUtils.contains(photo.getUrl(), "_q_")) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
File dstFile = new File(photo.getGoodsId()+".jpg");
|
||||
long fileSize = HttpUtil.downloadFile(photo.getUrl(), dstFile);
|
||||
log.info("超分开始:{}", fileSize);
|
||||
BceImageEnhancer enhancer = getEnhancer();
|
||||
MultipartFile enhancedFile = enhancer.enhance(dstFile.getName());
|
||||
log.info("超分结束:{}", photo.getUrl());
|
||||
String url = sourceService.uploadAndUpdateUrl(photo.getGoodsId(), enhancedFile);
|
||||
log.info("上传结束:->{}", url);
|
||||
} catch (Exception e) {
|
||||
log.error("超分失败:{}", photo.getGoodsId(), e);
|
||||
} finally {
|
||||
File _file = new File(photo.getGoodsId()+".jpg");
|
||||
if (_file.exists()) {
|
||||
_file.delete();
|
||||
}
|
||||
}
|
||||
});
|
||||
redisTemplate.opsForValue().set("aio:faceId:"+sourcePhotoList.getFirst().getFaceId().toString()+":pass", "1", 1, TimeUnit.DAYS);
|
||||
}).start();
|
||||
return ApiResponse.success(resp);
|
||||
}
|
||||
|
||||
@ApiOperation("人脸信息")
|
||||
// 人脸信息
|
||||
@GetMapping("/{faceId}")
|
||||
public ApiResponse<FaceRespVO> faceInfo(@PathVariable Long faceId) {
|
||||
return faceService.getById(faceId);
|
||||
}
|
||||
@ApiOperation("照片商品列表")
|
||||
@GetMapping("/face/{faceId}/check")
|
||||
public ApiResponse<Boolean> faceCheck(@PathVariable Long faceId) {
|
||||
if (redisTemplate.hasKey("aio:faceId:"+faceId.toString()+":pass")) {
|
||||
return ApiResponse.success(true);
|
||||
} else {
|
||||
return ApiResponse.success(false);
|
||||
}
|
||||
}
|
||||
@GetMapping("/face/{faceId}/bindWxaCode")
|
||||
public ApiResponse<String> bindWxaCode(@PathVariable Long faceId) {
|
||||
return ApiResponse.success(faceService.bindWxaCode(faceId));
|
||||
}
|
||||
// 照片商品列表
|
||||
@GetMapping("/{faceId}/photo")
|
||||
public ApiResponse<List<GoodsDetailVO>> sourceGoodsList(@PathVariable Long faceId) {
|
||||
GoodsReqQuery query = new GoodsReqQuery();
|
||||
@@ -124,7 +191,7 @@ public class AioDeviceController {
|
||||
return ApiResponse.success(goodsDetailVOS);
|
||||
}
|
||||
|
||||
@ApiOperation("创建订单")
|
||||
// 创建订单
|
||||
@PostMapping("/order")
|
||||
public ApiResponse<AioDeviceCreateOrderResp> createOrder(HttpServletRequest request, @RequestBody AioDeviceCreateOrderReq req) {
|
||||
String deviceId = request.getHeader("X-DeviceId");
|
||||
@@ -135,7 +202,7 @@ public class AioDeviceController {
|
||||
return ApiResponse.success(aioDeviceService.createOrder(aioDevice, req));
|
||||
}
|
||||
|
||||
@ApiOperation("查询订单")
|
||||
// 查询订单
|
||||
@GetMapping("/order/{orderId}")
|
||||
public ApiResponse<PayResponse> queryOrder(HttpServletRequest request, @PathVariable("orderId") Long orderId) {
|
||||
String deviceId = request.getHeader("X-DeviceId");
|
||||
@@ -145,4 +212,15 @@ public class AioDeviceController {
|
||||
}
|
||||
return ApiResponse.success(orderService.queryOrder(orderId));
|
||||
}
|
||||
|
||||
private BceImageEnhancer getEnhancer() {
|
||||
BceImageEnhancer enhancer = new BceImageEnhancer();
|
||||
BceEnhancerConfig config = new BceEnhancerConfig();
|
||||
config.setQps(1);
|
||||
config.setAppId("119554288");
|
||||
config.setApiKey("OX6QoijgKio3eVtA0PiUVf7f");
|
||||
config.setSecretKey("dYatXReVriPeiktTjUblhfubpcmYfuMk");
|
||||
enhancer.setConfig(config);
|
||||
return enhancer;
|
||||
}
|
||||
}
|
||||
|
83
src/main/java/com/ycwl/basic/controller/extern/CustomDeviceController.java
vendored
Normal file
83
src/main/java/com/ycwl/basic/controller/extern/CustomDeviceController.java
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
package com.ycwl.basic.controller.extern;
|
||||
|
||||
import com.ycwl.basic.annotation.IgnoreToken;
|
||||
import com.ycwl.basic.model.custom.req.AliyunCallbackReq;
|
||||
import com.ycwl.basic.model.custom.req.CreateUploadTaskReq;
|
||||
import com.ycwl.basic.model.custom.req.UploadCompleteReq;
|
||||
import com.ycwl.basic.model.custom.req.UploadFailedReq;
|
||||
import com.ycwl.basic.model.custom.resp.CreateUploadTaskResp;
|
||||
import com.ycwl.basic.service.custom.CustomUploadTaskService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/extern/custom-device")
|
||||
@IgnoreToken
|
||||
public class CustomDeviceController {
|
||||
|
||||
@Autowired
|
||||
private CustomUploadTaskService customUploadTaskService;
|
||||
|
||||
@PostMapping("/upload/create")
|
||||
public ApiResponse<CreateUploadTaskResp> createUploadTask(@RequestBody CreateUploadTaskReq req) {
|
||||
try {
|
||||
CreateUploadTaskResp resp = customUploadTaskService.createUploadTask(req);
|
||||
return ApiResponse.success(resp);
|
||||
} catch (Exception e) {
|
||||
log.error("创建上传任务失败", e);
|
||||
return ApiResponse.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/upload/complete")
|
||||
public ApiResponse<String> uploadComplete(@RequestBody UploadCompleteReq req) {
|
||||
try {
|
||||
customUploadTaskService.completeUpload(req.getAccessKey(), req.getTaskId());
|
||||
return ApiResponse.success("上传完成,人脸识别任务已提交");
|
||||
} catch (Exception e) {
|
||||
log.error("上传完成处理失败", e);
|
||||
return ApiResponse.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/upload/failed")
|
||||
public ApiResponse<String> uploadFailed(@RequestBody UploadFailedReq req) {
|
||||
try {
|
||||
customUploadTaskService.markTaskFailed(req.getAccessKey(), req.getTaskId(), req.getErrorMsg());
|
||||
return ApiResponse.success("任务已标记为失败");
|
||||
} catch (Exception e) {
|
||||
log.error("标记任务失败处理异常", e);
|
||||
return ApiResponse.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@PostMapping("/aliyun/mps/callback")
|
||||
public ApiResponse<String> aliyunCallback(@RequestBody AliyunCallbackReq req) {
|
||||
try {
|
||||
customUploadTaskService.handleAliyunCallback(req.getJobId(), req.getStatus());
|
||||
return ApiResponse.success("回调处理完成");
|
||||
} catch (Exception e) {
|
||||
log.error("阿里云回调处理失败", e);
|
||||
return ApiResponse.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@GetMapping("/aliyun/mps/callback")
|
||||
public ApiResponse<String> aliyunCallback(@RequestParam("jobId") String jobId, @RequestParam("status") String status) {
|
||||
try {
|
||||
customUploadTaskService.handleAliyunCallback(jobId, status);
|
||||
return ApiResponse.success("回调处理完成");
|
||||
} catch (Exception e) {
|
||||
log.error("阿里云回调处理失败", e);
|
||||
return ApiResponse.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
package com.ycwl.basic.controller.extern;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.ycwl.basic.annotation.IgnoreToken;
|
||||
import com.ycwl.basic.mapper.FaceMapper;
|
||||
import com.ycwl.basic.mapper.MemberMapper;
|
||||
@@ -88,7 +88,7 @@ public class LyCompatibleController {
|
||||
if (StringUtils.isBlank(scid)) {
|
||||
return R.error("景区ID为空!");
|
||||
}
|
||||
// if (StringUtils.equals("288",scid)) {
|
||||
// if (Strings.CS.equals("288",scid)) {
|
||||
scenicId = 3955650120997015552L;
|
||||
// } else {
|
||||
// scenicId = 3946669713328836608L;
|
||||
@@ -184,7 +184,7 @@ public class LyCompatibleController {
|
||||
}
|
||||
String openId = headersMap.get("client");
|
||||
if (redisTemplate.hasKey("ly:"+openId)) {
|
||||
return JSON.parseObject(redisTemplate.opsForValue().get("ly:"+openId), R.class);
|
||||
return JacksonUtil.parseObject(redisTemplate.opsForValue().get("ly:"+openId), R.class);
|
||||
}
|
||||
MemberRespVO member = memberMapper.getByOpenId(openId);
|
||||
if (member == null) {
|
||||
@@ -248,7 +248,7 @@ public class LyCompatibleController {
|
||||
.put("face_id", faceVO.getId().toString())
|
||||
.put("newvideo", videoList)
|
||||
.put("newuservideo", userVideoList);
|
||||
redisTemplate.opsForValue().set("ly:"+openId, JSON.toJSONString(response), 5, TimeUnit.SECONDS);
|
||||
redisTemplate.opsForValue().set("ly:"+openId, JacksonUtil.toJSONString(response), 5, TimeUnit.SECONDS);
|
||||
log.info("> {}", response);
|
||||
return response;
|
||||
}
|
||||
|
@@ -1,9 +1,47 @@
|
||||
package com.ycwl.basic.controller.mobile;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.ycwl.basic.constant.BaseContextHandler;
|
||||
import com.ycwl.basic.model.mobile.coupon.req.ClaimCouponReq;
|
||||
import com.ycwl.basic.model.pc.coupon.entity.CouponEntity;
|
||||
import com.ycwl.basic.model.pc.couponRecord.entity.CouponRecordEntity;
|
||||
import com.ycwl.basic.service.mobile.AppCouponRecordService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/controller/v1")
|
||||
@RequestMapping("/api/mobile/coupon/v1")
|
||||
public class AppCouponController {
|
||||
|
||||
@Autowired
|
||||
private AppCouponRecordService appCouponRecordService;
|
||||
|
||||
/**
|
||||
* 根据memberId、faceId和type查找优惠券记录
|
||||
*/
|
||||
@GetMapping("/record")
|
||||
public ApiResponse<CouponRecordEntity> getCouponRecords(
|
||||
@RequestParam Long faceId,
|
||||
@RequestParam Integer type) {
|
||||
CouponRecordEntity record = appCouponRecordService.queryByMemberIdAndFaceIdAndType(Long.valueOf(BaseContextHandler.getUserId()), faceId, type);
|
||||
return ApiResponse.success(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领取优惠券
|
||||
*/
|
||||
@PostMapping("/claim")
|
||||
public ApiResponse<CouponEntity> claimCoupon(@RequestBody ClaimCouponReq request) {
|
||||
request.setMemberId(Long.valueOf(BaseContextHandler.getUserId()));
|
||||
try {
|
||||
CouponEntity coupon = appCouponRecordService.claimCoupon(
|
||||
request.getMemberId(),
|
||||
request.getFaceId(),
|
||||
request.getType()
|
||||
);
|
||||
return ApiResponse.success(coupon);
|
||||
} catch (RuntimeException e) {
|
||||
return ApiResponse.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -7,8 +7,6 @@ import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
||||
import com.ycwl.basic.service.pc.FaceService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
@@ -21,7 +19,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/face/v1")
|
||||
@Api(tags = "用户人脸相关接口")
|
||||
// 用户人脸相关接口
|
||||
public class
|
||||
AppFaceController {
|
||||
|
||||
@@ -37,7 +35,7 @@ AppFaceController {
|
||||
* @param scenicId
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("人脸照片上传")
|
||||
// 人脸照片上传
|
||||
@PostMapping("/faceUPload")
|
||||
public ApiResponse<FaceRecognizeResp> faceUpload(@RequestParam("file")MultipartFile file, @RequestParam("scenicId") Long scenicId) {
|
||||
//获取用户id
|
||||
@@ -72,14 +70,14 @@ AppFaceController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("景区视频源素材列表")
|
||||
// 景区视频源素材列表
|
||||
@GetMapping("/{faceId}/contentList")
|
||||
public ApiResponse<List<ContentPageVO>> contentList(@PathVariable Long faceId) {
|
||||
List<ContentPageVO> contentPageVOS = faceService.faceContentList(faceId);
|
||||
return ApiResponse.success(contentPageVOS);
|
||||
}
|
||||
|
||||
@ApiOperation("绑定人脸")
|
||||
// 绑定人脸
|
||||
@PostMapping("/{faceId}/bind")
|
||||
public ApiResponse<String> bind(@PathVariable Long faceId) {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
|
@@ -7,8 +7,6 @@ import com.ycwl.basic.model.mobile.goods.*;
|
||||
import com.ycwl.basic.service.mobile.GoodsService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -21,26 +19,26 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/goods/v1")
|
||||
@Api(tags = "商品相关接口")
|
||||
// 商品相关接口
|
||||
public class AppGoodsController {
|
||||
|
||||
@Autowired
|
||||
private GoodsService goodsService;
|
||||
|
||||
@ApiOperation("商品列表")
|
||||
// 商品列表
|
||||
@PostMapping("/goodsList")
|
||||
public ApiResponse<List<GoodsPageVO>> goodsList(@RequestBody GoodsReqQuery query) {
|
||||
return goodsService.goodsList(query);
|
||||
}
|
||||
|
||||
@ApiOperation("源素材(原片/照片)商品列表")
|
||||
// 源素材(原片/照片)商品列表
|
||||
@PostMapping("/sourceGoodsList")
|
||||
public ApiResponse<List<GoodsDetailVO>> sourceGoodsList(@RequestBody GoodsReqQuery query) {
|
||||
List<GoodsDetailVO> goodsDetailVOS = goodsService.sourceGoodsList(query);
|
||||
return ApiResponse.success(goodsDetailVOS);
|
||||
}
|
||||
|
||||
@ApiOperation("源素材(原片/照片)商品数量")
|
||||
// 源素材(原片/照片)商品数量
|
||||
@PostMapping("/sourceGoodsCount")
|
||||
public ApiResponse<Integer> sourceGoodsCount(@RequestBody GoodsReqQuery query) {
|
||||
Integer count = goodsService.sourceGoodsCount(query);
|
||||
@@ -60,7 +58,7 @@ public class AppGoodsController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("成片vlog商品详情")
|
||||
// 成片vlog商品详情
|
||||
@GetMapping("/getVideoGoodsDetail/{videoId}")
|
||||
@IgnoreToken
|
||||
public ApiResponse<VideoGoodsDetailVO> videoGoodsDetail(@PathVariable("videoId") Long videoId) {
|
||||
@@ -82,7 +80,7 @@ public class AppGoodsController {
|
||||
*
|
||||
* @return 0没有任务 1 合成中 2 合成成功
|
||||
*/
|
||||
@ApiOperation("查询用户当前景区的整体视频合成任务状态 0没有任务 1 合成中 2 合成成功 ")
|
||||
// 查询用户当前景区的整体视频合成任务状态 0没有任务 1 合成中 2 合成成功
|
||||
@GetMapping("/getTaskStatus/")
|
||||
public ApiResponse<VideoTaskStatusVO> getAllTaskStatus() {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
@@ -95,7 +93,7 @@ public class AppGoodsController {
|
||||
* @param templateId 模版id
|
||||
* @return 1 合成中 2 合成成功
|
||||
*/
|
||||
@ApiOperation("查询用户当前景区的具体模版视频合成任务状态 1 合成中 2 合成成功 ")
|
||||
// 查询用户当前景区的具体模版视频合成任务状态 1 合成中 2 合成成功
|
||||
@GetMapping("/task/face/{faceId}/template/{templateId}")
|
||||
public ApiResponse<VideoTaskStatusVO> getTemplateTaskStatus(@PathVariable("faceId") Long faceId, @PathVariable("templateId") Long templateId) {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
|
@@ -6,8 +6,6 @@ import com.ycwl.basic.model.mobile.weChat.DTO.WeChatUserInfoUpdateDTO;
|
||||
import com.ycwl.basic.model.pc.member.resp.MemberRespVO;
|
||||
import com.ycwl.basic.service.mobile.AppMemberService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
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.web.bind.annotation.*;
|
||||
@@ -18,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/member/v1")
|
||||
@Api(tags = "用户相关接口")
|
||||
// 用户相关接口
|
||||
@Slf4j
|
||||
public class AppMemberController {
|
||||
|
||||
@@ -32,19 +30,29 @@ public class AppMemberController {
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@ApiOperation("登录")
|
||||
// 登录
|
||||
@PostMapping("/{scenicId}/login")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> login(@PathVariable("scenicId") Long scenicId ,@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||
return memberService.login(scenicId, userInfoDTO.getCode(), userInfoDTO);
|
||||
}
|
||||
@PostMapping("/undefined/login")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> loginUndefined(@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||
return memberService.login(null, userInfoDTO.getCode(), userInfoDTO);
|
||||
}
|
||||
@PostMapping({"//login", "/login"})
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> loginNoScenicId(@RequestBody WeChatUserInfoDTO userInfoDTO) throws Exception {
|
||||
return memberService.login(null, userInfoDTO.getCode(), userInfoDTO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取用户信息")
|
||||
// 获取用户信息
|
||||
@GetMapping("/getUserInfo")
|
||||
public ApiResponse<MemberRespVO> getUserInfo() {
|
||||
return memberService.getUserInfo();
|
||||
@@ -56,22 +64,22 @@ public class AppMemberController {
|
||||
* @param userInfoUpdateDTO
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("修改用户信息")
|
||||
// 修改用户信息
|
||||
@PostMapping("/update")
|
||||
public ApiResponse<?> update(@RequestBody WeChatUserInfoUpdateDTO userInfoUpdateDTO) {
|
||||
return memberService.update(userInfoUpdateDTO);
|
||||
}
|
||||
|
||||
@ApiOperation("新增或修改景区服务通知状态")
|
||||
// 新增或修改景区服务通知状态
|
||||
@GetMapping("/updateScenicServiceNoticeStatus")
|
||||
public ApiResponse<String> updateScenicServiceNoticeStatus(Long scenicId) {
|
||||
return memberService.updateScenicServiceNoticeStatus(scenicId);
|
||||
}
|
||||
|
||||
@ApiOperation("查看景区服务通知状态 0关闭 1开启")
|
||||
// 查看景区服务通知状态 0关闭 1开启
|
||||
@GetMapping("/getScenicServiceNoticeStatus")
|
||||
public ApiResponse<Integer> getScenicServiceNoticeStatus(Long scenicId) {
|
||||
return memberService.getScenicServiceNoticeStatus(scenicId);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@@ -18,8 +18,6 @@ import com.ycwl.basic.pay.entity.PayResponse;
|
||||
import com.ycwl.basic.service.pc.OrderService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -31,7 +29,7 @@ import java.util.Map;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/order/v1")
|
||||
@Api(tags = "订单相关接口")
|
||||
// 订单相关接口
|
||||
public class AppOrderController {
|
||||
|
||||
@Autowired
|
||||
@@ -43,7 +41,7 @@ public class AppOrderController {
|
||||
@Autowired
|
||||
private FaceMapper faceMapper;
|
||||
|
||||
@ApiOperation("用户端订单列表查询")
|
||||
// 用户端订单列表查询
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<OrderAppRespVO>> pageQuery(@RequestBody OrderAppPageReq orderReqQuery) {
|
||||
String userId = BaseContextHandler.getUserId();
|
||||
@@ -51,26 +49,26 @@ public class AppOrderController {
|
||||
return orderService.appPageQuery(orderReqQuery);
|
||||
}
|
||||
|
||||
@ApiOperation("用户端订单详情查询")
|
||||
// 用户端订单详情查询
|
||||
@GetMapping("getOrderDetails/{id}")
|
||||
public ApiResponse<OrderAppRespVO> getOrderDetails(@PathVariable("id") Long id) {
|
||||
return orderService.appDetail(id);
|
||||
}
|
||||
|
||||
@ApiOperation("用户端订单新增")
|
||||
// 用户端订单新增
|
||||
@PostMapping("/addOrder")
|
||||
public ApiResponse<Map<String, Object>> addOrder(@RequestBody CreateOrderReqVO orderAddReq) throws Exception {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
return orderService.createOrder(worker.getUserId(), orderAddReq);
|
||||
}
|
||||
|
||||
@ApiOperation("查询订单")
|
||||
// 查询订单
|
||||
@GetMapping("/queryOrder")
|
||||
public ApiResponse<PayResponse> queryOrder(@RequestParam("orderId") Long orderId) {
|
||||
return ApiResponse.success(orderService.queryOrder(orderId));
|
||||
}
|
||||
|
||||
@ApiOperation("用户端打包订单新增")
|
||||
// 用户端打包订单新增
|
||||
@PostMapping("/addBatchOrder")
|
||||
public ApiResponse<Map<String, Object>> addOrder(@RequestBody CreateBatchOrderReqVO batchOrderReqVO) throws Exception {
|
||||
JwtInfo worker = JwtTokenUtil.getWorker();
|
||||
@@ -78,7 +76,7 @@ public class AppOrderController {
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("获取用户订单数量")
|
||||
// 获取用户订单数量
|
||||
@GetMapping("/getUserOrderCount")
|
||||
public ApiResponse<Integer> getUserOrderCount() {
|
||||
Long userId = Long.parseLong(BaseContextHandler.getUserId());
|
||||
@@ -86,7 +84,7 @@ public class AppOrderController {
|
||||
return orderService.getOrderCountByUserId(userId);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "发起退款", notes = "发起退款")
|
||||
// 发起退款
|
||||
@PostMapping("/refundOrder")
|
||||
public ApiResponse<?> refundOrder(@RequestBody RefundOrderReq refundOrderReq) {
|
||||
return orderService.refundOrder(refundOrderReq);
|
||||
|
@@ -17,8 +17,6 @@ import com.ycwl.basic.service.mobile.AppScenicService;
|
||||
import com.ycwl.basic.service.pc.FaceService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -35,7 +33,7 @@ import java.util.List;
|
||||
@Deprecated
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/scenic/v1")
|
||||
@Api(tags = "景区相关接口")
|
||||
// 景区相关接口
|
||||
public class AppScenicController {
|
||||
|
||||
@Autowired
|
||||
@@ -50,7 +48,7 @@ public class AppScenicController {
|
||||
add("3936940597855784960");
|
||||
}};
|
||||
|
||||
@ApiOperation("分页查询景区列表")
|
||||
// 分页查询景区列表
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<ScenicAppVO>> pageQuery(@RequestBody ScenicReqQuery scenicReqQuery){
|
||||
String userId = BaseContextHandler.getUserId();
|
||||
@@ -60,7 +58,7 @@ public class AppScenicController {
|
||||
return ApiResponse.success(new PageInfo<>(new ArrayList<>()));
|
||||
}
|
||||
}
|
||||
@ApiOperation("根据id查询景区详情")
|
||||
// 根据id查询景区详情
|
||||
@IgnoreToken
|
||||
@GetMapping("/{id}")
|
||||
public ApiResponse<ScenicRespVO> getDetails(@PathVariable Long id){
|
||||
@@ -91,19 +89,19 @@ public class AppScenicController {
|
||||
return ApiResponse.success(resp);
|
||||
}
|
||||
|
||||
@ApiOperation("查询景区设备总数和拍到用户的机位数量")
|
||||
// 查询景区设备总数和拍到用户的机位数量
|
||||
@GetMapping("/{scenicId}/deviceCount/")
|
||||
public ApiResponse<ScenicDeviceCountVO> deviceCountByScenicId(@PathVariable Long scenicId){
|
||||
return appScenicService.deviceCountByScenicId(scenicId);
|
||||
}
|
||||
|
||||
@ApiOperation("景区视频源素材列表")
|
||||
// 景区视频源素材列表
|
||||
@GetMapping("/contentList/")
|
||||
public ApiResponse<List<ContentPageVO>> contentList() {
|
||||
return faceService.contentListUseDefaultFace();
|
||||
}
|
||||
|
||||
@ApiOperation("景区视频源素材列表")
|
||||
// 景区视频源素材列表
|
||||
@GetMapping("/face/{faceId}/contentList")
|
||||
public ApiResponse<List<ContentPageVO>> contentList(@PathVariable Long faceId) {
|
||||
List<ContentPageVO> contentPageVOS = faceService.faceContentList(faceId);
|
||||
|
@@ -8,7 +8,6 @@ import com.ycwl.basic.service.mobile.GoodsService;
|
||||
import com.ycwl.basic.service.task.TaskService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -46,7 +45,7 @@ public class AppTaskController {
|
||||
* @param templateId 模版id
|
||||
* @return 1 合成中 2 合成成功
|
||||
*/
|
||||
@ApiOperation("查询用户当前景区的具体模版视频合成任务状态 1 合成中 2 合成成功 ")
|
||||
// 查询用户当前景区的具体模版视频合成任务状态 1 合成中 2 合成成功
|
||||
@GetMapping("/face/{faceId}/template/{templateId}")
|
||||
@IgnoreLogReq
|
||||
public ApiResponse<VideoTaskStatusVO> getTemplateTaskStatus(@PathVariable("faceId") Long faceId, @PathVariable("templateId") Long templateId) {
|
||||
|
@@ -4,7 +4,6 @@ package com.ycwl.basic.controller.mobile;
|
||||
import com.ycwl.basic.annotation.IgnoreToken;
|
||||
import com.ycwl.basic.repository.ScenicRepository;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -23,7 +22,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/wx/notify/v1")
|
||||
@Api(tags = "微信消息模板通知")
|
||||
// 微信消息模板通知
|
||||
public class AppWxNotifyController {
|
||||
@Autowired
|
||||
private ScenicRepository scenicRepository;
|
||||
|
@@ -8,8 +8,6 @@ import com.ycwl.basic.model.wx.WxPayRespVO;
|
||||
import com.ycwl.basic.pay.entity.PayResponse;
|
||||
import com.ycwl.basic.service.mobile.WxPayService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -31,13 +29,13 @@ import java.security.GeneralSecurityException;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/wx/pay/v1")
|
||||
@Api(tags = "微信支付相关接口")
|
||||
// 微信支付相关接口
|
||||
public class AppWxPayController {
|
||||
|
||||
@Autowired
|
||||
private WxPayService wxPayService;
|
||||
|
||||
@ApiOperation(value = "微信支付回调", notes = "微信支付回调")
|
||||
// 微信支付回调
|
||||
@PostMapping("/payNotify")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> payNotify(HttpServletRequest request) {
|
||||
@@ -58,7 +56,7 @@ public class AppWxPayController {
|
||||
return ApiResponse.success(BizCodeEnum.REQUEST_OK);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "微信支付退款回调", notes = "微信支付退款回调")
|
||||
// 微信支付退款回调
|
||||
@PostMapping("/{scenicId}/refundNotify")
|
||||
@IgnoreToken
|
||||
public ApiResponse<?> refundNotify(@PathVariable Long scenicId, HttpServletRequest request) throws GeneralSecurityException, IOException {
|
||||
|
@@ -14,10 +14,7 @@ import com.ycwl.basic.service.mobile.AppScenicService;
|
||||
import com.ycwl.basic.service.pc.ScenicAccountService;
|
||||
import com.ycwl.basic.service.pc.ScenicService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Strings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -38,7 +35,7 @@ import static com.ycwl.basic.constant.JwtRoleConstant.MERCHANT;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/scenicAccount/v1")
|
||||
@Api(tags = "景区账号相关接口")
|
||||
// 景区账号相关接口
|
||||
public class AppScenicAccountController {
|
||||
@Autowired
|
||||
private ScenicAccountService accountService;
|
||||
@@ -47,7 +44,7 @@ public class AppScenicAccountController {
|
||||
@Autowired
|
||||
private ScenicService adminScenicService;
|
||||
|
||||
@ApiOperation("登录")
|
||||
// 登录
|
||||
@PostMapping("/login")
|
||||
@IgnoreToken
|
||||
public ApiResponse<ScenicLoginOldRespVO> login(@RequestBody ScenicLoginReq scenicLoginReq) throws Exception {
|
||||
@@ -68,16 +65,16 @@ public class AppScenicAccountController {
|
||||
|
||||
@GetMapping("/myScenicList")
|
||||
public ApiResponse<List<ScenicRespVO>> myScenicList() {
|
||||
List<ScenicRespVO> list = Collections.emptyList();
|
||||
if (StringUtils.equals(BaseContextHandler.getRoleId(), MERCHANT.type)) {
|
||||
List<ScenicRespVO> list;
|
||||
if (Strings.CS.equals(BaseContextHandler.getRoleId(), MERCHANT.type)) {
|
||||
String userId = BaseContextHandler.getUserId();
|
||||
ScenicAccountEntity account = accountService.getScenicAccountById(Long.valueOf(userId));
|
||||
if (account == null || account.getScenicId().isEmpty()) {
|
||||
return ApiResponse.fail("景区账号未绑定景区");
|
||||
}
|
||||
list = account.getScenicId().stream().map(id -> {
|
||||
return scenicService.getDetails(id).getData();
|
||||
}).toList();
|
||||
list = account.getScenicId().stream()
|
||||
.map(id -> scenicService.getDetails(id).getData())
|
||||
.toList();
|
||||
} else {
|
||||
list = adminScenicService.list(new ScenicReqQuery()).getData();
|
||||
}
|
||||
@@ -108,6 +105,7 @@ public class AppScenicAccountController {
|
||||
}
|
||||
|
||||
@GetMapping("/devices")
|
||||
@Deprecated
|
||||
public ApiResponse<List<DeviceRespVO>> getDeviceList() {
|
||||
String userId = BaseContextHandler.getUserId();
|
||||
ScenicAccountEntity account = accountService.getScenicAccountById(Long.valueOf(userId));
|
||||
|
@@ -9,7 +9,6 @@ import com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity;
|
||||
import com.ycwl.basic.service.pc.OrderService;
|
||||
import com.ycwl.basic.service.pc.ScenicAccountService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -21,7 +20,7 @@ import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/scenic/order/v1")
|
||||
@Api(tags = "景区账号相关接口")
|
||||
// 景区账号相关接口
|
||||
public class AppScenicOrderController {
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
@@ -11,8 +11,6 @@ import com.ycwl.basic.model.mobile.statistic.resp.AppStatisticsFunnelVO;
|
||||
import com.ycwl.basic.service.mobile.AppStatisticsService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
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.web.bind.annotation.*;
|
||||
@@ -24,41 +22,41 @@ import org.springframework.web.bind.annotation.*;
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/api/mobile/statistics/v1")
|
||||
@Api(tags = "数据统计相关接口")
|
||||
// 数据统计相关接口
|
||||
public class AppStatisticsController {
|
||||
|
||||
@Autowired
|
||||
private AppStatisticsService statisticsService;
|
||||
|
||||
@ApiOperation("支付订单金额、预览_支付转化率、扫码_付费用户转化率")
|
||||
// 支付订单金额、预览_支付转化率、扫码_付费用户转化率
|
||||
@PostMapping("/one")
|
||||
public ApiResponse<AppSta1VO> oneStatistics(@RequestBody CommonQueryReq query) {
|
||||
|
||||
return statisticsService.oneStatistics(query);
|
||||
}
|
||||
|
||||
@ApiOperation("支付订单数、现场订单数、推送订单数统计")
|
||||
// 支付订单数、现场订单数、推送订单数统计
|
||||
@PostMapping("/two")
|
||||
public ApiResponse<AppSta2VO> twoStatistics(@RequestBody CommonQueryReq query) {
|
||||
|
||||
return statisticsService.twoStatistics(query);
|
||||
}
|
||||
|
||||
@ApiOperation("扫码访问人数、推送订阅人数、预览视频人数统计")
|
||||
// 扫码访问人数、推送订阅人数、预览视频人数统计
|
||||
@PostMapping("/free")
|
||||
public ApiResponse<AppSta3VO> freeStatistics(@RequestBody CommonQueryReq query) {
|
||||
|
||||
return statisticsService.freeStatistics(query);
|
||||
}
|
||||
|
||||
@ApiOperation("用户转化漏斗")
|
||||
// 用户转化漏斗
|
||||
@PostMapping("/userConversionFunnel")
|
||||
public ApiResponse<AppStatisticsFunnelVO> userConversionFunnel(@RequestBody CommonQueryReq query) {
|
||||
|
||||
return statisticsService.userConversionFunnel(query);
|
||||
}
|
||||
|
||||
@ApiOperation("统计数据记录")
|
||||
// 统计数据记录
|
||||
@PostMapping("/addStatistics")
|
||||
@IgnoreToken
|
||||
public ApiResponse<String> addStatistics(@RequestBody StatisticsRecordAddReq req) {
|
||||
|
@@ -8,8 +8,6 @@ import com.ycwl.basic.model.pc.adminUser.resp.AdminUserListRespVO;
|
||||
import com.ycwl.basic.model.pc.adminUser.resp.StaffSimpleInfoRespVO;
|
||||
import com.ycwl.basic.service.pc.AdminUserService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
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.web.bind.annotation.*;
|
||||
@@ -19,7 +17,7 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping("/api/adminUser/v1")
|
||||
@Slf4j
|
||||
@Api(tags = "系统后台用户管理")
|
||||
// 系统后台用户管理
|
||||
public class AdminUserController {
|
||||
|
||||
@Autowired
|
||||
@@ -27,7 +25,7 @@ public class AdminUserController {
|
||||
|
||||
|
||||
@PostMapping(value = "/login")
|
||||
@ApiOperation(value = "登录")
|
||||
// 登录
|
||||
@IgnoreToken
|
||||
public ApiResponse login(@RequestBody LoginReqVO loginReqVO) throws Exception {
|
||||
log.info("{}:开始登录管理后台", loginReqVO.getAccount());
|
||||
@@ -35,49 +33,49 @@ public class AdminUserController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/updatePassword")
|
||||
@ApiOperation(value = "用户自己修改密码")
|
||||
// 用户自己修改密码
|
||||
public ApiResponse updatePassword(@RequestBody UpdatePasswordReqVO updatePasswordReqVO) throws Exception {
|
||||
log.info("{}:开始修改管理后台密码", updatePasswordReqVO.getId());
|
||||
return adminUserService.updatePassword(updatePasswordReqVO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/list")
|
||||
@ApiOperation(value = "系统后台用户列表")
|
||||
// 系统后台用户列表
|
||||
//@IgnoreToken
|
||||
public ApiResponse<PageInfo<List<AdminUserListRespVO>>> list(@RequestBody AdminUserListReqVO adminUserListReqVO) {
|
||||
return adminUserService.list(adminUserListReqVO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/query/list")
|
||||
@ApiOperation(value = "系统后台用户列表查询")
|
||||
// 系统后台用户列表查询
|
||||
@IgnoreToken
|
||||
public ApiResponse<PageInfo<List<AdminUserListRespVO>>> queryList(@RequestBody AdminUserListReqVO adminUserListReqVO) {
|
||||
return adminUserService.list(adminUserListReqVO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/add")
|
||||
@ApiOperation(value = "添加系统后台用户")
|
||||
// 添加系统后台用户
|
||||
//@IgnoreToken
|
||||
public ApiResponse add(@RequestBody AddOrUpdateAdminUserReqVO addOrUpdateAdminUserReqVO) {
|
||||
return adminUserService.addOrUpdate(addOrUpdateAdminUserReqVO);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/update")
|
||||
@ApiOperation(value = "更新系统后台用户")
|
||||
// 更新系统后台用户
|
||||
//@IgnoreToken
|
||||
public ApiResponse update(@RequestBody AddOrUpdateAdminUserReqVO addOrUpdateAdminUserReqVO) {
|
||||
return adminUserService.addOrUpdate(addOrUpdateAdminUserReqVO);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/delete/{id}")
|
||||
@ApiOperation(value = "删除")
|
||||
// 删除
|
||||
//@IgnoreToken
|
||||
public ApiResponse delete(@PathVariable("id") String id) {
|
||||
return adminUserService.delete(id);
|
||||
}
|
||||
|
||||
@PostMapping(value = "/resetPassword")
|
||||
@ApiOperation(value = "重置密码")
|
||||
// 重置密码
|
||||
//@IgnoreToken
|
||||
public ApiResponse resetPassword(@RequestBody ResetPasswordReqVO resetPasswordReqVO) {
|
||||
log.info("{}:开始重置后台密码", resetPasswordReqVO.getId());
|
||||
|
@@ -14,8 +14,6 @@ import com.ycwl.basic.repository.ScenicRepository;
|
||||
import com.ycwl.basic.storage.StorageFactory;
|
||||
import com.ycwl.basic.storage.adapters.IStorageAdapter;
|
||||
import com.ycwl.basic.model.pc.mp.MpConfigEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -30,7 +28,7 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/broker/v1")
|
||||
@Api(tags = "推客(推广人)管理")
|
||||
// 推客(推广人)管理
|
||||
public class BrokerController {
|
||||
@Autowired
|
||||
private BrokerService brokerService;
|
||||
@@ -41,64 +39,64 @@ public class BrokerController {
|
||||
@Autowired
|
||||
private ScenicRepository scenicRepository;
|
||||
|
||||
@ApiOperation("分页查询")
|
||||
// 分页查询
|
||||
@PostMapping("/page")
|
||||
public ApiResponse page(@RequestBody BrokerReqQuery brokerReqQuery){
|
||||
return ApiResponse.success(brokerService.pageQuery(brokerReqQuery));
|
||||
}
|
||||
|
||||
@ApiOperation("列表查询")
|
||||
// 列表查询
|
||||
@PostMapping("/list")
|
||||
public ApiResponse list(@RequestBody BrokerReqQuery brokerReqQuery){
|
||||
return ApiResponse.success(brokerService.list(brokerReqQuery));
|
||||
}
|
||||
|
||||
@ApiOperation("详情查询")
|
||||
// 详情查询
|
||||
@GetMapping("/getDetails/{id}")
|
||||
public ApiResponse getDetails(@PathVariable("id") Long id){
|
||||
return ApiResponse.success(brokerService.getById(id));
|
||||
}
|
||||
@ApiOperation("新增或修改")
|
||||
// 新增或修改
|
||||
@PostMapping("/addOrUpdate")
|
||||
public ApiResponse addOrUpdate(@RequestBody BrokerEntity broker){
|
||||
return ApiResponse.success(brokerService.addOrUpdate(broker));
|
||||
}
|
||||
@ApiOperation("删除")
|
||||
// 删除
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse delete(@PathVariable("id") Long id){
|
||||
return ApiResponse.success(brokerService.delete(id));
|
||||
}
|
||||
@ApiOperation("修改状态")
|
||||
// 修改状态
|
||||
@PutMapping("/updateStatus/{id}")
|
||||
public ApiResponse updateStatus(@PathVariable("id") Long id){
|
||||
return ApiResponse.success(brokerService.updateStatus(id));
|
||||
}
|
||||
|
||||
@ApiOperation("修改状态")
|
||||
// 修改状态
|
||||
@PutMapping("/updateBrokerEnable/{id}")
|
||||
public ApiResponse updateBrokerEnable(@PathVariable("id") Long id){
|
||||
return ApiResponse.success(brokerService.updateBrokerEnable(id));
|
||||
}
|
||||
|
||||
@ApiOperation("推客记录分页查询")
|
||||
// 推客记录分页查询
|
||||
@PostMapping("/record/page")
|
||||
public ApiResponse pageRecord(@RequestBody BrokerRecordReqQuery brokerRecordReqQuery) {
|
||||
return ApiResponse.success(brokerRecordService.pageQuery(brokerRecordReqQuery));
|
||||
}
|
||||
|
||||
@ApiOperation("推客记录列表查询")
|
||||
// 推客记录列表查询
|
||||
@PostMapping("/record/list")
|
||||
public ApiResponse listRecord(@RequestBody BrokerRecordReqQuery brokerRecordReqQuery) {
|
||||
return ApiResponse.success(brokerRecordService.list(brokerRecordReqQuery));
|
||||
}
|
||||
|
||||
@ApiOperation("推客记录详情查询")
|
||||
// 推客记录详情查询
|
||||
@GetMapping("/record/getDetails/{id}")
|
||||
public ApiResponse getRecordDetails(@PathVariable("id") Long id) {
|
||||
return ApiResponse.success(brokerRecordService.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据brokerId和时间范围查询每天的记录数量和orderPrice汇总")
|
||||
// 根据brokerId和时间范围查询每天的记录数量和orderPrice汇总
|
||||
@GetMapping("/{id}/record/summary")
|
||||
public ApiResponse<List<DailySummaryRespVO>> getDailySummaryByBrokerId(
|
||||
@PathVariable("id") Long brokerId,
|
||||
@@ -107,7 +105,7 @@ public class BrokerController {
|
||||
return ApiResponse.success(brokerRecordService.getDailySummaryByBrokerId(brokerId, startTime, endTime));
|
||||
}
|
||||
|
||||
@ApiOperation("根据景区ID下载小程序二维码")
|
||||
// 根据景区ID下载小程序二维码
|
||||
@GetMapping("/{id}/QRCode")
|
||||
public ApiResponse<String> downloadQrCode(@PathVariable Long id) {
|
||||
BrokerRespVO broker = brokerService.getById(id);
|
||||
|
@@ -8,8 +8,6 @@ import com.ycwl.basic.model.pc.coupon.resp.CouponRespVO;
|
||||
import com.ycwl.basic.model.pc.price.resp.GoodsListRespVO;
|
||||
import com.ycwl.basic.service.pc.CouponService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -17,7 +15,7 @@ import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/coupon/v1")
|
||||
@Api(tags = "优惠券管理")
|
||||
// 优惠券管理
|
||||
public class CouponController {
|
||||
@Autowired
|
||||
private CouponService couponService;
|
||||
@@ -31,13 +29,13 @@ public class CouponController {
|
||||
return ApiResponse.success(data);
|
||||
}
|
||||
|
||||
@ApiOperation("新增优惠券")
|
||||
// 新增优惠券
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Integer> add(@RequestBody CouponEntity coupon) {
|
||||
return ApiResponse.success(couponService.add(coupon));
|
||||
}
|
||||
|
||||
@ApiOperation("更新优惠券")
|
||||
// 更新优惠券
|
||||
@PostMapping("/update/{id}")
|
||||
public ApiResponse<Boolean> update(@PathVariable Integer id, @RequestBody CouponEntity coupon) {
|
||||
coupon.setId(id);
|
||||
@@ -49,19 +47,19 @@ public class CouponController {
|
||||
return ApiResponse.success(couponService.updateStatus(id));
|
||||
}
|
||||
|
||||
@ApiOperation("删除优惠券")
|
||||
// 删除优惠券
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse<Boolean> delete(@PathVariable Integer id) {
|
||||
return ApiResponse.success(couponService.delete(id));
|
||||
}
|
||||
|
||||
@ApiOperation("根据ID查询优惠券")
|
||||
// 根据ID查询优惠券
|
||||
@GetMapping("/get/{id}")
|
||||
public ApiResponse<CouponEntity> getById(@PathVariable Integer id) {
|
||||
return ApiResponse.success(couponService.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("分页查询优惠券列表")
|
||||
// 分页查询优惠券列表
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<CouponRespVO>> list(@RequestBody CouponQueryReq couponQuery) {
|
||||
PageHelper.startPage(couponQuery.getPageNum(), couponQuery.getPageSize());
|
||||
|
@@ -0,0 +1,22 @@
|
||||
package com.ycwl.basic.controller.pc;
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.ycwl.basic.model.pc.couponRecord.req.CouponRecordPageQueryReq;
|
||||
import com.ycwl.basic.model.pc.couponRecord.resp.CouponRecordPageResp;
|
||||
import com.ycwl.basic.service.pc.CouponRecordService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/coupon/record/v1")
|
||||
public class CouponRecordController {
|
||||
|
||||
@Autowired
|
||||
private CouponRecordService couponRecordService;
|
||||
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<CouponRecordPageResp>> pageQuery(@RequestBody CouponRecordPageQueryReq query) {
|
||||
return couponRecordService.pageQuery(query);
|
||||
}
|
||||
}
|
@@ -10,8 +10,6 @@ import com.ycwl.basic.model.pc.device.resp.DeviceRespVO;
|
||||
import com.ycwl.basic.model.pc.template.req.TemplateSortRequest;
|
||||
import com.ycwl.basic.service.pc.DeviceService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -21,43 +19,43 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/device/v1")
|
||||
@Api(tags = "设备管理")
|
||||
// 设备管理
|
||||
public class DeviceController {
|
||||
@Autowired
|
||||
private DeviceService deviceService;
|
||||
|
||||
@ApiOperation("设备分页查询")
|
||||
// 设备分页查询
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<DeviceRespVO>> pageQuery(@RequestBody DeviceReqQuery deviceReqQuery) {
|
||||
return deviceService.pageQuery(deviceReqQuery);
|
||||
}
|
||||
@ApiOperation("设备列表查询")
|
||||
// 设备列表查询
|
||||
@PostMapping("/list")
|
||||
public ApiResponse list(@RequestBody DeviceReqQuery deviceReqQuery) {
|
||||
return deviceService.list(deviceReqQuery);
|
||||
}
|
||||
@ApiOperation("设备详情查询")
|
||||
// 设备详情查询
|
||||
@GetMapping("/getDetails/{id}")
|
||||
public ApiResponse<DeviceRespVO> getDetails(@PathVariable("id") Long id) {
|
||||
return deviceService.getById(id);
|
||||
}
|
||||
@ApiOperation("新增或修改设备")
|
||||
// 新增或修改设备
|
||||
@PostMapping("/addOrUpdate")
|
||||
public ApiResponse addOrUpdate(@RequestBody DeviceAddOrUpdateReq deviceReqQuery) {
|
||||
return deviceService.addOrUpdate(deviceReqQuery);
|
||||
}
|
||||
@ApiOperation("删除设备")
|
||||
// 删除设备
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse delete(@PathVariable("id") Long id) {
|
||||
return deviceService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("修改设备状态")
|
||||
// 修改设备状态
|
||||
@PutMapping("/updateStatus/{id}")
|
||||
public ApiResponse updateStatus(@PathVariable("id") Long id) {
|
||||
return deviceService.updateStatus(id);
|
||||
}
|
||||
|
||||
@ApiOperation("排序设备")
|
||||
// 排序设备
|
||||
@PostMapping("/sort")
|
||||
public ApiResponse<Boolean> sortDevice(@RequestBody DeviceSortRequest request) {
|
||||
return deviceService.sortDevice(request.getDeviceId(), request.getAfterDeviceId());
|
||||
|
@@ -6,8 +6,6 @@ import com.ycwl.basic.model.pc.face.req.FaceReqQuery;
|
||||
import com.ycwl.basic.model.pc.face.resp.FaceRespVO;
|
||||
import com.ycwl.basic.service.pc.FaceService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -19,37 +17,37 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/face/v1")
|
||||
@Api(tags = "用户人脸管理")
|
||||
// 用户人脸管理
|
||||
public class FaceController {
|
||||
@Autowired
|
||||
private FaceService faceService;
|
||||
|
||||
@ApiOperation("分页查询用户人脸")
|
||||
// 分页查询用户人脸
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<FaceRespVO>> pageQuery(@RequestBody FaceReqQuery faceReqQuery) {
|
||||
return faceService.pageQuery(faceReqQuery);
|
||||
}
|
||||
@ApiOperation("用户人脸列表查询")
|
||||
// 用户人脸列表查询
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<FaceRespVO>> list(@RequestBody FaceReqQuery faceReqQuery) {
|
||||
return faceService.list(faceReqQuery);
|
||||
}
|
||||
@ApiOperation("用户人脸详情查询")
|
||||
// 用户人脸详情查询
|
||||
@GetMapping("/getDetail/{id}")
|
||||
public ApiResponse<FaceRespVO> getDetail(@PathVariable("id") Long id) {
|
||||
return faceService.getById(id);
|
||||
}
|
||||
@ApiOperation("添加用户人脸信息")
|
||||
// 添加用户人脸信息
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Integer> add(@RequestBody FaceEntity face) {
|
||||
return faceService.add(face);
|
||||
}
|
||||
@ApiOperation("删除用户人脸信息")
|
||||
// 删除用户人脸信息
|
||||
@PostMapping("/deleteById/{id}")
|
||||
public ApiResponse<Integer> deleteById(@PathVariable Long id) {
|
||||
return faceService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("批量删除用户人脸")
|
||||
// 批量删除用户人脸
|
||||
@PostMapping("/deleteByIds")
|
||||
public ApiResponse<Integer> deleteByIds(@RequestBody List<Long> ids) {
|
||||
return faceService.deleteByIds(ids);
|
||||
|
@@ -6,8 +6,6 @@ import com.ycwl.basic.model.pc.faceSample.req.FaceSampleReqQuery;
|
||||
import com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO;
|
||||
import com.ycwl.basic.service.pc.FaceSampleService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -20,22 +18,22 @@ import java.util.List;
|
||||
@Deprecated
|
||||
@RestController
|
||||
@RequestMapping("/api/faceSample/v1")
|
||||
@Api(tags = "人脸样本管理")
|
||||
// 人脸样本管理
|
||||
public class FaceSampleController {
|
||||
@Autowired
|
||||
private FaceSampleService FaceSampleService;
|
||||
|
||||
@ApiOperation("分页查询人脸样本")
|
||||
// 分页查询人脸样本
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<FaceSampleRespVO>> pageQuery(@RequestBody FaceSampleReqQuery FaceSampleReqQuery) {
|
||||
return FaceSampleService.pageQuery(FaceSampleReqQuery);
|
||||
}
|
||||
@ApiOperation("人脸样本列表查询")
|
||||
// 人脸样本列表查询
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<FaceSampleRespVO>> list(@RequestBody FaceSampleReqQuery FaceSampleReqQuery) {
|
||||
return FaceSampleService.list(FaceSampleReqQuery);
|
||||
}
|
||||
@ApiOperation("人脸样本详情查询")
|
||||
// 人脸样本详情查询
|
||||
@GetMapping("/getDetail/{id}")
|
||||
public ApiResponse<FaceSampleRespVO> getDetail(@PathVariable("id") Long id) {
|
||||
return FaceSampleService.getById(id);
|
||||
|
@@ -6,8 +6,6 @@ import com.ycwl.basic.model.pc.member.req.MemberReqQuery;
|
||||
import com.ycwl.basic.model.pc.member.resp.MemberRespVO;
|
||||
import com.ycwl.basic.service.pc.MemberService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -19,37 +17,37 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/member/v1")
|
||||
@Api(tags = "前台用户管理")
|
||||
// 前台用户管理
|
||||
public class MemberController {
|
||||
@Autowired
|
||||
private MemberService memberService;
|
||||
|
||||
@ApiOperation("前台用户分页查询")
|
||||
// 前台用户分页查询
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<MemberRespVO>> pageQuery(@RequestBody MemberReqQuery memberReqQuery) {
|
||||
return memberService.pageQuery(memberReqQuery);
|
||||
}
|
||||
@ApiOperation("前台用户列表查询")
|
||||
// 前台用户列表查询
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<MemberRespVO>> list(@RequestBody MemberReqQuery memberReqQuery) {
|
||||
return memberService.list(memberReqQuery);
|
||||
}
|
||||
@ApiOperation("前台用户详情查询")
|
||||
// 前台用户详情查询
|
||||
@GetMapping("/getDetail/{id}")
|
||||
public ApiResponse<MemberRespVO> getDetail(@PathVariable("id") Long id) {
|
||||
return memberService.getById(id);
|
||||
}
|
||||
@ApiOperation("前台用户删除")
|
||||
// 前台用户删除
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse<Integer> delete(@PathVariable("id") Long id) {
|
||||
return memberService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("前台用户新增")
|
||||
// 前台用户新增
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Integer> add(@RequestBody MemberEntity member) {
|
||||
return memberService.add(member);
|
||||
}
|
||||
@ApiOperation("前台用户修改")
|
||||
// 前台用户修改
|
||||
@PostMapping("/update")
|
||||
public ApiResponse<Integer> update(@RequestBody MemberEntity member) {
|
||||
return memberService.update(member);
|
||||
|
@@ -7,8 +7,6 @@ import com.ycwl.basic.model.pc.order.req.OrderReqQuery;
|
||||
import com.ycwl.basic.model.pc.order.resp.OrderRespVO;
|
||||
import com.ycwl.basic.service.pc.OrderService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -20,38 +18,38 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/order/v1")
|
||||
@Api(tags = "订单管理")
|
||||
// 订单管理
|
||||
public class OrderController {
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@ApiOperation(value = "审核退款", notes = "审核退款")
|
||||
// 审核退款: 审核退款
|
||||
@PostMapping("/auditRefundOrder")
|
||||
public ApiResponse<?> auditRefundOrder(@RequestBody RefundOrderReq refundOrderReq) {
|
||||
return orderService.auditRefundOrder(refundOrderReq);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("分页查询订单")
|
||||
// 分页查询订单
|
||||
@PostMapping("page")
|
||||
public ApiResponse<PageInfo<OrderRespVO>> pageQuery(@RequestBody OrderReqQuery query) {
|
||||
return orderService.pageQuery(query);
|
||||
}
|
||||
|
||||
@ApiOperation("订单列表查询")
|
||||
// 订单列表查询
|
||||
@PostMapping("list")
|
||||
public ApiResponse<List<OrderRespVO>> list(@RequestBody OrderReqQuery query) {
|
||||
return orderService.list(query);
|
||||
}
|
||||
@ApiOperation("订单详情查询")
|
||||
// 订单详情查询
|
||||
@GetMapping("detail/{id}")
|
||||
public ApiResponse<OrderRespVO> detail(@PathVariable("id") Long orderId) {
|
||||
return orderService.detail(orderId);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("订单备注")
|
||||
// 订单备注
|
||||
@PostMapping("remark/{id}")
|
||||
public ApiResponse<?> updateRemark(@PathVariable("id") Long orderId, @RequestBody OrderEntity query) {
|
||||
orderService.remarkOrder(orderId, query);
|
||||
|
@@ -10,8 +10,6 @@ import com.ycwl.basic.model.pc.role.resp.RolePermissionResp;
|
||||
import com.ycwl.basic.service.pc.PermissionService;
|
||||
import com.ycwl.basic.service.pc.RoleService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -28,7 +26,7 @@ import static com.ycwl.basic.constant.JwtRoleConstant.MERCHANT;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/permission/v1")
|
||||
@Api(tags = "权限管理接口")
|
||||
// 权限管理接口
|
||||
public class PermissionController {
|
||||
@Autowired
|
||||
private PermissionService permissionService;
|
||||
@@ -57,7 +55,7 @@ public class PermissionController {
|
||||
}
|
||||
}
|
||||
|
||||
@ApiOperation("根据用户ID查询权限信息")
|
||||
// 根据用户ID查询权限信息
|
||||
@GetMapping("/get/{userId}")
|
||||
public ApiResponse<PermissionResp> getPermissionByUser(@PathVariable Long userId) {
|
||||
PermissionEntity permission = permissionService.getPermissionByUserId(userId);
|
||||
@@ -67,7 +65,7 @@ public class PermissionController {
|
||||
return ApiResponse.success(new PermissionResp(Arrays.asList(StringUtils.split(permission.getPermString(), ",")), Arrays.asList(StringUtils.split(permission.getMenuString(), ","))));
|
||||
}
|
||||
|
||||
@ApiOperation("保存或更新权限信息")
|
||||
// 保存或更新权限信息
|
||||
@PostMapping("/save/{userId}")
|
||||
public ApiResponse saveOrUpdate(@PathVariable Long userId, @RequestBody PermissionSaveReq req) {
|
||||
permissionService.saveOrUpdate(userId, StringUtils.join(req.getPermissions(), ","), StringUtils.join(req.getMenus(), ","));
|
||||
|
@@ -3,8 +3,6 @@ package com.ycwl.basic.controller.pc;
|
||||
import com.ycwl.basic.model.pc.printer.entity.PrinterEntity;
|
||||
import com.ycwl.basic.service.printer.PrinterService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -22,31 +20,31 @@ public class PrinterController {
|
||||
@Autowired
|
||||
private PrinterService printerService;
|
||||
|
||||
@ApiOperation("查询列表")
|
||||
// 查询列表
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<PrinterEntity>> list(@RequestBody PrinterEntity condition) {
|
||||
return printerService.list(condition);
|
||||
}
|
||||
|
||||
@ApiOperation("获取详情")
|
||||
// 获取详情
|
||||
@GetMapping("/get/{id}")
|
||||
public ApiResponse<PrinterEntity> get(@PathVariable("id") Integer id) {
|
||||
return printerService.get(id);
|
||||
}
|
||||
|
||||
@ApiOperation("新增")
|
||||
// 新增
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Integer> add(@RequestBody PrinterEntity entity) {
|
||||
return printerService.add(entity);
|
||||
}
|
||||
|
||||
@ApiOperation("更新")
|
||||
// 更新
|
||||
@PostMapping("/update")
|
||||
public ApiResponse<Integer> update(@RequestBody PrinterEntity entity) {
|
||||
return printerService.update(entity);
|
||||
}
|
||||
|
||||
@ApiOperation("删除")
|
||||
// 删除
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse<Integer> delete(@PathVariable("id") Integer id) {
|
||||
return printerService.delete(id);
|
||||
|
@@ -7,8 +7,6 @@ import com.ycwl.basic.model.pc.order.req.OrderReqQuery;
|
||||
import com.ycwl.basic.model.pc.order.resp.OrderRespVO;
|
||||
import com.ycwl.basic.service.pc.OrderService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -25,38 +23,38 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/refund/v1")
|
||||
@Api(tags = "退款订单管理")
|
||||
// 退款订单管理
|
||||
public class RefundController {
|
||||
|
||||
@Autowired
|
||||
private OrderService orderService;
|
||||
|
||||
@ApiOperation(value = "审核退款", notes = "审核退款")
|
||||
// 审核退款: 审核退款
|
||||
@PostMapping("/auditRefundOrder")
|
||||
public ApiResponse<?> auditRefundOrder(@RequestBody RefundOrderReq refundOrderReq) {
|
||||
return orderService.auditRefundOrder(refundOrderReq);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("分页查询订单")
|
||||
// 分页查询订单
|
||||
@PostMapping("page")
|
||||
public ApiResponse<PageInfo<OrderRespVO>> pageQuery(@RequestBody OrderReqQuery query) {
|
||||
return orderService.refundPageQuery(query);
|
||||
}
|
||||
|
||||
@ApiOperation("订单列表查询")
|
||||
// 订单列表查询
|
||||
@PostMapping("list")
|
||||
public ApiResponse<List<OrderRespVO>> list(@RequestBody OrderReqQuery query) {
|
||||
return orderService.list(query);
|
||||
}
|
||||
@ApiOperation("订单详情查询")
|
||||
// 订单详情查询
|
||||
@GetMapping("detail/{id}")
|
||||
public ApiResponse<OrderRespVO> detail(@PathVariable("id") Long orderId) {
|
||||
return orderService.detail(orderId);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("订单备注")
|
||||
// 订单备注
|
||||
@PostMapping("remark/{id}")
|
||||
public ApiResponse<?> updateRemark(@PathVariable("id") Long orderId, @RequestBody OrderEntity query) {
|
||||
orderService.remarkOrder(orderId, query);
|
||||
|
@@ -4,8 +4,6 @@ import com.ycwl.basic.model.pc.renderWorker.entity.RenderWorkerEntity;
|
||||
import com.ycwl.basic.model.pc.renderWorker.req.RenderWorkerReqQuery;
|
||||
import com.ycwl.basic.service.pc.RenderWorkerService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -15,47 +13,47 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/renderWorker/v1")
|
||||
@Api(tags = "渲染机管理")
|
||||
// 渲染机管理
|
||||
public class RenderWorkerController {
|
||||
|
||||
@Autowired
|
||||
private RenderWorkerService renderWorkerService;
|
||||
|
||||
@ApiOperation("分页查询渲染机")
|
||||
// 分页查询渲染机
|
||||
@PostMapping("/page")
|
||||
public ApiResponse pageQuery(@RequestBody RenderWorkerReqQuery renderWorkerReqQuery){
|
||||
return renderWorkerService.pageQuery(renderWorkerReqQuery);
|
||||
}
|
||||
@ApiOperation("渲染机列表查询")
|
||||
// 渲染机列表查询
|
||||
@PostMapping("/list")
|
||||
public ApiResponse list(@RequestBody RenderWorkerReqQuery renderWorkerReqQuery){
|
||||
return renderWorkerService.list(renderWorkerReqQuery);
|
||||
}
|
||||
@ApiOperation("渲染机详情查询")
|
||||
// 渲染机详情查询
|
||||
@GetMapping("/detail/{id}")
|
||||
public ApiResponse detail(@PathVariable Long id){
|
||||
return renderWorkerService.detail(id);
|
||||
}
|
||||
|
||||
@ApiOperation("渲染机新增")
|
||||
// 渲染机新增
|
||||
@PostMapping("/add")
|
||||
public ApiResponse add(@RequestBody RenderWorkerEntity renderWorker){
|
||||
return renderWorkerService.add(renderWorker);
|
||||
}
|
||||
|
||||
@ApiOperation("渲染机删除")
|
||||
// 渲染机删除
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse deleteById(@PathVariable Long id){
|
||||
return renderWorkerService.deleteById(id);
|
||||
}
|
||||
|
||||
@ApiOperation("渲染机修改")
|
||||
// 渲染机修改
|
||||
@PostMapping("/update")
|
||||
public ApiResponse update(@RequestBody RenderWorkerEntity renderWorker){
|
||||
return renderWorkerService.update(renderWorker);
|
||||
}
|
||||
|
||||
@ApiOperation("渲染机修改状态")
|
||||
// 渲染机修改状态
|
||||
@PutMapping("/updateStatus/{id}")
|
||||
public ApiResponse updateStatus(@PathVariable Long id) {
|
||||
return renderWorkerService.updateStatus(id);
|
||||
|
@@ -9,8 +9,6 @@ import com.ycwl.basic.model.pc.role.resp.RoleListRespVO;
|
||||
import com.ycwl.basic.model.pc.role.resp.RolePermissionResp;
|
||||
import com.ycwl.basic.service.pc.RoleService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -20,24 +18,24 @@ import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/api/role/v1")
|
||||
@Api(tags = "系统角色管理")
|
||||
// 系统角色管理
|
||||
public class RoleController {
|
||||
|
||||
@Autowired
|
||||
RoleService roleService;
|
||||
|
||||
@PostMapping(value = "/page")
|
||||
@ApiOperation(value = "角色列表分页查询")
|
||||
// 角色列表分页查询
|
||||
public ApiResponse<PageInfo<RoleListRespVO>> page(@RequestBody RoleListReqVO roleListReqVO) {
|
||||
return roleService.pageQuery(roleListReqVO);
|
||||
}
|
||||
@PostMapping(value = "/list")
|
||||
@ApiOperation(value = "角色列表")
|
||||
// 角色列表
|
||||
public ApiResponse<List<RoleListRespVO>> list(@RequestBody RoleListReqVO roleListReqVO) {
|
||||
return roleService.list(roleListReqVO);
|
||||
}
|
||||
@GetMapping("/{roleId}/permission")
|
||||
@ApiOperation(value = "角色权限列表")
|
||||
// 角色权限列表
|
||||
public ApiResponse<PermissionResp> getPermissionByRoleId(@PathVariable("roleId") Long roleId) {
|
||||
RolePermissionResp permission = roleService.getPermissionByRoleId(roleId);
|
||||
if (permission == null) {
|
||||
@@ -47,19 +45,19 @@ public class RoleController {
|
||||
}
|
||||
|
||||
@PostMapping(value = "/addOrUpdate")
|
||||
@ApiOperation(value = "添加或更新角色")
|
||||
// 添加或更新角色
|
||||
public ApiResponse addOrUpdate(@RequestBody AddOrUpdateRoleReqVO addOrUpdateRoleReqVO) {
|
||||
return roleService.addOrUpdate(addOrUpdateRoleReqVO);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/delete/{id}")
|
||||
@ApiOperation(value = "删除")
|
||||
// 删除
|
||||
public ApiResponse delete(@PathVariable("id") String id) {
|
||||
return roleService.delete(id);
|
||||
}
|
||||
|
||||
@GetMapping(value = "/updateReturnMenu/{id}")
|
||||
@ApiOperation(value = "编辑回显该角色当前菜单")
|
||||
// 编辑回显该角色当前菜单
|
||||
public ApiResponse updateReturnMenu(@PathVariable("id") String id) {
|
||||
return roleService.updateReturnMenu(id);
|
||||
}
|
||||
@@ -67,7 +65,7 @@ public class RoleController {
|
||||
|
||||
|
||||
@GetMapping(value = "/updateStatus/{id}")
|
||||
@ApiOperation(value = "更改角色类型状态")
|
||||
// 更改角色类型状态
|
||||
public ApiResponse updateStatus(@PathVariable("id") String id) {
|
||||
return roleService.updateStatus(id);
|
||||
}
|
||||
|
@@ -19,9 +19,7 @@ import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.WxMpUtil;
|
||||
import com.ycwl.basic.repository.ScenicRepository;
|
||||
import com.ycwl.basic.model.pc.mp.MpConfigEntity;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Strings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -37,7 +35,7 @@ import static com.ycwl.basic.constant.JwtRoleConstant.MERCHANT;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/scenic/v1")
|
||||
@Api(tags = "景区管理")
|
||||
// 景区管理
|
||||
public class ScenicController {
|
||||
|
||||
@Autowired
|
||||
@@ -52,53 +50,53 @@ public class ScenicController {
|
||||
@Autowired
|
||||
private ScenicAccountService accountService;
|
||||
|
||||
@ApiOperation("分页查询景区")
|
||||
// 分页查询景区
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<ScenicRespVO>> pageQuery(@RequestBody ScenicReqQuery scenicReqQuery) {
|
||||
return scenicService.pageQuery(scenicReqQuery);
|
||||
}
|
||||
@ApiOperation("查询景区列表")
|
||||
// 查询景区列表
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<ScenicRespVO>> list(@RequestBody ScenicReqQuery scenicReqQuery) {
|
||||
return scenicService.list(scenicReqQuery);
|
||||
}
|
||||
@ApiOperation("查询景区详情")
|
||||
// 查询景区详情
|
||||
@GetMapping("/getDetail/{id}")
|
||||
public ApiResponse<ScenicRespVO> getDetail(@PathVariable Long id) {
|
||||
return scenicService.getById(id);
|
||||
}
|
||||
@ApiOperation("新增景区")
|
||||
// 新增景区
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Boolean> add(@RequestBody ScenicAddOrUpdateReq scenicAddReq) {
|
||||
return scenicService.add(scenicAddReq);
|
||||
}
|
||||
@ApiOperation("删除景区")
|
||||
// 删除景区
|
||||
@GetMapping("/delete/{id}")
|
||||
public ApiResponse<Boolean> delete(@PathVariable Long id) {
|
||||
return scenicService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("修改景区")
|
||||
// 修改景区
|
||||
@PostMapping("/update")
|
||||
public ApiResponse<Boolean> update(@RequestBody ScenicAddOrUpdateReq scenicAddReq) {
|
||||
return scenicService.update(scenicAddReq);
|
||||
}
|
||||
@ApiOperation("修改景区状态")
|
||||
// 修改景区状态
|
||||
@GetMapping("/updateStatus/{id}")
|
||||
public ApiResponse<Boolean> updateStatus(@PathVariable Long id) {
|
||||
return scenicService.updateStatus(id);
|
||||
}
|
||||
@ApiOperation("新增景区配置")
|
||||
// 新增景区配置
|
||||
@PostMapping("/addConfig")
|
||||
public ApiResponse<Boolean> addConfig(@RequestBody ScenicConfigEntity scenicConfig) {
|
||||
return scenicService.addConfig(scenicConfig);
|
||||
}
|
||||
@ApiOperation("修改景区配置")
|
||||
// 修改景区配置
|
||||
@PostMapping("/updateConfig")
|
||||
public ApiResponse<Boolean> updateConfig(@RequestBody ScenicConfigEntity scenicConfig) {
|
||||
return scenicService.updateConfigById(scenicConfig);
|
||||
}
|
||||
|
||||
@ApiOperation("查询景区配置")
|
||||
// 查询景区配置
|
||||
@GetMapping("/config/{id}")
|
||||
public ApiResponse<ScenicConfigEntity> getConfig(@PathVariable("id") Long id) {
|
||||
return ApiResponse.success(scenicService.getConfig(id));
|
||||
@@ -114,7 +112,7 @@ public class ScenicController {
|
||||
return ApiResponse.success(null);
|
||||
}
|
||||
|
||||
@ApiOperation("根据景区ID下载小程序二维码")
|
||||
// 根据景区ID下载小程序二维码
|
||||
@GetMapping("/{id}/QRCode")
|
||||
public ApiResponse<String> downloadQrCode(@PathVariable Long id) {
|
||||
MpConfigEntity mpConfig = scenicRepository.getScenicMpConfig(id);
|
||||
@@ -171,7 +169,7 @@ public class ScenicController {
|
||||
@GetMapping("/myScenicList")
|
||||
public ApiResponse<List<ScenicRespVO>> myScenicList() {
|
||||
List<ScenicRespVO> list = Collections.emptyList();
|
||||
if (StringUtils.equals(BaseContextHandler.getRoleId(), MERCHANT.type)) {
|
||||
if (Strings.CS.equals(BaseContextHandler.getRoleId(), MERCHANT.type)) {
|
||||
String userId = BaseContextHandler.getUserId();
|
||||
ScenicAccountEntity account = accountService.getScenicAccountById(Long.valueOf(userId));
|
||||
if (account == null || account.getScenicId().isEmpty()) {
|
||||
|
@@ -7,8 +7,6 @@ import com.ycwl.basic.model.pc.source.req.SourceReqQuery;
|
||||
import com.ycwl.basic.service.pc.SourceService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -18,20 +16,20 @@ import org.springframework.web.bind.annotation.*;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/source/v1")
|
||||
@Api(tags = "视频源管理")
|
||||
// 视频源管理
|
||||
public class SourceController {
|
||||
|
||||
@Autowired
|
||||
private SourceService sourceService;
|
||||
|
||||
@Deprecated
|
||||
@ApiOperation("分页查询视频源")
|
||||
// 分页查询视频源
|
||||
@PostMapping("/page")
|
||||
public ApiResponse pageQuery(@RequestBody SourceReqQuery sourceReqQuery) {
|
||||
return sourceService.pageQuery(sourceReqQuery);
|
||||
}
|
||||
@Deprecated
|
||||
@ApiOperation("查询视频源列表")
|
||||
// 查询视频源列表
|
||||
@PostMapping("/list")
|
||||
public ApiResponse list(@RequestBody SourceReqQuery sourceReqQuery) {
|
||||
return sourceService.list(sourceReqQuery);
|
||||
@@ -42,7 +40,7 @@ public class SourceController {
|
||||
return sourceService.cutVideo(id);
|
||||
}
|
||||
@Deprecated
|
||||
@ApiOperation("删除视频源")
|
||||
// 删除视频源
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse deleteById(@PathVariable Long id) {
|
||||
return sourceService.deleteById(id);
|
||||
|
@@ -0,0 +1,57 @@
|
||||
package com.ycwl.basic.controller.pc;
|
||||
|
||||
import com.ycwl.basic.model.mobile.statistic.req.CommonQueryReq;
|
||||
import com.ycwl.basic.model.pc.statistics.resp.OrderStatisticsResp;
|
||||
import com.ycwl.basic.service.mobile.AppStatisticsService;
|
||||
import com.ycwl.basic.service.pc.StatisticsService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/12/12 14:30
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/statistics/v1")
|
||||
public class StatisticsController {
|
||||
|
||||
@Autowired
|
||||
private StatisticsService statisticsService;
|
||||
|
||||
@Autowired
|
||||
private AppStatisticsService appStatisticsService;
|
||||
|
||||
/**
|
||||
* 智能获取扫码访问人数统计数据(自动选择粒度)
|
||||
* @param query 查询参数(包含景区ID、开始时间、结束时间;如果scenicId为空则统计全部景区,否则统计指定景区)
|
||||
* @return 统计数据(超过7天返回日期级别,否则返回小时级别)
|
||||
*/
|
||||
@PostMapping("/scanCodeMemberChart")
|
||||
public ApiResponse<List<HashMap<String, String>>> getScanCodeMemberChart(@RequestBody CommonQueryReq query) {
|
||||
return ApiResponse.success(statisticsService.getScanCodeMemberChartAuto(query));
|
||||
}
|
||||
|
||||
@PostMapping("/one")
|
||||
public ApiResponse getStatisticsOne(@RequestBody CommonQueryReq query) {
|
||||
return appStatisticsService.oneStatistics(query);
|
||||
}
|
||||
|
||||
@PostMapping("/two")
|
||||
public ApiResponse getStatisticsTwo(@RequestBody CommonQueryReq query) {
|
||||
return appStatisticsService.twoStatistics(query);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订单统计数据(包含订单数量和金额、推送订单数量、现场订单数量)
|
||||
* @param query 查询参数(包含景区ID、开始时间、结束时间;如果scenicId为空则统计全部景区,否则统计指定景区)
|
||||
* @return 统计数据(totalOrderCount: 总订单数量, totalOrderAmount: 总订单金额, pushOrderCount: 推送订单数量, sceneOrderCount: 现场订单数量)
|
||||
*/
|
||||
@PostMapping("/orderStatistics")
|
||||
public ApiResponse<OrderStatisticsResp> getOrderStatistics(@RequestBody CommonQueryReq query) {
|
||||
return ApiResponse.success(statisticsService.getOrderStatistics(query));
|
||||
}
|
||||
}
|
@@ -4,8 +4,6 @@ import com.ycwl.basic.model.pc.task.entity.TaskEntity;
|
||||
import com.ycwl.basic.model.pc.task.req.TaskReqQuery;
|
||||
import com.ycwl.basic.service.pc.TaskService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -16,38 +14,38 @@ import org.springframework.web.bind.annotation.*;
|
||||
@RestController
|
||||
@RequestMapping("/api/task/v1")
|
||||
@Deprecated
|
||||
@Api(tags = "任务列表管理")
|
||||
// 任务列表管理
|
||||
public class TaskController {
|
||||
|
||||
@Autowired
|
||||
private TaskService taskService;
|
||||
|
||||
@ApiOperation("分页查询任务列表")
|
||||
// 分页查询任务列表
|
||||
@PostMapping("/page")
|
||||
public ApiResponse pageQuery(@RequestBody TaskReqQuery taskReqQuery) {
|
||||
return taskService.pageQuery(taskReqQuery);
|
||||
}
|
||||
@ApiOperation("查询任务列表")
|
||||
// 查询任务列表
|
||||
@PostMapping("/list")
|
||||
public ApiResponse list(@RequestBody TaskReqQuery taskReqQuery) {
|
||||
return taskService.list(taskReqQuery);
|
||||
}
|
||||
@ApiOperation("查询任务详情")
|
||||
// 查询任务详情
|
||||
@GetMapping("/getDetail/{id}")
|
||||
public ApiResponse getById(@PathVariable Long id) {
|
||||
return taskService.getById(id);
|
||||
}
|
||||
@ApiOperation("删除任务")
|
||||
// 删除任务
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse deleteById(@PathVariable Long id) {
|
||||
return taskService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("修改任务")
|
||||
// 修改任务
|
||||
@PostMapping("/update")
|
||||
public ApiResponse update(@RequestBody TaskEntity taskEntity) {
|
||||
return taskService.update(taskEntity);
|
||||
}
|
||||
@ApiOperation("修改任务状态")
|
||||
// 修改任务状态
|
||||
@PostMapping("/updateStatus")
|
||||
public ApiResponse updateStatus(@RequestParam Long id, @RequestParam Integer status) {
|
||||
return taskService.updateStatus(id,status);
|
||||
|
@@ -9,8 +9,6 @@ import com.ycwl.basic.model.pc.template.req.TemplateSortRequest;
|
||||
import com.ycwl.basic.model.pc.template.resp.TemplateRespVO;
|
||||
import com.ycwl.basic.service.pc.TemplateService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -22,54 +20,60 @@ import java.util.List;
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/template/v1")
|
||||
@Api(tags = "模板管理")
|
||||
// 模板管理
|
||||
public class TemplateController {
|
||||
|
||||
@Autowired
|
||||
private TemplateService templateService;
|
||||
|
||||
@ApiOperation("分页查询模板")
|
||||
// 分页查询模板
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<TemplateRespVO>> pageQuery(@RequestBody TemplateReqQuery templateReqQuery) {
|
||||
return templateService.pageQuery(templateReqQuery);
|
||||
}
|
||||
@ApiOperation("查询模板列表")
|
||||
// 查询模板列表
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<TemplateRespVO>> list(@RequestBody TemplateReqQuery templateReqQuery) {
|
||||
return templateService.list(templateReqQuery);
|
||||
}
|
||||
@ApiOperation("查询模板详情")
|
||||
// 查询模板详情
|
||||
@GetMapping("getDetail/{id}")
|
||||
public ApiResponse<TemplateRespVO> getById(@PathVariable Long id) {
|
||||
return templateService.getById(id);
|
||||
}
|
||||
@ApiOperation("添加模板")
|
||||
// 添加模板
|
||||
@PostMapping("/add")
|
||||
public ApiResponse<Boolean> add(@RequestBody TemplateEntity template) {
|
||||
return templateService.add(template);
|
||||
}
|
||||
@ApiOperation("删除模板")
|
||||
// 删除模板
|
||||
@DeleteMapping("/delete/{id}")
|
||||
public ApiResponse<Integer> deleteById(@PathVariable Long id) {
|
||||
return templateService.deleteById(id);
|
||||
}
|
||||
@ApiOperation("修改模板")
|
||||
// 修改模板
|
||||
@PostMapping("/update")
|
||||
public ApiResponse<Boolean> update(@RequestBody TemplateEntity template) {
|
||||
return templateService.update(template);
|
||||
}
|
||||
@ApiOperation("修改模板状态")
|
||||
// 修改模板状态
|
||||
@PostMapping("/updateStatus/{id}")
|
||||
public ApiResponse<Boolean> updateStatus(@PathVariable("id") Long id) {
|
||||
return templateService.updateStatus(id);
|
||||
}
|
||||
|
||||
@ApiOperation("排序模板")
|
||||
// 排序模板
|
||||
@PostMapping("/sort")
|
||||
public ApiResponse<Boolean> sortTemplate(@RequestBody TemplateSortRequest request) {
|
||||
return templateService.sortTemplate(request.getTemplateId(), request.getAfterTemplateId());
|
||||
}
|
||||
|
||||
// 修改模板排序值
|
||||
@PostMapping("/updateSort/{id}")
|
||||
public ApiResponse<Boolean> updateSort(@PathVariable("id") Long id, @RequestParam Integer sort) {
|
||||
return templateService.updateSort(id, sort);
|
||||
}
|
||||
|
||||
@GetMapping("/config/{id}")
|
||||
public ApiResponse<TemplateConfigEntity> getConfig(@PathVariable("id") Long id) {
|
||||
return ApiResponse.success(templateService.getConfig(id));
|
||||
|
@@ -6,8 +6,6 @@ import com.ycwl.basic.model.pc.video.req.VideoReqQuery;
|
||||
import com.ycwl.basic.model.pc.video.resp.VideoRespVO;
|
||||
import com.ycwl.basic.service.pc.VideoService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -21,23 +19,23 @@ import java.util.List;
|
||||
@RestController
|
||||
@RequestMapping("/api/video/v1")
|
||||
@Deprecated
|
||||
@Api(tags = "视频成片管理")
|
||||
// 视频成片管理
|
||||
public class VideoController {
|
||||
|
||||
@Autowired
|
||||
private VideoService videoService;
|
||||
|
||||
@ApiOperation("分页查询成片")
|
||||
// 分页查询成片
|
||||
@PostMapping("/page")
|
||||
public ApiResponse<PageInfo<VideoRespVO>> pageQuery(@RequestBody VideoReqQuery videoReqQuery) {
|
||||
return videoService.pageQuery(videoReqQuery);
|
||||
}
|
||||
@ApiOperation("查询成片列表")
|
||||
// 查询成片列表
|
||||
@PostMapping("/list")
|
||||
public ApiResponse<List<VideoRespVO>> list(@RequestBody VideoReqQuery videoReqQuery) {
|
||||
return videoService.list(videoReqQuery);
|
||||
}
|
||||
@ApiOperation("查询成片详情")
|
||||
// 查询成片详情
|
||||
@GetMapping("/getDetail/{id}")
|
||||
public ApiResponse<VideoRespVO> getById(@PathVariable Long id) {
|
||||
return videoService.getById(id);
|
||||
|
@@ -7,14 +7,13 @@ import com.ycwl.basic.model.printer.resp.PrintTaskResp;
|
||||
import com.ycwl.basic.model.printer.resp.TaskSyncResp;
|
||||
import com.ycwl.basic.service.printer.PrinterService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@IgnoreToken
|
||||
@Api(tags = "打印机对接接口")
|
||||
// 打印机对接接口
|
||||
@RestController
|
||||
@RequestMapping("/printer/v1")
|
||||
public class PrinterTaskController {
|
||||
|
@@ -10,7 +10,6 @@ import com.ycwl.basic.model.task.req.WorkerAuthReqVo;
|
||||
import com.ycwl.basic.model.task.resp.TaskSyncRespVo;
|
||||
import com.ycwl.basic.service.task.TaskService;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -21,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@IgnoreToken
|
||||
@RestController
|
||||
@Api(tags = "渲染端对接接口")
|
||||
// 渲染端对接接口
|
||||
@RequestMapping("/task/v1/")
|
||||
public class TaskTaskController {
|
||||
|
||||
|
@@ -1,9 +1,10 @@
|
||||
package com.ycwl.basic.controller.viid;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.thread.ThreadFactoryBuilder;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.ycwl.basic.annotation.IgnoreLogReq;
|
||||
import com.ycwl.basic.annotation.IgnoreToken;
|
||||
import com.ycwl.basic.facebody.adapter.IFaceBodyAdapter;
|
||||
@@ -43,7 +44,6 @@ import com.ycwl.basic.task.DynamicTaskGenerator;
|
||||
import com.ycwl.basic.utils.ImageUtils;
|
||||
import com.ycwl.basic.utils.IpUtils;
|
||||
import com.ycwl.basic.utils.SnowFlakeUtil;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -75,7 +75,7 @@ import static com.ycwl.basic.constant.StorageConstant.VIID_FACE;
|
||||
|
||||
@IgnoreToken
|
||||
@RestController
|
||||
@Api(tags = "摄像头对接接口")
|
||||
// 摄像头对接接口
|
||||
@RequestMapping("/VIID")
|
||||
@Slf4j
|
||||
public class ViidController {
|
||||
@@ -275,9 +275,14 @@ public class ViidController {
|
||||
}
|
||||
if (shotTime == null) {
|
||||
shotTime = new Date();
|
||||
} else if (Math.abs(shotTime.getTime() - System.currentTimeMillis()) > 24 * 60 * 60 * 1000) {
|
||||
} else if (!DateUtil.isSameDay(shotTime, new Date())) {
|
||||
log.warn("时间不是今天,使用当前时间。错误entity:{}", face);
|
||||
shotTime = new Date();
|
||||
}
|
||||
if (Math.abs(shotTime.getTime() - System.currentTimeMillis()) > 3600 * 1000) {
|
||||
String jsonString = JacksonUtil.toJSONStringCompat(req);
|
||||
log.warn("时间差超过1小时。device:{},错误entity:{}", device, jsonString);
|
||||
}
|
||||
Long scenicId = device.getScenicId();
|
||||
if (scenicId == null) {
|
||||
continue;
|
||||
@@ -378,7 +383,7 @@ public class ViidController {
|
||||
String _sourceUrl = scenicStorageAdapter.uploadFile(_finalFile, filename);
|
||||
scenicStorageAdapter.setAcl(StorageAcl.PUBLIC_READ, filename);
|
||||
source.setUrl(_sourceUrl);
|
||||
source.setPosJson(JSON.toJSONString(facePosition));
|
||||
source.setPosJson(JacksonUtil.toJSONString(facePosition));
|
||||
sourceMapper.add(source);
|
||||
}
|
||||
});
|
||||
|
@@ -11,7 +11,6 @@ import com.ycwl.basic.storage.adapters.IStorageAdapter;
|
||||
import com.ycwl.basic.storage.enums.StorageAcl;
|
||||
import com.ycwl.basic.storage.utils.StorageUtil;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -26,7 +25,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@IgnoreToken
|
||||
@RestController
|
||||
@Api(tags = "自定义切片工具对接接口")
|
||||
// 自定义切片工具对接接口
|
||||
@RequestMapping("/vpt/v1/")
|
||||
public class VptController {
|
||||
|
||||
|
@@ -12,7 +12,6 @@ import com.ycwl.basic.storage.adapters.IStorageAdapter;
|
||||
import com.ycwl.basic.storage.enums.StorageAcl;
|
||||
import com.ycwl.basic.storage.utils.StorageUtil;
|
||||
import com.ycwl.basic.utils.ApiResponse;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -27,7 +26,7 @@ import java.util.List;
|
||||
@Slf4j
|
||||
@IgnoreToken
|
||||
@RestController
|
||||
@Api(tags = "WVP对接接口")
|
||||
// WVP对接接口
|
||||
@RequestMapping("/wvp/v1/")
|
||||
public class WvpController {
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package com.ycwl.basic.device.checker.helper;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.ycwl.basic.model.pc.device.entity.DeviceConfigEntity;
|
||||
import com.ycwl.basic.model.pc.device.entity.DeviceEntity;
|
||||
import lombok.Setter;
|
||||
@@ -13,7 +13,7 @@ public abstract class CommonDeviceChecker<C> {
|
||||
protected DeviceConfigEntity deviceConfig;
|
||||
|
||||
public CommonDeviceChecker(String configJson) {
|
||||
config = JSON.parseObject(configJson, getConfigClass());
|
||||
config = JacksonUtil.parseObject(configJson, getConfigClass());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package com.ycwl.basic.device.operator;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.ycwl.basic.device.entity.common.FileObject;
|
||||
import com.ycwl.basic.storage.StorageFactory;
|
||||
import com.ycwl.basic.storage.adapters.IStorageAdapter;
|
||||
@@ -28,7 +28,7 @@ public class AliOssStorageOperator extends ADeviceStorageOperator {
|
||||
|
||||
@Override
|
||||
public void loadConfig(String configJson) {
|
||||
AliOssStorageConfig config = JSON.parseObject(configJson, AliOssStorageConfig.class);
|
||||
AliOssStorageConfig config = JacksonUtil.parseObject(configJson, AliOssStorageConfig.class);
|
||||
adapter = StorageFactory.get(StorageType.ALI_OSS, config);
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package com.ycwl.basic.device.operator;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ycwl.basic.device.entity.common.FileObject;
|
||||
import com.ycwl.basic.device.entity.vpt_passive.VptPassiveStorageConfig;
|
||||
@@ -29,10 +28,8 @@ public class VptPassiveStorageOperator extends ADeviceStorageOperator {
|
||||
public Long scenicId;
|
||||
public Long deviceId;
|
||||
public String deviceNo;
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date startTime;
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date endTime;
|
||||
}
|
||||
@@ -75,7 +72,7 @@ public class VptPassiveStorageOperator extends ADeviceStorageOperator {
|
||||
|
||||
@Override
|
||||
public void loadConfig(String configJson) {
|
||||
this.config = JSON.parseObject(configJson, VptPassiveStorageConfig.class);
|
||||
this.config = JacksonUtil.parseObject(configJson, VptPassiveStorageConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -94,7 +91,7 @@ public class VptPassiveStorageOperator extends ADeviceStorageOperator {
|
||||
if (redisTemplate == null) {
|
||||
taskList.add(task);
|
||||
} else {
|
||||
redisTemplate.opsForValue().set(String.format(TASK_KEY, task.scenicId, task.deviceNo) + task.taskId, JSON.toJSONString(task), 10 * 60L, TimeUnit.SECONDS);
|
||||
redisTemplate.opsForValue().set(String.format(TASK_KEY, task.scenicId, task.deviceNo) + task.taskId, JacksonUtil.toJSONString(task), 10 * 60L, TimeUnit.SECONDS);
|
||||
}
|
||||
log.info("任务{}获取视频开始!共{}", task.taskId, taskList.size());
|
||||
Date taskStartTime = new Date();
|
||||
|
@@ -3,8 +3,8 @@ package com.ycwl.basic.device.operator;
|
||||
import cn.hutool.crypto.digest.MD5;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.ycwl.basic.device.entity.common.FileObject;
|
||||
import com.ycwl.basic.device.entity.wvp_active.WvpActiveStorageConfig;
|
||||
import com.ycwl.basic.storage.exceptions.StorageConfigException;
|
||||
@@ -30,7 +30,7 @@ public class WvpActiveStorageOperator extends ADeviceStorageOperator {
|
||||
|
||||
@Override
|
||||
public void loadConfig(String configJson) {
|
||||
this.config = JSON.parseObject(configJson, WvpActiveStorageConfig.class);
|
||||
this.config = JacksonUtil.parseObject(configJson, WvpActiveStorageConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,13 +55,14 @@ public class WvpActiveStorageOperator extends ADeviceStorageOperator {
|
||||
String password = MD5.create().digestHex(this.config.getLoginPassword());
|
||||
params.put("password", password);
|
||||
String jsonResult = HttpUtil.get(url, params);
|
||||
JSONObject result = JSON.parseObject(jsonResult);
|
||||
if (result.getInteger("code") == 0) {
|
||||
JSONObject data = result.getJSONObject("data");
|
||||
this.token = data.getString("accessToken");
|
||||
Map<String, Object> result = JacksonUtil.parseObject(jsonResult, Map.class);
|
||||
Integer code = (Integer) result.get("code");
|
||||
if (code != null && code == 0) {
|
||||
Map<String, Object> data = (Map<String, Object>) result.get("data");
|
||||
this.token = (String) data.get("accessToken");
|
||||
return this.token;
|
||||
} else {
|
||||
throw new StorageConfigException("获取token失败,原因为:" + result.getString("msg"));
|
||||
throw new StorageConfigException("获取token失败,原因为:" + result.get("msg"));
|
||||
}
|
||||
}
|
||||
public List<FileObject> listDirByDtRange(Date startDate, Date endDate) {
|
||||
@@ -75,19 +76,23 @@ public class WvpActiveStorageOperator extends ADeviceStorageOperator {
|
||||
params.put("page", 1);
|
||||
params.put("count", 100);
|
||||
String jsonResult = HttpRequest.get(url).form(params).header("Access-Token", getToken()).execute().body();
|
||||
JSONObject result = JSON.parseObject(jsonResult);
|
||||
if (result.getInteger("code") == 0) {
|
||||
JSONObject data = result.getJSONObject("data");
|
||||
List<JSONObject> recordList = data.getJSONArray("list").toJavaList(JSONObject.class);
|
||||
Map<String, Object> result = JacksonUtil.parseObject(jsonResult, Map.class);
|
||||
Integer code = (Integer) result.get("code");
|
||||
if (code != null && code == 0) {
|
||||
Map<String, Object> data = (Map<String, Object>) result.get("data");
|
||||
List<Map<String, Object>> recordList = JacksonUtil.parseObject(JacksonUtil.toJSONString(((Map<String, Object>) result.get("data")).get("list")), new TypeReference<List<Map<String, Object>>>() {});
|
||||
return recordList.stream()
|
||||
.map(record -> {
|
||||
FileObject object = new FileObject();
|
||||
object.setName(record.getString("id"));
|
||||
object.setPath(record.getString("folder"));
|
||||
object.setUrl(getUrlForDownload(record.getInteger("id")));
|
||||
object.setName((String) record.get("id"));
|
||||
object.setPath((String) record.get("folder"));
|
||||
Integer recordId = (Integer) record.get("id");
|
||||
object.setUrl(getUrlForDownload(recordId != null ? recordId : 0));
|
||||
object.setNeedDownload(true);
|
||||
object.setCreateTime(new Date(record.getLongValue("startTime")));
|
||||
object.setEndTime(new Date(record.getLongValue("endTime")));
|
||||
Number startTime = (Number) record.get("startTime");
|
||||
Number endTime = (Number) record.get("endTime");
|
||||
object.setCreateTime(new Date(startTime != null ? startTime.longValue() : 0));
|
||||
object.setEndTime(new Date(endTime != null ? endTime.longValue() : 0));
|
||||
return object;
|
||||
})
|
||||
.sorted(Comparator.comparing(FileObject::getCreateTime))
|
||||
@@ -100,10 +105,11 @@ public class WvpActiveStorageOperator extends ADeviceStorageOperator {
|
||||
// assume path is recordId
|
||||
String url = this.config.getHost() + "/api/cloud/record/play/path?recordId=" + id;
|
||||
String jsonResult = HttpRequest.get(url).header("Access-Token", getToken()).execute().body();
|
||||
JSONObject result = JSON.parseObject(jsonResult);
|
||||
if (result.getInteger("code") == 0) {
|
||||
JSONObject data = result.getJSONObject("data");
|
||||
String httpPath = data.getString("httpPath");
|
||||
Map<String, Object> result = JacksonUtil.parseObject(jsonResult, Map.class);
|
||||
Integer code = (Integer) result.get("code");
|
||||
if (code != null && code == 0) {
|
||||
Map<String, Object> data = (Map<String, Object>) result.get("data");
|
||||
String httpPath = (String) data.get("httpPath");
|
||||
if (StringUtils.isBlank(this.config.getZlmHost())) {
|
||||
return httpPath;
|
||||
}
|
||||
@@ -114,7 +120,7 @@ public class WvpActiveStorageOperator extends ADeviceStorageOperator {
|
||||
}
|
||||
return this.config.getZlmHost() + uri.getPath() + "?" + uri.getQuery();
|
||||
} else {
|
||||
throw new StorageUnsupportedException("获取播放地址失败,原因为:" + result.getString("msg"));
|
||||
throw new StorageUnsupportedException("获取播放地址失败,原因为:" + result.get("msg"));
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,7 +1,6 @@
|
||||
package com.ycwl.basic.device.operator;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import com.ycwl.basic.utils.JacksonUtil;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ycwl.basic.device.entity.common.FileObject;
|
||||
import com.ycwl.basic.device.entity.wvp_passive.WvpPassiveStorageConfig;
|
||||
@@ -28,10 +27,8 @@ public class WvpPassiveStorageOperator extends ADeviceStorageOperator {
|
||||
public Long scenicId;
|
||||
public Long deviceId;
|
||||
public String deviceNo;
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date startTime;
|
||||
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
public Date endTime;
|
||||
}
|
||||
@@ -72,7 +69,7 @@ public class WvpPassiveStorageOperator extends ADeviceStorageOperator {
|
||||
|
||||
@Override
|
||||
public void loadConfig(String configJson) {
|
||||
this.config = JSON.parseObject(configJson, WvpPassiveStorageConfig.class);
|
||||
this.config = JacksonUtil.parseObject(configJson, WvpPassiveStorageConfig.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -91,7 +88,7 @@ public class WvpPassiveStorageOperator extends ADeviceStorageOperator {
|
||||
if (redisTemplate == null) {
|
||||
taskList.add(task);
|
||||
} else {
|
||||
redisTemplate.opsForValue().set(String.format(TASK_KEY, task.scenicId, task.deviceNo) + task.taskId, JSON.toJSONString(task), 10 * 60L, TimeUnit.SECONDS);
|
||||
redisTemplate.opsForValue().set(String.format(TASK_KEY, task.scenicId, task.deviceNo) + task.taskId, JacksonUtil.toJSONString(task), 10 * 60L, TimeUnit.SECONDS);
|
||||
}
|
||||
Date taskStartTime = new Date();
|
||||
while (true) {
|
||||
|
@@ -0,0 +1,4 @@
|
||||
package com.ycwl.basic.image.enhancer;
|
||||
|
||||
public class ImageEnhancerFactory {
|
||||
}
|
@@ -0,0 +1,44 @@
|
||||
package com.ycwl.basic.image.enhancer.adapter;
|
||||
|
||||
import com.baidu.aip.imageprocess.AipImageProcess;
|
||||
import com.ycwl.basic.image.enhancer.entity.BceEnhancerConfig;
|
||||
import com.ycwl.basic.image.util.ImageUtil;
|
||||
import com.ycwl.basic.utils.ImageUtils;
|
||||
import org.json.JSONObject;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class BceImageEnhancer implements IEnhancer {
|
||||
private BceEnhancerConfig config;
|
||||
|
||||
public boolean setConfig(BceEnhancerConfig config) {
|
||||
this.config = config;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean loadConfig(Map<String, String> _config) {
|
||||
BceEnhancerConfig config = new BceEnhancerConfig();
|
||||
config.setAppId(_config.get("appId"));
|
||||
config.setApiKey(_config.get("apiKey"));
|
||||
config.setSecretKey(_config.get("secretKey"));
|
||||
config.setQps(Float.parseFloat(_config.get("qps")));
|
||||
this.config = config;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public MultipartFile enhance(String url) {
|
||||
AipImageProcess client = getClient();
|
||||
HashMap<String, String> options = new HashMap<>();
|
||||
JSONObject jsonObject = client.imageQualityEnhance(url, options);
|
||||
return ImageUtils.base64ToMultipartFile(jsonObject.getString("image"));
|
||||
}
|
||||
|
||||
public AipImageProcess getClient() {
|
||||
AipImageProcess client = new AipImageProcess(config.getAppId(), config.getApiKey(), config.getSecretKey());
|
||||
return client;
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
package com.ycwl.basic.image.enhancer.adapter;
|
||||
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public interface IEnhancer {
|
||||
boolean loadConfig(Map<String, String> _config);
|
||||
|
||||
public MultipartFile enhance(String url);
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
package com.ycwl.basic.image.enhancer.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class BceEnhancerConfig {
|
||||
private String appId;
|
||||
private String apiKey;
|
||||
private String secretKey;
|
||||
private float qps = 1.0f;
|
||||
}
|
@@ -14,6 +14,7 @@ public class WatermarkInfo {
|
||||
*/
|
||||
private File watermarkedFile;
|
||||
private File qrcodeFile;
|
||||
private File faceFile;
|
||||
private String scenicLine;
|
||||
private String secondLine;
|
||||
private String thirdLine;
|
||||
@@ -35,4 +36,5 @@ public class WatermarkInfo {
|
||||
}
|
||||
return scenicLine;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,11 +4,13 @@ import com.ycwl.basic.image.watermark.entity.WatermarkInfo;
|
||||
import com.ycwl.basic.image.watermark.exception.ImageWatermarkException;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import javax.imageio.IIOImage;
|
||||
import javax.imageio.ImageIO;
|
||||
import javax.imageio.ImageWriteParam;
|
||||
import javax.imageio.ImageWriter;
|
||||
import javax.imageio.stream.ImageOutputStream;
|
||||
import java.awt.*;
|
||||
import java.awt.geom.Ellipse2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
@@ -67,6 +69,7 @@ public class LeicaWatermarkOperator implements IOperator {
|
||||
BufferedImage baseImage;
|
||||
BufferedImage qrcodeImage;
|
||||
BufferedImage logoImage;
|
||||
BufferedImage faceImage = null;
|
||||
// 从类路径加载 zt-logo.png
|
||||
InputStream logoInputStream = getClass().getResourceAsStream("/zt-logo.png");
|
||||
if (logoInputStream == null) {
|
||||
@@ -77,6 +80,13 @@ public class LeicaWatermarkOperator implements IOperator {
|
||||
qrcodeImage = ImageIO.read(info.getQrcodeFile());
|
||||
logoImage = ImageIO.read(logoInputStream);
|
||||
logoInputStream.close();
|
||||
if (info.getFaceFile() != null && info.getFaceFile().isFile()) {
|
||||
try {
|
||||
faceImage = ImageIO.read(info.getFaceFile());
|
||||
} catch (IOException e) {
|
||||
log.warn("头像文件读取失败", e);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new ImageWatermarkException("图片打开失败");
|
||||
}
|
||||
@@ -110,9 +120,51 @@ public class LeicaWatermarkOperator implements IOperator {
|
||||
// 计算二维码的位置
|
||||
int qrcodeX = newImage.getWidth() + EXTRA_BORDER_PX - OFFSET_X - newQrcodeWidth - QRCODE_OFFSET_X - Math.max(scenicLineWidth, datetimeLineWidth);
|
||||
int qrcodeY = EXTRA_BORDER_PX + baseImage.getHeight() + OFFSET_Y - QRCODE_OFFSET_Y;
|
||||
|
||||
|
||||
g2d.drawImage(qrcodeImage, qrcodeX, qrcodeY, newQrcodeWidth, newQrcodeHeight, null);
|
||||
|
||||
// 在二维码中央绘制圆形头像
|
||||
if (faceImage != null) {
|
||||
// 计算圆形头像的尺寸和位置
|
||||
int avatarDiameter = (int) (newQrcodeHeight * 0.45);
|
||||
int avatarX = qrcodeX + (newQrcodeWidth - avatarDiameter) / 2;
|
||||
int avatarY = qrcodeY + (newQrcodeHeight - avatarDiameter) / 2;
|
||||
|
||||
// 保存当前的渲染设置和剪切区域
|
||||
RenderingHints originalHints = g2d.getRenderingHints();
|
||||
Shape originalClip = g2d.getClip();
|
||||
|
||||
// 设置高质量渲染
|
||||
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
|
||||
g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
|
||||
// 创建圆形剪切区域
|
||||
Ellipse2D avatarCircle = new Ellipse2D.Double(avatarX, avatarY, avatarDiameter, avatarDiameter);
|
||||
g2d.setClip(avatarCircle);
|
||||
|
||||
// 实现CSS cover效果的缩放逻辑
|
||||
double faceWidth = faceImage.getWidth();
|
||||
double faceHeight = faceImage.getHeight();
|
||||
double scaleX = avatarDiameter / faceWidth;
|
||||
double scaleY = avatarDiameter / faceHeight;
|
||||
double scale = Math.max(scaleX, scaleY); // 使用较大的缩放比例以填满圆形
|
||||
|
||||
int scaledWidth = (int) (faceWidth * scale);
|
||||
int scaledHeight = (int) (faceHeight * scale);
|
||||
|
||||
// 计算居中位置
|
||||
int faceDrawX = avatarX + (avatarDiameter - scaledWidth) / 2;
|
||||
int faceDrawY = avatarY + (avatarDiameter - scaledHeight) / 2;
|
||||
|
||||
// 绘制缩放后的头像
|
||||
g2d.drawImage(faceImage, faceDrawX, faceDrawY, scaledWidth, scaledHeight, null);
|
||||
|
||||
// 恢复原始设置
|
||||
g2d.setClip(originalClip);
|
||||
g2d.setRenderingHints(originalHints);
|
||||
}
|
||||
|
||||
// 计算文字与二维码垂直居中对齐的Y坐标
|
||||
int qrcodeTop = qrcodeY;
|
||||
int qrcodeBottom = qrcodeTop + newQrcodeHeight;
|
||||
@@ -153,7 +205,7 @@ public class LeicaWatermarkOperator implements IOperator {
|
||||
writeParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
|
||||
writeParam.setCompressionQuality(0.75f); // 设置写入质量为 75%
|
||||
}
|
||||
writer.write(null, new javax.imageio.IIOImage(newImage, null, null), writeParam);
|
||||
writer.write(null, new IIOImage(newImage, null, null), writeParam);
|
||||
} catch (IOException e) {
|
||||
throw new ImageWatermarkException("图片保存失败");
|
||||
}
|
||||
|
@@ -59,9 +59,17 @@ public class NormalWatermarkOperator implements IOperator {
|
||||
public File process(WatermarkInfo info) throws ImageWatermarkException {
|
||||
BufferedImage baseImage;
|
||||
BufferedImage qrcodeImage;
|
||||
BufferedImage faceImage = null;
|
||||
try {
|
||||
baseImage = ImageIO.read(info.getOriginalFile());
|
||||
qrcodeImage = ImageIO.read(info.getQrcodeFile());
|
||||
if (info.getFaceFile() != null && info.getFaceFile().isFile()) {
|
||||
try {
|
||||
faceImage = ImageIO.read(info.getFaceFile());
|
||||
} catch (IOException e) {
|
||||
log.warn("头像文件读取失败", e);
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new ImageWatermarkException("图片打开失败");
|
||||
}
|
||||
@@ -89,6 +97,47 @@ public class NormalWatermarkOperator implements IOperator {
|
||||
g2d.setClip(circle);
|
||||
g2d.drawImage(qrcodeImage, offsetX, offsetY + QRCODE_OFFSET_Y, newQrcodeWidth, newQrcodeHeight, null);
|
||||
g2d.setClip(originalClip);
|
||||
|
||||
// 在圆形二维码中央绘制圆形头像
|
||||
if (faceImage != null) {
|
||||
// 计算圆形头像的尺寸和位置
|
||||
int avatarDiameter = (int) (newQrcodeHeight * 0.45);
|
||||
int avatarX = offsetX + (newQrcodeWidth - avatarDiameter) / 2;
|
||||
int avatarY = offsetY + QRCODE_OFFSET_Y + (newQrcodeHeight - avatarDiameter) / 2;
|
||||
|
||||
// 保存当前的渲染设置
|
||||
RenderingHints originalHints = g2d.getRenderingHints();
|
||||
|
||||
// 设置高质量渲染
|
||||
g2d.setRenderingHint(RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR);
|
||||
g2d.setRenderingHint(RenderingHints.KEY_RENDERING, RenderingHints.VALUE_RENDER_QUALITY);
|
||||
g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
|
||||
|
||||
// 创建圆形剪切区域
|
||||
Ellipse2D avatarCircle = new Ellipse2D.Double(avatarX, avatarY, avatarDiameter, avatarDiameter);
|
||||
g2d.setClip(avatarCircle);
|
||||
|
||||
// 实现CSS cover效果的缩放逻辑
|
||||
double faceWidth = faceImage.getWidth();
|
||||
double faceHeight = faceImage.getHeight();
|
||||
double scaleX = avatarDiameter / faceWidth;
|
||||
double scaleY = avatarDiameter / faceHeight;
|
||||
double scale = Math.max(scaleX, scaleY); // 使用较大的缩放比例以填满圆形
|
||||
|
||||
int scaledWidth = (int) (faceWidth * scale);
|
||||
int scaledHeight = (int) (faceHeight * scale);
|
||||
|
||||
// 计算居中位置
|
||||
int faceDrawX = avatarX + (avatarDiameter - scaledWidth) / 2;
|
||||
int faceDrawY = avatarY + (avatarDiameter - scaledHeight) / 2;
|
||||
|
||||
// 绘制缩放后的头像
|
||||
g2d.drawImage(faceImage, faceDrawX, faceDrawY, scaledWidth, scaledHeight, null);
|
||||
|
||||
// 恢复原始设置
|
||||
g2d.setClip(originalClip);
|
||||
g2d.setRenderingHints(originalHints);
|
||||
}
|
||||
// 计算文字与二维码垂直居中对齐的Y坐标
|
||||
int qrcodeTop = offsetY + QRCODE_OFFSET_Y;
|
||||
int qrcodeBottom = qrcodeTop + newQrcodeHeight;
|
||||
|
@@ -17,6 +17,7 @@ import com.ycwl.basic.model.pc.scenic.entity.ScenicAccountEntity;
|
||||
import com.ycwl.basic.utils.JwtTokenUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.commons.lang3.Strings;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Component;
|
||||
@@ -63,11 +64,6 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||
return true;
|
||||
}
|
||||
|
||||
// 放行白名单
|
||||
if (getWhite(request.getRequestURI())) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
验证token
|
||||
*/
|
||||
@@ -83,7 +79,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||
JwtInfo jwtInfo;
|
||||
try {
|
||||
jwtInfo = JwtTokenUtil.parsingToken(token);
|
||||
if (StringUtils.equals(jwtInfo.getRoleId(), MERCHANT.type)) {
|
||||
if (Strings.CS.equals(jwtInfo.getRoleId(), MERCHANT.type)) {
|
||||
Long merchantId = jwtInfo.getUserId();
|
||||
ScenicAccountEntity account = scenicAccountMapper.findAccountById(merchantId.toString());
|
||||
LocalDateTime expireTime = jwtInfo.getExpireTime();
|
||||
@@ -91,7 +87,7 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||
throw new TokenExpireException("token过期");
|
||||
}
|
||||
}
|
||||
if (StringUtils.equals(jwtInfo.getRoleId(), ADMIN.type)) {
|
||||
if (Strings.CS.equals(jwtInfo.getRoleId(), ADMIN.type)) {
|
||||
Long adminId = jwtInfo.getUserId();
|
||||
LoginEntity account = adminUserMapper.getById(adminId);
|
||||
LocalDateTime expireTime = jwtInfo.getExpireTime();
|
||||
@@ -156,16 +152,6 @@ public class AuthInterceptor implements HandlerInterceptor {
|
||||
return token;
|
||||
}
|
||||
|
||||
|
||||
//白名单swagger2
|
||||
private boolean getWhite(String path) {
|
||||
return StringUtils.containsAny(
|
||||
path,
|
||||
"springfox", "swagger", "v2",
|
||||
"webjars", "doc.html", "favicon.ico"
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 业务接口白名单
|
||||
*
|
||||
|
@@ -1,6 +1,5 @@
|
||||
package com.ycwl.basic.mapper;
|
||||
import com.ycwl.basic.model.pc.coupon.entity.CouponEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ycwl.basic.model.pc.coupon.req.CouponQueryReq;
|
||||
import com.ycwl.basic.model.pc.coupon.resp.CouponRespVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
@@ -8,10 +7,22 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CouponMapper extends BaseMapper<CouponEntity> {
|
||||
public interface CouponMapper {
|
||||
List<CouponRespVO> selectByQuery(CouponQueryReq query);
|
||||
|
||||
int updateStatus(Integer id);
|
||||
|
||||
CouponEntity getById(Integer couponId);
|
||||
|
||||
int insert(CouponEntity coupon);
|
||||
|
||||
int updateById(CouponEntity coupon);
|
||||
|
||||
int deleteById(Integer id);
|
||||
|
||||
List<CouponEntity> selectList();
|
||||
|
||||
CouponEntity selectById(Integer id);
|
||||
|
||||
CouponEntity selectByScenicIdAndTypeAndStatus(Long scenicId, Integer type, Integer status);
|
||||
}
|
@@ -2,6 +2,8 @@ package com.ycwl.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ycwl.basic.model.pc.couponRecord.entity.CouponRecordEntity;
|
||||
import com.ycwl.basic.model.pc.couponRecord.req.CouponRecordPageQueryReq;
|
||||
import com.ycwl.basic.model.pc.couponRecord.resp.CouponRecordPageResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -9,4 +11,10 @@ import java.util.List;
|
||||
@Mapper
|
||||
public interface CouponRecordMapper extends BaseMapper<CouponRecordEntity> {
|
||||
List<CouponRecordEntity> queryByUserWithGoodsId(Long scenicId, Long memberId, String goodsId);
|
||||
|
||||
List<CouponRecordEntity> queryByMemberIdAndFaceId(Long memberId, Long faceId);
|
||||
|
||||
CouponRecordEntity queryByMemberIdAndFaceIdAndType(Long memberId, Long faceId, Integer type);
|
||||
|
||||
List<CouponRecordPageResp> selectByPageQuery(CouponRecordPageQueryReq query);
|
||||
}
|
||||
|
@@ -0,0 +1,10 @@
|
||||
package com.ycwl.basic.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.ycwl.basic.model.custom.entity.CustomUploadTaskEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface CustomUploadTaskMapper extends BaseMapper<CustomUploadTaskEntity> {
|
||||
CustomUploadTaskEntity getByJobId(String jobId);
|
||||
}
|
@@ -52,7 +52,9 @@ public interface OrderMapper {
|
||||
int updateOrderPrice(OrderEntity updateEntity);
|
||||
int updateOrder(OrderEntity updateEntity);
|
||||
|
||||
OrderEntity queryTypeOrder(Long userId, Long scenicId, int orderType, Integer priceConfigId);
|
||||
OrderEntity queryTypeOrder(Long userId, Long faceId, Long scenicId, int orderType, Integer priceConfigId);
|
||||
|
||||
OrderEntity getUserOrderItem(Long userId, Long scenicId, int orderType, Long configId, Integer goodsType, Long goodsId);
|
||||
|
||||
int updateMemberIdByFaceId(OrderEntity orderEntity);
|
||||
}
|
||||
|
@@ -83,4 +83,13 @@ public interface SourceMapper {
|
||||
void addSourceWatermark(Long sourceId, Long faceId, String type, String url);
|
||||
|
||||
int deleteUselessSource();
|
||||
|
||||
int updateMemberIdByFaceId(Long faceId, Long memberId);
|
||||
|
||||
/**
|
||||
* 根据faceId查询type=2的source列表
|
||||
* @param faceId 人脸ID
|
||||
* @return type=2的source列表
|
||||
*/
|
||||
List<SourceEntity> listImageSourcesByFaceId(Long faceId);
|
||||
}
|
||||
|
@@ -102,4 +102,15 @@ public interface StatisticsMapper {
|
||||
List<HashMap<String, String>> orderChartByDate(CommonQueryReq query);
|
||||
|
||||
List<HashMap<String, String>> orderChartByHour(CommonQueryReq query);
|
||||
|
||||
List<HashMap<String, String>> scanCodeMemberChartByHour(CommonQueryReq query);
|
||||
|
||||
List<HashMap<String, String>> scanCodeMemberChartByDate(CommonQueryReq query);
|
||||
|
||||
/**
|
||||
* 统计订单数量和金额(包含推送订单和现场订单)
|
||||
* @param query
|
||||
* @return
|
||||
*/
|
||||
com.ycwl.basic.model.pc.statistics.resp.OrderStatisticsResp getOrderStatistics(CommonQueryReq query);
|
||||
}
|
||||
|
@@ -55,4 +55,6 @@ public interface TaskMapper {
|
||||
List<TaskEntity> listEntity(TaskReqQuery taskReqQuery);
|
||||
|
||||
List<TaskRespVO> selectNotRunningByScenicList(String scenicOnly);
|
||||
|
||||
List<TaskEntity> selectAllFailed();
|
||||
}
|
||||
|
@@ -56,4 +56,6 @@ public interface VideoMapper {
|
||||
int deleteNotBuyFaceRelations(Long userId, Long faceId);
|
||||
|
||||
int deleteUselessVideo();
|
||||
|
||||
int updateMemberIdByFaceId(Long faceId, Long memberId);
|
||||
}
|
||||
|
@@ -1,19 +1,17 @@
|
||||
package com.ycwl.basic.model.common;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @date 2021年10月26日 14:09
|
||||
*/
|
||||
@ApiModel(value = "公共查询参数实体类", description = "公共查询参数实体类")
|
||||
// 公共查询参数实体类: 公共查询参数实体类
|
||||
@Data
|
||||
public class BaseQueryParameterReq {
|
||||
|
||||
@ApiModelProperty(value = "当前页数")
|
||||
// 当前页数
|
||||
private Integer pageNum = 1;
|
||||
|
||||
@ApiModelProperty(value = "每页条数")
|
||||
// 每页条数
|
||||
private Integer pageSize = 10;
|
||||
}
|
||||
|
@@ -0,0 +1,32 @@
|
||||
package com.ycwl.basic.model.custom.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName("custom_upload_task")
|
||||
public class CustomUploadTaskEntity {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private Long id;
|
||||
|
||||
private Long scenicId;
|
||||
|
||||
private Long deviceId;
|
||||
|
||||
private String savePath;
|
||||
|
||||
private String status;
|
||||
|
||||
private String jobId;
|
||||
|
||||
private String errorMsg;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
private Date updateTime;
|
||||
}
|
145
src/main/java/com/ycwl/basic/model/custom/entity/FaceData.java
Normal file
145
src/main/java/com/ycwl/basic/model/custom/entity/FaceData.java
Normal file
@@ -0,0 +1,145 @@
|
||||
package com.ycwl.basic.model.custom.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class FaceData {
|
||||
private String category;
|
||||
private String name;
|
||||
private List<Occurrence> occurrences;
|
||||
private Double ratio;
|
||||
|
||||
// Getters and setters
|
||||
public String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<Occurrence> getOccurrences() {
|
||||
return occurrences;
|
||||
}
|
||||
|
||||
public void setOccurrences(List<Occurrence> occurrences) {
|
||||
this.occurrences = occurrences;
|
||||
}
|
||||
|
||||
public Double getRatio() {
|
||||
return ratio;
|
||||
}
|
||||
|
||||
public void setRatio(Double ratio) {
|
||||
this.ratio = ratio;
|
||||
}
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class Occurrence {
|
||||
@JsonProperty("faceUrl")
|
||||
private String faceUrl;
|
||||
|
||||
private Double from;
|
||||
private Position position;
|
||||
private String scene;
|
||||
private Double score;
|
||||
private Double timestamp;
|
||||
private Double to;
|
||||
|
||||
// Getters and setters
|
||||
public String getFaceUrl() {
|
||||
return faceUrl;
|
||||
}
|
||||
|
||||
public void setFaceUrl(String faceUrl) {
|
||||
this.faceUrl = faceUrl;
|
||||
}
|
||||
|
||||
public Double getFrom() {
|
||||
return from;
|
||||
}
|
||||
|
||||
public void setFrom(Double from) {
|
||||
this.from = from;
|
||||
}
|
||||
|
||||
public Position getPosition() {
|
||||
return position;
|
||||
}
|
||||
|
||||
public void setPosition(Position position) {
|
||||
this.position = position;
|
||||
}
|
||||
|
||||
public String getScene() {
|
||||
return scene;
|
||||
}
|
||||
|
||||
public void setScene(String scene) {
|
||||
this.scene = scene;
|
||||
}
|
||||
|
||||
public Double getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(Double score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public Double getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
public void setTimestamp(Double timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
|
||||
public Double getTo() {
|
||||
return to;
|
||||
}
|
||||
|
||||
public void setTo(Double to) {
|
||||
this.to = to;
|
||||
}
|
||||
}
|
||||
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class Position {
|
||||
@JsonProperty("leftTop")
|
||||
private List<Integer> leftTop;
|
||||
|
||||
@JsonProperty("rightBottom")
|
||||
private List<Integer> rightBottom;
|
||||
|
||||
// Getters and setters
|
||||
public List<Integer> getLeftTop() {
|
||||
return leftTop;
|
||||
}
|
||||
|
||||
public void setLeftTop(List<Integer> leftTop) {
|
||||
this.leftTop = leftTop;
|
||||
}
|
||||
|
||||
public List<Integer> getRightBottom() {
|
||||
return rightBottom;
|
||||
}
|
||||
|
||||
public void setRightBottom(List<Integer> rightBottom) {
|
||||
this.rightBottom = rightBottom;
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.ycwl.basic.model.custom.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class AliyunCallbackReq {
|
||||
|
||||
private String jobId;
|
||||
|
||||
private String pipelineId;
|
||||
|
||||
private String status;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.ycwl.basic.model.custom.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CreateUploadTaskReq {
|
||||
|
||||
private String accessKey;
|
||||
|
||||
private String fileName;
|
||||
|
||||
private String type;
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
package com.ycwl.basic.model.custom.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UploadCompleteReq {
|
||||
|
||||
private String accessKey;
|
||||
|
||||
private Long taskId;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.ycwl.basic.model.custom.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UploadFailedReq {
|
||||
|
||||
private String accessKey;
|
||||
|
||||
private Long taskId;
|
||||
|
||||
private String errorMsg;
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
package com.ycwl.basic.model.custom.resp;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class CreateUploadTaskResp {
|
||||
|
||||
private Long taskId;
|
||||
|
||||
private String uploadUrl;
|
||||
|
||||
private String savePath;
|
||||
}
|
@@ -0,0 +1,10 @@
|
||||
package com.ycwl.basic.model.mobile.coupon.req;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ClaimCouponReq {
|
||||
private Long memberId;
|
||||
private Long faceId;
|
||||
private Integer type;
|
||||
}
|
@@ -1,8 +1,7 @@
|
||||
package com.ycwl.basic.model.mobile.goods;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@@ -15,35 +14,37 @@ import java.util.Date;
|
||||
* @Date:2024/12/5 15:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("商品详情")
|
||||
// 商品详情
|
||||
public class GoodsDetailVO {
|
||||
@ApiModelProperty("商品名称")
|
||||
// 商品名称
|
||||
private String goodsName;
|
||||
@ApiModelProperty("人脸id")
|
||||
// 人脸id
|
||||
private Long faceId;
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("景区名称")
|
||||
// 景区名称
|
||||
private String scenicName;
|
||||
@ApiModelProperty("商品类型 1:成片视频 2:源素材")
|
||||
// 商品类型 1:成片视频 2:源素材
|
||||
private Integer goodsType;
|
||||
@ApiModelProperty("商品id goodsType=1时为videoId,goodsType=2时为sourceId")
|
||||
// 商品id goodsType=1时为videoId,goodsType=2时为sourceId
|
||||
private Long goodsId;
|
||||
@ApiModelProperty("模版封面图片")
|
||||
// 模版封面图片
|
||||
private String templateCoverUrl;
|
||||
@ApiModelProperty("图片文件存储地址")
|
||||
// 图片文件存储地址
|
||||
private String url;
|
||||
@ApiModelProperty("视频文件存储地址")
|
||||
// 视频文件存储地址
|
||||
private String videoUrl;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
@ApiModelProperty("价格")
|
||||
// 价格
|
||||
private BigDecimal price;
|
||||
@ApiModelProperty("是否已购买 0否 1是")
|
||||
// 是否已购买 0否 1是
|
||||
private Integer isBuy;
|
||||
private Integer isFree;
|
||||
private Integer parts;
|
||||
private Integer sort;
|
||||
|
||||
@JsonProperty("sourceType")
|
||||
public Integer getSourceType() {
|
||||
return goodsType;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.goods;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -11,22 +9,22 @@ import java.math.BigDecimal;
|
||||
* @Date:2024/12/5 15:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端商品列表响应信息")
|
||||
// 移动端商品列表响应信息
|
||||
public class GoodsPageVO {
|
||||
@ApiModelProperty("商品名称")
|
||||
// 商品名称
|
||||
private String goodsName;
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
private Long faceId;
|
||||
@ApiModelProperty("景区名称")
|
||||
// 景区名称
|
||||
private String scenicName;
|
||||
@ApiModelProperty("商品类型 1:成片视频 2:源素材")
|
||||
// 商品类型 1:成片视频 2:源素材
|
||||
private Integer goodsType;
|
||||
@ApiModelProperty("源素材类型 1:视频 2:图片")
|
||||
// 源素材类型 1:视频 2:图片
|
||||
private Integer sourceType;
|
||||
@ApiModelProperty("商品(vlog)id goodsType为1时才有值")
|
||||
// 商品(vlog)id goodsType为1时才有值
|
||||
private Long goodsId;
|
||||
private String templateName;
|
||||
@ApiModelProperty("模版封面图片")
|
||||
// 模版封面图片
|
||||
private String templateCoverUrl;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.goods;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
@@ -11,12 +9,12 @@ import lombok.experimental.Accessors;
|
||||
*/
|
||||
@Accessors(chain = true)
|
||||
@Data
|
||||
@ApiModel("查询商品价格请求参数")
|
||||
// 查询商品价格请求参数
|
||||
public class GoodsPriceQueryReq {
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("商品类型 0:成片vlog 12:源素材")
|
||||
// 商品类型 0:成片vlog 12:源素材
|
||||
private Integer goodsType;
|
||||
@ApiModelProperty("商品id goodsType=0时才有值")
|
||||
// 商品id goodsType=0时才有值
|
||||
private Long goodsId;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.goods;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -9,14 +7,14 @@ import lombok.Data;
|
||||
* @Date:2024/12/5 15:40
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "商品查询对象")
|
||||
// 商品查询对象
|
||||
public class GoodsReqQuery {
|
||||
@ApiModelProperty("是否已购买 0否 1是")
|
||||
// 是否已购买 0否 1是
|
||||
private Integer isBuy;
|
||||
private Long faceId;
|
||||
private Long goodsId;
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("源素材商品类型 1视频 2图像")
|
||||
// 源素材商品类型 1视频 2图像
|
||||
private Integer sourceType;
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
package com.ycwl.basic.model.mobile.goods;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -13,13 +11,13 @@ import java.util.Date;
|
||||
* @Date:2024/12/5 15:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("商品详情")
|
||||
// 商品详情
|
||||
public class GoodsUrlVO {
|
||||
@ApiModelProperty("商品类型 0:vlog 1:成片视频 2:源素材")
|
||||
// 商品类型 0:vlog 1:成片视频 2:源素材
|
||||
private Integer goodsType;
|
||||
@ApiModelProperty("商品id goodsType=0时为videoId,goodsType=2时为sourceId")
|
||||
// 商品id goodsType=0时为videoId,goodsType=2时为sourceId
|
||||
private Long goodsId;
|
||||
@ApiModelProperty("图片文件存储地址")
|
||||
// 图片文件存储地址
|
||||
private String url;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
|
@@ -1,8 +1,7 @@
|
||||
package com.ycwl.basic.model.mobile.goods;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -13,44 +12,59 @@ import java.util.Date;
|
||||
* @Date:2024/12/5 15:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("vlog商品详情")
|
||||
// vlog商品详情
|
||||
public class VideoGoodsDetailVO {
|
||||
@ApiModelProperty("商品名称")
|
||||
// 商品名称
|
||||
private String goodsName;
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("景区名称")
|
||||
// 景区名称
|
||||
private String scenicName;
|
||||
@ApiModelProperty("经度")
|
||||
// 经度
|
||||
private BigDecimal longitude;
|
||||
@ApiModelProperty("纬度")
|
||||
// 纬度
|
||||
private BigDecimal latitude;
|
||||
@ApiModelProperty("商品类型 1:成片视频 2:源素材")
|
||||
// 商品类型 1:成片视频 2:源素材
|
||||
private Integer goodsType;
|
||||
@ApiModelProperty("源素材类型 1:视频 2:图片")
|
||||
// 源素材类型 1:视频 2:图片
|
||||
private Integer sourceType;
|
||||
@ApiModelProperty("商品id goodsType=1时为videoId,goodsType=2时为sourceId")
|
||||
// 商品id goodsType=1时为videoId,goodsType=2时为sourceId
|
||||
private Long goodsId;
|
||||
@ApiModelProperty("模版封面图片")
|
||||
// 模版封面图片
|
||||
private String templateCoverUrl;
|
||||
@ApiModelProperty("图片文件存储地址")
|
||||
// 图片文件存储地址
|
||||
private String url;
|
||||
@ApiModelProperty("视频文件存储地址")
|
||||
// 视频文件存储地址
|
||||
private String videoUrl;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private Date shotTime;
|
||||
@ApiModelProperty("价格")
|
||||
// 价格
|
||||
private Integer couponId;
|
||||
private Integer couponRecordId;
|
||||
private BigDecimal couponPrice;
|
||||
private BigDecimal origPrice;
|
||||
private String price;
|
||||
private String slashPrice;
|
||||
@ApiModelProperty("是否已购买 0否 1是")
|
||||
private BigDecimal slashPrice;
|
||||
// 是否已购买 0否 1是
|
||||
private Integer isBuy;
|
||||
@ApiModelProperty("镜头数")
|
||||
// 镜头数
|
||||
private Integer lensNum;
|
||||
private Long faceId;
|
||||
private boolean share = false;
|
||||
private Integer height;
|
||||
private Integer width;
|
||||
private BigDecimal duration;
|
||||
|
||||
@JsonProperty("discountPrice")
|
||||
public BigDecimal getDiscountPrice() {
|
||||
if (slashPrice == null) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
if (slashPrice.compareTo(BigDecimal.ZERO) <= 0) {
|
||||
return BigDecimal.ZERO;
|
||||
}
|
||||
return slashPrice.subtract(origPrice);
|
||||
}
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
package com.ycwl.basic.model.mobile.index;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -12,10 +10,10 @@ import lombok.Data;
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("顶部状态")
|
||||
// 顶部状态
|
||||
public class TopStateResp {
|
||||
@ApiModelProperty("是否录入有效人脸")
|
||||
// 是否录入有效人脸
|
||||
private Boolean isFace = false;
|
||||
@ApiModelProperty("AI合成了多少个视频,null时没有合成的视频")
|
||||
// AI合成了多少个视频,null时没有合成的视频
|
||||
private Integer aiVideoNum;
|
||||
}
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.ycwl.basic.model.mobile.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -18,6 +19,7 @@ public class IsBuyBatchRespVO {
|
||||
private BigDecimal couponPrice = BigDecimal.ZERO;
|
||||
private BigDecimal slashPrice;
|
||||
|
||||
@JsonProperty("price")
|
||||
public BigDecimal getPrice() {
|
||||
if (origPrice == null) {
|
||||
return BigDecimal.ZERO;
|
||||
@@ -27,6 +29,7 @@ public class IsBuyBatchRespVO {
|
||||
}
|
||||
return origPrice.subtract(couponPrice);
|
||||
}
|
||||
@JsonProperty("discountPrice")
|
||||
public BigDecimal getDiscountPrice() {
|
||||
if (slashPrice == null) {
|
||||
return BigDecimal.ZERO;
|
||||
|
@@ -1,5 +1,6 @@
|
||||
package com.ycwl.basic.model.mobile.order;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -17,6 +18,7 @@ public class IsBuyRespVO {
|
||||
private BigDecimal couponPrice = BigDecimal.ZERO;
|
||||
private BigDecimal slashPrice;
|
||||
|
||||
@JsonProperty("price")
|
||||
public BigDecimal getPrice() {
|
||||
if (origPrice == null) {
|
||||
return BigDecimal.ZERO;
|
||||
@@ -26,6 +28,7 @@ public class IsBuyRespVO {
|
||||
}
|
||||
return origPrice.subtract(couponPrice);
|
||||
}
|
||||
@JsonProperty("discountPrice")
|
||||
public BigDecimal getDiscountPrice() {
|
||||
if (slashPrice == null) {
|
||||
return BigDecimal.ZERO;
|
||||
|
@@ -1,8 +1,6 @@
|
||||
package com.ycwl.basic.model.mobile.order;
|
||||
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
@@ -15,9 +13,9 @@ import java.util.Date;
|
||||
*/
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Data
|
||||
@ApiModel(value = "移动端订单查询对象")
|
||||
// 移动端订单查询对象
|
||||
public class OrderAppPageReq extends BaseQueryParameterReq {
|
||||
@ApiModelProperty(value = "用户id",hidden = true)
|
||||
// 用户id
|
||||
private Long memberId;
|
||||
// /**
|
||||
// * 微信openId
|
||||
@@ -84,6 +82,6 @@ public class OrderAppPageReq extends BaseQueryParameterReq {
|
||||
// private Date startRefundTime;
|
||||
// private Date endRefundTime;
|
||||
|
||||
@ApiModelProperty("订单类型 0成片(vlog) 1原片 2照片")
|
||||
// 订单类型 0成片(vlog) 1原片 2照片
|
||||
private Integer type;
|
||||
}
|
||||
|
@@ -1,8 +1,6 @@
|
||||
package com.ycwl.basic.model.mobile.order;
|
||||
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -12,10 +10,10 @@ import lombok.Data;
|
||||
* @Version: 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("退款请求参数")
|
||||
// 退款请求参数
|
||||
public class RefundOrderReq {
|
||||
@ApiModelProperty("订单ID")
|
||||
// 订单ID
|
||||
private Long orderId;
|
||||
@ApiModelProperty("理由")
|
||||
// 理由
|
||||
private String refundReason;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.scenic;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -11,71 +9,71 @@ import java.math.BigDecimal;
|
||||
* @Date:2024/12/6 10:25
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端景区响应参数")
|
||||
// 移动端景区响应参数
|
||||
public class ScenicAppVO {
|
||||
private Long id;
|
||||
/**
|
||||
* 景区名称
|
||||
*/
|
||||
@ApiModelProperty("景区名称")
|
||||
// 景区名称
|
||||
private String name;
|
||||
/**
|
||||
* 联系电话
|
||||
*/
|
||||
@ApiModelProperty("联系电话")
|
||||
// 联系电话
|
||||
private String phone;
|
||||
/**
|
||||
* 景区介绍
|
||||
*/
|
||||
@ApiModelProperty("景区介绍")
|
||||
// 景区介绍
|
||||
private String introduction;
|
||||
@ApiModelProperty("封面图")
|
||||
// 封面图
|
||||
private String coverUrl;
|
||||
/**
|
||||
* 经度
|
||||
*/
|
||||
@ApiModelProperty("经度")
|
||||
// 经度
|
||||
private BigDecimal longitude;
|
||||
/***
|
||||
* 纬度
|
||||
*/
|
||||
@ApiModelProperty("纬度")
|
||||
// 纬度
|
||||
private BigDecimal latitude;
|
||||
/**
|
||||
* 半径(km)
|
||||
*/
|
||||
@ApiModelProperty("半径(km)")
|
||||
// 半径(km)
|
||||
private BigDecimal radius;
|
||||
/**
|
||||
* 省份
|
||||
*/
|
||||
@ApiModelProperty("省份")
|
||||
// 省份
|
||||
private String province;
|
||||
/**
|
||||
* 城市
|
||||
*/
|
||||
@ApiModelProperty("城市")
|
||||
// 城市
|
||||
private String city;
|
||||
/**
|
||||
* 区
|
||||
*/
|
||||
@ApiModelProperty("区")
|
||||
// 区
|
||||
private String area;
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@ApiModelProperty("详细地址")
|
||||
// 详细地址
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 距离
|
||||
*/
|
||||
@ApiModelProperty("距离米")
|
||||
// 距离米
|
||||
private BigDecimal distance;
|
||||
|
||||
/**
|
||||
* 机位数量
|
||||
*/
|
||||
@ApiModelProperty("机位数量")
|
||||
// 机位数量
|
||||
private Integer deviceNum;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.scenic;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -9,8 +7,8 @@ import lombok.Data;
|
||||
* @Date:2024/12/6 10:37
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端景区设备数量响应参数")
|
||||
// 移动端景区设备数量响应参数
|
||||
public class ScenicDeviceCountVO {
|
||||
@ApiModelProperty("景区设备总数")
|
||||
// 景区设备总数
|
||||
private Integer totalDeviceCount;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.scenic;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -10,10 +8,10 @@ import java.math.BigDecimal;
|
||||
* @Author:songmingsong
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("首页景区列表")
|
||||
// 首页景区列表
|
||||
public class ScenicIndexVO {
|
||||
@ApiModelProperty("经度")
|
||||
// 经度
|
||||
private BigDecimal longitude;
|
||||
@ApiModelProperty("纬度")
|
||||
// 纬度
|
||||
private BigDecimal latitude;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.scenic.account;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -11,18 +9,18 @@ import java.util.List;
|
||||
* @Date:2024/12/13 9:44
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("景区账号登录响应类")
|
||||
// 景区账号登录响应类
|
||||
public class ScenicLoginOldRespVO {
|
||||
private Long id;
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("是否是超级管理员")
|
||||
// 是否是超级管理员
|
||||
private Integer isSuper;
|
||||
@ApiModelProperty("账号名称")
|
||||
// 账号名称
|
||||
private String name;
|
||||
@ApiModelProperty("账号")
|
||||
// 账号
|
||||
private String account;
|
||||
@ApiModelProperty("1启用 0禁用")
|
||||
// 1启用 0禁用
|
||||
private Integer status;
|
||||
private String token;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.scenic.account;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -9,10 +7,7 @@ import lombok.Data;
|
||||
* @Date:2024/12/13 9:44
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("景区账号登录请求类")
|
||||
public class ScenicLoginReq {
|
||||
@ApiModelProperty("账号")
|
||||
private String account;
|
||||
@ApiModelProperty("密码")
|
||||
private String password;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.scenic.account;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
@@ -11,18 +9,18 @@ import java.util.List;
|
||||
* @Date:2024/12/13 9:44
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("景区账号登录响应类")
|
||||
// 景区账号登录响应类
|
||||
public class ScenicLoginRespVO {
|
||||
private Long id;
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private List<Long> scenicId;
|
||||
@ApiModelProperty("是否是超级管理员")
|
||||
// 是否是超级管理员
|
||||
private Integer isSuper;
|
||||
@ApiModelProperty("账号名称")
|
||||
// 账号名称
|
||||
private String name;
|
||||
@ApiModelProperty("账号")
|
||||
// 账号
|
||||
private String account;
|
||||
@ApiModelProperty("1启用 0禁用")
|
||||
// 1启用 0禁用
|
||||
private Integer status;
|
||||
private String token;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.scenic.content;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@@ -11,26 +9,26 @@ import java.math.BigDecimal;
|
||||
* @Date:2024/12/5 15:10
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("景区内容(成片、待成片模版、源素材)列表响应信息")
|
||||
// 景区内容(成片、待成片模版、源素材)列表响应信息
|
||||
public class ContentPageVO {
|
||||
@ApiModelProperty("内容名称")
|
||||
// 内容名称
|
||||
private String name;
|
||||
@ApiModelProperty("景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("景区名称")
|
||||
// 景区名称
|
||||
private String scenicName;
|
||||
@ApiModelProperty("内容类型 0模版 1:成片视频 2:源素材 ")
|
||||
// 内容类型 0模版 1:成片视频 2:源素材
|
||||
private Integer contentType;
|
||||
@ApiModelProperty("源素材类型 1:视频 2:图片")
|
||||
// 源素材类型 1:视频 2:图片
|
||||
private Integer sourceType;
|
||||
private int lockType;
|
||||
@ApiModelProperty("内容id contentType为0或1时才有值")
|
||||
// 内容id contentType为0或1时才有值
|
||||
private Long contentId;
|
||||
@ApiModelProperty("模版id")
|
||||
// 模版id
|
||||
private Long templateId;
|
||||
@ApiModelProperty("模版封面图片 contentType为0或1时才有值")
|
||||
// 模版封面图片 contentType为0或1时才有值
|
||||
private String templateCoverUrl;
|
||||
@ApiModelProperty("是否购买:0未购买,1已购买")
|
||||
// 是否购买:0未购买,1已购买
|
||||
private Integer isBuy;
|
||||
private BigDecimal duration;
|
||||
private Integer goodsType;
|
||||
|
@@ -1,8 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.statistic.req;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -12,11 +9,11 @@ import java.util.Date;
|
||||
* @Date:2024/12/11 19:03
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端公用请求参数")
|
||||
// 移动端公用请求参数
|
||||
public class CommonQueryReq {
|
||||
@ApiModelProperty(value = "查询统计纬度 0今天、1昨天、2-近一周(7天)、3-近30天、4-近1年")
|
||||
// 查询统计纬度 0今天、1昨天、2-近一周(7天)、3-近30天、4-近1年
|
||||
private Integer standard;
|
||||
@ApiModelProperty(value = "景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
private boolean realtime;
|
||||
private Date startTime;
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.statistic.req;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -9,16 +7,16 @@ import lombok.Data;
|
||||
* @Date:2024/12/12 18:31
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端用户操作统计记录添加类")
|
||||
// 移动端用户操作统计记录添加类
|
||||
public class StatisticsRecordAddReq {
|
||||
@ApiModelProperty(value = "主键id",hidden = true)
|
||||
// 主键id
|
||||
private Long id;
|
||||
@ApiModelProperty("统计数据类型,0扫码访问,1上传人脸,2预览视频,3现场支付,4事后支付,5退款,6消息推送,8下载,9点击购买")
|
||||
// 统计数据类型,0扫码访问,1上传人脸,2预览视频,3现场支付,4事后支付,5退款,6消息推送,8下载,9点击购买
|
||||
private Integer type;
|
||||
@ApiModelProperty(value = "景区id")
|
||||
// 景区id
|
||||
private Long scenicId;
|
||||
@ApiModelProperty(value = "触发用户id",hidden = true)
|
||||
// 触发用户id
|
||||
private Long memberId;
|
||||
@ApiModelProperty("关联数据ID 例如:预览视频就是视频id")
|
||||
// 关联数据ID 例如:预览视频就是视频id
|
||||
private Long morphId;
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
package com.ycwl.basic.model.mobile.statistic.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
@@ -9,18 +7,18 @@ import lombok.Data;
|
||||
* @Date:2024/12/11 18:23
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("移动端订单金额、预览_支付转化率、扫码_付费用户转化率统计结果类")
|
||||
// 移动端订单金额、预览_支付转化率、扫码_付费用户转化率统计结果类
|
||||
public class AppSta1VO {
|
||||
@ApiModelProperty("现在的数据 支付订单金额")
|
||||
// 现在的数据 支付订单金额
|
||||
private String nowOrderAmount;
|
||||
@ApiModelProperty("上一期的数据 支付订单金额")
|
||||
// 上一期的数据 支付订单金额
|
||||
private String previousOrderAmount;
|
||||
@ApiModelProperty("现在的数据 预览_支付转化率")
|
||||
// 现在的数据 预览_支付转化率
|
||||
private String nowPreviewPay;
|
||||
@ApiModelProperty("上一期的数据 预览_支付转化率")
|
||||
// 上一期的数据 预览_支付转化率
|
||||
private String previousPreviewPay;
|
||||
@ApiModelProperty("现在的数据 扫码_付费用户转化率")
|
||||
// 现在的数据 扫码_付费用户转化率
|
||||
private String nowScanCodePay;
|
||||
@ApiModelProperty("上一期的数据 扫码_付费用户转化率")
|
||||
// 上一期的数据 扫码_付费用户转化率
|
||||
private String previousScanCodePay;
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user