Compare commits
27 Commits
Author | SHA1 | Date |
---|---|---|
|
9ed8c924ee | |
|
10a4a491ac | |
|
9b66e3f71a | |
|
e0fa5bc2e9 | |
|
3702701c0d | |
|
72fbfd4649 | |
|
d507b1b95f | |
|
3b4600db02 | |
|
b7c3a1f09e | |
|
0492e0b5e3 | |
|
c309b2ce34 | |
|
cd84674a50 | |
|
9dbbdf5731 | |
|
a334ab2fb8 | |
|
a41e75e9c4 | |
|
3a62f92629 | |
|
d29222fefa | |
|
7d6f974bd4 | |
|
037643567e | |
|
a6b1365818 | |
|
c33fc3ae52 | |
|
2fb6724844 | |
|
463d1bf61c | |
|
ca1c7154cd | |
|
cade33d093 | |
|
0f3112dcf0 | |
|
32eb478322 |
|
@ -23,7 +23,7 @@ public class HealthDoctorController {
|
|||
|
||||
@PostMapping("/login")
|
||||
@ApiOperation("邮箱密码登录")
|
||||
public HealthR<?> login(@RequestParam @ApiParam("email") String email, @RequestParam @ApiParam("pwd") String pwd) {
|
||||
public HealthR<?> login(@RequestParam String email, @RequestParam String pwd) {
|
||||
DoctorVo userInfo = healthDoctorService.login(email,pwd);
|
||||
if (userInfo!=null){
|
||||
return HealthR.ok(userInfo,"登录成功");
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -11,7 +11,7 @@ import doctor.system.api.model.LoginUser;
|
|||
|
||||
/**
|
||||
* 权限获取工具类
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
public class SecurityUtils
|
||||
|
@ -63,6 +63,11 @@ public class SecurityUtils
|
|||
{
|
||||
// 从header获取token标识
|
||||
String token = request.getHeader(TokenConstants.AUTHENTICATION);
|
||||
if (StringUtils.isEmpty(token))
|
||||
{
|
||||
// 从参数获取token
|
||||
token = request.getHeader(TokenConstants.SESSIONID);
|
||||
}
|
||||
return replaceTokenPrefix(token);
|
||||
}
|
||||
|
||||
|
@ -81,7 +86,7 @@ public class SecurityUtils
|
|||
|
||||
/**
|
||||
* 是否为管理员
|
||||
*
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 结果
|
||||
*/
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -19,6 +19,36 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<!-- websocket -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-websocket</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.76</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <!– https://mvnrepository.com/artifact/com.alipay.sdk/alipay-sdk-java –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>com.alipay.sdk</groupId>-->
|
||||
<!-- <artifactId>alipay-sdk-java</artifactId>-->
|
||||
<!-- <version>4.13.50</version>-->
|
||||
<!-- </dependency>-->
|
||||
|
||||
<!--支付宝依赖 -->
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-easysdk</artifactId>
|
||||
<version>2.2.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alipay.sdk</groupId>
|
||||
<artifactId>alipay-sdk-java</artifactId>
|
||||
<version>4.38.149.ALL</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Oss上传 -->
|
||||
<dependency>
|
||||
|
@ -118,6 +148,36 @@
|
|||
<version>${mapstruct.version}</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- 其他依赖 ... -->
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.4.0</version> <!-- 根据最新版本调整 -->
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.alibaba</groupId>
|
||||
<artifactId>fastjson</artifactId>
|
||||
<version>1.2.80</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.aliyun</groupId>
|
||||
<artifactId>facebody20191230</artifactId>
|
||||
<version>4.0.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>core</artifactId>
|
||||
<version>3.4.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.zxing</groupId>
|
||||
<artifactId>javase</artifactId>
|
||||
<version>3.4.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package doctor;
|
||||
|
||||
import com.alipay.api.AlipayClient;
|
||||
import com.alipay.api.DefaultAlipayClient;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.stereotype.Component;
|
||||
@Component
|
||||
public class AliPayConfig {
|
||||
|
||||
|
||||
|
||||
@Bean
|
||||
public AlipayClient initAlipayClient(AlipayConfigProperties alipayConfigProperties) {
|
||||
return new
|
||||
DefaultAlipayClient(
|
||||
alipayConfigProperties.getGatewayUrl(),
|
||||
alipayConfigProperties.getAppId(),
|
||||
alipayConfigProperties.getMerchantPrivateKey(),
|
||||
"json", alipayConfigProperties.getCharset(),
|
||||
alipayConfigProperties.getAlipayPublicKey(),
|
||||
alipayConfigProperties.getSignType());
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
package doctor;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@Data
|
||||
//@ConfigurationProperties(prefix = "pay.alipay")
|
||||
public class AlipayConfigProperties {
|
||||
|
||||
|
||||
/**
|
||||
* 应用ID,您的APPID,收款账号既是您的APPID对应支付宝账号
|
||||
*/
|
||||
private String appId = "9021000132656203";
|
||||
|
||||
/**
|
||||
* 商户私钥,您的PKCS8格式RSA2私钥
|
||||
*/
|
||||
private String merchantPrivateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQC7lh2ErwckK+mODTqBRWi78nlUR5a1OrCP5b+ImFjsB0EIkeOpSKiqGJv9omaRUfKxwoSqBc6c22KLszNdS6rKvcDrRObFRcLaOoMVT7CS0sSsq7ZATVy4WvouyudAOTNL6H4QOyj+YnyM6pU7Ja2jepAJwvDD9h/7c0fvASAtSteC0akuRq/r2SJ7ZRQpLWtrW4KBz+NneYHHP519sWtF2GSToN8brZJrDB9xI75N43+42L8MEuVsRK375wBv4jkwPtrB9mYQsuSMDXOsLbjuCHfxcTlFEUJ3c6SiZeIrDH9auW/lPJ+QZg91DYsZr7+HdijBej/CRT+rTmgzb7VpAgMBAAECggEASuCxB7WV9CpTIBDHubIrDFrNc4bf8ZdrwwTCX5Pwasa6fuE9LuWB7ePE4Ilix78eUTaEHhoTTymDPKBbcHIzypnT2BW4yCYAkXupt2gH45OeTg58wU4gJLasBuGXTVuHzlUPfQsgYeqOLPG2f9WaahcSR9M4qAAm5AgwPocEgQ8eRxC13xBX5r+ZRhKdnI+jLIpYggv52oIiPxz+LBUcTNHyrzOVgmn+jvEvYWQ784vNQxRYidBTO6nz89PcdfXFeH1/GdGTnodutj3C5ccodlEbOsgtZQ9o6+E7x6YDRE2oKhCZOZGE9xaNfQDSnWMv07jb/i0GoF3DsB8xVUbwwQKBgQD7BLtS6dQTCR41fO7RGWKvhGTKS6RKL5djfVlB/IYujscNUnC36Uf2ZYJnQh1wF+ztcSyZQUStxDFy4+U/M39P03Nz1yG1cejonegll8OzZ706lNE/uqXa/ruGvuztg1kuM+qWYYK57EuWJIuFdirr6ZQ6kmPSzyrlnqPaQEoeSwKBgQC/Tx/rBAjbSiceaon0UAO61/TypjvsI7lwypyjIIew3/Nwm8icaaw3GZUCX/9JH89rddioZMncucuuCp8cHBwvNj+BnrqRJc4VAUhJ0U06oNFoxfdrjeU9Pg+RMoZ4i/pHrnkDsLbvu/JYjjcGwJXDlBcDGJvv3yzJtUTsUhtamwKBgCrm3yFHp6BtQYWAycxhG1XGOfe9P+ISCjzN0rCNeV2Bt5GWUn+MVmlNZiFB0ogy/qKCYk37MsLEMnNhcfAAXDUHfccBsNgzFMyVGHU8YA1MoLHfd3f97ZTlTqW0AgiCF37nDqQPHGmscirCKjpwPNu/Oz9bf8Yq9Dj0iSqnLEPLAoGAdiIRDpm2MluO3mxhdbj3JKh4PGJEPGQu/aRPpzfOMn2IIPBBp7xlOL0WU5od1PTMq4ng2NMsB52/VWB/seb1zH2OJ6dxg3G52SSqk9KoAt0Nkso0J3k+plutVzbA7K1bRmpJlerIfC8tzls7RXMkx9mpgCLxH+VLDd9eiSOGeqMCgYB5TqHy94+lVMBf9T+8qsvmBBbOhoerqdUzV3EIqumEpT2xCgCwUzKtUIgiPljbze5hzyOJRI3xvOa5DqAiaxI/iyG1bYqogIBjkQcz+WR/CvpciqO9OL5oHz/YzTtdX/vhLdTkZ88O/CbzMhQyolkLfvE5dLmhKqj8mCDX13PZ7A==";
|
||||
|
||||
/**
|
||||
* 支付宝公钥,查看地址:https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
|
||||
*/
|
||||
private String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhr8XuZtu7ytmPL907t0FeCppdF2+fHKn4nYBOV1eC6VlZh5TZ88Q8SAacj8FmkcWOyvAUwsF4ouQiuAxIGPLwklVVEwPc4xkdPMeiAStMqlHQreDdk33D4e9V6pkPmyNcA6ZTkUey1oaTB9lJ7S8oSbjiuMRwv8lxeSxjATjQsZoSryhl60oQj0qfEIjyttavWgpBiPRPLmwDOAIRAZC9Cm6gUnJFq3To3HyFnn81RzkowvvRp4rxZk28ZVPrBUM0TV8+Bn2m8MCeUVS1xt/dOrU2cUAru1iGKqJckiX1w+NV07euwDP1ekmze14i3oN0ZY5W/ZiAAcdF+eboPBouQIDAQAB";
|
||||
/**
|
||||
* 服务器异步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
|
||||
*/
|
||||
private String notifyUrl="http://localhost:7000/wallet/recharge/success";
|
||||
|
||||
/**\
|
||||
* 页面跳转同步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问
|
||||
*/
|
||||
private String returnUrl ="http://localhost:7000/wallet/recharge/success";
|
||||
|
||||
/**
|
||||
* 签名方式
|
||||
*/
|
||||
private String signType = "RSA2";
|
||||
|
||||
/**
|
||||
* / 字符编码格式
|
||||
*/
|
||||
private String charset ="utf-8";
|
||||
|
||||
/**
|
||||
* / 支付宝网关
|
||||
*/
|
||||
private String gatewayUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
|
||||
|
||||
|
||||
}
|
||||
/* *
|
||||
*类名:AlipayConfig
|
||||
*功能:基础配置类
|
||||
*详细:设置户有关信息及返回路径
|
||||
*修改日期:2017-04-05
|
||||
*说明:
|
||||
*以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
*该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
|
||||
*/
|
|
@ -3,8 +3,10 @@ package doctor;
|
|||
import doctor.common.security.annotation.EnableCustomConfig;
|
||||
import doctor.common.security.annotation.EnableRyFeignClients;
|
||||
import doctor.common.swagger.annotation.EnableCustomSwagger2;
|
||||
//import doctor.text.WebSocketServer;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
|
||||
@EnableCustomConfig
|
||||
@EnableCustomSwagger2
|
||||
|
@ -13,7 +15,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|||
public class DoctorHealthApplication {
|
||||
public static void main(String[] args)
|
||||
{
|
||||
SpringApplication.run(DoctorHealthApplication.class, args);
|
||||
ConfigurableApplicationContext applicationContext = SpringApplication.run(DoctorHealthApplication.class, args);
|
||||
// WebSocketServer.setUserService(applicationContext);
|
||||
System.out.println("(♥◠‿◠)ノ゙ 健康服务启动成功 ლ(´ڡ`ლ)゙ \n" +
|
||||
" .-------. ____ __ \n" +
|
||||
" | _ _ \\ \\ \\ / / \n" +
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
package doctor.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||
|
||||
// 配置开启WebSocket
|
||||
@Configuration
|
||||
public class WebSocketConfig {
|
||||
|
||||
@Bean
|
||||
public ServerEndpointExporter serverEndpointExporter() {
|
||||
return new ServerEndpointExporter();
|
||||
}
|
||||
|
||||
}
|
|
@ -2,6 +2,13 @@ package doctor.controller;
|
|||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import com.aliyun.oss.OSS;
|
||||
import com.aliyun.oss.OSSClientBuilder;
|
||||
import com.google.zxing.BarcodeFormat;
|
||||
import com.google.zxing.WriterException;
|
||||
import com.google.zxing.common.BitMatrix;
|
||||
import com.google.zxing.qrcode.QRCodeWriter;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.entity.SickCircleEntity;
|
||||
import doctor.service.CollectSickService;
|
||||
|
@ -15,9 +22,21 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import javax.imageio.ImageIO;
|
||||
import java.awt.*;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.security.MessageDigest;
|
||||
import java.sql.Connection;
|
||||
import java.sql.DriverManager;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -27,7 +46,7 @@ import java.util.Map;
|
|||
* @Author 栗永斌
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/verify/v1")
|
||||
@RequestMapping("/user/verify/v1")
|
||||
public class CollectSickController {
|
||||
@Autowired
|
||||
CollectSickService service;
|
||||
|
@ -54,14 +73,17 @@ public class CollectSickController {
|
|||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------
|
||||
/**
|
||||
* orc身份证识别
|
||||
* @param file
|
||||
*/
|
||||
@PostMapping("/file")
|
||||
@PostMapping("/files")
|
||||
public void file(MultipartFile file) {
|
||||
// TODO 存储OSS
|
||||
|
||||
String s = OssUtil.uploadMultipartFile(file);
|
||||
|
||||
String host = "https://cardnumber.market.alicloudapi.com";
|
||||
String path = "/rest/160601/ocr/ocr_idcard.json";
|
||||
String appcode = "94e0f9d0960f4931ad24eabfa187dcfe";
|
||||
|
@ -143,4 +165,198 @@ public class CollectSickController {
|
|||
}
|
||||
return imgBase64;
|
||||
}
|
||||
|
||||
|
||||
|
||||
private static final String AES_KEY = "1234567890123456";
|
||||
|
||||
@PostMapping("file")
|
||||
public HealthR<String> hao(@RequestParam("file") String hao){
|
||||
// // 验证主机号长度
|
||||
// if (hao.length() != 32) {
|
||||
// HealthR.fail("主机号长度不合法,操作失败!");
|
||||
// }
|
||||
// // AES加密
|
||||
// String encryptedHostNumber = encryptAES(hao, AES_KEY);
|
||||
// // Base64编码
|
||||
// String base64Encoded = java.util.Base64.getEncoder().encodeToString(encryptedHostNumber.getBytes(StandardCharsets.UTF_8));
|
||||
// // MD5加密
|
||||
// String md5Hash = generateMD5Hash(base64Encoded);
|
||||
|
||||
String s = OssUtil.uploadFile(hao);
|
||||
// 生成二维码(这里省略生成二维码的步骤)
|
||||
try {
|
||||
// 二维码内容
|
||||
String qrCodeData =s;
|
||||
|
||||
// 设置二维码的宽度和高度
|
||||
int width = 300;
|
||||
int height = 300;
|
||||
|
||||
// 设置二维码图片保存路径
|
||||
String filePath = "C:\\Users\\栗永斌\\Desktop\\二维码.png";//自己的
|
||||
|
||||
|
||||
String endpoint="oss-cn-shanghai.aliyuncs.com";//自己的
|
||||
String accessKeyId="LTAI5tLE4XbyvvbuT7D2stCk";//自己的
|
||||
String accessKeySecret="W7ZeT4dMrMPP0c8BBwcyIPnhe3P4E8";//自己的
|
||||
OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||
|
||||
try {
|
||||
File file = new File(filePath);
|
||||
String objectName = "身份证"; // OSS 对象名称
|
||||
|
||||
String bucketName="lyb1314";
|
||||
// 上传文件
|
||||
ossClient.putObject(bucketName, objectName, file);
|
||||
|
||||
System.out.println("文件上传成功!");
|
||||
|
||||
// 如果需要获取上传后的文件 URL,可以使用以下代码
|
||||
String fileUrl = "https://" + bucketName + "." + endpoint + "/" + objectName;
|
||||
System.out.println("文件访问地址:" + fileUrl);
|
||||
} finally {
|
||||
// 关闭 OSS 客户端
|
||||
ossClient.shutdown();
|
||||
}
|
||||
|
||||
// 存储到数据库
|
||||
// saveToDatabase(hao, md5Hash,filePath);
|
||||
// System.out.println("操作成功!生成的序列号为:" + md5Hash);
|
||||
|
||||
// 设置二维码图片格式
|
||||
String fileType = "png";
|
||||
|
||||
// 创建 BitMatrix 对象
|
||||
BitMatrix bitMatrix = new QRCodeWriter().encode(qrCodeData, BarcodeFormat.QR_CODE, width, height);
|
||||
|
||||
// 将 BitMatrix 转换为 BufferedImage
|
||||
Path path = Paths.get(filePath);
|
||||
CollectSickController.MatrixToImageWriter.writeToPath(bitMatrix, fileType, path);
|
||||
|
||||
|
||||
} catch (WriterException e) {
|
||||
throw new RuntimeException("生成二维码失败", e);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static class MatrixToImageWriter {
|
||||
private static final int BLACK = 0xFF000000;
|
||||
private static final int WHITE = 0xFFFFFFFF;
|
||||
|
||||
private MatrixToImageWriter() {}
|
||||
|
||||
public static void writeToPath(BitMatrix matrix, String format, Path path) {
|
||||
try {
|
||||
CollectSickController.MatrixToImageWriter.MatrixToImageConfig config = new CollectSickController.MatrixToImageWriter.MatrixToImageConfig(BLACK, WHITE);
|
||||
CollectSickController.MatrixToImageWriter.writeToPath(matrix, format, path, config);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("写入二维码图片失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
public static void writeToPath(BitMatrix matrix, String format, Path path, CollectSickController.MatrixToImageWriter.MatrixToImageConfig config) {
|
||||
try {
|
||||
BufferedImage image = toBufferedImage(matrix, config);
|
||||
if (!ImageIO.write(image, format, path.toFile())) {
|
||||
throw new RuntimeException("写入二维码图片失败");
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException("写入二维码图片失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static BufferedImage toBufferedImage(BitMatrix matrix, CollectSickController.MatrixToImageWriter.MatrixToImageConfig config) {
|
||||
int width = matrix.getWidth();
|
||||
int height = matrix.getHeight();
|
||||
BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
|
||||
for (int x = 0; x < width; x++) {
|
||||
for (int y = 0; y < height; y++) {
|
||||
image.setRGB(x, y, matrix.get(x, y) ? config.getPixelOnColor() : config.getPixelOffColor());
|
||||
}
|
||||
}
|
||||
return image;
|
||||
}
|
||||
|
||||
public static class MatrixToImageConfig {
|
||||
private final int onColor;
|
||||
private final int offColor;
|
||||
|
||||
public MatrixToImageConfig(int onColor, int offColor) {
|
||||
this.onColor = onColor;
|
||||
this.offColor = offColor;
|
||||
}
|
||||
|
||||
public int getPixelOnColor() {
|
||||
return onColor;
|
||||
}
|
||||
|
||||
public int getPixelOffColor() {
|
||||
return offColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static void saveToDatabase(String hostNumber, String serialNumber,String filePath) {
|
||||
try {
|
||||
// 假设你有一个数据库连接,并且有一个表用于存储主机号和序列号
|
||||
String jdbcUrl = "jdbc:mysql://101.34.77.101:3306/dome1";
|
||||
String username = "root";
|
||||
String password = "cbx@123";
|
||||
|
||||
Connection connection = DriverManager.getConnection(jdbcUrl, username, password);
|
||||
|
||||
// 插入数据
|
||||
String sql = "INSERT INTO `dome1`.`t_list` ( `host_number`, `serial_number`,`img`) VALUES (?, ?,?)";
|
||||
|
||||
|
||||
try (PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
|
||||
preparedStatement.setString(1, hostNumber);
|
||||
preparedStatement.setString(2, serialNumber);
|
||||
preparedStatement.setString(3, filePath);
|
||||
preparedStatement.executeUpdate();
|
||||
|
||||
}
|
||||
|
||||
connection.close();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("存储到数据库失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static String encryptAES(String input, String key) {
|
||||
try {
|
||||
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
||||
SecretKeySpec secretKey = new SecretKeySpec(key.getBytes(StandardCharsets.UTF_8), "AES");
|
||||
cipher.init(Cipher.ENCRYPT_MODE, secretKey);
|
||||
return new String(cipher.doFinal(input.getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("AES加密失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String generateMD5Hash(String input) {
|
||||
try {
|
||||
MessageDigest md = MessageDigest.getInstance("MD5");
|
||||
byte[] hashBytes = md.digest(input.getBytes(StandardCharsets.UTF_8));
|
||||
StringBuilder hexString = new StringBuilder();
|
||||
for (byte b : hashBytes) {
|
||||
String hex = Integer.toHexString(0xFF & b);
|
||||
if (hex.length() == 1) {
|
||||
hexString.append('0');
|
||||
}
|
||||
hexString.append(hex);
|
||||
}
|
||||
return hexString.toString();
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException("MD5加密失败", e);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ package doctor.controller;
|
|||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.common.core.domain.R;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.service.DiseaseCategoryService;
|
||||
import doctor.service.DiseaseKnowledgeService;
|
||||
import doctor.service.HealthJobTitleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -27,6 +28,8 @@ import static doctor.common.core.utils.PageUtils.startPage;
|
|||
public class DiseaseKnowledgeController {
|
||||
@Autowired
|
||||
private DiseaseKnowledgeService diseaseKnowledgeService;
|
||||
@Autowired
|
||||
private DiseaseCategoryService diseaseCategoryService;
|
||||
|
||||
@GetMapping("/findDepartment")
|
||||
public HealthR<List<Department>> findDepartment(){
|
||||
|
@ -53,19 +56,23 @@ public class DiseaseKnowledgeController {
|
|||
List<DrugsCategory> list=diseaseKnowledgeService.findDrugsKnowledgeList(drugsCategoryId);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/findDrugsKnowledge")
|
||||
public HealthR <DrugsKnowledge> findDrugsKnowledge(@RequestParam Integer id){
|
||||
DrugsKnowledge list=diseaseKnowledgeService.findDrugsKnowledge(id);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/popularSearch")
|
||||
public HealthR<List<PopularSearchEntity>> popularSeach(){
|
||||
List<PopularSearchEntity> list=diseaseKnowledgeService.popularSeach();
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/findDiseaseCategory")
|
||||
public HealthR<List<DiseaseCategory>> findDiseaseCategory(@RequestParam Integer departmentId){
|
||||
List<DiseaseCategory> list=diseaseCategoryService.findDiseaseCategory(departmentId);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,6 +2,7 @@ package doctor.controller;
|
|||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.entity.DoctorEntity;
|
||||
import doctor.domain.vo.DoctorVo;
|
||||
import doctor.service.DoctorService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -12,6 +13,8 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
import javax.print.Doc;
|
||||
import java.util.List;
|
||||
|
||||
import static com.github.pagehelper.page.PageMethod.startPage;
|
||||
|
||||
/**
|
||||
* @BelongsProject: Medical_Treatment
|
||||
* @BelongsPackage: doctor.controller
|
||||
|
@ -24,13 +27,14 @@ public class DoctorController {
|
|||
@Autowired
|
||||
private DoctorService doctorService;
|
||||
@GetMapping("/findDoctorList")
|
||||
public HealthR<List<DoctorEntity>> findDoctorList(@RequestParam Integer deptId,
|
||||
@RequestParam Integer condition,
|
||||
@RequestParam Integer sortBy,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "count",defaultValue = "5") Integer count
|
||||
public HealthR<List<DoctorVo>> findDoctorList(@RequestParam Integer deptId,
|
||||
@RequestParam Integer condition,
|
||||
@RequestParam Integer sortBy,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "count",defaultValue = "5") Integer count
|
||||
){
|
||||
List<DoctorEntity> list=doctorService.findDoctorList(deptId);
|
||||
startPage(page,count);
|
||||
List<DoctorVo> list=doctorService.findDoctorList(deptId,condition,sortBy);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
package doctor.controller;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.service.DepartmentService;
|
||||
import doctor.service.DiseaseCategoryService;
|
||||
import doctor.service.DiseaseKnowledgeService;
|
||||
import doctor.service.HealthDepartmentService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.github.pagehelper.page.PageMethod.startPage;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/knowledgeBase/v1")
|
||||
public class HealthDepartmentController {
|
||||
|
||||
@Autowired
|
||||
private HealthDepartmentService healthV1Service;
|
||||
@Autowired
|
||||
private DiseaseCategoryService diseaseCategoryService;
|
||||
|
||||
@Autowired
|
||||
private DiseaseKnowledgeService diseaseKnowledgeService;
|
||||
//罕见病症详情
|
||||
@GetMapping("/findDiseaseKnowledge")
|
||||
public HealthR<List<DiseaseKnowledge>> findDiseaseKnowledge(@RequestParam Integer diseaseCategoryId){
|
||||
return HealthR.ok(diseaseKnowledgeService.findDiseaseKnowledge(diseaseCategoryId));
|
||||
}
|
||||
|
||||
@GetMapping("/findDrugsCategoryList")
|
||||
public HealthR<List<DrugsCategory>> findDrugsCategoryList(){
|
||||
return HealthR.ok(diseaseKnowledgeService.findDrugsCategoryList());
|
||||
}
|
||||
@GetMapping("/findDrugsKnowledgeList")
|
||||
public HealthR<List<DrugsCategory>> findDrugsKnowledgeList(@RequestParam Integer drugsCategoryId,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "count",defaultValue = "5") Integer count){
|
||||
|
||||
startPage(page,count);
|
||||
List<DrugsCategory> list=diseaseKnowledgeService.findDrugsKnowledgeList(drugsCategoryId);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
|
||||
@GetMapping("/findDiseaseCategory")
|
||||
public HealthR<List<DiseaseCategory>> findDiseaseCategory(@RequestParam Integer departmentId){
|
||||
List<DiseaseCategory> list=diseaseCategoryService.findDiseaseCategory(departmentId);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
@GetMapping("/findDepartment")
|
||||
public HealthR<List<DepartmentEntity>> findDepartment(){
|
||||
List<DepartmentEntity> departmentEntities=healthV1Service.findDepartment();
|
||||
return HealthR.ok(departmentEntities);
|
||||
}
|
||||
}
|
|
@ -1,12 +1,11 @@
|
|||
package doctor.controller;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.vo.HistoryInquiryRecordVo;
|
||||
import doctor.domain.vo.InquiryRecordVo;
|
||||
import doctor.service.InquiryVerifyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -18,9 +17,19 @@ public class HealthInquiryVerifyController {
|
|||
private InquiryVerifyService inquiryVerifyService;
|
||||
|
||||
@GetMapping("/findInquiryRecordList")
|
||||
public HealthR<List<InquiryRecordVo>> findInquiryRecordList() {
|
||||
public HealthR<List<InquiryRecordVo>> findInquiryRecordList(@RequestParam Integer page,
|
||||
@RequestParam Integer count,
|
||||
@RequestParam Integer recordId) {
|
||||
List<InquiryRecordVo> inquiryRecordList = inquiryVerifyService.findInquiryRecordList();
|
||||
return HealthR.ok(inquiryRecordList);
|
||||
}
|
||||
|
||||
@GetMapping("/findHistoryInquiryRecord")
|
||||
public HealthR<List<HistoryInquiryRecordVo>> findHistoryInquiryRecord(@RequestParam Integer page,
|
||||
@RequestParam Integer count,
|
||||
@RequestHeader Integer userId) {
|
||||
List<HistoryInquiryRecordVo> inquiryRecordList = inquiryVerifyService.findHistoryInquiryRecord(page,count,userId);
|
||||
return HealthR.ok(inquiryRecordList);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class HealthJobTitleController {
|
|||
return HealthR.ok(doctorJobTitleEntities);
|
||||
}
|
||||
|
||||
@PostMapping("/sendEmailCode")
|
||||
@RequestMapping("/sendEmailCode")
|
||||
public HealthR sendEmailCode(@RequestParam("email") String email) {
|
||||
HealthR healthR= healthJobTitleService.sendEmailCode(email);
|
||||
return HealthR.ok(healthR);
|
||||
|
@ -39,15 +39,15 @@ public class HealthJobTitleController {
|
|||
HealthR healthR= healthJobTitleService.applyJoin(applyJoinDto);
|
||||
return HealthR.ok(healthR);
|
||||
}
|
||||
|
||||
@GetMapping("/findDoctorById")
|
||||
public HealthR<DoctorVo> findDoctorById(@RequestHeader Integer doctorId,
|
||||
@RequestHeader String sessionId) {
|
||||
return HealthR.ok(healthJobTitleService.findDoctorById(doctorId));
|
||||
}
|
||||
@GetMapping("/findSystemImagePic")
|
||||
public HealthR<List<FindImagePicVo>> findSystemImagePic() {
|
||||
return HealthR.ok(healthJobTitleService.findSystemImagePic());
|
||||
}
|
||||
|
||||
@PutMapping("/checkCode")
|
||||
public HealthR checkCode(@RequestParam("email") String email,
|
||||
@RequestParam("code") String code) {
|
||||
return HealthR.ok(healthJobTitleService.checkCode(email, code));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,10 +1,7 @@
|
|||
package doctor.controller;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.vo.DoctorIncomeRecordVo;
|
||||
import doctor.domain.vo.DoctorVo;
|
||||
import doctor.domain.vo.NoticeReadNumVo;
|
||||
import doctor.domain.vo.WalletVo;
|
||||
import doctor.domain.vo.*;
|
||||
import doctor.service.HealthJobTitleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
@ -18,6 +15,34 @@ public class HealthRVerifyController {
|
|||
@Autowired
|
||||
private HealthJobTitleService healthJobTitleService;
|
||||
|
||||
@PostMapping("/chooseImagePic")
|
||||
public HealthR chooseImagePic(@RequestParam String imagePic,
|
||||
@RequestHeader Integer doctorId) {
|
||||
healthJobTitleService.upImagePicByDoctorId(imagePic,doctorId);
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
||||
@GetMapping("/findDoctorSystemNoticeList")
|
||||
public HealthR<List<DoctorSystemNoticeListVo>> findDoctorSystemNoticeList(
|
||||
@RequestParam Integer page,@RequestParam Integer count) {
|
||||
List<DoctorSystemNoticeListVo> list = healthJobTitleService.findDoctorSystemNoticeList(page,count);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
@GetMapping("/findDoctorInquiryNoticeList")
|
||||
public HealthR<List<DoctorSystemNoticeListVo>> findDoctorInquiryNoticeList(
|
||||
@RequestParam Integer page,@RequestParam Integer count) {
|
||||
List<DoctorSystemNoticeListVo> list = healthJobTitleService.findDoctorSystemNoticeList(page,count);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
@GetMapping("/findDoctorHealthyCurrencyNoticeList")
|
||||
public HealthR<List<DoctorSystemNoticeListVo>> findDoctorHealthyCurrencyNoticeList(
|
||||
@RequestParam Integer page,@RequestParam Integer count) {
|
||||
List<DoctorSystemNoticeListVo> list = healthJobTitleService.findDoctorSystemNoticeList(page,count);
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@GetMapping("/findDoctorWallet")
|
||||
public HealthR<WalletVo> findDoctorWallet(@RequestHeader Integer doctorId,
|
||||
@RequestHeader String sessionId) {
|
||||
|
@ -55,4 +80,13 @@ public class HealthRVerifyController {
|
|||
return HealthR.ok(healthR);
|
||||
}
|
||||
|
||||
@GetMapping("/findMyAdoptedCommentList")
|
||||
public HealthR<List<MyAdoptedCommentListVo>> findMyAdoptedCommentList(@RequestHeader Integer doctorId,
|
||||
@RequestHeader String sessionId,
|
||||
@RequestParam Integer page,
|
||||
@RequestParam Integer count) {
|
||||
List<MyAdoptedCommentListVo> healthR = healthJobTitleService.findMyAdoptedCommentList(doctorId,page,count);
|
||||
return HealthR.ok(healthR);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ import static com.github.pagehelper.page.PageMethod.startPage;
|
|||
*/
|
||||
@RestController
|
||||
@RequestMapping("/share/information/v1")
|
||||
|
||||
public class InformationController {
|
||||
@Autowired
|
||||
private InformationService informationService;
|
||||
|
|
|
@ -5,6 +5,7 @@ import doctor.domain.vo.DoctorVo;
|
|||
import doctor.domain.vo.InquiryDetailsRecordVo;
|
||||
import doctor.service.InquiryService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.actuate.health.Health;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -33,8 +34,44 @@ public class InquiryController {
|
|||
@GetMapping("/v1/findDoctorInfo")
|
||||
public HealthR<DoctorVo> findDoctorInfo(@RequestHeader Integer userId,
|
||||
@RequestHeader String sessionId,
|
||||
@RequestParam Integer doctorId) {
|
||||
@RequestParam(value = "doctorId",defaultValue = "2") Integer doctorId) {
|
||||
DoctorVo doctorVo = inquiryService.findDoctorInfo(doctorId);
|
||||
return HealthR.ok(doctorVo);
|
||||
}
|
||||
|
||||
//咨询医生
|
||||
@PutMapping("/verify/v1/consultDoctor")
|
||||
public HealthR consultDoctor(@RequestHeader Integer userId,
|
||||
@RequestHeader String sessionId,
|
||||
@RequestParam Integer doctorId){
|
||||
String doctorUserName = inquiryService.consultDoctor(userId,doctorId);
|
||||
return HealthR.ok(doctorUserName);
|
||||
}
|
||||
|
||||
//关注医生
|
||||
@PostMapping("/verify/v1/followDoctor")
|
||||
public HealthR followDoctor(@RequestHeader Integer userId,
|
||||
@RequestHeader String sessionId,
|
||||
@RequestParam Integer doctorId) {
|
||||
inquiryService.followDoctor(userId,doctorId);
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
||||
//取消关注医生
|
||||
@DeleteMapping("/verify/v1/cancelFollow")
|
||||
public HealthR cancelFollow(@RequestHeader Integer userId,
|
||||
@RequestHeader String sessionId,
|
||||
@RequestParam Integer doctorId){
|
||||
inquiryService.cancelFollow(userId,doctorId);
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
||||
//结束问诊
|
||||
@PutMapping("/verify/v1/endInquiry")
|
||||
public HealthR endInquiry(@RequestHeader Integer userId,
|
||||
@RequestHeader String sessionId,
|
||||
@RequestParam Integer recordId) {
|
||||
inquiryService.endInquiry(userId,recordId);
|
||||
return HealthR.ok();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ import java.util.List;
|
|||
* @Author 栗永斌
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sickCircle/v1/")
|
||||
@RequestMapping("/user/sickCircle/v1/")
|
||||
public class PatientController {
|
||||
|
||||
@Autowired
|
||||
|
@ -46,17 +46,7 @@ public class PatientController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 点采
|
||||
* @param opinion
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("expressOpinion")
|
||||
public HealthR expressOpinion(@RequestParam("opinion") Integer opinion){
|
||||
// return sickCircleServer.expressOpinion(commentId, opinion);
|
||||
System.out.println(opinion);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增病友圈
|
||||
|
@ -67,19 +57,17 @@ public class PatientController {
|
|||
return sickCircleService.publishSickCircle(sickCircleEntity);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 病友圈列表
|
||||
*
|
||||
* @param departmentId
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/findSickCircleList")
|
||||
public HealthR<List<SickCircleEntity>> sickCircleList(@RequestParam(value = "departmentId",required = false) Integer departmentId,
|
||||
@RequestParam(value = "page",defaultValue = "1") Integer page,
|
||||
@RequestParam(value = "count",defaultValue = "10") Integer count) {
|
||||
return patientService.sickCircleList(departmentId);
|
||||
@RequestParam(value = "page") Integer page,
|
||||
@RequestParam(value = "count") Integer count) {
|
||||
|
||||
return patientService.sickCircleList(departmentId,page,count);
|
||||
}
|
||||
|
||||
private PageInfo<SickCircleEntity> startPage(Integer page, Integer count) {
|
||||
|
@ -106,7 +94,7 @@ public class PatientController {
|
|||
|
||||
|
||||
/**
|
||||
* 查询病友圈评论列表
|
||||
* 病友圈评论列表
|
||||
*/
|
||||
@GetMapping("/findSickCircleCommentList")
|
||||
public HealthR<List<SickCommentEntity>> findSickCircleCommentList(@RequestParam(value = "sickCircleId",required = false) Integer sickCircleId,
|
||||
|
@ -125,6 +113,13 @@ public class PatientController {
|
|||
@GetMapping("searchSickCircle")
|
||||
public HealthR<List<SickCircleEntity>> searchSickCircle(@RequestParam(value = "keyWord",required = false) String keyWord){
|
||||
return patientService.searchSickCircle(keyWord);
|
||||
}
|
||||
|
||||
@GetMapping("/findPatientSickCircleList")
|
||||
public HealthR<List<SickCircleEntity>> findPatientSickCircleList(@RequestParam(value = "patientUserId",required = false) Integer patientUserId,
|
||||
@RequestParam(value = "page") Integer page,
|
||||
@RequestParam(value = "count") Integer count) {
|
||||
|
||||
return patientService.findPatientSickCircleList(patientUserId,page,count);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,59 @@
|
|||
package doctor.controller;
|
||||
|
||||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.entity.SickCircleEntity;
|
||||
import doctor.domain.vo.SickCommentVo;
|
||||
import doctor.service.SickCircleServer;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
/**
|
||||
* @ClassName SickCircle
|
||||
* @Description 新增病友圈
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/sickCircle/verify/v1/")
|
||||
public class SickCircleController {
|
||||
@Autowired
|
||||
SickCircleServer sickCircleServer;
|
||||
|
||||
/**
|
||||
* 上传图片
|
||||
*
|
||||
* @param picture
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/uploadSickCirclePicture")
|
||||
public Result upload(@RequestParam("picture") MultipartFile picture) {
|
||||
return sickCircleServer.pictures(picture);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 发表评论
|
||||
*/
|
||||
@PostMapping("/publishComment")
|
||||
public Result<SickCommentVo> publishComment(
|
||||
@RequestParam("sickCircleId") Integer sickCircleId,
|
||||
@RequestParam("content") String content) {
|
||||
return sickCircleServer.publishComment(sickCircleId, content);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 点采
|
||||
* @param opinion
|
||||
* @return
|
||||
*/
|
||||
@PutMapping("expressOpinion")
|
||||
public HealthR expressOpinion(@RequestParam("commentId") Integer commentId,
|
||||
@RequestParam("opinion") Integer opinion){
|
||||
// return sickCircleServer.expressOpinion(commentId, opinion);
|
||||
|
||||
return sickCircleServer.expressOpinion(commentId, opinion);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package doctor.controller;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.entity.SickCircleEntity;
|
||||
import doctor.service.PatientService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/sickCircle/v1")
|
||||
public class SickCircleV1Controller {
|
||||
@Autowired
|
||||
private PatientService patientService;
|
||||
@GetMapping("/findSickCircleList")
|
||||
public HealthR<List<SickCircleEntity>> findSickCircleList(@RequestParam(value = "departmentId",required = false) Integer departmentId,
|
||||
@RequestParam(value = "page") Integer page,
|
||||
@RequestParam(value = "count") Integer count) {
|
||||
HealthR<List<SickCircleEntity>> listHealthR = patientService.sickCircleList(departmentId, page, count);
|
||||
return listHealthR;
|
||||
}
|
||||
}
|
|
@ -1,13 +1,11 @@
|
|||
package doctor.controller;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.vo.SickCircleCommentVo;
|
||||
import doctor.domain.vo.UserSickCircleVo;
|
||||
import doctor.service.UserSickCircleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -32,4 +30,5 @@ public class UserSickCircleController {
|
|||
return HealthR.ok(userFriendCircles);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -7,8 +7,13 @@ import doctor.domain.vo.*;
|
|||
import doctor.service.UserVideoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
import static com.github.pagehelper.page.PageMethod.startPage;
|
||||
|
@ -47,7 +52,7 @@ public class UserVideoController {
|
|||
return HealthR.ok(userVideoCollectionVos);
|
||||
}
|
||||
//用户删除购买的视频
|
||||
@DeleteMapping("/deleteVideoBuy}")
|
||||
@DeleteMapping("/deleteVideoBuy")
|
||||
public HealthR deleteVideoBuy(@RequestParam Integer videoId){
|
||||
userVideoService.deleteVideoBuy(videoId);
|
||||
return HealthR.ok();
|
||||
|
@ -55,9 +60,9 @@ public class UserVideoController {
|
|||
|
||||
//我的钱包
|
||||
@GetMapping("/findUserWallet")
|
||||
public HealthR<List<UserWalletEntity>> findUserWallet(){
|
||||
List<UserWalletEntity> userWallets = userVideoService.findUserWallet();
|
||||
return HealthR.ok(userWallets);
|
||||
public HealthR findUserWallet(@RequestHeader Integer userId){
|
||||
Integer i= userVideoService.findUserWallet(userId);
|
||||
return HealthR.ok(i);
|
||||
}
|
||||
//用户消费记录
|
||||
@GetMapping("/findUserConsumptionRecordList")
|
||||
|
@ -100,9 +105,12 @@ public class UserVideoController {
|
|||
}
|
||||
//上传用户档案图片
|
||||
@PostMapping("/uploadArchivesPicture")
|
||||
public HealthR uploadUserArchivesImg(@RequestParam Integer id){
|
||||
userVideoService.uploadUserArchivesImg(id);
|
||||
return HealthR.ok();
|
||||
public HealthR uploadUserArchivesImg(@RequestParam("imagePic") MultipartFile imagePic,
|
||||
@RequestHeader String sessionId,
|
||||
@RequestParam Integer id
|
||||
){
|
||||
|
||||
return HealthR.ok(userVideoService.uploadUserArchivesImg(imagePic,sessionId,id));
|
||||
}
|
||||
|
||||
//用户关注医生列表
|
||||
|
@ -124,7 +132,90 @@ public class UserVideoController {
|
|||
List<SignEntity> signEntities = userVideoService.findUserSign(userId);
|
||||
return HealthR.ok(signEntities);
|
||||
}
|
||||
// //根据用户ID查询用户信息
|
||||
// @GetMapping("/getUserInfoById")
|
||||
// public HealthR<>
|
||||
//根据用户ID查询用户信息
|
||||
@GetMapping("/getUserInfoById")
|
||||
public HealthR<List<UserVo>> getUserInfoById(@RequestHeader Integer userId){
|
||||
List<UserVo> userVos = userVideoService.getUserInfoById(userId);
|
||||
return HealthR.ok(userVos);
|
||||
}
|
||||
//用户签到
|
||||
@PostMapping("/addSign")
|
||||
public HealthR addSign(){
|
||||
userVideoService.addSign();
|
||||
return HealthR.ok("签到成功");
|
||||
}
|
||||
//完善用户信息
|
||||
@PutMapping("/perfectUserInfo")
|
||||
public HealthR perfectUserInfo(@RequestParam Integer age,@RequestParam Integer height,@RequestParam Integer weight,@RequestHeader Integer userId ){
|
||||
userVideoService.perfectUserInfo(age,height,weight,userId);
|
||||
return HealthR.ok("完善成功");
|
||||
}
|
||||
//修改用户性别
|
||||
@PutMapping("/updateUserSex")
|
||||
public HealthR updateUserSex(@RequestParam Integer sex,@RequestHeader Integer userId){
|
||||
userVideoService.updateUserSex(sex,userId);
|
||||
return HealthR.ok("修改成功");
|
||||
}
|
||||
//修改用户昵称
|
||||
@PutMapping("/modifyNickName")
|
||||
public HealthR modifyNickName(@RequestParam String nickName,@RequestHeader Integer userId){
|
||||
userVideoService.modifyNickName(nickName,userId);
|
||||
return HealthR.ok("修改成功");
|
||||
}
|
||||
//查询系统通知列表
|
||||
@GetMapping("/findSystemNoticeList")
|
||||
public HealthR<List<SystemNoticeEntity>> findSystemNoticeList(){
|
||||
List<SystemNoticeEntity> systemNoticeEntities = userVideoService.findSystemNoticeList();
|
||||
return HealthR.ok(systemNoticeEntities);
|
||||
}
|
||||
//查询用户问诊通知列表
|
||||
@GetMapping("/findInquiryNoticeList")
|
||||
public HealthR<List<InquiryNoticeVo>> findInquiryNoticeList(@RequestHeader Integer userId,@RequestParam Integer page,@RequestParam Integer count){
|
||||
startPage(page,count);
|
||||
List<InquiryNoticeVo> inquiryRecordEntities = userVideoService.findInquiryNoticeList(userId);
|
||||
return HealthR.ok(inquiryRecordEntities);
|
||||
}
|
||||
//查询用户货币通知列表
|
||||
@GetMapping("/findHealthyCurrencyNoticeList")
|
||||
public HealthR<List<HealthyCurrencyNoticeListVo>> findHealthyCurrencyNoticeList(@RequestHeader Integer userId,@RequestParam Integer page,@RequestParam Integer count) {
|
||||
startPage(page,count);
|
||||
List<HealthyCurrencyNoticeListVo> healthyCurrencyNoticeListVos = userVideoService.findHealthyCurrencyNoticeList(userId);
|
||||
return HealthR.ok(healthyCurrencyNoticeListVos);
|
||||
}
|
||||
|
||||
//查询用户未读数消息
|
||||
@GetMapping("/findUserNoticeReadNum")
|
||||
public HealthR<List<UserNoticeReadNumVo>> findUserNoticeReadNum(@RequestHeader Integer userId){
|
||||
List<UserNoticeReadNumVo> userNoticeReadNumVos = userVideoService.findUserNoticeReadNum(userId);
|
||||
return HealthR.ok(userNoticeReadNumVos);
|
||||
}
|
||||
//修改消息为已读
|
||||
@PutMapping("/modifyAllStatus")
|
||||
public HealthR modifyAllStatus(@RequestHeader Integer userId){
|
||||
userVideoService.modifyAllStatus(userId);
|
||||
return HealthR.ok("全部已读");
|
||||
}
|
||||
//充值
|
||||
@PostMapping("/recharge")
|
||||
public HealthR<String> pay(@RequestParam BigDecimal money,@RequestHeader Integer userId) {
|
||||
String pay = userVideoService.Pay(money,userId);
|
||||
System.err.println(pay);
|
||||
return HealthR.ok(pay);
|
||||
}
|
||||
|
||||
//提现
|
||||
@PostMapping("/drawCash")
|
||||
public HealthR drawCash(@RequestHeader Integer userId,@RequestParam BigDecimal money){
|
||||
userVideoService.drawCash(userId,money);
|
||||
return HealthR.ok("提现成功");
|
||||
}
|
||||
|
||||
//病友圈评论列表查询
|
||||
@GetMapping("/findUserSickCollectionList")
|
||||
public HealthR<List<SickCircleCommentVo>> findSickCircleCommentList(@RequestHeader Integer userId,@RequestParam Integer page, @RequestParam Integer count){
|
||||
startPage(page,count);
|
||||
List<SickCircleCommentVo> sickCircleComments = userVideoService.findSickCircleCommentList(userId);
|
||||
return HealthR.ok(sickCircleComments);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,11 +29,12 @@ public class VideoController {
|
|||
}
|
||||
//购买健康讲堂视频
|
||||
@PostMapping("/verify/v1/videoBuy")
|
||||
public HealthR videoBuy(@RequestParam Integer videoId, @RequestParam Integer price){
|
||||
videoService.videoBuy(videoId,price);
|
||||
public HealthR videoBuy(@RequestHeader Integer userId,@RequestParam Integer videoId, @RequestParam Integer price){
|
||||
videoService.videoBuy(userId,videoId,price);
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
||||
|
||||
//评论列表
|
||||
@GetMapping("/v1/findVideoCommentList")
|
||||
public HealthR<List<VideoCommentVo>> findVideoCommentList(@RequestParam Integer videoId) {
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
package doctor.convert;
|
||||
|
||||
import doctor.domain.entity.DoctorEntity;
|
||||
import doctor.domain.vo.DoctorVo;
|
||||
import org.mapstruct.Mapper;
|
||||
import org.mapstruct.Mapping;
|
||||
import org.mapstruct.Mappings;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface DoctorConvert {
|
||||
|
||||
DoctorConvert INSTANCE = Mappers.getMapper(DoctorConvert.class);
|
||||
|
||||
DoctorEntity doctorVoToDoctorEntity(DoctorVo doctorVo);
|
||||
@Mappings({
|
||||
@Mapping(source = "id", target = "id")
|
||||
})
|
||||
DoctorVo doctorEntityToDoctorVo(DoctorEntity doctorEntity);
|
||||
List<DoctorVo> doctorEntityListToDoctorVoList(List<DoctorEntity> doctorEntityList);
|
||||
|
||||
List<DoctorEntity> doctorVoListToDoctorEntityList(List<DoctorVo> doctorVoList);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @BelongsProject: Medical_Treatment
|
||||
* @BelongsPackage: doctor.domain.entity
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2024/1/19 11:41
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DoctorAskCount {
|
||||
private Integer id;
|
||||
private Integer doctorAskCount;
|
||||
private Integer number;
|
||||
private Date updateTime;
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @BelongsProject: Medical_Treatment
|
||||
* @BelongsPackage: doctor.domain.entity
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2024/1/18 18:33
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DoctorCharge {
|
||||
private Integer id;
|
||||
private Integer doctorId;
|
||||
private Integer cost;
|
||||
private Date updateTime;
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @BelongsProject: Medical_Treatment
|
||||
* @BelongsPackage: doctor.domain.entity
|
||||
* @Author: jpz
|
||||
* @CreateTime: 2024/1/18 18:48
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DoctorCommentCount {
|
||||
private Integer id;
|
||||
private Integer doctorId;
|
||||
private Integer praiseNum;
|
||||
private Integer badNum;
|
||||
private Date createTime;
|
||||
}
|
|
@ -24,6 +24,7 @@ public class DoctorEntity {
|
|||
private String phone;
|
||||
private String pwd;
|
||||
private String name;
|
||||
private String jobTitle;
|
||||
private String imagePic;
|
||||
private String inauguralHospital;
|
||||
private String personalProfile;
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DoctorSystemReplyEntity {
|
||||
private Integer id;
|
||||
private String content;
|
||||
private Date createTime;
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class InquiryDetailsRecord {
|
||||
private Integer id;
|
||||
private Integer inquiryId;
|
||||
private Integer userId;
|
||||
private Integer doctorId;
|
||||
private String askContent;
|
||||
private String askImage;
|
||||
private String voiceChat;
|
||||
private Integer direction;
|
||||
private Date askTime;
|
||||
private Date createTime;
|
||||
}
|
|
@ -1,5 +1,7 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
@ -8,6 +10,7 @@ import java.util.Date;
|
|||
* @Author : FJJ
|
||||
* @Date: 2024-01-12 19:57
|
||||
*/
|
||||
@Data
|
||||
public class SickCircleCommentEntity {
|
||||
private Integer id;
|
||||
private Integer sickCircleId;
|
||||
|
@ -15,61 +18,6 @@ public class SickCircleCommentEntity {
|
|||
private String content;
|
||||
private Date commentTime;
|
||||
private Integer whetherDoctor;
|
||||
private Long createTime;
|
||||
private Date createTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getSickCircleId() {
|
||||
return sickCircleId;
|
||||
}
|
||||
|
||||
public void setSickCircleId(Integer sickCircleId) {
|
||||
this.sickCircleId = sickCircleId;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Date getCommentTime() {
|
||||
return commentTime;
|
||||
}
|
||||
|
||||
public void setCommentTime(Date commentTime) {
|
||||
this.commentTime = commentTime;
|
||||
}
|
||||
|
||||
public Integer getWhetherDoctor() {
|
||||
return whetherDoctor;
|
||||
}
|
||||
|
||||
public void setWhetherDoctor(Integer whetherDoctor) {
|
||||
this.whetherDoctor = whetherDoctor;
|
||||
}
|
||||
|
||||
public Long getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Long createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,41 +9,99 @@ import java.util.Date;
|
|||
|
||||
@Data
|
||||
public class SickCircleEntity {
|
||||
/**
|
||||
* 病例ID
|
||||
*/
|
||||
private Integer sickCircleId;
|
||||
|
||||
private Integer userId;
|
||||
/**
|
||||
* 用户ID
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 病例标题
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
* 部门ID
|
||||
*/
|
||||
private Integer departmentId;
|
||||
|
||||
/**
|
||||
* 采纳评论ID
|
||||
*/
|
||||
private Integer adoptCommentId;
|
||||
|
||||
/**
|
||||
* 疾病名称
|
||||
*/
|
||||
private String disease;
|
||||
|
||||
|
||||
/**
|
||||
* 病例详情
|
||||
*/
|
||||
private String detail;
|
||||
|
||||
/**
|
||||
* 治疗医院
|
||||
*/
|
||||
private String treatmentHospital;
|
||||
|
||||
/**
|
||||
* 治疗开始时间
|
||||
*/
|
||||
private Date treatmentStartTime;
|
||||
|
||||
/**
|
||||
* 治疗结束时间
|
||||
*/
|
||||
private Date treatmentEndTime;
|
||||
|
||||
/**
|
||||
* 治疗过程
|
||||
*/
|
||||
private String treatmentProcess;
|
||||
|
||||
/**
|
||||
* 图片
|
||||
*/
|
||||
private String picture;
|
||||
|
||||
/**
|
||||
* 发布时间
|
||||
*/
|
||||
private Date releaseTime;
|
||||
|
||||
/**
|
||||
* 采纳时间
|
||||
*/
|
||||
private Date adoptTime;
|
||||
|
||||
/**
|
||||
* 治愈人数
|
||||
*/
|
||||
private Integer amount;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private LocalDateTime createTime;
|
||||
|
||||
/**
|
||||
* 收藏数
|
||||
*/
|
||||
private Integer collectionNum;
|
||||
|
||||
/**
|
||||
* 评论数
|
||||
*/
|
||||
private Integer commentNum;
|
||||
|
||||
/**
|
||||
* 科室名称
|
||||
*/
|
||||
private String department;
|
||||
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@ package doctor.domain.entity;
|
|||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName SickConmentEntity
|
||||
* @Description 评论表
|
||||
|
@ -10,19 +12,31 @@ import lombok.Data;
|
|||
@Data
|
||||
public class SickCommentEntity {
|
||||
|
||||
// 私有变量,评论的ID
|
||||
private String id;
|
||||
// 私有变量,评论所属的圈子ID
|
||||
private String sickCircleId;
|
||||
// 私有变量,评论的用户ID
|
||||
private String userId;
|
||||
// 私有变量,评论的内容
|
||||
// // 私有变量,评论的ID
|
||||
// private String id;
|
||||
// // 私有变量,评论所属的圈子ID
|
||||
// private String sickCircleId;
|
||||
// // 私有变量,评论的用户ID
|
||||
// private String patientUserId;
|
||||
// // 私有变量,评论的内容
|
||||
// private String content;
|
||||
// // 私有变量,评论的评论时间
|
||||
// private String commentTime;
|
||||
// // 私有变量,是否为医生评论
|
||||
// private String whetherDoctor;
|
||||
// // 私有变量,评论的创建时间
|
||||
// private String createTime;
|
||||
|
||||
|
||||
private String content;
|
||||
// 私有变量,评论的评论时间
|
||||
private String commentTime;
|
||||
// 私有变量,是否为医生评论
|
||||
private String whetherDoctor;
|
||||
// 私有变量,评论的创建时间
|
||||
private String createTime;
|
||||
private Date createTime;
|
||||
private Integer patientUserId;
|
||||
private Integer whetherDoctor;
|
||||
private Integer commentUserId;
|
||||
private Integer opposeNum;
|
||||
private Integer supportNum;
|
||||
private Integer opinion;
|
||||
private String headPic;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : SystemNoticeEntity
|
||||
* @Description : 系统通知表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-18 10:57
|
||||
*/
|
||||
@Data
|
||||
public class SystemNoticeEntity {
|
||||
private Integer id;
|
||||
private Integer reciveUserId;
|
||||
private String content;
|
||||
private String noticeType;
|
||||
private String pushType;
|
||||
private Integer status;
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName : UserBankCard
|
||||
* @Description : 银行卡表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-19 10:22
|
||||
*/
|
||||
@Data
|
||||
public class UserBankCard {
|
||||
private Integer id;
|
||||
private Integer userId;
|
||||
private String bankCardNumber;
|
||||
private String bankName;
|
||||
private Integer bankCardType;
|
||||
private Data updateTime;
|
||||
private Data createTime;
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
|
@ -10,42 +12,16 @@ import java.util.Date;
|
|||
* @Author: jpz
|
||||
* @CreateTime: 2024/1/8 21:49
|
||||
*/
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class UserDoctorFollowEntity {
|
||||
private Integer id;
|
||||
private Integer userId;
|
||||
private Long userId;
|
||||
private Integer doctorId;
|
||||
private Date createTime;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getUserId() {
|
||||
return userId;
|
||||
}
|
||||
|
||||
public void setUserId(Integer userId) {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Integer getDoctorId() {
|
||||
return doctorId;
|
||||
}
|
||||
|
||||
public void setDoctorId(Integer doctorId) {
|
||||
this.doctorId = doctorId;
|
||||
}
|
||||
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
package doctor.domain.entity;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : UserRechargeRecordEntity
|
||||
* @Description : 用户充值
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-18 20:51
|
||||
*/
|
||||
@Data
|
||||
public class UserRechargeRecordEntity {
|
||||
private Integer id;
|
||||
private String orderId;
|
||||
private Integer userId;
|
||||
private Integer money;
|
||||
private Integer payType;
|
||||
private Integer payStatus;
|
||||
private Date rechargeTime;
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class DoctorSystemNoticeListVo {
|
||||
private Integer id;
|
||||
private String content;
|
||||
private Date createTime;
|
||||
}
|
|
@ -16,20 +16,13 @@ import java.util.List;
|
|||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class DoctorVo {
|
||||
private Integer doctorId;
|
||||
private String doctorName;
|
||||
private String imagePic;
|
||||
private String jobTitle;
|
||||
private String inauguralHospital;
|
||||
private double praise;
|
||||
private Integer serverNum;
|
||||
private Integer servicePrice;
|
||||
private Integer followFlag;
|
||||
private String personalProfile;
|
||||
private Integer id;
|
||||
private Integer departmentId;
|
||||
private String departmentName;
|
||||
private String goodField;
|
||||
private Integer commentNum;
|
||||
private Integer praiseNum;
|
||||
private Integer badNum;
|
||||
private List<DoctorReceiveGift> doctorReceiveGiftList;
|
||||
private List<Comment> commentVoList;
|
||||
private String imagePic;
|
||||
private String inauguralHospital;
|
||||
private String jobTitle;
|
||||
private String name;
|
||||
private String personalProfile;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : HealthyCurrencyNoticeListVo
|
||||
* @Description : 用户H币通知列表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-18 15:57
|
||||
*/
|
||||
@Data
|
||||
public class HealthyCurrencyNoticeListVo {
|
||||
private Integer id;
|
||||
private String content;
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class HistoryInquiryRecordVo {
|
||||
private Integer recordId;
|
||||
private Integer userId;
|
||||
private String uerHeadPic;
|
||||
private String doctorHeadPic;
|
||||
private String nickName;
|
||||
private Date inquiryTime;
|
||||
private Integer status;
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : InquiryNotice
|
||||
* @Description : 用户问诊通知表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-18 11:33
|
||||
*/
|
||||
@Data
|
||||
public class InquiryNoticeVo {
|
||||
private Integer id;
|
||||
private String content;
|
||||
private Date createTime;
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class MyAdoptedCommentListVo {
|
||||
private Integer releaseUserId;
|
||||
private String releaseUserNickName;
|
||||
private String title;
|
||||
private String disease;
|
||||
private String content;
|
||||
private String adoptTime;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @ClassName : SickCircleComment
|
||||
* @Description : 病友圈列表
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-19 11:03
|
||||
*/
|
||||
@Data
|
||||
public class SickCircleCommentVo {
|
||||
private Integer commentId;
|
||||
private Integer commentUserId;
|
||||
private String nickNmae;
|
||||
private String headPic;
|
||||
private String content;
|
||||
private Integer supportNum;
|
||||
private Integer opposeNum;
|
||||
private Integer opinion;
|
||||
private Integer whetherDoctor;
|
||||
private Date commentTime;
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TestUserVo {
|
||||
private String nickName;
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
package doctor.domain.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @ClassName : UserNoticeReadNumVo
|
||||
* @Description : 未读消息
|
||||
* @Author : FJJ
|
||||
* @Date: 2024-01-18 16:14
|
||||
*/
|
||||
@Data
|
||||
public class UserNoticeReadNumVo {
|
||||
private Integer notReadNum;
|
||||
private Integer noticeType;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package doctor.mapper;
|
||||
|
||||
import doctor.domain.entity.DoctorEntity;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -13,5 +14,6 @@ import java.util.List;
|
|||
*/
|
||||
@MapperScan
|
||||
public interface DoctorMapper {
|
||||
List<DoctorEntity> findDoctorList(Integer deptId);
|
||||
// List<DoctorEntity> findDoctorList(Integer deptId, Integer condition, Integer sortBy);
|
||||
List<DoctorEntity> findDoctorList(@Param("deptId") Integer deptId);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
package doctor.mapper;
|
||||
|
||||
import doctor.domain.entity.DoctorIncomeRecordEntity;
|
||||
import doctor.domain.entity.DoctorJobTitleEntity;
|
||||
import doctor.domain.entity.DoctorWalletEntity;
|
||||
import doctor.domain.entity.doctorSystemNoticeEntity;
|
||||
import doctor.controller.HealthRVerifyController;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.system.api.domain.Department;
|
||||
import doctor.system.api.domain.Doctor;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
@ -32,4 +30,8 @@ public interface HealthJobTitleMapper {
|
|||
List<DoctorIncomeRecordEntity> findDoctorIncomeRecordList(Integer doctorId);
|
||||
|
||||
List<doctorSystemNoticeEntity> findDoctorNoticeReadNum(Integer doctorId);
|
||||
|
||||
List<DoctorSystemReplyEntity> findDoctorSystemNoticeList();
|
||||
|
||||
void upImagePicByDoctorId(@Param("doctorId") Integer doctorId, @Param("imagePic") String imagePic);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,12 @@
|
|||
package doctor.mapper;
|
||||
|
||||
import doctor.domain.entity.DoctorAskCount;
|
||||
import doctor.domain.entity.InquiryDetailsRecordEntity;
|
||||
import doctor.domain.entity.InquiryRecordEntity;
|
||||
import doctor.domain.entity.UserDoctorFollowEntity;
|
||||
import doctor.domain.vo.DoctorVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -14,4 +19,24 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface InquiryMapper {
|
||||
List<InquiryDetailsRecordEntity> findHistoryInquiryRecord();
|
||||
|
||||
void consultDoctor(@Param("userId") Integer userId, @Param("doctorId") Integer doctorId);
|
||||
|
||||
String findDoctorUserNameByDoctorId(@Param("doctorId") Integer doctorId);
|
||||
|
||||
DoctorVo findDoctorInfo(@Param("doctorId") Integer doctorId);
|
||||
|
||||
void followDoctor(@Param("userDoctorFollowEntity") UserDoctorFollowEntity userDoctorFollowEntity);
|
||||
|
||||
void delCancelFollow(@Param("userid") Long userid, @Param("doctorId") Integer doctorId);
|
||||
|
||||
InquiryRecordEntity findInquiryRecordById(@Param("recordId") Integer recordId, int i);
|
||||
|
||||
void endInquiry(@Param("recordId") Integer recordId);
|
||||
|
||||
DoctorAskCount getDoctorAskCount(@Param("doctorId") Integer doctorId);
|
||||
|
||||
void addDoctorAskCount(DoctorAskCount doctorAskCount);
|
||||
|
||||
void updDoctorAskCount(DoctorAskCount doctorAskCount);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
package doctor.mapper;
|
||||
|
||||
import doctor.domain.entity.InquiryDetailsRecord;
|
||||
import doctor.domain.entity.UserEntity;
|
||||
import doctor.domain.vo.InquiryRecordVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
@Mapper
|
||||
public interface InquiryVerifyServiceMapper {
|
||||
List<InquiryRecordVo> findInquiryRecordList();
|
||||
|
||||
|
||||
List<InquiryDetailsRecord> findHistoryInquiryRecord(Integer doctorId);
|
||||
|
||||
List<UserEntity> findUserByIds(@Param("split") String[] split);
|
||||
|
||||
}
|
||||
|
|
|
@ -37,4 +37,7 @@ public interface PatientMapper {
|
|||
|
||||
List<SickCircleEntity> searchSickCircle(@Param("keyWord") String keyWord);
|
||||
|
||||
|
||||
List<SickCircleEntity> findPatientSickCircleList(@Param("patientUserId") Integer patientUserId);
|
||||
|
||||
}
|
||||
|
|
|
@ -3,18 +3,35 @@ package doctor.mapper;
|
|||
import doctor.domain.entity.SickCircleEntity;
|
||||
import doctor.domain.vo.SickInfoVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface SickCircleMapper {
|
||||
List<SickCircleEntity> findSickCircleList(Integer departmentId);
|
||||
List<SickCircleEntity> findSickCircleList(@Param("departmentId") Integer departmentId);
|
||||
|
||||
SickCircleEntity findSickCircleInfo(Integer sickCircleId);
|
||||
SickCircleEntity findSickCircleInfo(@Param("sickCircleId") Integer sickCircleId);
|
||||
|
||||
SickCircleEntity findSickCircleInfoByKeyWord(String keyWord);
|
||||
SickCircleEntity findSickCircleInfoByKeyWord(@Param("keyWord") String keyWord);
|
||||
|
||||
void publishComment(Integer sickCircleId, Long userid, String content);
|
||||
void publishComment(@Param("sickCircleId") Integer sickCircleId, @Param("userid") Long userid, @Param("content") String content);
|
||||
|
||||
void publishSickCircle(SickCircleEntity sickCircleEntity);
|
||||
|
||||
|
||||
void expressOpinion(@Param("commentId") Integer commentId, @Param("opinion") Integer opinion, @Param("userid") Long userid);
|
||||
|
||||
void ins(@Param("sickCircleId") Integer sickCircleId);
|
||||
|
||||
void inss(@Param("sickCircleId") Integer sickCircleId, @Param("userid") Long userid);
|
||||
|
||||
void jia(@Param("commentId") Integer commentId);
|
||||
|
||||
void jian(@Param("commentId") Integer commentId);
|
||||
|
||||
void jiann(@Param("commentId") Integer commentId);
|
||||
|
||||
void jiaa(@Param("commentId") Integer commentId);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
package doctor.mapper;
|
||||
|
||||
import doctor.domain.entity.SickCircleCommentEntity;
|
||||
import doctor.domain.entity.UserSickCircleEntity;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -14,4 +16,5 @@ import java.util.List;
|
|||
@Mapper
|
||||
public interface UserSickCircleMapper {
|
||||
List<UserSickCircleEntity> findUserSickCircleList();
|
||||
|
||||
}
|
||||
|
|
|
@ -5,7 +5,9 @@ import doctor.domain.dto.UserTaskRecordDto;
|
|||
import doctor.domain.entity.*;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -24,7 +26,7 @@ public interface UserVideoMapper {
|
|||
|
||||
void deleteVideoBuy(@Param("videoId") Integer videoId);
|
||||
|
||||
List<UserWalletEntity> findUserWallet();
|
||||
// Integer findUserWallet(@Param("userId") Integer userId);
|
||||
|
||||
List<UserConsumptionRecordEntity> findUserConsumptionRecordList();
|
||||
|
||||
|
@ -38,7 +40,7 @@ public interface UserVideoMapper {
|
|||
|
||||
void addUserArchives(UserArchivesEntity userArchivesEntity, @Param("userId") Integer userId);
|
||||
|
||||
void uploadUserArchivesImg(@Param("id") Integer id);
|
||||
|
||||
|
||||
|
||||
List<UserDoctorFollowEntity> findUserDoctorFollowList();
|
||||
|
@ -46,4 +48,39 @@ public interface UserVideoMapper {
|
|||
List<UserTaskRecordDto> findUserTaskList();
|
||||
|
||||
List<SignEntity> findUserSign(@Param("userId") Integer userId);
|
||||
|
||||
List<UserEntity> getUserInfoById(@Param("userId") Integer userId);
|
||||
|
||||
void perfectUserInfo(@Param("age") Integer age, @Param("height") Integer height, @Param("weight") Integer weight, @Param("userId") Integer userId);
|
||||
|
||||
void updateUserSex(@Param("sex") Integer sex, @Param("userId") Integer userId);
|
||||
|
||||
void modifyNickName(@Param("nickName") String nickName, @Param("userId") Integer userId);
|
||||
|
||||
List<SystemNoticeEntity> findSystemNoticeList();
|
||||
|
||||
List<InquiryRecordEntity> findInquiryNoticeList(Integer userId);
|
||||
|
||||
List<UserWalletEntity> findHealthyCurrencyNoticeList(@Param("userId") Integer userId);
|
||||
|
||||
List<SystemNoticeEntity> findUserNoticeReadNum(@Param("userId") Integer userId);
|
||||
|
||||
|
||||
SystemNoticeEntity findModifyAll(@Param("userId") Integer userId);
|
||||
|
||||
void modifyAllStatus(@Param("userId") Integer userId);
|
||||
|
||||
void uploadUserArchivesImg(@Param("id") Integer id, @Param("s") String s);
|
||||
|
||||
void updateUserWallet(@Param("money") BigDecimal money, @Param("userId") Integer userId);
|
||||
|
||||
Integer findUserWallet(@Param("userId") Integer userId);
|
||||
|
||||
void updateUserWallet1(@Param("money") BigDecimal money, @Param("userId") Integer userId);
|
||||
|
||||
|
||||
// void addSign(SignEntity signEntity);
|
||||
|
||||
List<SickCircleCommentEntity> findSickCircleCommentList(@Param("userId") Integer userId);
|
||||
|
||||
}
|
||||
|
|
|
@ -29,12 +29,14 @@ public interface VideoMapper {
|
|||
UserWalletEntity FindUserWallet(@Param("id") Integer id);
|
||||
|
||||
|
||||
void updateUserWallet(@Param("newblance") int newblance, @Param("id") Integer id);
|
||||
|
||||
List<VideoCommentEntity> findVideoCommentList(@Param("videoId") Integer videoId);
|
||||
|
||||
void addVideoComment(@Param("userId") Integer userId, @Param("sessionId") String sessionId, @Param("videoId") Integer videoId, @Param("content") String content);
|
||||
|
||||
UserEntity FindByUserId(@Param("userId") Integer userId);
|
||||
|
||||
|
||||
|
||||
// UserWalletEntity FindById(@Param("userId") Integer userId);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package doctor.model;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 交易关闭
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TradeCloseModel {
|
||||
/**
|
||||
* 商户订单号,商户网站订单系统中唯一订单号
|
||||
*/
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
/**
|
||||
* 支付宝交易号
|
||||
*/
|
||||
@JSONField(name = "trade_no")
|
||||
private String tradeNo;
|
||||
|
||||
public String toJsonStr(){
|
||||
return JSONObject.toJSONString(this);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package doctor.model;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 支付模型
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TradePayModel {
|
||||
|
||||
/**
|
||||
* 商户订单号,商户网站订单系统中唯一订单号
|
||||
*/
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
/**
|
||||
* 付款金额,必填
|
||||
*/
|
||||
@JSONField(name = "total_amount")
|
||||
private BigDecimal totalAmount;
|
||||
/**
|
||||
* 订单名称
|
||||
*/
|
||||
private String subject;
|
||||
|
||||
/**
|
||||
* 商品描述,可空
|
||||
*/
|
||||
private String body;
|
||||
/**
|
||||
* 商品编码
|
||||
*/
|
||||
@JSONField(name = "product_code")
|
||||
private String productCode = "FAST_INSTANT_TRADE_PAY";
|
||||
|
||||
public String toJsonStr() {
|
||||
return JSONObject.toJSONString(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
package doctor.model;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 交易查询
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TradeQueryModel {
|
||||
/**
|
||||
* 商户订单号,商户网站订单系统中唯一订单号
|
||||
*/
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
/**
|
||||
* 支付宝交易号
|
||||
*/
|
||||
@JSONField(name = "trade_no")
|
||||
private String tradeNo;
|
||||
|
||||
public String toJsonStr(){
|
||||
return JSONObject.toJSONString(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
package doctor.model;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 退款
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TradeRefundModel {
|
||||
/**
|
||||
* 商户订单号
|
||||
*/
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
/**
|
||||
* 支付宝交易号
|
||||
*/
|
||||
@JSONField(name = "trade_no")
|
||||
private String tradeNo;
|
||||
/**
|
||||
* 退款金额
|
||||
*/
|
||||
@JSONField(name = "refund_amount")
|
||||
private String refundAmount;
|
||||
/**
|
||||
* 退款原因
|
||||
*/
|
||||
@JSONField(name = "refund_reason")
|
||||
private String refundReason;
|
||||
/**
|
||||
* 商户退款请求号
|
||||
*/
|
||||
@JSONField(name = "out_request_no")
|
||||
private String outRequestNo;
|
||||
|
||||
public String toJsonStr(){
|
||||
return JSONObject.toJSONString(this);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
package doctor.model;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.annotation.JSONField;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 退款查询
|
||||
*/
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class TradeRefundQueryModel {
|
||||
/**
|
||||
* 商户订单号,商户网站订单系统中唯一订单号
|
||||
*/
|
||||
@JSONField(name = "out_trade_no")
|
||||
private String outTradeNo;
|
||||
/**
|
||||
//支付宝交易号
|
||||
*
|
||||
*/
|
||||
@JSONField(name = "trade_no")
|
||||
private String tradeNo;
|
||||
//请二选一设置
|
||||
/**
|
||||
* 请求退款接口时,传入的退款请求号,如果在退款请求时未传入,则该值为创建交易时的外部交易号,必填
|
||||
*/
|
||||
@JSONField(name = "out_request_no")
|
||||
private String outRequestNo;
|
||||
|
||||
public String toJsonStr(){
|
||||
return JSONObject.toJSONString(this);
|
||||
}
|
||||
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
package doctor.service;
|
||||
|
||||
import doctor.domain.entity.DoctorEntity;
|
||||
import doctor.domain.vo.DoctorVo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
@ -11,5 +12,5 @@ import java.util.List;
|
|||
* @CreateTime: 2024/1/15 11:32
|
||||
*/
|
||||
public interface DoctorService {
|
||||
List<DoctorEntity> findDoctorList(Integer deptId);
|
||||
List<DoctorVo> findDoctorList(Integer deptId, Integer condition, Integer sortBy);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package doctor.service;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.controller.HealthRVerifyController;
|
||||
import doctor.domain.dto.ApplyJoinDto;
|
||||
import doctor.domain.entity.DoctorJobTitleEntity;
|
||||
import doctor.domain.vo.*;
|
||||
|
@ -32,4 +33,10 @@ public interface HealthJobTitleService {
|
|||
HealthR<List<DoctorHistoryInquiryVo>> findHistoryInquiryRecord(Integer page, Integer size);
|
||||
|
||||
List<NoticeReadNumVo> findDoctorNoticeReadNum(Integer doctorId);
|
||||
|
||||
List<MyAdoptedCommentListVo> findMyAdoptedCommentList(Integer doctorId, Integer page, Integer count);
|
||||
|
||||
List<DoctorSystemNoticeListVo> findDoctorSystemNoticeList(Integer page, Integer count);
|
||||
|
||||
void upImagePicByDoctorId(String imagePic, Integer doctorId);
|
||||
}
|
||||
|
|
|
@ -15,4 +15,12 @@ public interface InquiryService {
|
|||
List<InquiryDetailsRecordVo> findHistoryInquiryRecord();
|
||||
|
||||
DoctorVo findDoctorInfo(Integer doctorId);
|
||||
|
||||
String consultDoctor(Integer userId, Integer doctorId);
|
||||
|
||||
void followDoctor(Integer userId, Integer doctorId);
|
||||
|
||||
void cancelFollow(Integer userId, Integer doctorId);
|
||||
|
||||
void endInquiry(Integer userId, Integer recordId);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package doctor.service;
|
||||
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.vo.HistoryInquiryRecordVo;
|
||||
import doctor.domain.vo.InquiryRecordVo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -8,4 +9,5 @@ import java.util.List;
|
|||
public interface InquiryVerifyService {
|
||||
List<InquiryRecordVo> findInquiryRecordList();
|
||||
|
||||
List<HistoryInquiryRecordVo> findHistoryInquiryRecord(Integer page, Integer count, Integer doctorId);
|
||||
}
|
||||
|
|
|
@ -14,22 +14,14 @@ import java.util.List;
|
|||
*/
|
||||
public interface PatientService {
|
||||
|
||||
|
||||
|
||||
|
||||
SickCircleEntity findSickCircleInfo(Integer id);
|
||||
|
||||
|
||||
|
||||
Result<List<SymptomEntity>> symptomList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId);
|
||||
HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId, Integer page, Integer count);
|
||||
|
||||
|
||||
HealthR<List<SickCommentEntity>> findSickCircleCommentList(Integer sickCircleId);
|
||||
|
@ -38,4 +30,7 @@ public interface PatientService {
|
|||
|
||||
HealthR<List<SickCircleEntity>> searchSickCircle(String keyWord);
|
||||
|
||||
HealthR<List<SickCircleEntity>> findPatientSickCircleList(Integer patientUserId, Integer page, Integer count);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
package doctor.service;
|
||||
|
||||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.entity.SickCircleEntity;
|
||||
import doctor.domain.vo.SickCommentVo;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
/**
|
||||
* @ClassName SickCircleServer
|
||||
* @Description 描述
|
||||
*/
|
||||
public interface SickCircleServer {
|
||||
HealthR<SickCircleEntity> publishSickCircle(SickCircleEntity sickCircleEntity);
|
||||
Result pictures(MultipartFile picture);
|
||||
Result<SickCommentVo> publishComment(Integer sickCircleId, String content);
|
||||
|
||||
|
||||
HealthR expressOpinion(Integer commentId, Integer opinion);
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package doctor.service;
|
||||
|
||||
import doctor.domain.vo.TestUserVo;
|
||||
|
||||
public interface UserService {
|
||||
TestUserVo findById(Long aLong);
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
package doctor.service;
|
||||
|
||||
import doctor.domain.vo.SickCircleCommentVo;
|
||||
import doctor.domain.vo.UserSickCircleVo;
|
||||
|
||||
import java.util.List;
|
||||
|
@ -13,4 +14,6 @@ import java.util.List;
|
|||
public interface UserSickCircleService {
|
||||
|
||||
List<UserSickCircleVo> findMySickCircleList();
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
package doctor.service;
|
||||
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.domain.vo.*;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -21,7 +26,7 @@ public interface UserVideoService {
|
|||
|
||||
void deleteVideoBuy(Integer videoId);
|
||||
|
||||
List<UserWalletEntity> findUserWallet();
|
||||
|
||||
|
||||
List<UserVideoCollectionVo> findVideoCollectionList(Integer userId);
|
||||
|
||||
|
@ -39,11 +44,42 @@ public interface UserVideoService {
|
|||
|
||||
void addUserArchives(UserArchivesEntity userArchivesEntity, Integer userId);
|
||||
|
||||
void uploadUserArchivesImg(Integer id);
|
||||
|
||||
|
||||
List<UserDoctorFollowVo> findUserDoctorFollowList();
|
||||
|
||||
List<UserTaskRecordVo> findUserTaskList();
|
||||
|
||||
List<SignEntity> findUserSign(Integer userId);
|
||||
|
||||
List<UserVo> getUserInfoById(Integer userId);
|
||||
|
||||
void addSign();
|
||||
|
||||
void perfectUserInfo(Integer age, Integer height, Integer weight, Integer userId);
|
||||
|
||||
void updateUserSex(Integer sex, Integer userId);
|
||||
|
||||
void modifyNickName(String nickName, Integer userId);
|
||||
|
||||
List<SystemNoticeEntity> findSystemNoticeList();
|
||||
|
||||
List<InquiryNoticeVo> findInquiryNoticeList(Integer userId);
|
||||
|
||||
List<HealthyCurrencyNoticeListVo> findHealthyCurrencyNoticeList(Integer userId);
|
||||
|
||||
List<UserNoticeReadNumVo> findUserNoticeReadNum(Integer userId);
|
||||
|
||||
void modifyAllStatus(Integer userId);
|
||||
|
||||
|
||||
HealthR uploadUserArchivesImg(MultipartFile imagePic, String sessionId, Integer id);
|
||||
|
||||
String Pay(BigDecimal money,Integer userId);
|
||||
|
||||
Integer findUserWallet(Integer userId);
|
||||
|
||||
|
||||
void drawCash(Integer userId, BigDecimal money);
|
||||
List<SickCircleCommentVo> findSickCircleCommentList(Integer userId);
|
||||
}
|
||||
|
|
|
@ -16,10 +16,12 @@ public interface VideoService {
|
|||
void addUserVideoCollection(Integer videoId,Integer userId);
|
||||
|
||||
|
||||
void videoBuy(Integer videoId,Integer price);
|
||||
// void videoBuy(Integer videoId,Integer price);
|
||||
|
||||
|
||||
List<VideoCommentVo> findVideoCommentList(Integer videoId);
|
||||
|
||||
void addVideoComment(Integer userId, String sessionId, Integer videoId, String content);
|
||||
|
||||
void videoBuy(Integer userId, Integer videoId, Integer price);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,17 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import doctor.convert.DoctorConvert;
|
||||
import doctor.domain.entity.DoctorCharge;
|
||||
import doctor.domain.entity.DoctorCommentCount;
|
||||
import doctor.domain.entity.DoctorEntity;
|
||||
import doctor.domain.vo.DoctorVo;
|
||||
import doctor.mapper.DoctorMapper;
|
||||
import doctor.service.DoctorService;
|
||||
import doctor.system.api.domain.Doctor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -19,8 +25,33 @@ public class DoctorServiceimpl implements DoctorService {
|
|||
@Autowired
|
||||
private DoctorMapper doctorMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<DoctorEntity> findDoctorList(Integer deptId) {
|
||||
return doctorMapper.findDoctorList(deptId);
|
||||
public List<DoctorVo> findDoctorList(Integer deptId, Integer condition, Integer sortBy) {
|
||||
List<DoctorEntity> doctorEntities=doctorMapper.findDoctorList(deptId);//获取指定部门的医生实体列表
|
||||
// List<DoctorVo> doctorVos=new ArrayList<>();
|
||||
// for (DoctorEntity doctorEntity : doctorVoList) {
|
||||
// DoctorVo doctorVo = new DoctorVo();
|
||||
// DoctorCharge doctorCharge = doctorMapper.doctorCharge(doctorEntity.getId()); // 获医生的收费信
|
||||
// doctorVo.setServicePrice(doctorCharge.getCost()); // 设置医生的收费价格
|
||||
// doctorVo.setDoctorId(doctorEntity.getId());
|
||||
// doctorVo.setDoctorName(doctorEntity.getName());
|
||||
// doctorVo.setDoctorName(doctorVo.getDoctorName());
|
||||
// doctorVo.setImagePic(doctorVo.getImagePic());
|
||||
// doctorVo.setJobTitle(doctorEntity.getJobTitle());
|
||||
// doctorVo.setInauguralHospital(doctorVo.getInauguralHospital());
|
||||
// DoctorCommentCount doctored=doctorMapper.doctorCommentCount(doctorEntity.getId());
|
||||
// doctorVo.setPraiseNum(doctored.getPraiseNum());
|
||||
// doctorVo.setCommentNum(doctored.getPraiseNum()+doctored.getBadNum());
|
||||
// doctorVo.setBadNum(doctored.getBadNum());
|
||||
// doctorVo.setPraise(doctorVo.getPraiseNum()/doctorVo.getCommentNum());
|
||||
//
|
||||
//
|
||||
//
|
||||
// }
|
||||
|
||||
List<DoctorVo> doctorVos= DoctorConvert.INSTANCE.doctorEntityListToDoctorVoList(doctorEntities);
|
||||
|
||||
return doctorVos;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,11 +3,9 @@ package doctor.service.impl;
|
|||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.common.core.web.controller.BaseController;
|
||||
import doctor.common.security.service.TokenService;
|
||||
import doctor.controller.HealthRVerifyController;
|
||||
import doctor.domain.dto.ApplyJoinDto;
|
||||
import doctor.domain.entity.DoctorIncomeRecordEntity;
|
||||
import doctor.domain.entity.DoctorJobTitleEntity;
|
||||
import doctor.domain.entity.DoctorWalletEntity;
|
||||
import doctor.domain.entity.doctorSystemNoticeEntity;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.domain.vo.*;
|
||||
import doctor.mapper.HealthJobTitleMapper;
|
||||
import doctor.service.HealthJobTitleService;
|
||||
|
@ -88,7 +86,7 @@ public class HealthJobTitleServiceImpl extends BaseController implements HealthJ
|
|||
}
|
||||
Integer integer = redisTemplate.opsForValue().get(applyJoinDto.getEmail());
|
||||
if (!String.valueOf(integer).equals(applyJoinDto.getCode())){
|
||||
return HealthR.fail("验车码错误");
|
||||
return HealthR.fail("验证码码错误");
|
||||
}
|
||||
Doctor doctor = new Doctor();
|
||||
BeanUtils.copyProperties(applyJoinDto,doctor);
|
||||
|
@ -199,4 +197,28 @@ public class HealthJobTitleServiceImpl extends BaseController implements HealthJ
|
|||
}
|
||||
return noticeReadNumVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MyAdoptedCommentListVo> findMyAdoptedCommentList(Integer doctorId, Integer page, Integer count) {
|
||||
startPage(page,count);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DoctorSystemNoticeListVo> findDoctorSystemNoticeList(Integer page, Integer count) {
|
||||
startPage(page,count);
|
||||
List<DoctorSystemReplyEntity> doctorSystemNoticeList = healthJobTitleMapper.findDoctorSystemNoticeList();
|
||||
ArrayList<DoctorSystemNoticeListVo> doctorSystemNoticeListVos = new ArrayList<>();
|
||||
for (DoctorSystemReplyEntity doctorSystemReplyEntity : doctorSystemNoticeList) {
|
||||
DoctorSystemNoticeListVo doctorSystemNoticeListVo = new DoctorSystemNoticeListVo();
|
||||
BeanUtils.copyProperties(doctorSystemReplyEntity,doctorSystemNoticeListVo);
|
||||
doctorSystemNoticeListVos.add(doctorSystemNoticeListVo);
|
||||
}
|
||||
return doctorSystemNoticeListVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void upImagePicByDoctorId(String imagePic, Integer doctorId) {
|
||||
healthJobTitleMapper.upImagePicByDoctorId(doctorId,imagePic);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,14 +1,21 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import doctor.domain.entity.InquiryDetailsRecordEntity;
|
||||
import doctor.common.security.utils.SecurityUtils;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.domain.vo.DoctorVo;
|
||||
import doctor.domain.vo.InquiryDetailsRecordVo;
|
||||
import doctor.mapper.InquiryMapper;
|
||||
import doctor.service.InquiryService;
|
||||
import doctor.system.api.domain.Doctor;
|
||||
import doctor.system.api.model.LoginUser;
|
||||
import doctor.util.ConvertUtil;
|
||||
import doctor.util.RSAUtils;
|
||||
import doctor.util.RsaKey;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +37,84 @@ public class InquiryServiceImpl implements InquiryService {
|
|||
|
||||
@Override
|
||||
public DoctorVo findDoctorInfo(Integer doctorId) {
|
||||
// DoctorCharge doctorCharge=inquiryMapper.doctorCharge(doctorId);
|
||||
// DoctorCommentCount doctorCommentCount=inquiryMapper.doctorCommentCount(doctorId);
|
||||
return inquiryMapper.findDoctorInfo(doctorId);
|
||||
|
||||
return null;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public String consultDoctor(Integer userId, Integer doctorId) {
|
||||
inquiryMapper.consultDoctor(userId,doctorId);
|
||||
String doctorUserName1 = inquiryMapper.findDoctorUserNameByDoctorId(doctorId);
|
||||
try {
|
||||
List<String> strings = RSAUtils.rsaEncrypt(doctorUserName1, RsaKey.PUBLIC_KEY);
|
||||
String doctorUserName = strings.get(0);
|
||||
System.out.println("==============="+doctorUserName);
|
||||
return doctorUserName;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void followDoctor(Integer userId, Integer doctorId) {
|
||||
if (doctorId==0){
|
||||
throw new RuntimeException("医生Id不能为空");
|
||||
}else {
|
||||
UserDoctorFollowEntity userDoctorFollowEntity = new UserDoctorFollowEntity();
|
||||
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||
Long userid = loginUser.getUserid();
|
||||
userDoctorFollowEntity.setUserId(userid);
|
||||
userDoctorFollowEntity.setDoctorId(doctorId);
|
||||
userDoctorFollowEntity.setCreateTime(new Date());
|
||||
inquiryMapper.followDoctor(userDoctorFollowEntity);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//取消关注
|
||||
@Override
|
||||
public void cancelFollow(Integer userId, Integer doctorId) {
|
||||
LoginUser loginUser= SecurityUtils.getLoginUser();
|
||||
Long userid=loginUser.getUserid();
|
||||
inquiryMapper.delCancelFollow(userid,doctorId);
|
||||
}
|
||||
|
||||
//结束问增
|
||||
@Override
|
||||
public void endInquiry(Integer userId, Integer recordId) {
|
||||
//检查问诊记录Id是否为空
|
||||
if (recordId == 0) {
|
||||
throw new RuntimeException("问诊记录Id不能为空");
|
||||
}
|
||||
//结束问诊,获取问诊记录信息
|
||||
InquiryRecordEntity inquiryRecordEntity = inquiryMapper.findInquiryRecordById(recordId,1);
|
||||
//结束问诊,修改问诊记录状态
|
||||
inquiryMapper.endInquiry(recordId);
|
||||
if (inquiryRecordEntity==null){
|
||||
throw new RuntimeException("没有找到该问诊记录");
|
||||
}
|
||||
//获取医生问诊次数信息
|
||||
DoctorAskCount doctorAskCount=inquiryMapper.getDoctorAskCount(inquiryRecordEntity.getDoctorId());
|
||||
// 如果医生问诊次数信息为空,表示医生首次问诊,添加新的记录
|
||||
if (doctorAskCount==null){
|
||||
doctorAskCount = new DoctorAskCount();
|
||||
doctorAskCount.setDoctorAskCount(inquiryRecordEntity.getDoctorId());
|
||||
doctorAskCount.setNumber(1);
|
||||
doctorAskCount.setUpdateTime(new Date());
|
||||
doctorAskCount.setCreateTime(new Timestamp(new Date().getTime()));
|
||||
// 添加医生问诊次数记录到数据库
|
||||
inquiryMapper.addDoctorAskCount(doctorAskCount);
|
||||
}
|
||||
else {
|
||||
// 如果医生已有问诊次数记录,增加次数并更新信息
|
||||
doctorAskCount.setNumber(doctorAskCount.getNumber() + 1);
|
||||
doctorAskCount.setUpdateTime(new Date());
|
||||
|
||||
// 更新医生问诊次数记录到数据库
|
||||
inquiryMapper.updDoctorAskCount(doctorAskCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,16 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import doctor.common.core.web.controller.BaseController;
|
||||
import doctor.domain.entity.InquiryDetailsRecord;
|
||||
import doctor.domain.entity.UserEntity;
|
||||
import doctor.domain.vo.HistoryInquiryRecordVo;
|
||||
import doctor.domain.vo.InquiryRecordVo;
|
||||
import doctor.mapper.InquiryVerifyServiceMapper;
|
||||
import doctor.service.InquiryVerifyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
|
@ -16,6 +20,38 @@ public class InquiryVerifyServiceImpl extends BaseController implements InquiryV
|
|||
|
||||
@Override
|
||||
public List<InquiryRecordVo> findInquiryRecordList() {
|
||||
return inquiryVerifyServiceMapper.findInquiryRecordList();
|
||||
//TODO 待做
|
||||
//inquiryVerifyServiceMapper.findInquiryRecordList();
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HistoryInquiryRecordVo> findHistoryInquiryRecord(Integer page, Integer count, Integer doctorId) {
|
||||
startPage(page,count);
|
||||
//查询所有和医生聊天的聊天列表拿到患者id
|
||||
List<InquiryDetailsRecord> inquiryDetailsRecord = inquiryVerifyServiceMapper.findHistoryInquiryRecord(doctorId);
|
||||
//定义一个数组用来接收所有的用户id
|
||||
String userId="";
|
||||
for (InquiryDetailsRecord detailsRecord : inquiryDetailsRecord) {
|
||||
userId+=","+detailsRecord;
|
||||
}
|
||||
String[] split = userId.split(",");
|
||||
//患者所有信息赋值
|
||||
List<UserEntity> userEntities = inquiryVerifyServiceMapper.findUserByIds(split);
|
||||
ArrayList<HistoryInquiryRecordVo> historyInquiryRecordVos = new ArrayList<>();
|
||||
for (UserEntity userEntity : userEntities) {
|
||||
HistoryInquiryRecordVo historyInquiryRecordVo = new HistoryInquiryRecordVo();
|
||||
historyInquiryRecordVo.setUserId(userEntity.getId());
|
||||
historyInquiryRecordVo.setNickName(historyInquiryRecordVo.getNickName());
|
||||
historyInquiryRecordVo.setUerHeadPic(userEntity.getHeadPic());
|
||||
historyInquiryRecordVo.setStatus(3);
|
||||
historyInquiryRecordVos.add(historyInquiryRecordVo);
|
||||
}
|
||||
for (HistoryInquiryRecordVo historyInquiryRecordVo : historyInquiryRecordVos) {
|
||||
for (InquiryDetailsRecord detailsRecord : inquiryDetailsRecord) {
|
||||
historyInquiryRecordVo.setInquiryTime(detailsRecord.getAskTime());
|
||||
}
|
||||
}
|
||||
return historyInquiryRecordVos;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ package doctor.service.impl;
|
|||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import doctor.common.core.constant.TokenConstants;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.common.core.web.controller.BaseController;
|
||||
import doctor.common.security.service.TokenService;
|
||||
import doctor.common.security.utils.SecurityUtils;
|
||||
import doctor.domain.entity.SickCircleEntity;
|
||||
import doctor.domain.entity.SickCommentEntity;
|
||||
import doctor.domain.entity.SymptomEntity;
|
||||
|
@ -24,25 +26,20 @@ import java.util.List;
|
|||
*/
|
||||
@Service
|
||||
@Log4j2
|
||||
public class PatientServiceImpl implements PatientService {
|
||||
public class PatientServiceImpl extends BaseController implements PatientService {
|
||||
@Autowired
|
||||
private PatientMapper patientMapper;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId) {
|
||||
public HealthR<List<SickCircleEntity>> sickCircleList(Integer departmentId, Integer page, Integer count) {
|
||||
/**
|
||||
* 根据科室id获取病人圈列表
|
||||
* @param departmentId 科室id
|
||||
* @return 病人圈列表
|
||||
*/
|
||||
startPage(page,count);
|
||||
List<SickCircleEntity> sickCircleEntity = patientMapper.sickCircleList(departmentId);
|
||||
return HealthR.ok(sickCircleEntity);
|
||||
return HealthR.ok(sickCircleEntity);
|
||||
}
|
||||
|
||||
|
||||
|
@ -62,9 +59,17 @@ public class PatientServiceImpl implements PatientService {
|
|||
@Override
|
||||
public HealthR<List<SickCircleEntity>> searchSickCircle(String keyWord) {
|
||||
List<SickCircleEntity> list= patientMapper.searchSickCircle(keyWord);
|
||||
|
||||
return HealthR.ok(list);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HealthR<List<SickCircleEntity>> findPatientSickCircleList(Integer patientUserId, Integer page, Integer count) {
|
||||
startPage(page,count);
|
||||
List<SickCircleEntity> sickCircleEntity = patientMapper.findPatientSickCircleList(patientUserId);
|
||||
return HealthR.ok(sickCircleEntity);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SickCircleEntity findSickCircleInfo(Integer id) {
|
||||
|
|
|
@ -0,0 +1,113 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import com.alibaba.nacos.api.model.v2.Result;
|
||||
import doctor.common.core.constant.TokenConstants;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.common.core.domain.R;
|
||||
import doctor.common.security.service.TokenService;
|
||||
import doctor.common.core.utils.StringUtils;
|
||||
import doctor.domain.entity.SickCircleEntity;
|
||||
import doctor.domain.vo.SickCommentVo;
|
||||
import doctor.mapper.SickCircleMapper;
|
||||
import doctor.service.SickCircleServer;
|
||||
import doctor.system.api.model.LoginUser;
|
||||
import doctor.util.OssUtil;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.persistence.Access;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
/**
|
||||
* @ClassName SickCircleServerImpl
|
||||
* @Description 描述
|
||||
*/
|
||||
@Service
|
||||
@Log4j2
|
||||
public class SickCircleServerImpl implements SickCircleServer {
|
||||
|
||||
@Autowired
|
||||
SickCircleMapper mapper;
|
||||
|
||||
@Override
|
||||
public HealthR<SickCircleEntity> publishSickCircle(SickCircleEntity sickCircleEntity) {
|
||||
if (StringUtils.isEmpty(sickCircleEntity.getTitle())) {
|
||||
Result.failure("标题不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(sickCircleEntity.getTitle())) {
|
||||
Result.failure("标题不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(sickCircleEntity.getDisease())) {
|
||||
Result.failure("症状不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(sickCircleEntity.getDetail())) {
|
||||
Result.failure("描述不能为空");
|
||||
}
|
||||
if (StringUtils.isEmpty(sickCircleEntity.getTreatmentProcess())) {
|
||||
Result.failure("治疗过程不能为空");
|
||||
}
|
||||
LoginUser login = Login();
|
||||
sickCircleEntity.setUserId(login.getUserid());
|
||||
String s = redisTemplate.opsForValue().get("url");
|
||||
sickCircleEntity.setPicture(s);
|
||||
mapper.publishSickCircle(sickCircleEntity);
|
||||
return HealthR.ok(sickCircleEntity);
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
HttpServletRequest httpServletRequest;
|
||||
@Autowired
|
||||
TokenService tokenService;
|
||||
|
||||
private LoginUser Login() {
|
||||
|
||||
String header = httpServletRequest.getHeader(TokenConstants.SESSIONID);
|
||||
LoginUser loginUser = tokenService.getLoginUser(header);
|
||||
return loginUser;
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
RedisTemplate<String,String> redisTemplate;
|
||||
@Override
|
||||
public Result pictures(MultipartFile picture) {
|
||||
String url = OssUtil.uploadMultipartFile(picture);
|
||||
if (StringUtils.isEmpty(url)){
|
||||
log.info("上传oss成功:"+url);
|
||||
}
|
||||
// redisTemplate.opsForValue().set("usr",url);
|
||||
return Result.success(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<SickCommentVo> publishComment(Integer sickCircleId, String content) {
|
||||
//获取用户对象
|
||||
LoginUser login = Login();
|
||||
//获取用户id
|
||||
Long userid = login.getUserid();
|
||||
|
||||
mapper.publishComment(sickCircleId,userid, content);
|
||||
|
||||
return Result.success(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HealthR expressOpinion(Integer commentId, Integer opinion) {
|
||||
if(opinion==1){
|
||||
mapper.jia(commentId);
|
||||
mapper.jiann(commentId);
|
||||
}
|
||||
if(opinion==2){
|
||||
mapper.jiaa(commentId);
|
||||
mapper.jian(commentId);
|
||||
}
|
||||
LoginUser login = Login();
|
||||
Long userid = login.getUserid();
|
||||
return HealthR.ok();
|
||||
}
|
||||
|
||||
}
|
|
@ -67,6 +67,11 @@ public class SickCircleServiceImpl extends BaseController implements SickCircleS
|
|||
LoginUser login = Login();
|
||||
//获取用户id
|
||||
Long userid = login.getUserid();
|
||||
//病友圈评论计树
|
||||
sickCircleMapper.ins(sickCircleId);
|
||||
//病友圈评论试图
|
||||
sickCircleMapper.inss(sickCircleId,userid);
|
||||
|
||||
sickCircleMapper.publishComment(sickCircleId,userid, content);
|
||||
|
||||
return Result.success(null);
|
||||
|
@ -90,7 +95,7 @@ public class SickCircleServiceImpl extends BaseController implements SickCircleS
|
|||
Result.failure("治疗过程不能为空");
|
||||
}
|
||||
LoginUser login = Login();
|
||||
sickCircleEntity.setUserId(login.getUserid().intValue());
|
||||
sickCircleEntity.setUserId(login.getUserid());
|
||||
|
||||
sickCircleMapper.publishSickCircle(sickCircleEntity);
|
||||
return HealthR.ok(sickCircleEntity);
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
public class UserServiceImpl {
|
||||
}
|
|
@ -1,6 +1,8 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import doctor.domain.entity.SickCircleCommentEntity;
|
||||
import doctor.domain.entity.UserSickCircleEntity;
|
||||
import doctor.domain.vo.SickCircleCommentVo;
|
||||
import doctor.domain.vo.UserSickCircleVo;
|
||||
import doctor.mapper.UserSickCircleMapper;
|
||||
import doctor.mapper.UserVideoMapper;
|
||||
|
@ -27,4 +29,6 @@ public class UserSickCircleServiceImpl implements UserSickCircleService {
|
|||
List<UserSickCircleVo> userSickCircleVoList = ConvertUtil.entityToVoList(userSickCircleEntityList, UserSickCircleVo.class);
|
||||
return userSickCircleVoList;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,16 +1,39 @@
|
|||
package doctor.service.impl;
|
||||
|
||||
import com.alipay.api.AlipayApiException;
|
||||
import com.alipay.api.AlipayClient;
|
||||
import com.alipay.api.CertAlipayRequest;
|
||||
import com.alipay.api.DefaultAlipayClient;
|
||||
import com.alipay.api.domain.AlipayFundTransToaccountTransferModel;
|
||||
import com.alipay.api.request.AlipayFundTransToaccountTransferRequest;
|
||||
import com.alipay.api.request.AlipayTradePagePayRequest;
|
||||
import com.alipay.api.response.AlipayFundTransToaccountTransferResponse;
|
||||
import com.alipay.api.response.AlipayTradePagePayResponse;
|
||||
import doctor.AlipayConfigProperties;
|
||||
import doctor.common.core.domain.HealthR;
|
||||
import doctor.common.security.service.TokenService;
|
||||
import doctor.domain.dto.UserArchivesDto;
|
||||
import doctor.domain.dto.UserTaskRecordDto;
|
||||
import doctor.domain.entity.*;
|
||||
import doctor.domain.vo.*;
|
||||
import doctor.mapper.UserVideoMapper;
|
||||
import doctor.model.TradePayModel;
|
||||
import doctor.service.UserVideoService;
|
||||
import doctor.system.api.domain.Doctor;
|
||||
import doctor.system.api.model.LoginUser;
|
||||
import doctor.util.ConvertUtil;
|
||||
import doctor.util.OssUtil;
|
||||
import lombok.extern.log4j.Log4j2;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.web.bind.annotation.RequestHeader;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
import java.util.UUID;
|
||||
|
||||
/**
|
||||
* @ClassName : UserVideoServiceImpl
|
||||
|
@ -19,10 +42,20 @@ import java.util.List;
|
|||
* @Date: 2024-01-10 14:34
|
||||
*/
|
||||
@Service
|
||||
@Log4j2
|
||||
public class UserVideoServiceImpl implements UserVideoService {
|
||||
@Autowired
|
||||
private UserVideoMapper userVideoMapper;
|
||||
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
@Autowired
|
||||
private HttpServletResponse response;
|
||||
@Autowired
|
||||
private AlipayConfigProperties alipayConfigProperties;
|
||||
@Autowired
|
||||
private AlipayClient alipayClient;
|
||||
|
||||
@Override
|
||||
public List<UserVideoCollectionVo> findVideoCollectionList(Integer userId) {
|
||||
|
@ -75,10 +108,6 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
userVideoMapper.addUserArchives(userArchivesEntity,userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void uploadUserArchivesImg(Integer id) {
|
||||
userVideoMapper.uploadUserArchivesImg(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserDoctorFollowVo> findUserDoctorFollowList() {
|
||||
|
@ -100,6 +129,119 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
return userEntityList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserVo> getUserInfoById(Integer userId) {
|
||||
List<UserEntity> userEntities=userVideoMapper.getUserInfoById(userId);
|
||||
List<UserVo> userVos = ConvertUtil.entityToVoList(userEntities, UserVo.class);
|
||||
return userVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addSign() {
|
||||
// userVideoMapper.addSign(signEntity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void perfectUserInfo(Integer age, Integer height, Integer weight, Integer userId) {
|
||||
userVideoMapper.perfectUserInfo(age,height,weight,userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUserSex(Integer sex, Integer userId) {
|
||||
userVideoMapper.updateUserSex(sex,userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifyNickName(String nickName, Integer userId) {
|
||||
userVideoMapper.modifyNickName(nickName,userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SystemNoticeEntity> findSystemNoticeList() {
|
||||
List<SystemNoticeEntity> systemNoticeEntities=userVideoMapper.findSystemNoticeList();
|
||||
return systemNoticeEntities;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<InquiryNoticeVo> findInquiryNoticeList(Integer userId) {
|
||||
List<InquiryRecordEntity> inquiryRecordEntities=userVideoMapper.findInquiryNoticeList(userId);
|
||||
List<InquiryNoticeVo> inquiryNoticeVos = ConvertUtil.entityToVoList(inquiryRecordEntities, InquiryNoticeVo.class);
|
||||
return inquiryNoticeVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<HealthyCurrencyNoticeListVo> findHealthyCurrencyNoticeList(Integer userId) {
|
||||
List<UserWalletEntity> healthyCurrencyNoticeEntities=userVideoMapper.findHealthyCurrencyNoticeList(userId);
|
||||
List<HealthyCurrencyNoticeListVo> healthyCurrencyNoticeListVos = ConvertUtil.entityToVoList(healthyCurrencyNoticeEntities, HealthyCurrencyNoticeListVo.class);
|
||||
return healthyCurrencyNoticeListVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserNoticeReadNumVo> findUserNoticeReadNum(Integer userId) {
|
||||
List<SystemNoticeEntity> userNoticeReadNumEntities=userVideoMapper.findUserNoticeReadNum(userId);
|
||||
List<UserNoticeReadNumVo> userNoticeReadNumVos = ConvertUtil.entityToVoList(userNoticeReadNumEntities, UserNoticeReadNumVo.class);
|
||||
return userNoticeReadNumVos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void modifyAllStatus(Integer userId) {
|
||||
userVideoMapper.modifyAllStatus(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HealthR uploadUserArchivesImg(MultipartFile imagePic, String sessionId, Integer id) {
|
||||
String s = OssUtil.uploadMultipartFile(imagePic);
|
||||
userVideoMapper.uploadUserArchivesImg(id,s);
|
||||
LoginUser loginUser = tokenService.getLoginUser(sessionId);
|
||||
Doctor doctor = loginUser.getDoctor();
|
||||
doctor.setImagePic(s);
|
||||
tokenService.createToken(loginUser);
|
||||
return HealthR.ok(s);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String Pay(BigDecimal money,Integer userId) {
|
||||
// 设置支付宝请求参数
|
||||
AlipayTradePagePayRequest alipayRequest = new AlipayTradePagePayRequest();
|
||||
|
||||
// 设置返回页面的URL,用户支付成功后会跳转到这个URL
|
||||
alipayRequest.setReturnUrl(alipayConfigProperties.getReturnUrl());
|
||||
|
||||
// 设置异步通知的URL,支付宝会向这个URL发送支付结果通知
|
||||
alipayRequest.setNotifyUrl(alipayConfigProperties.getNotifyUrl());
|
||||
|
||||
// 构建业务参数,使用TradePayModel封装支付信息
|
||||
alipayRequest.setBizContent(TradePayModel.builder()
|
||||
.outTradeNo(UUID.randomUUID().toString().replaceAll("-", "")) // 生成商户订单号
|
||||
.totalAmount(money) // 设置订单总金额
|
||||
.subject("H币充值") // 设置订单标题
|
||||
.body("APP内虚拟货币") // 设置订单描述
|
||||
.productCode("FAST_INSTANT_TRADE_PAY") // 设置产品码,FAST_INSTANT_TRADE_PAY表示快速支付
|
||||
.build()
|
||||
.toJsonStr()); // 将TradePayModel转换为JSON字符串并设置到业务参数
|
||||
|
||||
try {
|
||||
// 调用支付宝SDK发起支付请求
|
||||
AlipayTradePagePayResponse alipayTradeRefundResponse = alipayClient.pageExecute(alipayRequest);
|
||||
|
||||
// 打印请求成功的日志信息
|
||||
log.info("请求成功: {}", alipayTradeRefundResponse);
|
||||
log.info("请求成功: {}", alipayTradeRefundResponse.getBody());
|
||||
|
||||
// 设置响应的Content-Type为text/html;charset=UTF-8
|
||||
response.setContentType("text/html;charset=UTF-8");
|
||||
|
||||
//修改金额
|
||||
userVideoMapper.updateUserWallet(money,userId);
|
||||
// 返回支付宝支付页面的HTML代码,用户浏览器将自动跳转到支付宝页面进行支付
|
||||
return alipayTradeRefundResponse.getBody();
|
||||
|
||||
} catch (AlipayApiException e) {
|
||||
// 处理支付宝API异常,抛出运行时异常
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<UserVideoBuyVo> findUserVideoBuyList() {
|
||||
|
@ -114,9 +256,78 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<UserWalletEntity> findUserWallet() {
|
||||
return userVideoMapper.findUserWallet();
|
||||
public Integer findUserWallet(Integer userId) {
|
||||
return userVideoMapper.findUserWallet(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawCash(Integer userId, BigDecimal money) {
|
||||
AlipayConfigProperties alipayConfigProperties1 = new AlipayConfigProperties();
|
||||
//构造client
|
||||
CertAlipayRequest certAlipayRequest = new CertAlipayRequest();
|
||||
// 设置网关地址
|
||||
certAlipayRequest.setServerUrl(alipayConfigProperties1.getGatewayUrl());
|
||||
//设置应用AppId
|
||||
certAlipayRequest.setAppId(alipayConfigProperties1.getAppId());
|
||||
//设置应用私钥
|
||||
certAlipayRequest.setPrivateKey(alipayConfigProperties1.getMerchantPrivateKey());
|
||||
|
||||
// 设置字符集
|
||||
certAlipayRequest.setCharset(alipayConfigProperties1.getCharset());
|
||||
// 设置签名类型
|
||||
certAlipayRequest.setSignType(alipayConfigProperties1.getSignType());
|
||||
// // 设置应用公钥证书路径
|
||||
// certAlipayRequest.setCertPath(alipayConfigProperties1.);
|
||||
// // 设置支付宝公钥证书路径
|
||||
// certAlipayRequest.setAlipayPublicCertPath(basePath + AliPayConfig.ALIPAY_CERT_PATH);
|
||||
// // 设置支付宝根证书路径
|
||||
// certAlipayRequest.setRootCertPath(basePath + AliPayConfig.ALIPAY_ROOT_CERT_PATH);
|
||||
// 构造client
|
||||
AlipayClient alipayClient = null;
|
||||
try {
|
||||
alipayClient = new DefaultAlipayClient(certAlipayRequest);
|
||||
} catch (AlipayApiException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
//请求对象
|
||||
AlipayFundTransToaccountTransferRequest request = new AlipayFundTransToaccountTransferRequest();
|
||||
// 设置请求参数
|
||||
AlipayFundTransToaccountTransferModel model = new AlipayFundTransToaccountTransferModel();
|
||||
// 金额
|
||||
model.setAmount(String.valueOf(money));
|
||||
// // 商户单号 订单id
|
||||
// model.setOutBizNo(wOrderNumber);
|
||||
// 收款方支付宝账号
|
||||
// model.setPayeeAccount(zfbName);
|
||||
// // 收款方姓名
|
||||
// model.setPayeeRealName(name);
|
||||
// 收款方账户类型
|
||||
model.setPayeeType("ALIPAY_LOGONID");
|
||||
// 备注
|
||||
model.setRemark("用户提现");
|
||||
// 设置请求参数
|
||||
request.setBizModel(model);
|
||||
AlipayFundTransToaccountTransferResponse response = null;
|
||||
try {
|
||||
response = alipayClient.certificateExecute(request);
|
||||
if (response.isSuccess()) {
|
||||
if ("10000".equals(response.getCode())) {
|
||||
/**
|
||||
* 转账成功 这里写自己的业务代码
|
||||
* */
|
||||
userVideoMapper.updateUserWallet1(money,userId);
|
||||
}
|
||||
}
|
||||
} catch (AlipayApiException e) {
|
||||
System.out.println("转账失败");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SickCircleCommentVo> findSickCircleCommentList(Integer userId) {
|
||||
List<SickCircleCommentEntity> sickCircleCommentEntities = userVideoMapper.findSickCircleCommentList(userId);
|
||||
List<SickCircleCommentVo> sickCircleCommentVos = ConvertUtil.entityToVoList(sickCircleCommentEntities, SickCircleCommentVo.class);
|
||||
return sickCircleCommentVos;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,23 +34,23 @@ public class VideoServiceImpl implements VideoService {
|
|||
videoMapper.updateVideoCount(videoCount);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void videoBuy(Integer videoId,Integer price) {
|
||||
//获取用户id
|
||||
String token = request.getHeader("token");
|
||||
Integer userId = Integer.valueOf(JwtUtils.getUserId(token));
|
||||
//查询用户信息
|
||||
UserEntity user = videoMapper.FindById(userId);
|
||||
//查询用户钱包
|
||||
UserWalletEntity userWallet = videoMapper.FindUserWallet(user.getId());
|
||||
//判断用户钱包是否足够
|
||||
if (userWallet.getBalance() >= price) {
|
||||
//更新用户钱包
|
||||
int newblance = userWallet.getBalance() -price;
|
||||
//更新用户钱包
|
||||
videoMapper.updateUserWallet(newblance, userWallet.getId());
|
||||
}
|
||||
}
|
||||
// @Override
|
||||
// public void videoBuy(Integer videoId,Integer price) {
|
||||
// //获取用户id
|
||||
// String token = request.getHeader("token");
|
||||
// Integer userId = Integer.valueOf(JwtUtils.getUserId(token));
|
||||
// //查询用户信息
|
||||
// UserEntity user = videoMapper.FindById(userId);
|
||||
// //查询用户钱包
|
||||
// UserWalletEntity userWallet = videoMapper.FindUserWallet(user.getId());
|
||||
// //判断用户钱包是否足够
|
||||
// if (userWallet.getBalance() >= price) {
|
||||
// //更新用户钱包
|
||||
// int newblance = userWallet.getBalance() -price;
|
||||
// //更新用户钱包
|
||||
// videoMapper.updateUserWallet(newblance, userWallet.getId());
|
||||
// }
|
||||
// }
|
||||
|
||||
@Override
|
||||
public List<VideoCommentVo> findVideoCommentList(Integer videoId) {
|
||||
|
@ -64,5 +64,13 @@ public class VideoServiceImpl implements VideoService {
|
|||
videoMapper.addVideoComment(userId, sessionId, videoId, content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void videoBuy(Integer userId, Integer videoId, Integer price) {
|
||||
//获取用户id
|
||||
UserEntity user =videoMapper.FindByUserId(userId);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,169 @@
|
|||
//package doctor.text;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSON;
|
||||
//import com.alibaba.fastjson.JSONObject;
|
||||
//import doctor.common.core.utils.StringUtils;
|
||||
//import doctor.domain.vo.TestUserVo;
|
||||
//import doctor.service.UserService;
|
||||
//import doctor.service.impl.UserServiceImpl;
|
||||
//import org.slf4j.Logger;
|
||||
//import org.slf4j.LoggerFactory;
|
||||
//import org.springframework.context.ApplicationContext;
|
||||
//import org.springframework.data.redis.core.RedisTemplate;
|
||||
//import org.springframework.stereotype.Component;
|
||||
//
|
||||
//import javax.websocket.*;
|
||||
//import javax.websocket.server.PathParam;
|
||||
//import javax.websocket.server.ServerEndpoint;
|
||||
//import java.util.LinkedList;
|
||||
//import java.util.List;
|
||||
//import java.util.Map;
|
||||
//import java.util.concurrent.ConcurrentHashMap;
|
||||
//import java.util.concurrent.TimeUnit;
|
||||
//
|
||||
///**
|
||||
// * @author websocket服务
|
||||
// */
|
||||
//@ServerEndpoint(value = "/imserver/{userId}")
|
||||
//@Component
|
||||
//public class WebSocketServer {
|
||||
//
|
||||
//
|
||||
// private static UserService userService;
|
||||
//
|
||||
// private static RedisTemplate redisTemplate;
|
||||
//
|
||||
// public static void setUserService(ApplicationContext context){
|
||||
// userService = context.getBean(UserServiceImpl.class);
|
||||
// redisTemplate = (RedisTemplate) context.getBean("redisTemplate");
|
||||
// }
|
||||
//
|
||||
//
|
||||
// private static final Logger log = LoggerFactory.getLogger(WebSocketServer.class);
|
||||
// /**
|
||||
// * 记录当前在线连接数
|
||||
// */
|
||||
// public static final Map<String, Session> sessionMap = new ConcurrentHashMap<>();
|
||||
// /**
|
||||
// * 连接建立成功调用的方法
|
||||
// */
|
||||
// // 当前用户
|
||||
// private TestUserVo userVo;
|
||||
// // 连接上服务端触发的方法
|
||||
// @OnOpen
|
||||
// public void onOpen(Session session, @PathParam("userId") String userId) {
|
||||
// if (StringUtils.hasText(userId)){
|
||||
// // 加入新用户
|
||||
// if (sessionMap.containsKey(userId)){
|
||||
// sessionMap.remove(userId);
|
||||
// }
|
||||
// sessionMap.put(userId, session);
|
||||
// this.userVo = userService.findById(Long.valueOf(userId));
|
||||
// // 统计所有在线用户
|
||||
// List<TestUserVo> list = new LinkedList<>();
|
||||
// sessionMap.forEach((userId1,session1) -> {
|
||||
// TestUserVo userVo = userService.findById(Long.valueOf(userId1));
|
||||
// list.add(userVo);
|
||||
// });
|
||||
// try {
|
||||
// // 发送给所有在线的用户,更新在线人数
|
||||
// sendAllMessage(JSON.toJSONString(list));
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// log.info("有新用户加入,userId={}, 当前在线人数为:{}", userId, sessionMap.size());
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// /**
|
||||
// * 连接关闭调用的方法
|
||||
// */
|
||||
// @OnClose
|
||||
// public void onClose(Session session, @PathParam("userId") String userId) {
|
||||
// sessionMap.remove(userId);
|
||||
// // 统计所有在线用户
|
||||
// List<TestUserVo> list = new LinkedList<>();
|
||||
// sessionMap.forEach((userId1,session1) -> {
|
||||
// TestUserVo userVo = userService.findById(Long.valueOf(userId1));
|
||||
// list.add(userVo);
|
||||
// });
|
||||
// sendAllMessage(JSON.toJSONString(list));
|
||||
// log.info("有一连接关闭,移除userId={}的用户session, 当前在线人数为:{}", userId, sessionMap.size());
|
||||
// }
|
||||
// /**
|
||||
// * 收到客户端消息后调用的方法
|
||||
// * 后台收到客户端发送过来的消息
|
||||
// * onMessage 是一个消息的中转站
|
||||
// * 接受 浏览器端 socket.send 发送过来的 json数据
|
||||
// * @param message 客户端发送过来的消息
|
||||
// */
|
||||
// @OnMessage
|
||||
// public void onMessage(String message, Session session, @PathParam("userId") String userId) {
|
||||
// userVo = userService.findById(Long.valueOf(userId));
|
||||
// log.info("服务端收到用户username={},id={}的消息:{}", userVo.getNickName(),userId, message);
|
||||
// // 解析消息
|
||||
// JSONObject jsonObject1 = JSON.parseObject(message);
|
||||
// String toUserId = jsonObject1.getString("toUserId");
|
||||
// String text = jsonObject1.getString("text");
|
||||
// // 判断是给指定人发,还是群发
|
||||
// if (StringUtils.hasText(toUserId)){
|
||||
// // {"to": "admin", "text": "聊天文本"}
|
||||
// Session toSession = sessionMap.get(toUserId); // 根据 to用户名来获取 session,再通过session发送消息文本
|
||||
// if (toSession != null) {
|
||||
// // 服务器端 再把消息组装一下,组装后的消息包含发送人和发送的文本内容
|
||||
// // {"from": "zhang", "text": "hello"}
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("fromUser",userVo);
|
||||
// jsonObject.put("toUser",userService.findById(Long.valueOf(toUserId)));
|
||||
// jsonObject.put("text",text);
|
||||
// this.sendMessage(jsonObject.toJSONString(), toSession);
|
||||
// log.info("发送给用户userId={},消息:{}", toUserId, jsonObject.toJSONString());
|
||||
// } else {
|
||||
// log.info("发送失败,未找到用户username={}的session", toUserId);
|
||||
// }
|
||||
// }else{
|
||||
// JSONObject jsonObject = new JSONObject();
|
||||
// jsonObject.put("fromUser",userVo);
|
||||
// jsonObject.put("text",text);
|
||||
// this.sendAllMessage(jsonObject.toJSONString());
|
||||
// // 将消息存入redis
|
||||
// redisTemplate.opsForList().rightPush("messageList",jsonObject.toJSONString());
|
||||
// redisTemplate.expire("messageList",60*60, TimeUnit.SECONDS); // 过期时间
|
||||
//
|
||||
// log.info("发送给所有用户,消息:{}", toUserId, jsonObject.toJSONString());
|
||||
//
|
||||
// }
|
||||
// }
|
||||
// @OnError
|
||||
// public void onError(Session session, Throwable error) {
|
||||
// log.error("发生错误");
|
||||
// error.printStackTrace();
|
||||
// }
|
||||
// /**
|
||||
// * 服务端发送消息给客户端
|
||||
// */
|
||||
// private void sendMessage(String message, Session toSession) {
|
||||
// try {
|
||||
// log.info("服务端给客户端[{}]发送消息{}", toSession.getId(), message);
|
||||
// toSession.getBasicRemote().sendText(message);
|
||||
// } catch (Exception e) {
|
||||
// log.error("服务端发送消息给客户端失败", e);
|
||||
// }
|
||||
// }
|
||||
// /**
|
||||
// * 服务端发送消息给所有客户端
|
||||
// */
|
||||
// private void sendAllMessage(String message) {
|
||||
// try {
|
||||
// for (Session session : sessionMap.values()) {
|
||||
// log.info("服务端给客户端[{}]发送消息{}", session.getId(), message);
|
||||
// session.getBasicRemote().sendText(message);
|
||||
//
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// log.error("服务端发送消息给客户端失败", e);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//
|
||||
//
|
|
@ -29,7 +29,7 @@ spring:
|
|||
host: smtp.qq.com
|
||||
port: 587
|
||||
username: 3581044601@qq.com
|
||||
password: bwscqgqpkagjciih
|
||||
password: jwxhwyxfaznhdaae
|
||||
default-encoding: UTF8
|
||||
properties:
|
||||
mail:
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
<select id="list" resultType="doctor.domain.entity.DiseaseCategory">
|
||||
select *from disease_category where department_id=#{departmentId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -5,8 +5,14 @@
|
|||
<mapper namespace="doctor.mapper.DoctorMapper">
|
||||
|
||||
|
||||
<!-- <select id="findDoctorList" resultType="doctor.domain.entity.DoctorEntity">-->
|
||||
<!-- select *-->
|
||||
<!-- from doctor where department_id = #{deptId}-->
|
||||
<!-- </select>-->
|
||||
<!-- <select id="findDoctorList" resultType="doctor.domain.entity.DoctorEntity">-->
|
||||
<!-- select * from doctor where department_id = #{deptId}-->
|
||||
<!-- </select>-->
|
||||
<select id="findDoctorList" resultType="doctor.domain.entity.DoctorEntity">
|
||||
select *
|
||||
from doctor where department_id = #{deptId}
|
||||
select * from doctor where department_id = #{deptId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
<update id="updDoctorImgPicBuyId">
|
||||
update doctor set image_pic=#{s} where id=#{doctorId}
|
||||
</update>
|
||||
<update id="upImagePicByDoctorId">
|
||||
update doctor set image_pic=#{imagePic} where id=#{doctorId}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="findJobTitleList" resultType="doctor.domain.entity.DoctorJobTitleEntity">
|
||||
|
@ -35,6 +38,20 @@
|
|||
select * from doctor_income_record where doctor_id=#{doctorId}
|
||||
</select>
|
||||
<select id="findDoctorNoticeReadNum" resultType="doctor.domain.entity.doctorSystemNoticeEntity">
|
||||
SELECT COUNT(id) num,notice_type FROM doctor_system_notice where receive_doctor_id=#{doctorId} and status=2 GROUP BY notice_type
|
||||
SELECT
|
||||
m.notice_type,
|
||||
COALESCE(COUNT(n.notice_type), 0) AS num
|
||||
FROM
|
||||
(
|
||||
SELECT DISTINCT notice_type
|
||||
FROM doctor_system_notice
|
||||
) m
|
||||
LEFT JOIN
|
||||
doctor_system_notice n ON m.notice_type = n.notice_type AND n.status = 2
|
||||
GROUP BY
|
||||
m.notice_type;
|
||||
</select>
|
||||
<select id="findDoctorSystemNoticeList" resultType="doctor.domain.entity.DoctorSystemReplyEntity">
|
||||
select * from doctor_system_reply
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -3,10 +3,73 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="doctor.mapper.InquiryMapper">
|
||||
<insert id="consultDoctor">
|
||||
insert into inquiry_record(
|
||||
user_id,
|
||||
doctor_id,
|
||||
status,
|
||||
show_status,
|
||||
inquiry_time,
|
||||
create_time
|
||||
)values (
|
||||
#{userId},
|
||||
#{doctorId},
|
||||
1,
|
||||
1,
|
||||
now(),
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
<insert id="followDoctor">
|
||||
insert into user_doctor_follow (doctor_id, user_id, create_time)values (#{doctorId}, #{userId}, #{createTime})
|
||||
</insert>
|
||||
<insert id="addDoctorAskCount">
|
||||
insert into doctor_ask_count (doctor_id, number, create_time)
|
||||
values (#{doctorId}, #{number}, #{createTime})
|
||||
</insert>
|
||||
<update id="endInquiry">
|
||||
update inquiry_record set status = 2 where id = #{recordId}
|
||||
</update>
|
||||
<update id="updDoctorAskCount">
|
||||
update doctor_ask_count
|
||||
set number = #{number},
|
||||
update_time = #{updateTime}
|
||||
where doctor_id = #{doctorId}
|
||||
</update>
|
||||
<delete id="delCancelFollow">
|
||||
delete from user_doctor_follow where doctor_id = #{doctorId} and user_id = #{userId}
|
||||
</delete>
|
||||
|
||||
|
||||
<select id="findHistoryInquiryRecord" resultType="doctor.domain.entity.InquiryDetailsRecordEntity">
|
||||
select *
|
||||
from inquiry_details_record
|
||||
</select>
|
||||
<select id="findDoctorUserNameByDoctorId" resultType="java.lang.String">
|
||||
select user_name from doctor where department_id=#{doctorId}
|
||||
</select>
|
||||
<select id="findDoctorInfo" resultType="doctor.domain.vo.DoctorVo">
|
||||
select * from doctor where department_id=#{doctorId}
|
||||
</select>
|
||||
<select id="findInquiryRecordById" resultType="doctor.domain.entity.InquiryRecordEntity">
|
||||
SELECT inquiry_record.id as id,
|
||||
inquiry_record.user_id as userId,
|
||||
inquiry_record.doctor_id as doctorId,
|
||||
inquiry_record.status as status,
|
||||
inquiry_record.inquiry_time as inquiryTime,
|
||||
inquiry_record.create_time as createTime
|
||||
FROM inquiry_record
|
||||
WHERE inquiry_record.id = #{recordId}
|
||||
and inquiry_record.status = #{status}
|
||||
ORDER BY inquiry_record.create_time DESC LIMIT 1
|
||||
</select>
|
||||
<select id="getDoctorAskCount" resultType="doctor.domain.entity.DoctorAskCount">
|
||||
SELECT
|
||||
doctor_ask_count.doctor_id as doctorId,
|
||||
doctor_ask_count.number as number,
|
||||
doctor_ask_count.update_time as updateTime,
|
||||
doctor_ask_count.create_time as createTime
|
||||
FROM doctor_ask_count
|
||||
WHERE doctor_ask_count.doctor_id = #{doctorId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -5,7 +5,14 @@
|
|||
<mapper namespace="doctor.mapper.InquiryVerifyServiceMapper">
|
||||
|
||||
|
||||
<select id="findInquiryRecordList" resultType="doctor.domain.vo.InquiryRecordVo">
|
||||
|
||||
<select id="findHistoryInquiryRecord" resultType="doctor.domain.entity.InquiryDetailsRecord">
|
||||
select * from inquiry_details_record where doctor_id = #{doctorId}
|
||||
</select>
|
||||
<select id="findUserByIds" resultType="doctor.domain.entity.UserEntity">
|
||||
select * from user_entity where id in
|
||||
<foreach collection="split" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -28,14 +28,36 @@
|
|||
SELECT sick_circle.*,department.department_name department FROM sick_circle LEFT JOIN department on sick_circle.department_id=department.id
|
||||
WHERE sick_circle.sick_circle_id=#{id}
|
||||
</select>
|
||||
|
||||
<select id="findSickCircleCommentList" resultType="doctor.domain.entity.SickCommentEntity">
|
||||
select * from sick_circle_comment where sick_circle_id=#{sickCircleId}
|
||||
SELECT
|
||||
sick_circle_comment.content,
|
||||
sick_circle_comment.create_time,
|
||||
sick_circle_comment.patient_user_id,
|
||||
sick_circle_comment.whether_doctor,
|
||||
sick_circle_comment_count.comment_id as commentUserId,
|
||||
sick_circle_comment_count.oppose_num,
|
||||
sick_circle_comment_count.support_num,
|
||||
sick_circle_comment_view.opinion ,
|
||||
`user`.head_pic
|
||||
FROM
|
||||
sick_circle_comment
|
||||
LEFT JOIN sick_circle_comment_count ON sick_circle_comment.patient_user_id = sick_circle_comment_count.comment_id
|
||||
LEFT JOIN sick_circle_comment_view ON sick_circle_comment.patient_user_id = sick_circle_comment_view.comment_id
|
||||
LEFT JOIN `user` on sick_circle_comment_view.user_id=`user`.id
|
||||
WHERE
|
||||
sick_circle_comment.sick_circle_id =#{sickCircleId}
|
||||
</select>
|
||||
|
||||
<select id="searchSickCircle" resultType="doctor.domain.entity.SickCircleEntity">
|
||||
select sick_circle_id , `user_id`, `title`, `department_id`, `adopt_comment_id`, `disease`, `detail`, `treatment_hospital`, `treatment_start_time`, `treatment_end_time`, `treatment_process`, `picture`, `release_time`, `adopt_time`, `amount`, `create_time`, `collection_num`, `comment_num`
|
||||
from sick_circle where
|
||||
|
||||
disease like '%${keyWord}%';
|
||||
from sick_circle where disease like '%${keyWord}%' or title like '%${keyWord}%' or detail like '%${keyWord}%';
|
||||
|
||||
</select>
|
||||
|
||||
<select id="findPatientSickCircleList" resultType="doctor.domain.entity.SickCircleEntity">
|
||||
select sick_circle_id , `user_id`, `title`, `department_id`, `adopt_comment_id`, `disease`, `detail`, `treatment_hospital`, `treatment_start_time`, `treatment_end_time`, `treatment_process`, `picture`, `release_time`, `adopt_time`, `amount`, `create_time`, `collection_num`, `comment_num`
|
||||
from sick_circle where user_id=#{patientUserId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -3,6 +3,21 @@
|
|||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="doctor.mapper.SickCircleMapper">
|
||||
<update id="jia">
|
||||
update sick_circle_comment_count set support_num = support_num + 1 where comment_id=#{commentId}
|
||||
</update>
|
||||
|
||||
<update id="jian">
|
||||
update sick_circle_comment_count set support_num = support_num - 1 where comment_id=#{commentId}
|
||||
</update>
|
||||
|
||||
<update id="jiann">
|
||||
update sick_circle_comment_count set oppose_num = oppose_num - 1 where comment_id=#{commentId}
|
||||
</update>
|
||||
|
||||
<update id="jiaa">
|
||||
update sick_circle_comment_count set oppose_num = oppose_num + 1 where comment_id=#{commentId}
|
||||
</update>
|
||||
|
||||
|
||||
<select id="findSickCircleList" resultType="doctor.domain.entity.SickCircleEntity">
|
||||
|
@ -21,7 +36,23 @@
|
|||
</insert>
|
||||
|
||||
<insert id="publishComment">
|
||||
INSERT INTO `doctor`.`sick_circle_comment` ( `sick_circle_id`, `user_id`, `content`, `comment_time`, `whether_doctor`, `create_time`)
|
||||
INSERT INTO `doctor`.`sick_circle_comment` ( `sick_circle_id`, `patient_user_id`, `content`, `comment_time`, `whether_doctor`, `create_time`)
|
||||
VALUES (#{sickCircleId},#{userid},#{content},now(),1,now())
|
||||
</insert>
|
||||
|
||||
<insert id="expressOpinion">
|
||||
UPDATE sick_circle_comment_view set opinion=#{opinion} ,user_id=#{userid} WHERE comment_id=#{commentId}
|
||||
</insert>
|
||||
|
||||
<insert id="ins">
|
||||
INSERT INTO `doctor`.`sick_circle_comment_count` ( `comment_id`, `support_num`, `oppose_num`, `create_time`)
|
||||
VALUES (#{sickCircleId},0,0,now());
|
||||
|
||||
</insert>
|
||||
<insert id="inss">
|
||||
INSERT INTO `doctor`.`sick_circle_comment_view` ( `comment_id`, `user_id`, `opinion`, `create_time`)
|
||||
VALUES (#{sickCircleId},#{userid},0,now());
|
||||
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
select *
|
||||
from user_sick_circle
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -30,11 +30,60 @@ create_time
|
|||
now()
|
||||
);
|
||||
</insert>
|
||||
<!-- <insert id="addSign">-->
|
||||
<!-- insert into sign (-->
|
||||
<!-- user_id,-->
|
||||
<!--sign_time,-->
|
||||
<!--sign_num,-->
|
||||
<!--sign_reward,-->
|
||||
<!--create_time-->
|
||||
|
||||
<!-- )-->
|
||||
<!-- values (-->
|
||||
<!-- #{userId},-->
|
||||
<!-- now(),-->
|
||||
<!-- sign_num+1,-->
|
||||
<!-- #{signReward},-->
|
||||
<!-- now()-->
|
||||
<!-- );-->
|
||||
<!-- </insert>-->
|
||||
<update id="uploadUserArchivesImg">
|
||||
update user_archives
|
||||
set picture = #{picture}
|
||||
set picture = #{s}
|
||||
where id=#{id}
|
||||
</update>
|
||||
<update id="perfectUserInfo">
|
||||
update user
|
||||
set age = #{age},
|
||||
height = #{height},
|
||||
weight = #{weight}
|
||||
where id = #{userId}
|
||||
</update>
|
||||
<update id="updateUserSex">
|
||||
update user
|
||||
set sex = #{sex}
|
||||
where id = #{userId}
|
||||
</update>
|
||||
<update id="modifyNickName">
|
||||
update user
|
||||
set nick_name = #{nickName}
|
||||
where id = #{userId}
|
||||
</update>
|
||||
<update id="modifyAllStatus">
|
||||
update system_notice
|
||||
set status = 1
|
||||
where receive_user_id=#{userId}
|
||||
</update>
|
||||
<update id="updateUserWallet">
|
||||
update user_wallet
|
||||
set balance = balance + #{money}
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
<update id="updateUserWallet1">
|
||||
update user_wallet
|
||||
set balance = balance - #{money}
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
<delete id="cancelVideoCollection">
|
||||
delete
|
||||
from user_video_collection
|
||||
|
@ -52,10 +101,10 @@ create_time
|
|||
select *
|
||||
from user_video_buy
|
||||
</select>
|
||||
<select id="findUserWallet" resultType="doctor.domain.entity.UserWalletEntity">
|
||||
select *
|
||||
from user_wallet
|
||||
</select>
|
||||
<!-- <select id="findUserWallet" resultType="doctor.domain.entity.UserWalletEntity">-->
|
||||
<!-- select *-->
|
||||
<!-- from user_wallet where user_id=#{userId}-->
|
||||
<!-- </select>-->
|
||||
<select id="findUserConsumptionRecordList" resultType="doctor.domain.entity.UserConsumptionRecordEntity">
|
||||
select *
|
||||
from user_consumption_record
|
||||
|
@ -86,5 +135,41 @@ create_time
|
|||
select *
|
||||
from sign where user_id=#{userId}
|
||||
</select>
|
||||
<select id="getUserInfoById" resultType="doctor.domain.entity.UserEntity">
|
||||
select *
|
||||
from user where id=#{userId}
|
||||
</select>
|
||||
<select id="findSystemNoticeList" resultType="doctor.domain.entity.SystemNoticeEntity">
|
||||
select *
|
||||
from system_notice
|
||||
</select>
|
||||
<select id="findInquiryNoticeList" resultType="doctor.domain.entity.InquiryRecordEntity">
|
||||
select *
|
||||
from inquiry_record
|
||||
where user_id=#{userId}
|
||||
</select>
|
||||
<select id="findHealthyCurrencyNoticeList" resultType="doctor.domain.entity.UserWalletEntity">
|
||||
select *
|
||||
from user_wallet
|
||||
where user_id=#{userId}
|
||||
</select>
|
||||
<select id="findUserNoticeReadNum" resultType="doctor.domain.entity.SystemNoticeEntity">
|
||||
select *
|
||||
from system_notice
|
||||
where receive_user_id=#{userId}
|
||||
</select>
|
||||
<select id="findModifyAll" resultType="doctor.domain.entity.SystemNoticeEntity">
|
||||
select *
|
||||
from system_notice
|
||||
where receive_user_id=#{userId}
|
||||
</select>
|
||||
<select id="findUserWallet" resultType="java.lang.Integer">
|
||||
select balance
|
||||
from user_wallet where user_id=#{userId}
|
||||
</select>
|
||||
<select id="findSickCircleCommentList" resultType="doctor.domain.entity.SickCircleCommentEntity">
|
||||
select *
|
||||
from sick_circle_comment where patient_user_id=#{userId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -31,11 +31,6 @@
|
|||
set collection_num=collection_num + 1
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateUserWallet">
|
||||
update user_wallet
|
||||
set blance==#{newblance}
|
||||
where id=#{id}
|
||||
</update>
|
||||
|
||||
<select id="findById" resultType="doctor.domain.entity.VideoEntity">
|
||||
SELECT user_video_collection.*
|
||||
|
@ -63,6 +58,10 @@
|
|||
<select id="findVideoCommentList" resultType="doctor.domain.entity.VideoCommentEntity">
|
||||
select * from video_comment where video_id=#{videoId}
|
||||
</select>
|
||||
<select id="FindByUserId" resultType="doctor.domain.entity.UserEntity">
|
||||
select *
|
||||
from user where user_id=#{userId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -15,11 +15,11 @@ spring:
|
|||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 101.34.77.101:8848
|
||||
namespace: 9de208a6-cb30-41ae-a880-78196c99c050
|
||||
namespace: 7e1e997d-5fa4-4f84-9f48-3e0adf830a37
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
Loading…
Reference in New Issue