newMaster
parent
a41e75e9c4
commit
a334ab2fb8
|
@ -19,6 +19,25 @@
|
|||
|
||||
<dependencies>
|
||||
|
||||
<!-- <!– 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>
|
||||
|
|
|
@ -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
|
||||
*说明:
|
||||
*以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
*该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
|
||||
*/
|
|
@ -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;
|
||||
|
@ -55,9 +60,9 @@ public class UserVideoController {
|
|||
|
||||
//我的钱包
|
||||
@GetMapping("/findUserWallet")
|
||||
public HealthR<List<UserWalletEntity>> findUserWallet(@RequestHeader Integer userId){
|
||||
List<UserWalletEntity> userWallets = userVideoService.findUserWallet(userId);
|
||||
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));
|
||||
}
|
||||
|
||||
//用户关注医生列表
|
||||
|
@ -154,4 +162,60 @@ public class UserVideoController {
|
|||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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,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,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,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,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,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();
|
||||
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ 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;
|
||||
|
||||
/**
|
||||
|
@ -25,7 +26,7 @@ public interface UserVideoMapper {
|
|||
|
||||
void deleteVideoBuy(@Param("videoId") Integer videoId);
|
||||
|
||||
List<UserWalletEntity> findUserWallet(Integer userId);
|
||||
// Integer findUserWallet(@Param("userId") Integer userId);
|
||||
|
||||
List<UserConsumptionRecordEntity> findUserConsumptionRecordList();
|
||||
|
||||
|
@ -39,7 +40,7 @@ public interface UserVideoMapper {
|
|||
|
||||
void addUserArchives(UserArchivesEntity userArchivesEntity, @Param("userId") Integer userId);
|
||||
|
||||
void uploadUserArchivesImg(@Param("id") Integer id);
|
||||
|
||||
|
||||
|
||||
List<UserDoctorFollowEntity> findUserDoctorFollowList();
|
||||
|
@ -56,6 +57,30 @@ public interface UserVideoMapper {
|
|||
|
||||
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);
|
||||
|
||||
}
|
||||
|
|
|
@ -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,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,10 +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;
|
||||
|
||||
/**
|
||||
|
@ -22,7 +26,7 @@ public interface UserVideoService {
|
|||
|
||||
void deleteVideoBuy(Integer videoId);
|
||||
|
||||
List<UserWalletEntity> findUserWallet(Integer userId);
|
||||
|
||||
|
||||
List<UserVideoCollectionVo> findVideoCollectionList(Integer userId);
|
||||
|
||||
|
@ -40,7 +44,7 @@ public interface UserVideoService {
|
|||
|
||||
void addUserArchives(UserArchivesEntity userArchivesEntity, Integer userId);
|
||||
|
||||
void uploadUserArchivesImg(Integer id);
|
||||
|
||||
|
||||
List<UserDoctorFollowVo> findUserDoctorFollowList();
|
||||
|
||||
|
@ -57,4 +61,25 @@ public interface UserVideoService {
|
|||
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);
|
||||
}
|
||||
|
|
|
@ -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,17 +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
|
||||
|
@ -20,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) {
|
||||
|
@ -76,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() {
|
||||
|
@ -128,6 +156,92 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
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() {
|
||||
|
@ -142,9 +256,78 @@ public class UserVideoServiceImpl implements UserVideoService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<UserWalletEntity> findUserWallet(Integer userId) {
|
||||
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;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -8,4 +8,5 @@
|
|||
select *
|
||||
from user_sick_circle
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -49,7 +49,7 @@ create_time
|
|||
<!-- </insert>-->
|
||||
<update id="uploadUserArchivesImg">
|
||||
update user_archives
|
||||
set picture = #{picture}
|
||||
set picture = #{s}
|
||||
where id=#{id}
|
||||
</update>
|
||||
<update id="perfectUserInfo">
|
||||
|
@ -69,6 +69,21 @@ weight = #{weight}
|
|||
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
|
||||
|
@ -86,10 +101,10 @@ weight = #{weight}
|
|||
select *
|
||||
from user_video_buy
|
||||
</select>
|
||||
<select id="findUserWallet" resultType="doctor.domain.entity.UserWalletEntity">
|
||||
select *
|
||||
from user_wallet where user_id=#{userId}
|
||||
</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
|
||||
|
@ -124,5 +139,37 @@ weight = #{weight}
|
|||
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>
|
||||
|
|
Loading…
Reference in New Issue