Initial commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
### Example user template template
|
||||
### Example user template
|
||||
|
||||
# IntelliJ project files
|
||||
.idea
|
||||
*.iml
|
||||
out
|
||||
gen
|
||||
@@ -0,0 +1,135 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>oneone-pms</artifactId>
|
||||
<version>${revision}</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>oneone-pms-boot</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>oneone-upms-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>oneone-pms-api</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.swagger</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>common-web</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>common-log</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>common-redis</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>common-mybatis-plus</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Registry 注册中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- Maven依赖 -->
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.15</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Config 配置中心相关 -->
|
||||
<dependency>
|
||||
<groupId>com.alibaba.cloud</groupId>
|
||||
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.binarywang</groupId>-->
|
||||
<!-- <artifactId>weixin-java-pay</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.github.binarywang</groupId>-->
|
||||
<!-- <artifactId>wx-java-miniapp-spring-boot-starter</artifactId>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springdoc</groupId>
|
||||
<artifactId>springdoc-openapi-ui</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.baomidou</groupId>-->
|
||||
<!-- <artifactId>mybatis-plus-generator</artifactId> <!– 代码生成器,使用它解析表结构 –>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>cn.smallbun.screw</groupId>-->
|
||||
<!-- <artifactId>screw-core</artifactId> <!– 实现数据库文档 –>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- 单元测试 -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-openfeign-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>oneone-pms-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.oneone.cloud</groupId>
|
||||
<artifactId>common-biz</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<!-- 设置构建的 jar 包名 -->
|
||||
<finalName>${project.artifactId}</finalName>
|
||||
<plugins>
|
||||
<!-- 打包 -->
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
<version>${spring.boot.version}</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>repackage</goal> <!-- 将引入的 jar 打入其中 -->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
|
||||
</project>
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.oneone.pms;
|
||||
|
||||
import com.oneone.upms.api.dict.DictDataApi;
|
||||
import com.oneone.upms.api.file.FileUploadApi;
|
||||
import com.oneone.upms.api.logger.OperateLogApi;
|
||||
import com.oneone.upms.api.notify.NotifyMessageSendApi;
|
||||
import com.oneone.upms.api.permission.PermissionApi;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
/**
|
||||
* @author
|
||||
*/
|
||||
@SpringBootApplication
|
||||
@EnableDiscoveryClient
|
||||
@EnableConfigurationProperties
|
||||
@EnableFeignClients(clients = { PermissionApi.class, OperateLogApi.class, FileUploadApi.class, DictDataApi.class,
|
||||
NotifyMessageSendApi.class })
|
||||
@MapperScan({ "com.oneone.pms.dal.mysql.*" })
|
||||
public class PmsApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(PmsApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
package com.oneone.pms.api.account;
|
||||
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import com.oneone.pms.api.account.dto.PlatformUserInfoDTO;
|
||||
import com.oneone.pms.api.account.dto.UserLoginAccountInfoDTO;
|
||||
import com.oneone.pms.api.account.vo.RegisterParam;
|
||||
import com.oneone.pms.api.account.vo.UserLoginAccountParam;
|
||||
import com.oneone.pms.dal.dataobject.useraccount.PlatformUserAccountDO;
|
||||
import com.oneone.pms.service.user.PlatformUserService;
|
||||
import com.oneone.pms.service.useraccount.PlatformUserAccountService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Slf4j
|
||||
public class PlatformAccountApiImpl implements IPlatformAccountApi {
|
||||
|
||||
@Autowired
|
||||
PlatformUserService platformUserService;
|
||||
|
||||
@Autowired
|
||||
PlatformUserAccountService platformUserAccountService;
|
||||
|
||||
@Override
|
||||
public Result<PlatformUserInfoDTO> getPlatformUserInfo(Long id) {
|
||||
|
||||
return Result.success(platformUserService.getPlatformUserInfo(id));
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Result<UserLoginAccountInfoDTO> getUserLoginAccountInfo(UserLoginAccountParam userLoginAccountParam) {
|
||||
return Result.success(platformUserAccountService.getUserLoginAccountInfo(userLoginAccountParam.getAccountType(), userLoginAccountParam.getAccount()));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<UserLoginAccountInfoDTO> register(RegisterParam param) {
|
||||
return Result.success(platformUserAccountService.register(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Boolean> bindAccount(RegisterParam param) {
|
||||
return Result.success(platformUserAccountService.bindAccount(param));
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Boolean> checkUserHasBindGrantType(Long platformUserId, String grantType) {
|
||||
PlatformUserAccountDO one = platformUserAccountService.lambdaQuery().eq(PlatformUserAccountDO::getPlatformUserId, platformUserId)
|
||||
.eq(PlatformUserAccountDO::getAccountType, grantType).one();
|
||||
return Result.success(one != null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<UserLoginAccountInfoDTO> getAccountByPlatformUserId(Long platformUserId, String grantType) {
|
||||
PlatformUserAccountDO one = platformUserAccountService.lambdaQuery().eq(PlatformUserAccountDO::getPlatformUserId, platformUserId)
|
||||
.eq(PlatformUserAccountDO::getAccountType, grantType).one();
|
||||
UserLoginAccountInfoDTO userLoginAccountInfoDTO = BeanUtils.toBean(one, UserLoginAccountInfoDTO.class);
|
||||
return Result.success(userLoginAccountInfoDTO);
|
||||
}
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
package com.oneone.pms.api.loginconfig;
|
||||
|
||||
import com.oneone.common.constant.CommonConstant;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtil;
|
||||
import com.oneone.pms.api.loginconfig.dto.AppThirdLoginDTO;
|
||||
import com.oneone.pms.dal.dataobject.thirdloginconfig.PlatformThirdLoginConfigDO;
|
||||
import com.oneone.pms.service.thirdloginconfig.PlatformThirdLoginConfigService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController // 提供 RESTful API 接口,给 Feign 调用
|
||||
@Slf4j
|
||||
public class ThirdLoginConfigApiImpl implements IThirdLoginConfigApi{
|
||||
@Autowired
|
||||
PlatformThirdLoginConfigService platformThirdLoginConfigService;
|
||||
@Override
|
||||
public Result<AppThirdLoginDTO> thirdLoginConfig(String type) {
|
||||
PlatformThirdLoginConfigDO thirdLogin = platformThirdLoginConfigService.lambdaQuery()
|
||||
.eq(PlatformThirdLoginConfigDO::getType, type)
|
||||
.eq(PlatformThirdLoginConfigDO::getStatus, CommonConstant.STATUS_YES)
|
||||
.one();
|
||||
if(thirdLogin==null){
|
||||
return Result.success(null);
|
||||
}
|
||||
return Result.success(BeanUtil.copy(thirdLogin,AppThirdLoginDTO.class));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package com.oneone.pms.config;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.servlet.*;
|
||||
import javax.servlet.annotation.WebFilter;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
|
||||
@Slf4j
|
||||
@Component
|
||||
@WebFilter(filterName = "ApiAccessFilter", urlPatterns = "/*")
|
||||
public class ApiAccessFilter implements Filter {
|
||||
|
||||
|
||||
@Override
|
||||
public void init(FilterConfig filterConfig) {
|
||||
log.info("过滤器名称:ApiAccessFilter");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse,
|
||||
FilterChain filterChain) throws IOException, ServletException {
|
||||
|
||||
HttpServletRequest request = (HttpServletRequest) servletRequest;
|
||||
|
||||
long start = System.currentTimeMillis(); // 请求进入时间
|
||||
filterChain.doFilter(servletRequest, servletResponse);
|
||||
log.info("请求地址: {}, 耗时: {}", request.getRequestURI(), System.currentTimeMillis()-start);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.oneone.pms.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* Notification configuration for PMS
|
||||
*/
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "notify.order")
|
||||
@Data
|
||||
public class NotifyConfig {
|
||||
/**
|
||||
* Admin user ID to receive order notifications
|
||||
*/
|
||||
private Long adminUserId=1L;
|
||||
|
||||
/**
|
||||
* Template code for order payment notification
|
||||
*/
|
||||
private String paymentTemplateCode="newOrder";
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.oneone.pms.config;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@Configuration
|
||||
@ConfigurationProperties(prefix = "pay.wechat")
|
||||
@Data
|
||||
public class PayConfig {
|
||||
/**
|
||||
* 商户id
|
||||
*/
|
||||
private String merchantId;
|
||||
/**
|
||||
* 私钥
|
||||
*/
|
||||
private String apiKey;
|
||||
/**
|
||||
* 小程序appId
|
||||
*/
|
||||
private String appId;
|
||||
/**
|
||||
* 支付回调地址
|
||||
*/
|
||||
private String notifyUrl;
|
||||
/**
|
||||
* 退款回调地址
|
||||
*/
|
||||
private String refundNotifyUrl;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package com.oneone.pms.config;
|
||||
|
||||
import com.oneone.common.redis.utils.LocalRedisTokenStore;
|
||||
import com.oneone.common.redis.utils.RedisUtils;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @author mice
|
||||
* @version 1.0
|
||||
* @date 2022-04-07 16:44
|
||||
*/
|
||||
@Configuration
|
||||
public class RedisStoreConfig {
|
||||
|
||||
@Bean(value = "appRedisTokenStore")
|
||||
public LocalRedisTokenStore appRedisTokenStore(RedisUtils redisUtils){
|
||||
LocalRedisTokenStore appRedisTokenStore = new LocalRedisTokenStore(redisUtils);
|
||||
appRedisTokenStore.setPrefix("app_token:");
|
||||
return appRedisTokenStore;
|
||||
}
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.appointment;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.appointment.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.appointment.AppointmentDO;
|
||||
import com.oneone.pms.service.appointment.AppointmentService;
|
||||
|
||||
@Tag(name = "管理后台 - 预约")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/appointment")
|
||||
@Validated
|
||||
public class AppointmentController {
|
||||
|
||||
@Resource
|
||||
private AppointmentService appointmentService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建预约")
|
||||
@RequiresPermissions("psychic:appointment:create")
|
||||
public Result<Long> createAppointment(@Valid @RequestBody AppointmentSaveReqVO createReqVO) {
|
||||
return success(appointmentService.createAppointment(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新预约")
|
||||
@RequiresPermissions("psychic:appointment:update")
|
||||
public Result<Boolean> updateAppointment(@Valid @RequestBody AppointmentSaveReqVO updateReqVO) {
|
||||
appointmentService.updateAppointment(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除预约")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:appointment:delete")
|
||||
public Result<Boolean> deleteAppointment(@RequestParam("id") Long id) {
|
||||
appointmentService.deleteAppointment(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得预约")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:appointment:query")
|
||||
public Result<AppointmentRespVO> getAppointment(@RequestParam("id") Long id) {
|
||||
AppointmentDO appointment = appointmentService.getAppointment(id);
|
||||
return success(BeanUtils.toBean(appointment, AppointmentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得预约分页")
|
||||
@RequiresPermissions("psychic:appointment:query")
|
||||
public Result<PageResult<AppointmentRespVO>> getAppointmentPage(@Valid AppointmentPageReqVO pageReqVO) {
|
||||
PageResult<AppointmentDO> pageResult = appointmentService.getAppointmentPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AppointmentRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出预约 Excel")
|
||||
@RequiresPermissions("psychic:appointment:export")
|
||||
@ISysLog("导出预约 Excel")
|
||||
public void exportAppointmentExcel(@Valid AppointmentPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AppointmentDO> list = appointmentService.getAppointmentPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "预约.xls", "数据", AppointmentRespVO.class,
|
||||
BeanUtils.toBean(list, AppointmentRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
package com.oneone.pms.controller.admin.appointment.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 预约分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AppointmentPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "时间段id", example = "10429")
|
||||
private Long slotId;
|
||||
|
||||
@Schema(description = "咨询师id", example = "13453")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "用户id", example = "30937")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "订单id 冗余字段", example = "22033")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "预约日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] appointmentDate;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "0锁定 1已支付 9取消", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.oneone.pms.controller.admin.appointment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 预约 Response VO")
|
||||
@Data
|
||||
public class AppointmentRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "95")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "时间段id", example = "10429")
|
||||
private Long slotId;
|
||||
|
||||
@Schema(description = "咨询师id", example = "13453")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "用户id", example = "30937")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "订单id 冗余字段", example = "22033")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "预约日期")
|
||||
private LocalDate appointmentDate;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "0锁定 1已支付 9取消", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+44
@@ -0,0 +1,44 @@
|
||||
package com.oneone.pms.controller.admin.appointment.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 预约新增/修改 Request VO")
|
||||
@Data
|
||||
public class AppointmentSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "95")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "时间段id", example = "10429")
|
||||
private Long slotId;
|
||||
|
||||
@Schema(description = "咨询师id", example = "13453")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "用户id", example = "30937")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "订单id 冗余字段", example = "22033")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "预约日期")
|
||||
private LocalDate appointmentDate;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "0锁定 1已支付 9取消", example = "1")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.appointmentinfo;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.appointmentinfo.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.appointmentinfo.AppointmentInfoDO;
|
||||
import com.oneone.pms.service.appointmentinfo.AppointmentInfoService;
|
||||
|
||||
@Tag(name = "管理后台 - 用户预约信息")
|
||||
@RestController
|
||||
@RequestMapping("/user/appointment-info")
|
||||
@Validated
|
||||
public class AppointmentInfoController {
|
||||
|
||||
@Resource
|
||||
private AppointmentInfoService appointmentInfoService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建用户预约信息")
|
||||
@RequiresPermissions("user:appointment-info:create")
|
||||
public Result<Long> createAppointmentInfo(@Valid @RequestBody AppointmentInfoSaveReqVO createReqVO) {
|
||||
return success(appointmentInfoService.createAppointmentInfo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新用户预约信息")
|
||||
@RequiresPermissions("user:appointment-info:update")
|
||||
public Result<Boolean> updateAppointmentInfo(@Valid @RequestBody AppointmentInfoSaveReqVO updateReqVO) {
|
||||
appointmentInfoService.updateAppointmentInfo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户预约信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("user:appointment-info:delete")
|
||||
public Result<Boolean> deleteAppointmentInfo(@RequestParam("id") Long id) {
|
||||
appointmentInfoService.deleteAppointmentInfo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户预约信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("user:appointment-info:query")
|
||||
public Result<AppointmentInfoRespVO> getAppointmentInfo(@RequestParam("id") Long id) {
|
||||
AppointmentInfoDO appointmentInfo = appointmentInfoService.getAppointmentInfo(id);
|
||||
return success(BeanUtils.toBean(appointmentInfo, AppointmentInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户预约信息分页")
|
||||
@RequiresPermissions("user:appointment-info:query")
|
||||
public Result<PageResult<AppointmentInfoRespVO>> getAppointmentInfoPage(@Valid AppointmentInfoPageReqVO pageReqVO) {
|
||||
PageResult<AppointmentInfoDO> pageResult = appointmentInfoService.getAppointmentInfoPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, AppointmentInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出用户预约信息 Excel")
|
||||
@RequiresPermissions("user:appointment-info:export")
|
||||
@ISysLog("导出用户预约信息 Excel")
|
||||
public void exportAppointmentInfoExcel(@Valid AppointmentInfoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<AppointmentInfoDO> list = appointmentInfoService.getAppointmentInfoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "用户预约信息.xls", "数据", AppointmentInfoRespVO.class,
|
||||
BeanUtils.toBean(list, AppointmentInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.oneone.pms.controller.admin.appointmentinfo.vo;
|
||||
|
||||
import lombok.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户预约信息分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class AppointmentInfoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "预约人名称", example = "张三")
|
||||
private String appointmentName;
|
||||
|
||||
@Schema(description = "预约人生日")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "紧急联系人和电话 json方式保存")
|
||||
private String emergencyContactInfo;
|
||||
|
||||
@Schema(description = "用户id", example = "16909")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.oneone.pms.controller.admin.appointmentinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户预约信息 Response VO")
|
||||
@Data
|
||||
public class AppointmentInfoRespVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23702")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "预约人名称", example = "张三")
|
||||
private String appointmentName;
|
||||
|
||||
@Schema(description = "预约人生日")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "紧急联系人和电话 json方式保存")
|
||||
private String emergencyContactInfo;
|
||||
|
||||
@Schema(description = "用户id", example = "16909")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.oneone.pms.controller.admin.appointmentinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
|
||||
@Schema(description = "管理后台 - 用户预约信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class AppointmentInfoSaveReqVO {
|
||||
|
||||
@Schema(description = "主键id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23702")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "预约人名称", example = "张三")
|
||||
private String appointmentName;
|
||||
|
||||
@Schema(description = "预约人生日")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "紧急联系人和电话 json方式保存")
|
||||
private String emergencyContactInfo;
|
||||
|
||||
@Schema(description = "用户id", example = "16909")
|
||||
private Long userId;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.bannerinfo;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.bannerinfo.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.bannerinfo.BannerInfoDO;
|
||||
import com.oneone.pms.service.bannerinfo.BannerInfoService;
|
||||
|
||||
@Tag(name = "管理后台 - banner位设置")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/banner-info")
|
||||
@Validated
|
||||
public class BannerInfoController {
|
||||
|
||||
@Resource
|
||||
private BannerInfoService bannerInfoService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建banner位设置")
|
||||
@RequiresPermissions("psychic:banner-info:create")
|
||||
public Result<Integer> createBannerInfo(@Valid @RequestBody BannerInfoSaveReqVO createReqVO) {
|
||||
return success(bannerInfoService.createBannerInfo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新banner位设置")
|
||||
@RequiresPermissions("psychic:banner-info:update")
|
||||
public Result<Boolean> updateBannerInfo(@Valid @RequestBody BannerInfoSaveReqVO updateReqVO) {
|
||||
bannerInfoService.updateBannerInfo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除banner位设置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:banner-info:delete")
|
||||
public Result<Boolean> deleteBannerInfo(@RequestParam("id") Integer id) {
|
||||
bannerInfoService.deleteBannerInfo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得banner位设置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:banner-info:query")
|
||||
public Result<BannerInfoRespVO> getBannerInfo(@RequestParam("id") Integer id) {
|
||||
BannerInfoDO bannerInfo = bannerInfoService.getBannerInfo(id);
|
||||
return success(BeanUtils.toBean(bannerInfo, BannerInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得banner位设置分页")
|
||||
@RequiresPermissions("psychic:banner-info:query")
|
||||
public Result<PageResult<BannerInfoRespVO>> getBannerInfoPage(@Valid BannerInfoPageReqVO pageReqVO) {
|
||||
PageResult<BannerInfoDO> pageResult = bannerInfoService.getBannerInfoPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, BannerInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出banner位设置 Excel")
|
||||
@RequiresPermissions("psychic:banner-info:export")
|
||||
@ISysLog("导出banner位设置 Excel")
|
||||
public void exportBannerInfoExcel(@Valid BannerInfoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<BannerInfoDO> list = bannerInfoService.getBannerInfoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "banner位设置.xls", "数据", BannerInfoRespVO.class,
|
||||
BeanUtils.toBean(list, BannerInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.oneone.pms.controller.admin.bannerinfo.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - banner位设置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class BannerInfoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "banner位名称", example = "李四")
|
||||
private String bannerName;
|
||||
|
||||
@Schema(description = "banner位显示图片")
|
||||
private String bannerImage;
|
||||
|
||||
@Schema(description = "点击banner图片跳转地址", example = "https://www.iocoder.cn")
|
||||
private String clickUrl;
|
||||
|
||||
@Schema(description = "banner位描述")
|
||||
private String manual;
|
||||
|
||||
@Schema(description = "显示顺序")
|
||||
private Integer orderIndex;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.oneone.pms.controller.admin.bannerinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - banner位设置 Response VO")
|
||||
@Data
|
||||
public class BannerInfoRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16288")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "banner位名称", example = "李四")
|
||||
private String bannerName;
|
||||
|
||||
@Schema(description = "banner位显示图片")
|
||||
private String bannerImage;
|
||||
|
||||
@Schema(description = "点击banner图片跳转地址", example = "https://www.iocoder.cn")
|
||||
private String clickUrl;
|
||||
|
||||
@Schema(description = "banner位描述")
|
||||
private String describe;
|
||||
|
||||
@Schema(description = "显示顺序")
|
||||
private Integer orderIndex;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 跳转类型 1.小程序内部调整 2.跳转外部链接
|
||||
*/
|
||||
private Integer jumpType;
|
||||
|
||||
}
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package com.oneone.pms.controller.admin.bannerinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - banner位设置新增/修改 Request VO")
|
||||
@Data
|
||||
public class BannerInfoSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "16288")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "banner位名称", example = "李四")
|
||||
private String bannerName;
|
||||
|
||||
@Schema(description = "banner位显示图片")
|
||||
private String bannerImage;
|
||||
|
||||
@Schema(description = "点击banner图片跳转地址", example = "https://www.iocoder.cn")
|
||||
private String clickUrl;
|
||||
|
||||
@Schema(description = "banner位描述")
|
||||
private String manual;
|
||||
|
||||
@Schema(description = "显示顺序")
|
||||
private Integer orderIndex;
|
||||
|
||||
/**
|
||||
* 跳转类型 1.小程序内部调整 2.跳转外部链接
|
||||
*/
|
||||
private Integer jumpType;
|
||||
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
package com.oneone.pms.controller.admin.doctorinfo;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import com.oneone.common.util.Func;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.doctorinfo.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.doctorinfo.DoctorInfoDO;
|
||||
import com.oneone.pms.service.doctorinfo.DoctorInfoService;
|
||||
|
||||
@Tag(name = "管理后台 - 心理师信息")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/doctor-info")
|
||||
@Validated
|
||||
public class DoctorInfoController {
|
||||
|
||||
@Resource
|
||||
private DoctorInfoService doctorInfoService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心理师信息")
|
||||
@RequiresPermissions("psychic:doctor-info:create")
|
||||
public Result<Long> createDoctorInfo(@Valid @RequestBody DoctorInfoSaveReqVO createReqVO) {
|
||||
return success(doctorInfoService.createDoctorInfo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心理师信息")
|
||||
@RequiresPermissions("psychic:doctor-info:update")
|
||||
public Result<Boolean> updateDoctorInfo(@Valid @RequestBody DoctorInfoSaveReqVO updateReqVO) {
|
||||
doctorInfoService.updateDoctorInfo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心理师信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:doctor-info:delete")
|
||||
public Result<Boolean> deleteDoctorInfo(@RequestParam("id") Long id) {
|
||||
doctorInfoService.deleteDoctorInfo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心理师信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:doctor-info:query")
|
||||
public Result<DoctorInfoRespVO> getDoctorInfo(@RequestParam("id") Long id) {
|
||||
DoctorInfoDO doctorInfo = doctorInfoService.getDoctorInfo(id);
|
||||
return success(BeanUtils.toBean(doctorInfo, DoctorInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心理师信息分页")
|
||||
@RequiresPermissions("psychic:doctor-info:query")
|
||||
public Result<PageResult<DoctorInfoRespVO>> getDoctorInfoPage(@Valid DoctorInfoPageReqVO pageReqVO) {
|
||||
PageResult<DoctorInfoDO> pageResult = doctorInfoService.getDoctorInfoPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DoctorInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/simple-list")
|
||||
@Operation(summary = "获得心理师信息")
|
||||
@RequiresPermissions("psychic:doctor-info:query")
|
||||
public Result<List<DoctorInfoRespVO>> getSimpleDoctorInfoList(@Valid DoctorInfoPageReqVO param) {
|
||||
List<DoctorInfoDO> list = doctorInfoService.lambdaQuery().list();
|
||||
return success(BeanUtils.toBean(list, DoctorInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心理师信息 Excel")
|
||||
@RequiresPermissions("psychic:doctor-info:export")
|
||||
@ISysLog("导出心理师信息 Excel")
|
||||
public void exportDoctorInfoExcel(@Valid DoctorInfoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
List<DoctorInfoDO> list = doctorInfoService.lambdaQuery().list();
|
||||
ExcelUtils.write(response, "心理师信息.xls", "数据", DoctorInfoRespVO.class,
|
||||
BeanUtils.toBean(list, DoctorInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
package com.oneone.pms.controller.admin.doctorinfo.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理师信息分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DoctorInfoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户id", example = "3286")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "业务范围 ,号分隔")
|
||||
private String businessScope;
|
||||
|
||||
@Schema(description = "封面图", example = "https://www.iocoder.cn")
|
||||
private String coverUrl;
|
||||
|
||||
@Schema(description = "咨询方式,号分隔 ")
|
||||
private String consultationMethod;
|
||||
|
||||
@Schema(description = "学历")
|
||||
private String education;
|
||||
|
||||
@Schema(description = "简介")
|
||||
private String introduction;
|
||||
|
||||
@Schema(description = "个人简介")
|
||||
private String resume;
|
||||
|
||||
@Schema(description = "预约须知")
|
||||
private String notice;
|
||||
|
||||
@Schema(description = "标签 ,号分隔")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "咨询经验")
|
||||
private String workExperience;
|
||||
|
||||
@Schema(description = "工作开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] workStartTime;
|
||||
|
||||
@Schema(description = "咨询价格", example = "22675")
|
||||
private Integer price;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "是否置顶", example = "0")
|
||||
private Integer top;
|
||||
|
||||
}
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
package com.oneone.pms.controller.admin.doctorinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
@Schema(description = "管理后台 - 心理师信息 Response VO")
|
||||
@Data
|
||||
public class DoctorInfoRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31102")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3286")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "业务范围 ,号分隔")
|
||||
private String businessScope;
|
||||
|
||||
@Schema(description = "封面图", example = "https://www.iocoder.cn")
|
||||
private String coverUrl;
|
||||
|
||||
@Schema(description = "咨询方式,号分隔 ")
|
||||
private String consultationMethod;
|
||||
|
||||
@Schema(description = "学历")
|
||||
private String education;
|
||||
|
||||
@Schema(description = "简介")
|
||||
private String introduction;
|
||||
|
||||
@Schema(description = "个人简介")
|
||||
private String resume;
|
||||
|
||||
@Schema(description = "预约须知")
|
||||
private String notice;
|
||||
|
||||
@Schema(description = "标签 ,号分隔")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "咨询经验")
|
||||
private String workExperience;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
@Schema(description = "工作开始时间")
|
||||
private LocalDate workStartTime;
|
||||
|
||||
@Schema(description = "咨询价格", example = "22675")
|
||||
private Integer price;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 地址详情
|
||||
*/
|
||||
private String addressDetail;
|
||||
|
||||
|
||||
private Integer showServiceNum;
|
||||
|
||||
@Schema(description = "是否置顶", example = "0")
|
||||
private Integer top;
|
||||
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package com.oneone.pms.controller.admin.doctorinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理师信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class DoctorInfoSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "31102")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "3286")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "名称", example = "李四")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "头像")
|
||||
private String avatar;
|
||||
|
||||
@Schema(description = "业务范围 ,号分隔")
|
||||
private String businessScope;
|
||||
|
||||
@Schema(description = "封面图", example = "https://www.iocoder.cn")
|
||||
private String coverUrl;
|
||||
|
||||
@Schema(description = "咨询方式,号分隔 ")
|
||||
private String consultationMethod;
|
||||
|
||||
@Schema(description = "学历")
|
||||
private String education;
|
||||
|
||||
@Schema(description = "简介")
|
||||
private String introduction;
|
||||
|
||||
@Schema(description = "个人简介")
|
||||
private String resume;
|
||||
|
||||
@Schema(description = "预约须知")
|
||||
private String notice;
|
||||
|
||||
@Schema(description = "标签 ,号分隔")
|
||||
private String tags;
|
||||
|
||||
@Schema(description = "咨询经验")
|
||||
private String workExperience;
|
||||
|
||||
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
@Schema(description = "工作开始时间")
|
||||
private LocalDate workStartTime;
|
||||
|
||||
@Schema(description = "咨询价格", example = "22675")
|
||||
private Integer price;
|
||||
|
||||
|
||||
/**
|
||||
* 地址
|
||||
*/
|
||||
private String address;
|
||||
/**
|
||||
* 地址详情
|
||||
*/
|
||||
private String addressDetail;
|
||||
|
||||
|
||||
private Integer showServiceNum;
|
||||
|
||||
@Schema(description = "是否置顶", example = "0")
|
||||
private Integer top;
|
||||
|
||||
}
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.doctorscheduledata.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.doctorscheduledata.DoctorScheduleDataDO;
|
||||
import com.oneone.pms.service.doctorscheduledata.DoctorScheduleDataService;
|
||||
|
||||
@Tag(name = "管理后台 - 心理师排班")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/doctor-schedule-data")
|
||||
@Validated
|
||||
public class DoctorScheduleDataController {
|
||||
|
||||
@Resource
|
||||
private DoctorScheduleDataService doctorScheduleDataService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心理师排班")
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:create")
|
||||
public Result<Long> createDoctorScheduleData(@Valid @RequestBody DoctorScheduleDataSaveReqVO createReqVO) {
|
||||
return success(doctorScheduleDataService.createDoctorScheduleData(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心理师排班")
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:update")
|
||||
public Result<Boolean> updateDoctorScheduleData(@Valid @RequestBody DoctorScheduleDataSaveReqVO updateReqVO) {
|
||||
doctorScheduleDataService.updateDoctorScheduleData(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心理师排班")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:delete")
|
||||
public Result<Boolean> deleteDoctorScheduleData(@RequestParam("id") Long id) {
|
||||
doctorScheduleDataService.deleteDoctorScheduleData(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心理师排班")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:query")
|
||||
public Result<DoctorScheduleDataRespVO> getDoctorScheduleData(@RequestParam("id") Long id) {
|
||||
DoctorScheduleDataDO doctorScheduleData = doctorScheduleDataService.getDoctorScheduleData(id);
|
||||
return success(BeanUtils.toBean(doctorScheduleData, DoctorScheduleDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心理师排班分页")
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:query")
|
||||
public Result<PageResult<DoctorScheduleDataRespVO>> getDoctorScheduleDataPage(@Valid DoctorScheduleDataPageReqVO pageReqVO) {
|
||||
PageResult<DoctorScheduleDataDO> pageResult = doctorScheduleDataService.getDoctorScheduleDataPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, DoctorScheduleDataRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心理师排班 Excel")
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:export")
|
||||
@ISysLog("导出心理师排班 Excel")
|
||||
public void exportDoctorScheduleDataExcel(@Valid DoctorScheduleDataPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<DoctorScheduleDataDO> list = doctorScheduleDataService.getDoctorScheduleDataPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "心理师排班.xls", "数据", DoctorScheduleDataRespVO.class,
|
||||
BeanUtils.toBean(list, DoctorScheduleDataRespVO.class));
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/detail_page")
|
||||
@Operation(summary = "获得心理师排班详情分页")
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:query")
|
||||
public Result<PageResult<DoctorScheduleDetailVO>> getDoctorScheduleDataDetailPage(@Valid DoctorScheduleDataDetailPageReqVO reqVO) {
|
||||
PageResult<DoctorScheduleDetailVO> pageResult = doctorScheduleDataService.getDoctorScheduleDataDetailPage(reqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@PostMapping("/copy")
|
||||
@Operation(summary = "创建心理师排班")
|
||||
@RequiresPermissions("psychic:doctor-schedule-data:create")
|
||||
public Result copyDoctorScheduleData(@Valid @RequestBody DoctorScheduleDataSaveReqVO createReqVO) {
|
||||
doctorScheduleDataService.copyDoctorScheduleData(createReqVO);
|
||||
return success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
@Schema(description = "管理后台 - 心理师排班新增/修改 Request VO")
|
||||
@Data
|
||||
public class DoctorScheduleDataCopyReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4004")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "咨询师id", example = "26752")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "时间排班时间")
|
||||
private LocalDate scheduleDate;
|
||||
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata.vo;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY;
|
||||
|
||||
|
||||
@Data
|
||||
public class DoctorScheduleDataDetailPageReqVO extends PageParam {
|
||||
|
||||
private Long doctorId;
|
||||
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY)
|
||||
private LocalDate scheduleDate;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理师排班分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class DoctorScheduleDataPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "咨询师id", example = "26752")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "时间排班时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalTime[] scheduleDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Schema(description = "管理后台 - 心理师排班 Response VO")
|
||||
@Data
|
||||
public class DoctorScheduleDataRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4004")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "咨询师id", example = "26752")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "时间排班时间")
|
||||
private LocalTime scheduleDate;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 心理师排班新增/修改 Request VO")
|
||||
@Data
|
||||
public class DoctorScheduleDataSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4004")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "咨询师id", example = "26752")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "时间排班时间")
|
||||
private LocalDate scheduleDate;
|
||||
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
@Data
|
||||
public class DoctorScheduleDetailTimeSlotVO {
|
||||
|
||||
/**
|
||||
* 时间段id
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private LocalTime startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private LocalTime endTime;
|
||||
|
||||
private String consultationMethod;
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.oneone.pms.controller.admin.doctorscheduledata.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class DoctorScheduleDetailVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "4004")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "咨询师id", example = "26752")
|
||||
private Long doctorId;
|
||||
@Schema(description = "时间排班时间")
|
||||
private LocalDate scheduleDate;
|
||||
|
||||
|
||||
List<DoctorScheduleDetailTimeSlotVO> list;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.focusinfo;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.focusinfo.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.focusinfo.FocusInfoDO;
|
||||
import com.oneone.pms.service.focusinfo.FocusInfoService;
|
||||
|
||||
@Tag(name = "管理后台 - 用户关注")
|
||||
@RestController
|
||||
@RequestMapping("/user/focus-info")
|
||||
@Validated
|
||||
public class FocusInfoController {
|
||||
|
||||
@Resource
|
||||
private FocusInfoService focusInfoService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建用户关注")
|
||||
@RequiresPermissions("user:focus-info:create")
|
||||
public Result<Long> createFocusInfo(@Valid @RequestBody FocusInfoSaveReqVO createReqVO) {
|
||||
return success(focusInfoService.createFocusInfo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新用户关注")
|
||||
@RequiresPermissions("user:focus-info:update")
|
||||
public Result<Boolean> updateFocusInfo(@Valid @RequestBody FocusInfoSaveReqVO updateReqVO) {
|
||||
focusInfoService.updateFocusInfo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户关注")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("user:focus-info:delete")
|
||||
public Result<Boolean> deleteFocusInfo(@RequestParam("id") Long id) {
|
||||
focusInfoService.deleteFocusInfo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户关注")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("user:focus-info:query")
|
||||
public Result<FocusInfoRespVO> getFocusInfo(@RequestParam("id") Long id) {
|
||||
FocusInfoDO focusInfo = focusInfoService.getFocusInfo(id);
|
||||
return success(BeanUtils.toBean(focusInfo, FocusInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户关注分页")
|
||||
@RequiresPermissions("user:focus-info:query")
|
||||
public Result<PageResult<FocusInfoRespVO>> getFocusInfoPage(@Valid FocusInfoPageReqVO pageReqVO) {
|
||||
PageResult<FocusInfoDO> pageResult = focusInfoService.getFocusInfoPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, FocusInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出用户关注 Excel")
|
||||
@RequiresPermissions("user:focus-info:export")
|
||||
@ISysLog("导出用户关注 Excel")
|
||||
public void exportFocusInfoExcel(@Valid FocusInfoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<FocusInfoDO> list = focusInfoService.getFocusInfoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "用户关注.xls", "数据", FocusInfoRespVO.class,
|
||||
BeanUtils.toBean(list, FocusInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.oneone.pms.controller.admin.focusinfo.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户关注分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class FocusInfoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户id", example = "28396")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "关注的咨询师id", example = "20048")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
package com.oneone.pms.controller.admin.focusinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户关注 Response VO")
|
||||
@Data
|
||||
public class FocusInfoRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17440")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28396")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "关注的咨询师id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20048")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
package com.oneone.pms.controller.admin.focusinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 用户关注新增/修改 Request VO")
|
||||
@Data
|
||||
public class FocusInfoSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "17440")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "28396")
|
||||
@NotNull(message = "用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "关注的咨询师id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20048")
|
||||
@NotNull(message = "关注的咨询师id不能为空")
|
||||
private Long doctorId;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.news;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.news.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.news.NewsDO;
|
||||
import com.oneone.pms.service.news.NewsService;
|
||||
|
||||
@Tag(name = "管理后台 - 心理新闻")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/news")
|
||||
@Validated
|
||||
public class NewsController {
|
||||
|
||||
@Resource
|
||||
private NewsService newsService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心理新闻")
|
||||
@RequiresPermissions("psychic:news:create")
|
||||
public Result<Long> createNews(@Valid @RequestBody NewsSaveReqVO createReqVO) {
|
||||
return success(newsService.createNews(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心理新闻")
|
||||
@RequiresPermissions("psychic:news:update")
|
||||
public Result<Boolean> updateNews(@Valid @RequestBody NewsSaveReqVO updateReqVO) {
|
||||
newsService.updateNews(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心理新闻")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:news:delete")
|
||||
public Result<Boolean> deleteNews(@RequestParam("id") Long id) {
|
||||
newsService.deleteNews(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心理新闻")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:news:query")
|
||||
public Result<NewsRespVO> getNews(@RequestParam("id") Long id) {
|
||||
NewsDO news = newsService.getNews(id);
|
||||
return success(BeanUtils.toBean(news, NewsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心理新闻分页")
|
||||
@RequiresPermissions("psychic:news:query")
|
||||
public Result<PageResult<NewsRespVO>> getNewsPage(@Valid NewsPageReqVO pageReqVO) {
|
||||
PageResult<NewsDO> pageResult = newsService.getNewsPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, NewsRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心理新闻 Excel")
|
||||
@RequiresPermissions("psychic:news:export")
|
||||
@ISysLog("导出心理新闻 Excel")
|
||||
public void exportNewsExcel(@Valid NewsPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<NewsDO> list = newsService.getNewsPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "心理新闻.xls", "数据", NewsRespVO.class,
|
||||
BeanUtils.toBean(list, NewsRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.oneone.pms.controller.admin.news.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理新闻分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class NewsPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "类型1.艺术疗愈 2活动中心", example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "封面图片")
|
||||
private String showImage;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "是否首页显示 1 显示 0不显示")
|
||||
private Integer showMain;
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.oneone.pms.controller.admin.news.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 心理新闻 Response VO")
|
||||
@Data
|
||||
public class NewsRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19236")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型1.艺术疗愈 2活动中心", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "封面图片")
|
||||
private String showImage;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "是否首页显示 1 显示 0不显示")
|
||||
private Integer showMain;
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.oneone.pms.controller.admin.news.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 心理新闻新增/修改 Request VO")
|
||||
@Data
|
||||
public class NewsSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19236")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "类型1.艺术疗愈 2活动中心", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "类型1.艺术疗愈 2活动中心不能为空")
|
||||
private Integer type;
|
||||
|
||||
@Schema(description = "标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "封面图片")
|
||||
private String showImage;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String content;
|
||||
|
||||
@Schema(description = "是否首页显示 1 显示 0不显示")
|
||||
private Integer showMain;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.orderpay;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.orderpay.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.orderpay.OrderPayDO;
|
||||
import com.oneone.pms.service.orderpay.OrderPayService;
|
||||
|
||||
@Tag(name = "管理后台 - 支付信息")
|
||||
@RestController
|
||||
@RequestMapping("/pms/order-pay")
|
||||
@Validated
|
||||
public class OrderPayController {
|
||||
|
||||
@Resource
|
||||
private OrderPayService orderPayService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建支付信息")
|
||||
@RequiresPermissions("pms:order-pay:create")
|
||||
public Result<Long> createOrderPay(@Valid @RequestBody OrderPaySaveReqVO createReqVO) {
|
||||
return success(orderPayService.createOrderPay(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新支付信息")
|
||||
@RequiresPermissions("pms:order-pay:update")
|
||||
public Result<Boolean> updateOrderPay(@Valid @RequestBody OrderPaySaveReqVO updateReqVO) {
|
||||
orderPayService.updateOrderPay(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除支付信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("pms:order-pay:delete")
|
||||
public Result<Boolean> deleteOrderPay(@RequestParam("id") Long id) {
|
||||
orderPayService.deleteOrderPay(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得支付信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("pms:order-pay:query")
|
||||
public Result<OrderPayRespVO> getOrderPay(@RequestParam("id") Long id) {
|
||||
OrderPayDO orderPay = orderPayService.getOrderPay(id);
|
||||
return success(BeanUtils.toBean(orderPay, OrderPayRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得支付信息分页")
|
||||
@RequiresPermissions("pms:order-pay:query")
|
||||
public Result<PageResult<OrderPayRespVO>> getOrderPayPage(@Valid OrderPayPageReqVO pageReqVO) {
|
||||
PageResult<OrderPayDO> pageResult = orderPayService.getOrderPayPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, OrderPayRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出支付信息 Excel")
|
||||
@RequiresPermissions("pms:order-pay:export")
|
||||
@ISysLog("导出支付信息 Excel")
|
||||
public void exportOrderPayExcel(@Valid OrderPayPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<OrderPayDO> list = orderPayService.getOrderPayPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "支付信息.xls", "数据", OrderPayRespVO.class,
|
||||
BeanUtils.toBean(list, OrderPayRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+59
@@ -0,0 +1,59 @@
|
||||
package com.oneone.pms.controller.admin.orderpay.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 支付信息分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OrderPayPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "订单id", example = "19751")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "支付流水号")
|
||||
private String paySn;
|
||||
|
||||
@Schema(description = "外部交易流水号")
|
||||
private String outTransactionSn;
|
||||
|
||||
@Schema(description = "应付总额")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
@Schema(description = "支付时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] payTime;
|
||||
|
||||
@Schema(description = "支付方式【1->支付宝;2->微信;3->银联; 4->货到付款;】")
|
||||
private String payChannel;
|
||||
|
||||
@Schema(description = "支付状态", example = "2")
|
||||
private Integer payStatus;
|
||||
|
||||
@Schema(description = "确认时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] confirmTime;
|
||||
|
||||
@Schema(description = "回调内容")
|
||||
private String callbackContent;
|
||||
|
||||
@Schema(description = "回调时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] callbackTime;
|
||||
|
||||
@Schema(description = "交易内容")
|
||||
private String paySubject;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+54
@@ -0,0 +1,54 @@
|
||||
package com.oneone.pms.controller.admin.orderpay.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 支付信息 Response VO")
|
||||
@Data
|
||||
public class OrderPayRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23235")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19751")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "支付流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String paySn;
|
||||
|
||||
@Schema(description = "外部交易流水号")
|
||||
private String outTransactionSn;
|
||||
|
||||
@Schema(description = "应付总额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private BigDecimal payAmount;
|
||||
|
||||
@Schema(description = "支付时间")
|
||||
private LocalDateTime payTime;
|
||||
|
||||
@Schema(description = "支付方式【1->支付宝;2->微信;3->银联; 4->货到付款;】")
|
||||
private String payChannel;
|
||||
|
||||
@Schema(description = "支付状态", example = "2")
|
||||
private Integer payStatus;
|
||||
|
||||
@Schema(description = "确认时间")
|
||||
private LocalDateTime confirmTime;
|
||||
|
||||
@Schema(description = "回调内容")
|
||||
private String callbackContent;
|
||||
|
||||
@Schema(description = "回调时间")
|
||||
private LocalDateTime callbackTime;
|
||||
|
||||
@Schema(description = "交易内容")
|
||||
private String paySubject;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.oneone.pms.controller.admin.orderpay.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 支付信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class OrderPaySaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "23235")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "19751")
|
||||
@NotNull(message = "订单id不能为空")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "支付流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "支付流水号不能为空")
|
||||
private String paySn;
|
||||
|
||||
@Schema(description = "外部交易流水号")
|
||||
private String outTransactionSn;
|
||||
|
||||
@Schema(description = "应付总额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "应付总额不能为空")
|
||||
private BigDecimal payAmount;
|
||||
|
||||
@Schema(description = "支付时间")
|
||||
private LocalDateTime payTime;
|
||||
|
||||
@Schema(description = "支付方式【1->支付宝;2->微信;3->银联; 4->货到付款;】")
|
||||
private String payChannel;
|
||||
|
||||
@Schema(description = "支付状态", example = "2")
|
||||
private Integer payStatus;
|
||||
|
||||
@Schema(description = "确认时间")
|
||||
private LocalDateTime confirmTime;
|
||||
|
||||
@Schema(description = "回调内容")
|
||||
private String callbackContent;
|
||||
|
||||
@Schema(description = "回调时间")
|
||||
private LocalDateTime callbackTime;
|
||||
|
||||
@Schema(description = "交易内容")
|
||||
private String paySubject;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.orderrefund;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.orderrefund.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.orderrefund.OrderRefundDO;
|
||||
import com.oneone.pms.service.orderrefund.OrderRefundService;
|
||||
|
||||
@Tag(name = "管理后台 - 退款信息")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/order-refund")
|
||||
@Validated
|
||||
public class OrderRefundController {
|
||||
|
||||
@Resource
|
||||
private OrderRefundService orderRefundService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建退款信息")
|
||||
@RequiresPermissions("psychic:order-refund:create")
|
||||
public Result<Long> createOrderRefund(@Valid @RequestBody OrderRefundSaveReqVO createReqVO) {
|
||||
return success(orderRefundService.createOrderRefund(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新退款信息")
|
||||
@RequiresPermissions("psychic:order-refund:update")
|
||||
public Result<Boolean> updateOrderRefund(@Valid @RequestBody OrderRefundSaveReqVO updateReqVO) {
|
||||
orderRefundService.updateOrderRefund(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除退款信息")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:order-refund:delete")
|
||||
public Result<Boolean> deleteOrderRefund(@RequestParam("id") Long id) {
|
||||
orderRefundService.deleteOrderRefund(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得退款信息")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:order-refund:query")
|
||||
public Result<OrderRefundRespVO> getOrderRefund(@RequestParam("id") Long id) {
|
||||
OrderRefundDO orderRefund = orderRefundService.getOrderRefund(id);
|
||||
return success(BeanUtils.toBean(orderRefund, OrderRefundRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得退款信息分页")
|
||||
@RequiresPermissions("psychic:order-refund:query")
|
||||
public Result<PageResult<OrderRefundRespVO>> getOrderRefundPage(@Valid OrderRefundPageReqVO pageReqVO) {
|
||||
PageResult<OrderRefundDO> pageResult = orderRefundService.getOrderRefundPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, OrderRefundRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出退款信息 Excel")
|
||||
@RequiresPermissions("psychic:order-refund:export")
|
||||
@ISysLog("导出退款信息 Excel")
|
||||
public void exportOrderRefundExcel(@Valid OrderRefundPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<OrderRefundDO> list = orderRefundService.getOrderRefundPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "退款信息.xls", "数据", OrderRefundRespVO.class,
|
||||
BeanUtils.toBean(list, OrderRefundRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+62
@@ -0,0 +1,62 @@
|
||||
package com.oneone.pms.controller.admin.orderrefund.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 退款信息分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class OrderRefundPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "订单id", example = "11218")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "退款流水号")
|
||||
private String refundSn;
|
||||
|
||||
@Schema(description = "外部交易流水号")
|
||||
private String outTransactionSn;
|
||||
|
||||
@Schema(description = "退款总额")
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
@Schema(description = "退款时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] refundTime;
|
||||
|
||||
@Schema(description = "支付方式【1->支付宝;2->微信;3->银联; 4->货到付款;】")
|
||||
private String refundChannel;
|
||||
|
||||
@Schema(description = "支付状态", example = "1")
|
||||
private Integer refundStatus;
|
||||
|
||||
@Schema(description = "确认时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] confirmTime;
|
||||
|
||||
@Schema(description = "回调内容")
|
||||
private String callbackContent;
|
||||
|
||||
@Schema(description = "回调时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] callbackTime;
|
||||
|
||||
@Schema(description = "交易内容")
|
||||
private String paySubject;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
@Schema(description = "支付参数")
|
||||
private String refundParam;
|
||||
|
||||
}
|
||||
+57
@@ -0,0 +1,57 @@
|
||||
package com.oneone.pms.controller.admin.orderrefund.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 退款信息 Response VO")
|
||||
@Data
|
||||
public class OrderRefundRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "29102")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "11218")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "退款流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String refundSn;
|
||||
|
||||
@Schema(description = "外部交易流水号")
|
||||
private String outTransactionSn;
|
||||
|
||||
@Schema(description = "退款总额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
@Schema(description = "退款时间")
|
||||
private LocalDateTime refundTime;
|
||||
|
||||
@Schema(description = "支付方式【1->支付宝;2->微信;3->银联; 4->货到付款;】")
|
||||
private String refundChannel;
|
||||
|
||||
@Schema(description = "支付状态", example = "1")
|
||||
private Integer refundStatus;
|
||||
|
||||
@Schema(description = "确认时间")
|
||||
private LocalDateTime confirmTime;
|
||||
|
||||
@Schema(description = "回调内容")
|
||||
private String callbackContent;
|
||||
|
||||
@Schema(description = "回调时间")
|
||||
private LocalDateTime callbackTime;
|
||||
|
||||
@Schema(description = "交易内容")
|
||||
private String paySubject;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "支付参数")
|
||||
private String refundParam;
|
||||
|
||||
}
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
package com.oneone.pms.controller.admin.orderrefund.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import java.math.BigDecimal;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 退款信息新增/修改 Request VO")
|
||||
@Data
|
||||
public class OrderRefundSaveReqVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "29102")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单id", requiredMode = Schema.RequiredMode.REQUIRED, example = "11218")
|
||||
@NotNull(message = "订单id不能为空")
|
||||
private Long orderId;
|
||||
|
||||
@Schema(description = "退款流水号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "退款流水号不能为空")
|
||||
private String refundSn;
|
||||
|
||||
@Schema(description = "外部交易流水号")
|
||||
private String outTransactionSn;
|
||||
|
||||
@Schema(description = "退款总额", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "退款总额不能为空")
|
||||
private BigDecimal refundAmount;
|
||||
|
||||
@Schema(description = "退款时间")
|
||||
private LocalDateTime refundTime;
|
||||
|
||||
@Schema(description = "支付方式【1->支付宝;2->微信;3->银联; 4->货到付款;】")
|
||||
private String refundChannel;
|
||||
|
||||
@Schema(description = "支付状态", example = "1")
|
||||
private Integer refundStatus;
|
||||
|
||||
@Schema(description = "确认时间")
|
||||
private LocalDateTime confirmTime;
|
||||
|
||||
@Schema(description = "回调内容")
|
||||
private String callbackContent;
|
||||
|
||||
@Schema(description = "回调时间")
|
||||
private LocalDateTime callbackTime;
|
||||
|
||||
@Schema(description = "交易内容")
|
||||
private String paySubject;
|
||||
|
||||
@Schema(description = "支付参数")
|
||||
private String refundParam;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.protocol;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.protocol.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.protocol.ProtocolDO;
|
||||
import com.oneone.pms.service.protocol.ProtocolService;
|
||||
|
||||
@Tag(name = "管理后台 - 用户协议")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/protocol")
|
||||
@Validated
|
||||
public class ProtocolController {
|
||||
|
||||
@Resource
|
||||
private ProtocolService protocolService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建用户协议")
|
||||
@RequiresPermissions("psychic:protocol:create")
|
||||
public Result<Integer> createProtocol(@Valid @RequestBody ProtocolSaveReqVO createReqVO) {
|
||||
return success(protocolService.createProtocol(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新用户协议")
|
||||
@RequiresPermissions("psychic:protocol:update")
|
||||
public Result<Boolean> updateProtocol(@Valid @RequestBody ProtocolSaveReqVO updateReqVO) {
|
||||
protocolService.updateProtocol(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户协议")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:protocol:delete")
|
||||
public Result<Boolean> deleteProtocol(@RequestParam("id") Integer id) {
|
||||
protocolService.deleteProtocol(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户协议")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:protocol:query")
|
||||
public Result<ProtocolRespVO> getProtocol(@RequestParam("id") Integer id) {
|
||||
ProtocolDO protocol = protocolService.getProtocol(id);
|
||||
return success(BeanUtils.toBean(protocol, ProtocolRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户协议分页")
|
||||
@RequiresPermissions("psychic:protocol:query")
|
||||
public Result<PageResult<ProtocolRespVO>> getProtocolPage(@Valid ProtocolPageReqVO pageReqVO) {
|
||||
PageResult<ProtocolDO> pageResult = protocolService.getProtocolPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ProtocolRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出用户协议 Excel")
|
||||
@RequiresPermissions("psychic:protocol:export")
|
||||
@ISysLog("导出用户协议 Excel")
|
||||
public void exportProtocolExcel(@Valid ProtocolPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ProtocolDO> list = protocolService.getProtocolPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "用户协议.xls", "数据", ProtocolRespVO.class,
|
||||
BeanUtils.toBean(list, ProtocolRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.oneone.pms.controller.admin.protocol.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户协议分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ProtocolPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "协议内容")
|
||||
private String context;
|
||||
|
||||
@Schema(description = "协议标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "协议类型")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "1启用 0禁用", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.oneone.pms.controller.admin.protocol.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户协议 Response VO")
|
||||
@Data
|
||||
public class ProtocolRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27195")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "协议内容")
|
||||
private String context;
|
||||
|
||||
@Schema(description = "协议标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "协议类型")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "1启用 0禁用", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.oneone.pms.controller.admin.protocol.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 用户协议新增/修改 Request VO")
|
||||
@Data
|
||||
public class ProtocolSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "27195")
|
||||
private Integer id;
|
||||
|
||||
|
||||
@Schema(description = "协议内容")
|
||||
@NotEmpty(message = "协议内容不能为空")
|
||||
private String context;
|
||||
|
||||
@Schema(description = "协议标题")
|
||||
private String title;
|
||||
|
||||
@Schema(description = "协议类型")
|
||||
@NotEmpty(message = "协议类型不能为空")
|
||||
private String code;
|
||||
|
||||
@Schema(description = "1启用 0禁用", example = "2")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
+168
@@ -0,0 +1,168 @@
|
||||
package com.oneone.pms.controller.admin.psychicorder;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import com.oneone.pms.service.doctorinfo.DoctorInfoService;
|
||||
import com.oneone.pms.service.useraccount.PlatformUserAccountService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.psychicorder.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.psychicorder.PsychicOrderDO;
|
||||
import com.oneone.pms.service.psychicorder.PsychicOrderService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@Tag(name = "管理后台 - 订单")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/psychic-order")
|
||||
@Validated
|
||||
@Slf4j
|
||||
public class PsychicOrderController {
|
||||
|
||||
@Resource
|
||||
private PsychicOrderService psychicOrderService;
|
||||
|
||||
@Resource
|
||||
private DoctorInfoService doctorInfoService;
|
||||
|
||||
@Resource
|
||||
private PlatformUserAccountService platformUserAccountService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建订单")
|
||||
@RequiresPermissions("psychic:psychic-order:create")
|
||||
public Result<Long> createPsychicOrder(@Valid @RequestBody PsychicOrderSaveReqVO createReqVO) {
|
||||
return success(psychicOrderService.createPsychicOrder(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新订单")
|
||||
@RequiresPermissions("psychic:psychic-order:update")
|
||||
public Result<Boolean> updatePsychicOrder(@Valid @RequestBody PsychicOrderSaveReqVO updateReqVO) {
|
||||
psychicOrderService.updatePsychicOrder(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除订单")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:psychic-order:delete")
|
||||
public Result<Boolean> deletePsychicOrder(@RequestParam("id") Long id) {
|
||||
psychicOrderService.deletePsychicOrder(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得订单")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:psychic-order:query")
|
||||
public Result<PsychicOrderRespVO> getPsychicOrder(@RequestParam("id") Long id) {
|
||||
PsychicOrderDO psychicOrder = psychicOrderService.getPsychicOrder(id);
|
||||
return success(BeanUtils.toBean(psychicOrder, PsychicOrderRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得订单分页")
|
||||
@RequiresPermissions("psychic:psychic-order:query")
|
||||
public Result<PageResult<PsychicOrderRespVO>> getPsychicOrderPage(@Valid PsychicOrderPageReqVO pageReqVO) {
|
||||
PageResult<PsychicOrderDO> pageResult = psychicOrderService.getPsychicOrderPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PsychicOrderRespVO.class));
|
||||
}
|
||||
|
||||
@PostMapping("/use")
|
||||
@Operation(summary = "订单使用")
|
||||
@RequiresPermissions("psychic:psychic-order:update")
|
||||
public Result<Boolean> usePsychicOrder(@RequestParam("id") Long id) {
|
||||
return success(psychicOrderService.usePsychicOrder(id));
|
||||
}
|
||||
|
||||
@PostMapping("/use-finish")
|
||||
@Operation(summary = "订单使用")
|
||||
@RequiresPermissions("psychic:psychic-order:update")
|
||||
public Result<Boolean> finishPsychicOrder(@RequestParam("id") Long id) {
|
||||
return success(psychicOrderService.finishPsychicOrder(id));
|
||||
}
|
||||
|
||||
/*
|
||||
* @PostMapping("/apply-refund")
|
||||
*
|
||||
* @Operation(summary = "申请退款")
|
||||
*
|
||||
* @RequiresPermissions("psychic:psychic-order:update")
|
||||
* public Result<Boolean> applyRefundPsychicOrder(@Valid @RequestBody
|
||||
* PsychicOrderSaveReqVO createReqVO) {
|
||||
* return success(psychicOrderService.applyRefundPsychicOrder(createReqVO));
|
||||
* }
|
||||
*/
|
||||
|
||||
@PostMapping("/refund")
|
||||
@Operation(summary = "退款")
|
||||
@RequiresPermissions("psychic:psychic-order:update")
|
||||
public Result<Boolean> refundPsychicOrder(@Valid @RequestBody PsychicOrderSaveReqVO createReqVO) {
|
||||
return success(psychicOrderService.refundPsychicOrder(createReqVO));
|
||||
}
|
||||
|
||||
// 退款审批
|
||||
/*
|
||||
* @PostMapping("/approval-refund")
|
||||
*
|
||||
* @Operation(summary = "退款审批")
|
||||
*
|
||||
* @RequiresPermissions("pms:psychic-order:approval")
|
||||
* public Result<Boolean> approvalRefundPsychicOrder(@Valid @RequestBody
|
||||
* ApprovalRefundOrderReqVO param) {
|
||||
* return success(psychicOrderService.approvalRefundPsychicOrder(param));
|
||||
* }
|
||||
*/
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出订单 Excel")
|
||||
@RequiresPermissions("psychic:psychic-order:export")
|
||||
@ISysLog("导出订单 Excel")
|
||||
public void exportPsychicOrderExcel(@Valid PsychicOrderPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
// 执行查询
|
||||
PageResult<PsychicOrderDO> pageResult = psychicOrderService.getPsychicOrderPage(pageReqVO);
|
||||
// 转换为 VO 列表
|
||||
List<PsychicOrderRespVO> voList = new ArrayList<>();
|
||||
try {
|
||||
// 使用反射获取 list 字段
|
||||
java.lang.reflect.Field listField = pageResult.getClass().getDeclaredField("list");
|
||||
listField.setAccessible(true);
|
||||
@SuppressWarnings("unchecked")
|
||||
List<PsychicOrderDO> list = (List<PsychicOrderDO>) listField.get(pageResult);
|
||||
|
||||
if (list != null) {
|
||||
for (PsychicOrderDO orderDO : list) {
|
||||
if (orderDO != null) {
|
||||
PsychicOrderRespVO vo = BeanUtils.toBean(orderDO, PsychicOrderRespVO.class);
|
||||
voList.add(vo);
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
// 忽略异常
|
||||
}
|
||||
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "订单.xls", "数据", PsychicOrderRespVO.class, voList);
|
||||
}
|
||||
|
||||
}
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
package com.oneone.pms.controller.admin.psychicorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 订单新增/修改 Request VO")
|
||||
@Data
|
||||
public class ApprovalRefundOrderReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12561")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "1是0否")
|
||||
private Integer approvalResult;
|
||||
|
||||
@Schema(description = "订单备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
|
||||
@Schema(description = "申请退款金额分")
|
||||
private Integer applyRefundAmount;
|
||||
}
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
package com.oneone.pms.controller.admin.psychicorder.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 订单分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PsychicOrderPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String orderSn;
|
||||
|
||||
@Schema(description = "时间段id", example = "14603")
|
||||
private Long slotId;
|
||||
|
||||
@Schema(description = "咨询师id", example = "29997")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "咨询师ids", example = "29997")
|
||||
private List<Long> doctorIds;
|
||||
|
||||
@Schema(description = "咨询师名称", example = "29997")
|
||||
private String doctorName;
|
||||
|
||||
@Schema(description = "用户id", example = "25042")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "预约日期")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDate[] appointmentDate;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "0锁定(待支付) 1已支付(待使用) 3待使用(暂时不用) 4已使用(待用户确认) 5已完成 6申请退款中(待退款审核) 7退款中 8已退款 9取消", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "用户是否删除")
|
||||
private Integer userDeleted;
|
||||
|
||||
@Schema(description = "预约人名称", example = "王五")
|
||||
private String appointmentName;
|
||||
|
||||
@Schema(description = "预约人生日")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "紧急联系人和电话 json方式保存")
|
||||
private String emergencyContactInfo;
|
||||
|
||||
@Schema(description = "订单备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "用户是否已读 1已读")
|
||||
private Integer userRead;
|
||||
|
||||
@Schema(description = "订单金额分")
|
||||
private Integer totalAmount;
|
||||
|
||||
@Schema(description = "支付有效时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] validTime;
|
||||
|
||||
@Schema(description = "错误码")
|
||||
private Short errorCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
package com.oneone.pms.controller.admin.psychicorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 订单 Response VO")
|
||||
@Data
|
||||
public class PsychicOrderRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12561")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String orderSn;
|
||||
|
||||
@Schema(description = "时间段id", example = "14603")
|
||||
private Long slotId;
|
||||
|
||||
@Schema(description = "咨询师id", example = "29997")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "咨询师名称")
|
||||
private String doctorName;
|
||||
|
||||
@Schema(description = "用户id", example = "25042")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "预约日期")
|
||||
private LocalDate appointmentDate;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
private LocalTime startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
private LocalTime endTime;
|
||||
|
||||
@Schema(description = "0锁定(待支付) 1已支付(待使用) 3待使用(暂时不用) 4已使用(待用户确认) 5已完成 6申请退款中(待退款审核) 7退款中 8已退款 9取消", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "用户是否删除")
|
||||
private Integer userDeleted;
|
||||
|
||||
@Schema(description = "预约人名称", example = "王五")
|
||||
private String appointmentName;
|
||||
|
||||
@Schema(description = "预约人生日")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "紧急联系人和电话 json方式保存")
|
||||
private String emergencyContactInfo;
|
||||
|
||||
@Schema(description = "订单备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "用户是否已读 1已读")
|
||||
private Integer userRead;
|
||||
|
||||
@Schema(description = "订单金额分")
|
||||
private Integer totalAmount;
|
||||
|
||||
@Schema(description = "支付有效时间")
|
||||
private LocalDateTime validTime;
|
||||
|
||||
@Schema(description = "错误码")
|
||||
private Short errorCode;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@Schema(description = "创建者电话号码")
|
||||
private String createUserPhoneNo;
|
||||
|
||||
private String consultationMethod;
|
||||
|
||||
}
|
||||
+83
@@ -0,0 +1,83 @@
|
||||
package com.oneone.pms.controller.admin.psychicorder.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 订单新增/修改 Request VO")
|
||||
@Data
|
||||
public class PsychicOrderSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "12561")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "订单号")
|
||||
private String orderSn;
|
||||
|
||||
@Schema(description = "时间段id", example = "14603")
|
||||
private Long slotId;
|
||||
|
||||
@Schema(description = "咨询师id", example = "29997")
|
||||
private Long doctorId;
|
||||
|
||||
@Schema(description = "用户id", example = "25042")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "预约日期")
|
||||
private LocalDate appointmentDate;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "0锁定(待支付) 1已支付(待使用) 3待使用(暂时不用) 4已使用(待用户确认) 5已完成 6申请退款中(待退款审核) 7退款中 8已退款 9取消", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "用户是否删除")
|
||||
private Integer userDeleted;
|
||||
|
||||
@Schema(description = "预约人名称", example = "王五")
|
||||
private String appointmentName;
|
||||
|
||||
@Schema(description = "预约人生日")
|
||||
private LocalDate birthday;
|
||||
|
||||
@Schema(description = "联系电话")
|
||||
private String phone;
|
||||
|
||||
@Schema(description = "性别 1男 2女")
|
||||
private Integer sex;
|
||||
|
||||
@Schema(description = "紧急联系人和电话 json方式保存")
|
||||
private String emergencyContactInfo;
|
||||
|
||||
@Schema(description = "订单备注", example = "你猜")
|
||||
private String remark;
|
||||
|
||||
@Schema(description = "用户是否已读 1已读")
|
||||
private Integer userRead;
|
||||
|
||||
@Schema(description = "订单金额分")
|
||||
private Integer totalAmount;
|
||||
|
||||
@Schema(description = "支付有效时间")
|
||||
private LocalDateTime validTime;
|
||||
|
||||
@Schema(description = "错误码")
|
||||
private Short errorCode;
|
||||
|
||||
|
||||
@Schema(description = "退款金额分")
|
||||
private Integer refundAmount;
|
||||
|
||||
@Schema(description = "申请退款金额分")
|
||||
private Integer applyRefundAmount;
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.oneone.pms.controller.admin.psychicorder.vo;
|
||||
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class RefundOrderVO {
|
||||
|
||||
private Long orderId;
|
||||
|
||||
private String orderSn;
|
||||
|
||||
private String refundReason;
|
||||
|
||||
private Integer refundAmount;
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
package com.oneone.pms.controller.admin.questioninfo;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionPageReqVO;
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionRespVO;
|
||||
import com.oneone.pms.dal.dataobject.questionoption.QuestionOptionDO;
|
||||
import com.oneone.pms.dal.mysql.questionoption.QuestionOptionMapper;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.questioninfo.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.questioninfo.QuestionInfoDO;
|
||||
import com.oneone.pms.service.questioninfo.QuestionInfoService;
|
||||
|
||||
@Tag(name = "管理后台 - 心理测试问题")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/question-info")
|
||||
@Validated
|
||||
public class QuestionInfoController {
|
||||
|
||||
@Resource
|
||||
private QuestionInfoService questionInfoService;
|
||||
@Resource
|
||||
private QuestionOptionMapper questionOptionMapper;
|
||||
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心理测试问题")
|
||||
@RequiresPermissions("psychic:question-info:create")
|
||||
public Result<Integer> createQuestionInfo(@Valid @RequestBody QuestionInfoSaveReqVO createReqVO) {
|
||||
return success(questionInfoService.createQuestionInfo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心理测试问题")
|
||||
@RequiresPermissions("psychic:question-info:update")
|
||||
public Result<Boolean> updateQuestionInfo(@Valid @RequestBody QuestionInfoSaveReqVO updateReqVO) {
|
||||
questionInfoService.updateQuestionInfo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心理测试问题")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:question-info:delete")
|
||||
public Result<Boolean> deleteQuestionInfo(@RequestParam("id") Integer id) {
|
||||
questionInfoService.deleteQuestionInfo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心理测试问题")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:question-info:query")
|
||||
public Result<QuestionInfoRespVO> getQuestionInfo(@RequestParam("id") Integer id) {
|
||||
QuestionInfoDO questionInfo = questionInfoService.getQuestionInfo(id);
|
||||
|
||||
QuestionInfoRespVO questionInfoRespVO = BeanUtils.toBean(questionInfo, QuestionInfoRespVO.class);
|
||||
|
||||
List<QuestionOptionDO> questionInfoDOList = questionOptionMapper.selectList(new LambdaQueryWrapper<QuestionOptionDO>()
|
||||
.eq(QuestionOptionDO::getQuestionId, questionInfoRespVO.getId()));
|
||||
|
||||
List<QuestionOptionRespVO> questionOptionPageReqVOS = BeanUtils.toBean(questionInfoDOList, QuestionOptionRespVO.class);
|
||||
questionInfoRespVO.setList(questionOptionPageReqVOS);
|
||||
return success(questionInfoRespVO);
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心理测试问题分页")
|
||||
@RequiresPermissions("psychic:question-info:query")
|
||||
public Result<PageResult<QuestionInfoRespVO>> getQuestionInfoPage(@Valid QuestionInfoPageReqVO pageReqVO) {
|
||||
PageResult<QuestionInfoDO> pageResult = questionInfoService.getQuestionInfoPage(pageReqVO);
|
||||
PageResult<QuestionInfoRespVO> result = BeanUtils.toBean(pageResult, QuestionInfoRespVO.class);
|
||||
if (CollectionUtil.isNotEmpty(result.getList())) {
|
||||
List<Integer> list = result.getList().stream().map(QuestionInfoRespVO::getId).collect(Collectors.toList());
|
||||
List<QuestionOptionDO> questionInfoDOList = questionOptionMapper.selectList(new LambdaQueryWrapper<QuestionOptionDO>().in(QuestionOptionDO::getQuestionId, list));
|
||||
Map<Integer, List<QuestionOptionDO>> map = questionInfoDOList.stream().collect(Collectors.groupingBy(QuestionOptionDO::getQuestionId));
|
||||
result.getList().forEach(questionInfoRespVO -> {
|
||||
List<QuestionOptionDO> questionOptionDOList = map.get(questionInfoRespVO.getId());
|
||||
if (!CollectionUtil.isEmpty(questionOptionDOList)) {
|
||||
List<QuestionOptionRespVO> questionOptionPageReqVOS = BeanUtils.toBean(questionOptionDOList, QuestionOptionRespVO.class);
|
||||
questionInfoRespVO.setList(questionOptionPageReqVOS);
|
||||
}
|
||||
});
|
||||
}
|
||||
return success(result);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心理测试问题 Excel")
|
||||
@RequiresPermissions("psychic:question-info:export")
|
||||
@ISysLog("导出心理测试问题 Excel")
|
||||
public void exportQuestionInfoExcel(@Valid QuestionInfoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<QuestionInfoDO> list = questionInfoService.getQuestionInfoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "心理测试问题.xls", "数据", QuestionInfoRespVO.class,
|
||||
BeanUtils.toBean(list, QuestionInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.oneone.pms.controller.admin.questioninfo.vo;
|
||||
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionPageReqVO;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测试问题分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class QuestionInfoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "所属问卷主表id", example = "21118")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "问题类型1.单选 2.多选 3.问答", example = "1")
|
||||
private Integer questionType;
|
||||
|
||||
@Schema(description = "问题内容")
|
||||
private String questionText;
|
||||
|
||||
@Schema(description = "问题图片")
|
||||
private String questionImgae;
|
||||
|
||||
@Schema(description = "是否必答 1.是 2否")
|
||||
private Integer required;
|
||||
|
||||
@Schema(description = "问题排序")
|
||||
private Integer orderIndex;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.oneone.pms.controller.admin.questioninfo.vo;
|
||||
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionPageReqVO;
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测试问题 Response VO")
|
||||
@Data
|
||||
public class QuestionInfoRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6033")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "所属问卷主表id", example = "21118")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "问题类型1.单选 2.多选 3.问答", example = "1")
|
||||
private Integer questionType;
|
||||
|
||||
@Schema(description = "问题内容")
|
||||
private String questionText;
|
||||
|
||||
@Schema(description = "问题图片")
|
||||
private String questionImgae;
|
||||
|
||||
@Schema(description = "是否必答 1.是 2否")
|
||||
private Integer required;
|
||||
|
||||
@Schema(description = "问题排序")
|
||||
private Integer orderIndex;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
|
||||
private List<QuestionOptionRespVO> list;
|
||||
|
||||
}
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
package com.oneone.pms.controller.admin.questioninfo.vo;
|
||||
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionRespVO;
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionSaveReqVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测试问题新增/修改 Request VO")
|
||||
@Data
|
||||
public class QuestionInfoSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "6033")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "所属问卷主表id", example = "21118")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "问题类型1.单选 2.多选 3.问答", example = "1")
|
||||
private Integer questionType;
|
||||
|
||||
@Schema(description = "问题内容")
|
||||
private String questionText;
|
||||
|
||||
@Schema(description = "问题图片")
|
||||
private String questionImgae;
|
||||
|
||||
@Schema(description = "是否必答 1.是 2否")
|
||||
private Integer required;
|
||||
|
||||
@Schema(description = "问题排序")
|
||||
private Integer orderIndex;
|
||||
|
||||
List<QuestionOptionSaveReqVO> list;
|
||||
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.questionoption;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.questionoption.QuestionOptionDO;
|
||||
import com.oneone.pms.service.questionoption.QuestionOptionService;
|
||||
|
||||
@Tag(name = "管理后台 - 问题选项")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/question-option")
|
||||
@Validated
|
||||
public class QuestionOptionController {
|
||||
|
||||
@Resource
|
||||
private QuestionOptionService questionOptionService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建问题选项")
|
||||
@RequiresPermissions("psychic:question-option:create")
|
||||
public Result<Integer> createQuestionOption(@Valid @RequestBody QuestionOptionSaveReqVO createReqVO) {
|
||||
return success(questionOptionService.createQuestionOption(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新问题选项")
|
||||
@RequiresPermissions("psychic:question-option:update")
|
||||
public Result<Boolean> updateQuestionOption(@Valid @RequestBody QuestionOptionSaveReqVO updateReqVO) {
|
||||
questionOptionService.updateQuestionOption(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除问题选项")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:question-option:delete")
|
||||
public Result<Boolean> deleteQuestionOption(@RequestParam("id") Integer id) {
|
||||
questionOptionService.deleteQuestionOption(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得问题选项")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:question-option:query")
|
||||
public Result<QuestionOptionRespVO> getQuestionOption(@RequestParam("id") Integer id) {
|
||||
QuestionOptionDO questionOption = questionOptionService.getQuestionOption(id);
|
||||
return success(BeanUtils.toBean(questionOption, QuestionOptionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得问题选项分页")
|
||||
@RequiresPermissions("psychic:question-option:query")
|
||||
public Result<PageResult<QuestionOptionRespVO>> getQuestionOptionPage(@Valid QuestionOptionPageReqVO pageReqVO) {
|
||||
PageResult<QuestionOptionDO> pageResult = questionOptionService.getQuestionOptionPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, QuestionOptionRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出问题选项 Excel")
|
||||
@RequiresPermissions("psychic:question-option:export")
|
||||
@ISysLog("导出问题选项 Excel")
|
||||
public void exportQuestionOptionExcel(@Valid QuestionOptionPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<QuestionOptionDO> list = questionOptionService.getQuestionOptionPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "问题选项.xls", "数据", QuestionOptionRespVO.class,
|
||||
BeanUtils.toBean(list, QuestionOptionRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.oneone.pms.controller.admin.questionoption.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 问题选项分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class QuestionOptionPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "问题表id", example = "20207")
|
||||
private Integer questionId;
|
||||
|
||||
@Schema(description = "选项内容")
|
||||
private String optionText;
|
||||
|
||||
@Schema(description = "选项值")
|
||||
private String optionValue;
|
||||
|
||||
@Schema(description = "选项值分数")
|
||||
private Integer optionScore;
|
||||
|
||||
@Schema(description = "选项排序")
|
||||
private Integer orderIndex;
|
||||
|
||||
}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
package com.oneone.pms.controller.admin.questionoption.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 问题选项 Response VO")
|
||||
@Data
|
||||
public class QuestionOptionRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "26980")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "问题表id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20207")
|
||||
private Integer questionId;
|
||||
|
||||
@Schema(description = "选项内容")
|
||||
private String optionText;
|
||||
|
||||
@Schema(description = "选项值")
|
||||
private String optionValue;
|
||||
|
||||
@Schema(description = "选项值分数")
|
||||
private Integer optionScore;
|
||||
|
||||
@Schema(description = "选项排序")
|
||||
private Integer orderIndex;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.oneone.pms.controller.admin.questionoption.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 问题选项新增/修改 Request VO")
|
||||
@Data
|
||||
public class QuestionOptionSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "26980")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "问题表id", requiredMode = Schema.RequiredMode.REQUIRED, example = "20207")
|
||||
@NotNull(message = "问题表id不能为空")
|
||||
private Integer questionId;
|
||||
|
||||
@Schema(description = "选项内容")
|
||||
private String optionText;
|
||||
|
||||
@Schema(description = "选项值")
|
||||
private String optionValue;
|
||||
|
||||
@Schema(description = "选项值分数")
|
||||
private Integer optionScore;
|
||||
|
||||
@Schema(description = "选项排序")
|
||||
private Integer orderIndex;
|
||||
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.scheduletimeslot;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.scheduletimeslot.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.scheduletimeslot.ScheduleTimeSlotDO;
|
||||
import com.oneone.pms.service.scheduletimeslot.ScheduleTimeSlotService;
|
||||
|
||||
@Tag(name = "管理后台 - 时间段")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/schedule-time-slot")
|
||||
@Validated
|
||||
public class ScheduleTimeSlotController {
|
||||
|
||||
@Resource
|
||||
private ScheduleTimeSlotService scheduleTimeSlotService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建时间段")
|
||||
@RequiresPermissions("psychic:schedule-time-slot:create")
|
||||
public Result<Long> createScheduleTimeSlot(@Valid @RequestBody ScheduleTimeSlotSaveReqVO createReqVO) {
|
||||
return success(scheduleTimeSlotService.createScheduleTimeSlot(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新时间段")
|
||||
@RequiresPermissions("psychic:schedule-time-slot:update")
|
||||
public Result<Boolean> updateScheduleTimeSlot(@Valid @RequestBody ScheduleTimeSlotSaveReqVO updateReqVO) {
|
||||
scheduleTimeSlotService.updateScheduleTimeSlot(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除时间段")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:schedule-time-slot:delete")
|
||||
public Result<Boolean> deleteScheduleTimeSlot(@RequestParam("id") Long id) {
|
||||
scheduleTimeSlotService.deleteScheduleTimeSlot(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得时间段")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:schedule-time-slot:query")
|
||||
public Result<ScheduleTimeSlotRespVO> getScheduleTimeSlot(@RequestParam("id") Long id) {
|
||||
ScheduleTimeSlotDO scheduleTimeSlot = scheduleTimeSlotService.getScheduleTimeSlot(id);
|
||||
return success(BeanUtils.toBean(scheduleTimeSlot, ScheduleTimeSlotRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得时间段分页")
|
||||
@RequiresPermissions("psychic:schedule-time-slot:query")
|
||||
public Result<PageResult<ScheduleTimeSlotRespVO>> getScheduleTimeSlotPage(@Valid ScheduleTimeSlotPageReqVO pageReqVO) {
|
||||
PageResult<ScheduleTimeSlotDO> pageResult = scheduleTimeSlotService.getScheduleTimeSlotPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, ScheduleTimeSlotRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出时间段 Excel")
|
||||
@RequiresPermissions("psychic:schedule-time-slot:export")
|
||||
@ISysLog("导出时间段 Excel")
|
||||
public void exportScheduleTimeSlotExcel(@Valid ScheduleTimeSlotPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<ScheduleTimeSlotDO> list = scheduleTimeSlotService.getScheduleTimeSlotPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "时间段.xls", "数据", ScheduleTimeSlotRespVO.class,
|
||||
BeanUtils.toBean(list, ScheduleTimeSlotRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.oneone.pms.controller.admin.scheduletimeslot.vo;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 时间段分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ScheduleTimeSlotPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "排班表id", example = "27714")
|
||||
private Long scheduleId;
|
||||
|
||||
@Schema(description = "容量")
|
||||
private Integer maxCapacity;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalTime[] startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalTime[] endTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.oneone.pms.controller.admin.scheduletimeslot.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 时间段 Response VO")
|
||||
@Data
|
||||
public class ScheduleTimeSlotRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14806")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "排班表id", example = "27714")
|
||||
private Long scheduleId;
|
||||
|
||||
@Schema(description = "容量")
|
||||
private Integer maxCapacity;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
private LocalTime startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
private LocalTime endTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.oneone.pms.controller.admin.scheduletimeslot.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 时间段新增/修改 Request VO")
|
||||
@Data
|
||||
public class ScheduleTimeSlotSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "14806")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "排班表id", example = "27714")
|
||||
private Long scheduleId;
|
||||
|
||||
@Schema(description = "容量")
|
||||
private Integer maxCapacity;
|
||||
|
||||
@Schema(description = "指定开始时间")
|
||||
private LocalTime startTime;
|
||||
|
||||
@Schema(description = "指定结束时间")
|
||||
private LocalTime endTime;
|
||||
|
||||
@Schema(description = "咨询方式")
|
||||
private String consultationMethod;
|
||||
|
||||
}
|
||||
+169
@@ -0,0 +1,169 @@
|
||||
package com.oneone.pms.controller.admin.testinfo;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import com.oneone.pms.controller.admin.questioninfo.vo.QuestionInfoRespVO;
|
||||
import com.oneone.pms.controller.admin.questionoption.vo.QuestionOptionRespVO;
|
||||
import com.oneone.pms.controller.admin.testresult.vo.TestResultRespVO;
|
||||
import com.oneone.pms.dal.dataobject.questioninfo.QuestionInfoDO;
|
||||
import com.oneone.pms.dal.dataobject.questionoption.QuestionOptionDO;
|
||||
import com.oneone.pms.dal.dataobject.testresult.TestResultDO;
|
||||
import com.oneone.pms.dal.mysql.questioninfo.QuestionInfoMapper;
|
||||
import com.oneone.pms.dal.mysql.questionoption.QuestionOptionMapper;
|
||||
import com.oneone.pms.dal.mysql.testresult.TestResultMapper;
|
||||
import com.oneone.pms.service.questioninfo.QuestionInfoService;
|
||||
import com.oneone.pms.service.questionoption.QuestionOptionService;
|
||||
import com.oneone.pms.service.testresult.TestResultService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.testinfo.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.testinfo.TestInfoDO;
|
||||
import com.oneone.pms.service.testinfo.TestInfoService;
|
||||
|
||||
@Tag(name = "管理后台 - 心理测评主")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/test-info")
|
||||
@Validated
|
||||
public class TestInfoController {
|
||||
|
||||
@Resource
|
||||
private TestInfoService testInfoService;
|
||||
@Resource
|
||||
private QuestionInfoMapper questionInfoMapper;
|
||||
|
||||
@Resource
|
||||
private TestResultMapper testResultMapper;
|
||||
|
||||
@Resource
|
||||
private QuestionOptionMapper questionOptionMapper;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心理测评主")
|
||||
@RequiresPermissions("psychic:test-info:create")
|
||||
public Result<Integer> createTestInfo(@Valid @RequestBody TestInfoSaveReqVO createReqVO) {
|
||||
return success(testInfoService.createTestInfo(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心理测评主")
|
||||
@RequiresPermissions("psychic:test-info:update")
|
||||
public Result<Boolean> updateTestInfo(@Valid @RequestBody TestInfoSaveReqVO updateReqVO) {
|
||||
testInfoService.updateTestInfo(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心理测评主")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:test-info:delete")
|
||||
public Result<Boolean> deleteTestInfo(@RequestParam("id") Integer id) {
|
||||
testInfoService.deleteTestInfo(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心理测评主")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:test-info:query")
|
||||
public Result<TestInfoRespVO> getTestInfo(@RequestParam("id") Integer id) {
|
||||
TestInfoDO testInfo = testInfoService.getTestInfo(id);
|
||||
return success(BeanUtils.toBean(testInfo, TestInfoRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心理测评主分页")
|
||||
@RequiresPermissions("psychic:test-info:query")
|
||||
public Result<PageResult<TestInfoRespVO>> getTestInfoPage(@Valid TestInfoPageReqVO pageReqVO) {
|
||||
PageResult<TestInfoDO> pageResult = testInfoService.getTestInfoPage(pageReqVO);
|
||||
Result<PageResult<TestInfoRespVO>> result = success(BeanUtils.toBean(pageResult, TestInfoRespVO.class));
|
||||
if (CollectionUtil.isNotEmpty(result.getData().getList())) {
|
||||
List<Integer> testIds = result.getData().getList().stream().map(TestInfoRespVO::getId).collect(Collectors.toList());
|
||||
List<TestResultDO> list = testResultMapper.selectList(new LambdaQueryWrapper<TestResultDO>().in(TestResultDO::getTestId, testIds));
|
||||
|
||||
Map<Integer,List<TestResultRespVO>> map= new HashMap<>();
|
||||
if (CollectionUtil.isNotEmpty(list)) {
|
||||
List<TestResultRespVO> testResultRespVOS = list.stream().map(testResultDO -> {
|
||||
TestResultRespVO testResultRespVO = BeanUtils.toBean(testResultDO, TestResultRespVO.class);
|
||||
return testResultRespVO;
|
||||
}).collect(Collectors.toList());
|
||||
map= testResultRespVOS.stream().collect(Collectors.groupingBy(e->e.getTestId()));
|
||||
}
|
||||
List<QuestionInfoDO> questionInfoDOS = questionInfoMapper.selectList(new LambdaQueryWrapper<QuestionInfoDO>()
|
||||
.in(QuestionInfoDO::getTestId, testIds));
|
||||
List<Integer> questionIds = questionInfoDOS.stream().map(QuestionInfoDO::getId).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtil.isNotEmpty(questionIds)){
|
||||
List<QuestionOptionDO> questionOptionDOList = questionOptionMapper.selectList(new LambdaQueryWrapper<QuestionOptionDO>()
|
||||
.in(QuestionOptionDO::getQuestionId,questionIds));
|
||||
Map<Integer,List<QuestionOptionDO>> optionsMap = new HashMap<>();
|
||||
if(CollectionUtil.isNotEmpty(questionOptionDOList)){
|
||||
optionsMap = questionOptionDOList.stream().collect(Collectors.groupingBy(e->e.getQuestionId()));
|
||||
}
|
||||
Map<Integer, List<QuestionOptionDO>> finalOptionsMap = optionsMap;
|
||||
List<QuestionInfoRespVO> questionInfoRespVOList = questionInfoDOS.stream().map(questionInfoDO -> {
|
||||
List<QuestionOptionDO> doList = finalOptionsMap.get(questionInfoDO.getId());
|
||||
QuestionInfoRespVO questionInfoRespVO = BeanUtils.toBean(questionInfoDO, QuestionInfoRespVO.class);
|
||||
if(CollectionUtil.isNotEmpty(doList)){
|
||||
List<QuestionOptionRespVO> questionOptionRespVOList = BeanUtils.toBean(doList, QuestionOptionRespVO.class);
|
||||
questionInfoRespVO.setList(questionOptionRespVOList);
|
||||
}
|
||||
return questionInfoRespVO;
|
||||
}).collect(Collectors.toList());
|
||||
Map<Integer,List<QuestionInfoRespVO>> questionInfoMap = questionInfoRespVOList.stream().collect(Collectors.groupingBy(e->e.getTestId()));
|
||||
Map<Integer, List<TestResultRespVO>> finalMap = map;
|
||||
result.getData().getList().forEach(ele->{
|
||||
List<QuestionInfoRespVO> respVOList = questionInfoMap.get(ele.getId());
|
||||
if(CollectionUtil.isNotEmpty(respVOList)){
|
||||
ele.setQuestionInfoRespVOList(respVOList);
|
||||
}
|
||||
List<TestResultRespVO> testResultRespVOS = finalMap.get(ele.getId());
|
||||
if(CollectionUtil.isNotEmpty(testResultRespVOS)){
|
||||
ele.setTestResultRespVOList(testResultRespVOS);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心理测评主 Excel")
|
||||
@RequiresPermissions("psychic:test-info:export")
|
||||
@ISysLog("导出心理测评主 Excel")
|
||||
public void exportTestInfoExcel(@Valid TestInfoPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<TestInfoDO> list = testInfoService.getTestInfoPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "心理测评主.xls", "数据", TestInfoRespVO.class,
|
||||
BeanUtils.toBean(list, TestInfoRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.oneone.pms.controller.admin.testinfo.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评主分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class TestInfoPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "测评名称", example = "芋艿")
|
||||
private String testName;
|
||||
|
||||
@Schema(description = "测评副标题")
|
||||
private String subTitle;
|
||||
|
||||
@Schema(description = "测评图片")
|
||||
private String testPic;
|
||||
|
||||
@Schema(description = "测评介绍")
|
||||
private String testIntroduction;
|
||||
|
||||
@Schema(description = "测评须知")
|
||||
private String testNotice;
|
||||
|
||||
@Schema(description = "测评基础人数")
|
||||
private Long baseNum;
|
||||
|
||||
@Schema(description = "测评人数增加规则 1.正常增加 2.每次增加固定数量 3.随机增加", example = "1")
|
||||
private Integer addType;
|
||||
|
||||
@Schema(description = "每次增加人数")
|
||||
private Integer addNum;
|
||||
|
||||
@Schema(description = "状态 1.启用 2.禁用", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+64
@@ -0,0 +1,64 @@
|
||||
package com.oneone.pms.controller.admin.testinfo.vo;
|
||||
|
||||
import com.oneone.pms.controller.admin.questioninfo.vo.QuestionInfoRespVO;
|
||||
import com.oneone.pms.controller.admin.testresult.vo.TestResultRespVO;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评主 Response VO")
|
||||
@Data
|
||||
public class TestInfoRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11059")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "测评名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
private String testName;
|
||||
|
||||
@Schema(description = "测评图片")
|
||||
private String testPic;
|
||||
|
||||
@Schema(description = "测评副标题")
|
||||
private String subTitle;
|
||||
|
||||
@Schema(description = "测评介绍")
|
||||
private String testIntroduction;
|
||||
|
||||
@Schema(description = "测评须知")
|
||||
private String testNotice;
|
||||
|
||||
@Schema(description = "测评基础人数")
|
||||
private Long baseNum;
|
||||
|
||||
@Schema(description = "测评人数增加规则 1.正常增加 2.每次增加固定数量 3.随机增加", example = "1")
|
||||
private Integer addType;
|
||||
|
||||
@Schema(description = "每次增加人数")
|
||||
private Integer addNum;
|
||||
|
||||
@Schema(description = "状态 1.启用 2.禁用", example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
/**
|
||||
* 名义测评人数
|
||||
*/
|
||||
private Integer totalNum;
|
||||
|
||||
private Integer showMain;
|
||||
/**
|
||||
* 实际测评人数
|
||||
*/
|
||||
private Integer actualNum;
|
||||
private List<QuestionInfoRespVO> questionInfoRespVOList;
|
||||
|
||||
private List<TestResultRespVO> testResultRespVOList;
|
||||
}
|
||||
+46
@@ -0,0 +1,46 @@
|
||||
package com.oneone.pms.controller.admin.testinfo.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评主新增/修改 Request VO")
|
||||
@Data
|
||||
public class TestInfoSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "11059")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "测评名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "测评名称不能为空")
|
||||
private String testName;
|
||||
|
||||
@Schema(description = "测评图片")
|
||||
private String testPic;
|
||||
|
||||
@Schema(description = "测评副标题")
|
||||
private String subTitle;
|
||||
|
||||
@Schema(description = "测评介绍")
|
||||
private String testIntroduction;
|
||||
|
||||
@Schema(description = "测评须知")
|
||||
private String testNotice;
|
||||
|
||||
@Schema(description = "测评基础人数")
|
||||
private Long baseNum;
|
||||
|
||||
@Schema(description = "测评人数增加规则 1.正常增加 2.每次增加固定数量 3.随机增加", example = "1")
|
||||
private Integer addType;
|
||||
|
||||
@Schema(description = "每次增加人数")
|
||||
private Integer addNum;
|
||||
|
||||
@Schema(description = "状态 1.启用 2.禁用", example = "1")
|
||||
private Integer status;
|
||||
|
||||
private Integer showMain;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.testresult;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.testresult.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.testresult.TestResultDO;
|
||||
import com.oneone.pms.service.testresult.TestResultService;
|
||||
|
||||
@Tag(name = "管理后台 - 心理测评结果")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/test-result")
|
||||
@Validated
|
||||
public class TestResultController {
|
||||
|
||||
@Resource
|
||||
private TestResultService testResultService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心理测评结果")
|
||||
@RequiresPermissions("psychic:test-result:create")
|
||||
public Result<Integer> createTestResult(@Valid @RequestBody TestResultSaveReqVO createReqVO) {
|
||||
return success(testResultService.createTestResult(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心理测评结果")
|
||||
@RequiresPermissions("psychic:test-result:update")
|
||||
public Result<Boolean> updateTestResult(@Valid @RequestBody TestResultSaveReqVO updateReqVO) {
|
||||
testResultService.updateTestResult(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心理测评结果")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:test-result:delete")
|
||||
public Result<Boolean> deleteTestResult(@RequestParam("id") Integer id) {
|
||||
testResultService.deleteTestResult(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心理测评结果")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:test-result:query")
|
||||
public Result<TestResultRespVO> getTestResult(@RequestParam("id") Integer id) {
|
||||
TestResultDO testResult = testResultService.getTestResult(id);
|
||||
return success(BeanUtils.toBean(testResult, TestResultRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心理测评结果分页")
|
||||
@RequiresPermissions("psychic:test-result:query")
|
||||
public Result<PageResult<TestResultRespVO>> getTestResultPage(@Valid TestResultPageReqVO pageReqVO) {
|
||||
PageResult<TestResultDO> pageResult = testResultService.getTestResultPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, TestResultRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心理测评结果 Excel")
|
||||
@RequiresPermissions("psychic:test-result:export")
|
||||
@ISysLog("导出心理测评结果 Excel")
|
||||
public void exportTestResultExcel(@Valid TestResultPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<TestResultDO> list = testResultService.getTestResultPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "心理测评结果.xls", "数据", TestResultRespVO.class,
|
||||
BeanUtils.toBean(list, TestResultRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.oneone.pms.controller.admin.testresult.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评结果分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class TestResultPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "测试表id", example = "18744")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "最小分数")
|
||||
private Integer minScore;
|
||||
|
||||
@Schema(description = "最大分数")
|
||||
private Integer maxScore;
|
||||
|
||||
@Schema(description = "结果描述")
|
||||
private String resultDesc;
|
||||
|
||||
@Schema(description = "结果分析")
|
||||
private String resultAnalysis;
|
||||
|
||||
@Schema(description = "治疗方案")
|
||||
private String treatPlan;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
package com.oneone.pms.controller.admin.testresult.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评结果 Response VO")
|
||||
@Data
|
||||
public class TestResultRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "29960")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "测试表id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18744")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "最小分数")
|
||||
private Integer minScore;
|
||||
|
||||
@Schema(description = "最大分数")
|
||||
private Integer maxScore;
|
||||
|
||||
@Schema(description = "结果描述")
|
||||
private String resultDesc;
|
||||
|
||||
@Schema(description = "结果分析")
|
||||
private String resultAnalysis;
|
||||
|
||||
@Schema(description = "治疗方案")
|
||||
private String treatPlan;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.oneone.pms.controller.admin.testresult.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评结果新增/修改 Request VO")
|
||||
@Data
|
||||
public class TestResultSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "29960")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "测试表id", requiredMode = Schema.RequiredMode.REQUIRED, example = "18744")
|
||||
@NotNull(message = "测试表id不能为空")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "最小分数")
|
||||
private Integer minScore;
|
||||
|
||||
@Schema(description = "最大分数")
|
||||
private Integer maxScore;
|
||||
|
||||
@Schema(description = "结果描述")
|
||||
private String resultDesc;
|
||||
|
||||
@Schema(description = "结果分析")
|
||||
private String resultAnalysis;
|
||||
|
||||
@Schema(description = "治疗方案")
|
||||
private String treatPlan;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.thirdloginconfig;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.thirdloginconfig.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.thirdloginconfig.PlatformThirdLoginConfigDO;
|
||||
import com.oneone.pms.service.thirdloginconfig.PlatformThirdLoginConfigService;
|
||||
|
||||
@Tag(name = "管理后台 - 三方登录配置")
|
||||
@RestController
|
||||
@RequestMapping("/pms/platform-third-login-config")
|
||||
@Validated
|
||||
public class PlatformThirdLoginConfigController {
|
||||
|
||||
@Resource
|
||||
private PlatformThirdLoginConfigService platformThirdLoginConfigService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建三方登录配置")
|
||||
@RequiresPermissions("pms:platform-third-login-config:create")
|
||||
public Result<Integer> createPlatformThirdLoginConfig(@Valid @RequestBody PlatformThirdLoginConfigSaveReqVO createReqVO) {
|
||||
return success(platformThirdLoginConfigService.createPlatformThirdLoginConfig(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新三方登录配置")
|
||||
@RequiresPermissions("pms:platform-third-login-config:update")
|
||||
public Result<Boolean> updatePlatformThirdLoginConfig(@Valid @RequestBody PlatformThirdLoginConfigSaveReqVO updateReqVO) {
|
||||
platformThirdLoginConfigService.updatePlatformThirdLoginConfig(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除三方登录配置")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("pms:platform-third-login-config:delete")
|
||||
public Result<Boolean> deletePlatformThirdLoginConfig(@RequestParam("id") Integer id) {
|
||||
platformThirdLoginConfigService.deletePlatformThirdLoginConfig(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得三方登录配置")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("pms:platform-third-login-config:query")
|
||||
public Result<PlatformThirdLoginConfigRespVO> getPlatformThirdLoginConfig(@RequestParam("id") Integer id) {
|
||||
PlatformThirdLoginConfigDO platformThirdLoginConfig = platformThirdLoginConfigService.getPlatformThirdLoginConfig(id);
|
||||
return success(BeanUtils.toBean(platformThirdLoginConfig, PlatformThirdLoginConfigRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得三方登录配置分页")
|
||||
@RequiresPermissions("pms:platform-third-login-config:query")
|
||||
public Result<PageResult<PlatformThirdLoginConfigRespVO>> getPlatformThirdLoginConfigPage(@Valid PlatformThirdLoginConfigPageReqVO pageReqVO) {
|
||||
PageResult<PlatformThirdLoginConfigDO> pageResult = platformThirdLoginConfigService.getPlatformThirdLoginConfigPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PlatformThirdLoginConfigRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出三方登录配置 Excel")
|
||||
@RequiresPermissions("pms:platform-third-login-config:export")
|
||||
@ISysLog("导出三方登录配置 Excel")
|
||||
public void exportPlatformThirdLoginConfigExcel(@Valid PlatformThirdLoginConfigPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlatformThirdLoginConfigDO> list = platformThirdLoginConfigService.getPlatformThirdLoginConfigPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "三方登录配置.xls", "数据", PlatformThirdLoginConfigRespVO.class,
|
||||
BeanUtils.toBean(list, PlatformThirdLoginConfigRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.oneone.pms.controller.admin.thirdloginconfig.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 三方登录配置分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PlatformThirdLoginConfigPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "三方登录类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "应用id")
|
||||
private String thirdAppId;
|
||||
|
||||
@Schema(description = "0未启用 1已启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.oneone.pms.controller.admin.thirdloginconfig.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 三方登录配置 Response VO")
|
||||
@Data
|
||||
public class PlatformThirdLoginConfigRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "三方登录类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "应用id")
|
||||
private String thirdAppId;
|
||||
|
||||
|
||||
@Schema(description = "privateKey")
|
||||
private String privateKey;
|
||||
|
||||
|
||||
@Schema(description = "publicKey")
|
||||
private String publicKey;
|
||||
|
||||
@Schema(description = "0未启用 1已启用")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.oneone.pms.controller.admin.thirdloginconfig.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 三方登录配置新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlatformThirdLoginConfigSaveReqVO {
|
||||
|
||||
@Schema(description = "三方登录配置id")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "三方登录类型")
|
||||
private String type;
|
||||
|
||||
@Schema(description = "应用id")
|
||||
private String thirdAppId;
|
||||
|
||||
@Schema(description = "privateKey")
|
||||
private String privateKey;
|
||||
|
||||
@Schema(description = "publicKey")
|
||||
private String publicKey;
|
||||
|
||||
@Schema(description = "0未启用 1已启用")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.user;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.user.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.user.PlatformUserDO;
|
||||
import com.oneone.pms.service.user.PlatformUserService;
|
||||
|
||||
@Tag(name = "管理后台 - 用户账户")
|
||||
@RestController
|
||||
@RequestMapping("/pms/platform-user")
|
||||
@Validated
|
||||
public class PlatformUserController {
|
||||
|
||||
@Resource
|
||||
private PlatformUserService platformUserService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建用户账户")
|
||||
@RequiresPermissions("pms:platform-user:create")
|
||||
public Result<Long> createPlatformUser(@Valid @RequestBody PlatformUserSaveReqVO createReqVO) {
|
||||
return success(platformUserService.createPlatformUser(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新用户账户")
|
||||
@RequiresPermissions("pms:platform-user:update")
|
||||
public Result<Boolean> updatePlatformUser(@Valid @RequestBody PlatformUserSaveReqVO updateReqVO) {
|
||||
platformUserService.updatePlatformUser(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户账户")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("pms:platform-user:delete")
|
||||
public Result<Boolean> deletePlatformUser(@RequestParam("id") Long id) {
|
||||
platformUserService.deletePlatformUser(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户账户")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("pms:platform-user:query")
|
||||
public Result<PlatformUserRespVO> getPlatformUser(@RequestParam("id") Long id) {
|
||||
PlatformUserDO platformUser = platformUserService.getPlatformUser(id);
|
||||
return success(BeanUtils.toBean(platformUser, PlatformUserRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户账户分页")
|
||||
@RequiresPermissions("pms:platform-user:query")
|
||||
public Result<PageResult<PlatformUserRespVO>> getPlatformUserPage(@Valid PlatformUserPageReqVO pageReqVO) {
|
||||
PageResult<PlatformUserRespVO> pageResult = platformUserService.getPlatformUserVoPage(pageReqVO);
|
||||
return success(pageResult);
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出用户账户 Excel")
|
||||
@RequiresPermissions("pms:platform-user:export")
|
||||
@ISysLog("导出用户账户 Excel")
|
||||
public void exportPlatformUserExcel(@Valid PlatformUserPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlatformUserDO> list = platformUserService.getPlatformUserPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "用户账户.xls", "数据", PlatformUserRespVO.class,
|
||||
BeanUtils.toBean(list, PlatformUserRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.oneone.pms.controller.admin.user.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户账户分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PlatformUserPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "状态", example = "1")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "身份证")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "真实姓名", example = "芋艿")
|
||||
private String realName;
|
||||
|
||||
|
||||
private String nickName;
|
||||
private String avatarUrl;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
package com.oneone.pms.controller.admin.user.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户账户 Response VO")
|
||||
@Data
|
||||
public class PlatformUserRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "27599")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "身份证", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "真实姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
private String nickName;
|
||||
private String avatarUrl;
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.oneone.pms.controller.admin.user.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 用户账户新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlatformUserSaveReqVO {
|
||||
|
||||
|
||||
@Schema(description = "用户账号id")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
@NotNull(message = "状态不能为空")
|
||||
private Boolean status;
|
||||
|
||||
@Schema(description = "身份证", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "身份证不能为空")
|
||||
private String idCard;
|
||||
|
||||
@Schema(description = "真实姓名", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
|
||||
@NotEmpty(message = "真实姓名不能为空")
|
||||
private String realName;
|
||||
|
||||
@Schema(description = "最近登录区id", example = "32358")
|
||||
private Integer lastRegionId;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.useraccount;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.useraccount.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.useraccount.PlatformUserAccountDO;
|
||||
import com.oneone.pms.service.useraccount.PlatformUserAccountService;
|
||||
|
||||
@Tag(name = "管理后台 - 玩家登录账号")
|
||||
@RestController
|
||||
@RequestMapping("/pms/platform-user-account")
|
||||
@Validated
|
||||
public class PlatformUserAccountController {
|
||||
|
||||
@Resource
|
||||
private PlatformUserAccountService platformUserAccountService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建玩家登录账号")
|
||||
@RequiresPermissions("pms:platform-user-account:create")
|
||||
public Result<Long> createPlatformUserAccount(@Valid @RequestBody PlatformUserAccountSaveReqVO createReqVO) {
|
||||
return success(platformUserAccountService.createPlatformUserAccount(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新玩家登录账号")
|
||||
@RequiresPermissions("pms:platform-user-account:update")
|
||||
public Result<Boolean> updatePlatformUserAccount(@Valid @RequestBody PlatformUserAccountSaveReqVO updateReqVO) {
|
||||
platformUserAccountService.updatePlatformUserAccount(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除玩家登录账号")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("pms:platform-user-account:delete")
|
||||
public Result<Boolean> deletePlatformUserAccount(@RequestParam("id") Long id) {
|
||||
platformUserAccountService.deletePlatformUserAccount(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得玩家登录账号")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("pms:platform-user-account:query")
|
||||
public Result<PlatformUserAccountRespVO> getPlatformUserAccount(@RequestParam("id") Long id) {
|
||||
PlatformUserAccountDO platformUserAccount = platformUserAccountService.getPlatformUserAccount(id);
|
||||
return success(BeanUtils.toBean(platformUserAccount, PlatformUserAccountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得玩家登录账号分页")
|
||||
@RequiresPermissions("pms:platform-user-account:query")
|
||||
public Result<PageResult<PlatformUserAccountRespVO>> getPlatformUserAccountPage(@Valid PlatformUserAccountPageReqVO pageReqVO) {
|
||||
PageResult<PlatformUserAccountDO> pageResult = platformUserAccountService.getPlatformUserAccountPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, PlatformUserAccountRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出玩家登录账号 Excel")
|
||||
@RequiresPermissions("pms:platform-user-account:export")
|
||||
@ISysLog("导出玩家登录账号 Excel")
|
||||
public void exportPlatformUserAccountExcel(@Valid PlatformUserAccountPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<PlatformUserAccountDO> list = platformUserAccountService.getPlatformUserAccountPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "玩家登录账号.xls", "数据", PlatformUserAccountRespVO.class,
|
||||
BeanUtils.toBean(list, PlatformUserAccountRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+37
@@ -0,0 +1,37 @@
|
||||
package com.oneone.pms.controller.admin.useraccount.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 玩家登录账号分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class PlatformUserAccountPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "用户id", example = "670")
|
||||
private Long platformUserId;
|
||||
|
||||
@Schema(description = "账号类型", example = "2")
|
||||
private String accountType;
|
||||
|
||||
@Schema(description = "账号", example = "15718")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "1:启用 0:禁用", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package com.oneone.pms.controller.admin.useraccount.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 玩家登录账号 Response VO")
|
||||
@Data
|
||||
public class PlatformUserAccountRespVO {
|
||||
|
||||
@Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "13184")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", example = "670")
|
||||
private Long platformUserId;
|
||||
|
||||
@Schema(description = "账号类型", example = "2")
|
||||
private String accountType;
|
||||
|
||||
@Schema(description = "账号", example = "15718")
|
||||
private String account;
|
||||
|
||||
// @Schema(description = "密码")
|
||||
// private String password;
|
||||
|
||||
@Schema(description = "1:启用 0:禁用", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+33
@@ -0,0 +1,33 @@
|
||||
package com.oneone.pms.controller.admin.useraccount.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 玩家登录账号新增/修改 Request VO")
|
||||
@Data
|
||||
public class PlatformUserAccountSaveReqVO {
|
||||
|
||||
|
||||
|
||||
@Schema(description = "表id", example = "670")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "用户id", example = "670")
|
||||
private Long platformUserId;
|
||||
|
||||
@Schema(description = "账号类型", example = "2")
|
||||
private String accountType;
|
||||
|
||||
@Schema(description = "账号", example = "15718")
|
||||
private String account;
|
||||
|
||||
@Schema(description = "密码")
|
||||
private String password;
|
||||
|
||||
@Schema(description = "1:启用 0:禁用", example = "2")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
package com.oneone.pms.controller.admin.userchoice;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.userchoice.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.userchoice.UserChoiceDO;
|
||||
import com.oneone.pms.service.userchoice.UserChoiceService;
|
||||
|
||||
@Tag(name = "管理后台 - 心理测评用户选择")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/user-choice")
|
||||
@Validated
|
||||
public class UserChoiceController {
|
||||
|
||||
@Resource
|
||||
private UserChoiceService userChoiceService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建心理测评用户选择")
|
||||
@RequiresPermissions("psychic:user-choice:create")
|
||||
public Result<Long> createUserChoice(@Valid @RequestBody UserChoiceSaveReqVO createReqVO) {
|
||||
return success(userChoiceService.createUserChoice(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新心理测评用户选择")
|
||||
@RequiresPermissions("psychic:user-choice:update")
|
||||
public Result<Boolean> updateUserChoice(@Valid @RequestBody UserChoiceSaveReqVO updateReqVO) {
|
||||
userChoiceService.updateUserChoice(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除心理测评用户选择")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:user-choice:delete")
|
||||
public Result<Boolean> deleteUserChoice(@RequestParam("id") Long id) {
|
||||
userChoiceService.deleteUserChoice(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得心理测评用户选择")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:user-choice:query")
|
||||
public Result<UserChoiceRespVO> getUserChoice(@RequestParam("id") Long id) {
|
||||
UserChoiceDO userChoice = userChoiceService.getUserChoice(id);
|
||||
return success(BeanUtils.toBean(userChoice, UserChoiceRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得心理测评用户选择分页")
|
||||
@RequiresPermissions("psychic:user-choice:query")
|
||||
public Result<PageResult<UserChoiceRespVO>> getUserChoicePage(@Valid UserChoicePageReqVO pageReqVO) {
|
||||
PageResult<UserChoiceDO> pageResult = userChoiceService.getUserChoicePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, UserChoiceRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出心理测评用户选择 Excel")
|
||||
@RequiresPermissions("psychic:user-choice:export")
|
||||
@ISysLog("导出心理测评用户选择 Excel")
|
||||
public void exportUserChoiceExcel(@Valid UserChoicePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<UserChoiceDO> list = userChoiceService.getUserChoicePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "心理测评用户选择.xls", "数据", UserChoiceRespVO.class,
|
||||
BeanUtils.toBean(list, UserChoiceRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
package com.oneone.pms.controller.admin.userchoice.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评用户选择分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class UserChoicePageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "回答用户id", example = "24430")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "问卷id", example = "24370")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "用户选择答案")
|
||||
private String choiceInfo;
|
||||
|
||||
@Schema(description = "问卷总分")
|
||||
private Integer totalScore;
|
||||
|
||||
@Schema(description = "问卷答案对应结果", example = "32671")
|
||||
private Integer resultId;
|
||||
|
||||
@Schema(description = "测评开始时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] startTime;
|
||||
|
||||
@Schema(description = "测评结束时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] endTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
package com.oneone.pms.controller.admin.userchoice.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评用户选择 Response VO")
|
||||
@Data
|
||||
public class UserChoiceRespVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8722")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "回答用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24430")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "问卷id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24370")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "用户选择答案", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private String choiceInfo;
|
||||
|
||||
@Schema(description = "问卷总分")
|
||||
private Integer totalScore;
|
||||
|
||||
@Schema(description = "问卷答案对应结果", example = "32671")
|
||||
private Integer resultId;
|
||||
|
||||
@Schema(description = "测评开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "测评结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+42
@@ -0,0 +1,42 @@
|
||||
package com.oneone.pms.controller.admin.userchoice.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 心理测评用户选择新增/修改 Request VO")
|
||||
@Data
|
||||
public class UserChoiceSaveReqVO {
|
||||
|
||||
@Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED, example = "8722")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "回答用户id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24430")
|
||||
@NotNull(message = "回答用户id不能为空")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "问卷id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24370")
|
||||
@NotNull(message = "问卷id不能为空")
|
||||
private Integer testId;
|
||||
|
||||
@Schema(description = "用户选择答案", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotEmpty(message = "用户选择答案不能为空")
|
||||
private String choiceInfo;
|
||||
|
||||
@Schema(description = "问卷总分")
|
||||
private Integer totalScore;
|
||||
|
||||
@Schema(description = "问卷答案对应结果", example = "32671")
|
||||
private Integer resultId;
|
||||
|
||||
@Schema(description = "测评开始时间")
|
||||
private LocalDateTime startTime;
|
||||
|
||||
@Schema(description = "测评结束时间")
|
||||
private LocalDateTime endTime;
|
||||
|
||||
}
|
||||
+102
@@ -0,0 +1,102 @@
|
||||
package com.oneone.pms.controller.admin.userfeedback;
|
||||
|
||||
import com.oneone.common.util.ExcelUtils;
|
||||
import com.oneone.common.log.annotation.ISysLog;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import com.oneone.common.web.security.annotation.RequiresPermissions;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.oneone.common.base.PageParam;
|
||||
import com.oneone.common.result.PageResult;
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.common.util.BeanUtils;
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
import com.oneone.pms.controller.admin.userfeedback.vo.*;
|
||||
import com.oneone.pms.dal.dataobject.userfeedback.UserFeedbackDO;
|
||||
import com.oneone.pms.service.userfeedback.UserFeedbackService;
|
||||
|
||||
@Tag(name = "管理后台 - 用户意见反馈")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/user-feedback")
|
||||
@Validated
|
||||
public class UserFeedbackController {
|
||||
|
||||
@Resource
|
||||
private UserFeedbackService userFeedbackService;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建用户意见反馈")
|
||||
@RequiresPermissions("psychic:user-feedback:create")
|
||||
public Result<Integer> createUserFeedback(@Valid @RequestBody UserFeedbackSaveReqVO createReqVO) {
|
||||
return success(userFeedbackService.createUserFeedback(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新用户意见反馈")
|
||||
@RequiresPermissions("psychic:user-feedback:update")
|
||||
public Result<Boolean> updateUserFeedback(@Valid @RequestBody UserFeedbackSaveReqVO updateReqVO) {
|
||||
userFeedbackService.updateUserFeedback(updateReqVO);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除用户意见反馈")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:user-feedback:delete")
|
||||
public Result<Boolean> deleteUserFeedback(@RequestParam("id") Integer id) {
|
||||
userFeedbackService.deleteUserFeedback(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@PostMapping("/deal-status")
|
||||
@Operation(summary = "修改状态")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@RequiresPermissions("psychic:user-feedback:update")
|
||||
public Result<Boolean> dealStatus(@RequestParam("id") Integer id) {
|
||||
userFeedbackService.dealStatus(id);
|
||||
return success(true);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户意见反馈")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@RequiresPermissions("psychic:user-feedback:query")
|
||||
public Result<UserFeedbackRespVO> getUserFeedback(@RequestParam("id") Integer id) {
|
||||
UserFeedbackDO userFeedback = userFeedbackService.getUserFeedback(id);
|
||||
return success(BeanUtils.toBean(userFeedback, UserFeedbackRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得用户意见反馈分页")
|
||||
@RequiresPermissions("psychic:user-feedback:query")
|
||||
public Result<PageResult<UserFeedbackRespVO>> getUserFeedbackPage(@Valid UserFeedbackPageReqVO pageReqVO) {
|
||||
PageResult<UserFeedbackDO> pageResult = userFeedbackService.getUserFeedbackPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, UserFeedbackRespVO.class));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出用户意见反馈 Excel")
|
||||
@RequiresPermissions("psychic:user-feedback:export")
|
||||
@ISysLog("导出用户意见反馈 Excel")
|
||||
public void exportUserFeedbackExcel(@Valid UserFeedbackPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<UserFeedbackDO> list = userFeedbackService.getUserFeedbackPage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "用户意见反馈.xls", "数据", UserFeedbackRespVO.class,
|
||||
BeanUtils.toBean(list, UserFeedbackRespVO.class));
|
||||
}
|
||||
|
||||
}
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
package com.oneone.pms.controller.admin.userfeedback.vo;
|
||||
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import com.oneone.common.base.PageParam;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static com.oneone.common.util.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
|
||||
|
||||
@Schema(description = "管理后台 - 用户意见反馈分页 Request VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class UserFeedbackPageReqVO extends PageParam {
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String contentText;
|
||||
|
||||
@Schema(description = "用户id", example = "27094")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "联系方式")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "0未处理 1已处理", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
|
||||
private LocalDateTime[] createTime;
|
||||
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
package com.oneone.pms.controller.admin.userfeedback.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import java.util.*;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
@Schema(description = "管理后台 - 用户意见反馈 Response VO")
|
||||
@Data
|
||||
public class UserFeedbackRespVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6488")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String contentText;
|
||||
|
||||
@Schema(description = "用户id", example = "27094")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "联系方式")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "0未处理 1已处理", example = "2")
|
||||
private Integer status;
|
||||
|
||||
@Schema(description = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.oneone.pms.controller.admin.userfeedback.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.*;
|
||||
import java.util.*;
|
||||
import javax.validation.constraints.*;
|
||||
import java.util.*;
|
||||
|
||||
@Schema(description = "管理后台 - 用户意见反馈新增/修改 Request VO")
|
||||
@Data
|
||||
public class UserFeedbackSaveReqVO {
|
||||
|
||||
@Schema(description = "ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6488")
|
||||
private Integer id;
|
||||
|
||||
@Schema(description = "内容")
|
||||
private String contentText;
|
||||
|
||||
@Schema(description = "用户id", example = "27094")
|
||||
private Long userId;
|
||||
|
||||
@Schema(description = "联系方式")
|
||||
private String contact;
|
||||
|
||||
@Schema(description = "0未处理 1已处理", example = "2")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
package com.oneone.pms.controller.app.appointmentinfo;
|
||||
|
||||
import com.oneone.common.result.Result;
|
||||
import com.oneone.pms.controller.app.appointmentinfo.vo.AppointmentInfoAppRespVO;
|
||||
import com.oneone.pms.controller.app.appointmentinfo.vo.AppointmentInfoAppSaveReqVO;
|
||||
import com.oneone.pms.service.appointmentinfo.AppointmentInfoService;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
|
||||
import static com.oneone.common.result.Result.success;
|
||||
|
||||
@Tag(name = "管理后台 - 用户预约信息")
|
||||
@RestController
|
||||
@RequestMapping("/psychic/appointment-info")
|
||||
@Validated
|
||||
public class AppointmentInfoAppController {
|
||||
|
||||
@Resource
|
||||
private AppointmentInfoService appointmentInfoService;
|
||||
|
||||
@PostMapping("/saveOrUpdate")
|
||||
public Result createAppointmentInfo(@Valid @RequestBody AppointmentInfoAppSaveReqVO createReqVO) {
|
||||
appointmentInfoService.saveOrUpdateAppInfo(createReqVO);
|
||||
return success();
|
||||
}
|
||||
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得用户预约信息")
|
||||
public Result<AppointmentInfoAppRespVO> getAppointmentInfo() {
|
||||
AppointmentInfoAppRespVO appointmentInfoRespVO = appointmentInfoService.getAppointmentInfoByUserId();
|
||||
return success(appointmentInfoRespVO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user