├── img ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg └── 9.jpg ├── imgkkpay ├── 1.jpg ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.jpg ├── 7.jpg ├── 8.jpg └── 9.jpg ├── .gitignore ├── c2cpay-biz └── src │ └── main │ └── java │ └── com │ └── c2cpay │ ├── trade │ ├── vo │ │ ├── TradeOrderSubtotalVO.java │ │ ├── PreTradeOrderSubtotalVO.java │ │ ├── statistic │ │ │ ├── TradeStatisticDataVO.java │ │ │ └── EverydayTradeDataVO.java │ │ ├── AvailableTradeOrderVO.java │ │ ├── TradeOrderStateLogVO.java │ │ ├── MemberPreTradeOrderVO.java │ │ └── TradeRiskRecordVO.java │ ├── param │ │ ├── BuyerCancelTradeParam.java │ │ ├── SellerConfirmOrderParam.java │ │ ├── SellerRejectOrderParam.java │ │ ├── CancelPreTradeOrderParam.java │ │ ├── InitiatorCancelAppealParam.java │ │ ├── BuyerMarkPaidParam.java │ │ ├── SellerConfirmTradeCompletedParam.java │ │ ├── AppealProcessParam.java │ │ ├── TradeChatRecordQueryCondParam.java │ │ ├── CustomerServiceSendMsgParam.java │ │ ├── SendMsgParam.java │ │ ├── InitiateAppealParam.java │ │ ├── BuyParam.java │ │ ├── SellParam.java │ │ └── CreatePreTradeOrderParam.java │ ├── repo │ │ ├── statistic │ │ │ └── EverydayTradeDataRepo.java │ │ ├── PreTradeOrderRepo.java │ │ ├── TradeRiskRecordRepo.java │ │ ├── TradeChatRecordRepo.java │ │ ├── TradeAppealRecordRepo.java │ │ ├── TradeOrderStateLogRepo.java │ │ ├── TradeOrderRepo.java │ │ └── TradeChatUnreadRepo.java │ └── domain │ │ ├── statistic │ │ └── EverydayTradeData.java │ │ ├── TradeOrderStateLog.java │ │ ├── TradeChatUnread.java │ │ └── PreTradeOrder.java │ ├── transfer │ ├── vo │ │ ├── ReceiptSubtotalVO.java │ │ ├── TransferSubtotalVO.java │ │ ├── MerchantReceiptSubtotalVO.java │ │ ├── MerchantTransferSubtotalVO.java │ │ ├── statistic │ │ │ ├── MemberReceiptStatisticDataVO.java │ │ │ ├── MemberTransferStatisticDataVO.java │ │ │ ├── MerchantReceiptStatisticDataVO.java │ │ │ ├── MerchantTransferStatisticDataVO.java │ │ │ ├── MemberEverydayReceiptDataVO.java │ │ │ ├── MemberEverydayTransferDataVO.java │ │ │ ├── MerchantEverydayReceiptDataVO.java │ │ │ └── MerchantEverydayTransferDataVO.java │ │ ├── CreatePreReceiptReturnVO.java │ │ ├── MemberReceiptDetailVO.java │ │ ├── MemberTransferDetailVO.java │ │ ├── MemberReceiptRecordVO.java │ │ ├── MemberTransferRecordVO.java │ │ ├── MerchantTransferRecordVO.java │ │ ├── ReceiptRecordVO.java │ │ ├── PreReceiptOrderDetailVO.java │ │ ├── ExportMerchantTransferDataVO.java │ │ └── TransferRecordVO.java │ ├── param │ │ ├── LockPreReceiptOrderParam.java │ │ ├── PreReceiptTransferParam.java │ │ ├── TransferParam.java │ │ ├── PreReceiptParam.java │ │ ├── MerchantTransferParam.java │ │ ├── PreReceiptApiParam.java │ │ ├── MerchantTransferApiParam.java │ │ └── ReceiptAsynNoticeParam.java │ ├── repo │ │ ├── statistic │ │ │ ├── MemberEverydayReceiptDataRepo.java │ │ │ ├── MemberEverydayTransferDataRepo.java │ │ │ ├── MerchantEverydayReceiptDataRepo.java │ │ │ └── MerchantEverydayTransferDataRepo.java │ │ ├── MemberTransferRecordRepo.java │ │ ├── MerchantTransferRecordRepo.java │ │ ├── MemberReceiptRecordRepo.java │ │ └── MerchantReceiptRecordRepo.java │ └── domain │ │ └── statistic │ │ ├── MemberEverydayReceiptData.java │ │ ├── MemberEverydayTransferData.java │ │ ├── MerchantEverydayReceiptData.java │ │ └── MerchantEverydayTransferData.java │ ├── member │ ├── param │ │ ├── LoginParam.java │ │ ├── AddMemberParam.java │ │ ├── ModifyLoginPwdParam.java │ │ ├── ForgetLoginPwdParam.java │ │ ├── ModifyPayPwdParam.java │ │ ├── RegisterParam.java │ │ ├── MemberRegisterParam.java │ │ ├── UpdateMemberParam.java │ │ └── MemberQueryCondParam.java │ ├── vo │ │ ├── MemberStatisticDataVO.java │ │ ├── AccountAuthInfoVO.java │ │ ├── MemberSecurityInfoVO.java │ │ └── MemberFundInfoVO.java │ └── repo │ │ └── MemberRepo.java │ ├── merchant │ ├── vo │ │ ├── MerchantStatisticDataVO.java │ │ ├── AccountAuthInfoVO.java │ │ ├── MerchantInfoVO.java │ │ ├── MerchantFundInfoVO.java │ │ └── MerchantVO.java │ ├── param │ │ ├── ModifyPayPwdParam.java │ │ ├── ModifyLoginPwdParam.java │ │ ├── UpdateMerchantParam.java │ │ ├── AddMerchantParam.java │ │ └── MerchantQueryCondParam.java │ ├── repo │ │ └── MerchantRepo.java │ └── domain │ │ └── Merchant.java │ ├── notice │ ├── param │ │ ├── NoticeQueryCondParam.java │ │ └── AddOrUpdateNoticeParam.java │ ├── repo │ │ └── NoticeRepo.java │ ├── domain │ │ └── Notice.java │ └── vo │ │ ├── NoticeVO.java │ │ └── NoticeAbstractVO.java │ ├── backgroundaccount │ ├── param │ │ ├── AssignMenuParam.java │ │ ├── AssignRoleParam.java │ │ ├── BackgroundAccountQueryCondParam.java │ │ ├── BackgroundAccountEditParam.java │ │ ├── RoleParam.java │ │ ├── MenuParam.java │ │ └── AddBackgroundAccountParam.java │ ├── repo │ │ ├── RoleRepo.java │ │ ├── RoleMenuRepo.java │ │ ├── AccountRoleRepo.java │ │ ├── MenuRepo.java │ │ └── BackgroundAccountRepo.java │ ├── vo │ │ ├── AccountAuthInfoVO.java │ │ ├── RoleVO.java │ │ ├── SuperAdminVO.java │ │ ├── MenuVO.java │ │ └── BackgroundAccountVO.java │ └── domain │ │ ├── Role.java │ │ ├── Menu.java │ │ ├── BackgroundAccount.java │ │ ├── RoleMenu.java │ │ └── AccountRole.java │ ├── common │ ├── exception │ │ ├── BizError.java │ │ └── BizException.java │ ├── utils │ │ ├── IdUtils.java │ │ ├── RedisUtils.java │ │ └── ThreadPoolUtils.java │ ├── param │ │ └── PageParam.java │ ├── operlog │ │ └── OperLog.java │ ├── vo │ │ ├── TokenInfo.java │ │ └── PageResult.java │ ├── googleauth │ │ └── GoogleAuthInfoVO.java │ └── StpInterfaceImpl.java │ ├── storage │ ├── repo │ │ └── StorageRepo.java │ ├── vo │ │ └── StorageVO.java │ └── domain │ │ └── Storage.java │ ├── dictconfig │ ├── param │ │ ├── DictTypeQueryCondParam.java │ │ ├── UpdateDictDataParam.java │ │ ├── ConfigItemQueryCondParam.java │ │ ├── DictDataParam.java │ │ └── AddOrUpdateDictTypeParam.java │ ├── repo │ │ ├── DictTypeRepo.java │ │ └── DictItemRepo.java │ ├── domain │ │ ├── DictType.java │ │ └── DictItem.java │ ├── vo │ │ ├── DictItemVO.java │ │ └── DictTypeVO.java │ └── DictHolder.java │ ├── receiptpaymentinfo │ ├── param │ │ ├── UpdateActivatedFlagParam.java │ │ ├── ReceiptPaymentInfoQueryCondParam.java │ │ └── AddReceiptPaymentInfoParam.java │ ├── repo │ │ └── ReceiptPaymentInfoRepo.java │ ├── vo │ │ └── ReceiptPaymentInfoVO.java │ └── domain │ │ └── ReceiptPaymentInfo.java │ ├── setting │ ├── repo │ │ ├── SystemSettingRepo.java │ │ └── TradeRiskSettingRepo.java │ ├── vo │ │ ├── LatestAppInfoVO.java │ │ ├── SystemSettingVO.java │ │ └── TradeRiskSettingVO.java │ ├── param │ │ ├── SystemSettingParam.java │ │ └── TradeRiskSettingParam.java │ └── domain │ │ ├── SystemSetting.java │ │ └── TradeRiskSetting.java │ ├── dataclean │ └── param │ │ └── DataCleanParam.java │ ├── log │ ├── param │ │ ├── OperLogQueryCondParam.java │ │ └── LoginLogQueryCondParam.java │ ├── repo │ │ ├── OperLogRepo.java │ │ ├── LoginLogRepo.java │ │ ├── MemberBalanceChangeLogRepo.java │ │ └── MerchantBalanceChangeLogRepo.java │ ├── vo │ │ ├── MemberFinanceDetailVO.java │ │ ├── MemberFinanceRecordVO.java │ │ ├── OperLogVO.java │ │ ├── LoginLogVO.java │ │ ├── MemberBalanceChangeLogVO.java │ │ └── MerchantBalanceChangeLogVO.java │ ├── domain │ │ ├── OperLog.java │ │ └── LoginLog.java │ └── service │ │ └── MerchantBalanceChangeLogService.java │ └── sms │ ├── repo │ └── SmsSendRecordRepo.java │ ├── vo │ └── SmsSendRecordVO.java │ └── domain │ └── SmsSendRecord.java ├── c2cpay-member ├── src │ └── main │ │ ├── java │ │ └── com │ │ │ ├── c2cpay │ │ │ ├── PageController.java │ │ │ ├── config │ │ │ │ └── xss │ │ │ │ │ ├── XssStringJsonDeserializer.java │ │ │ │ │ ├── XssFilter.java │ │ │ │ │ ├── XssConfig.java │ │ │ │ │ └── XssHttpServletRequestWrapper.java │ │ │ ├── dictconfig │ │ │ │ └── controller │ │ │ │ │ └── DictConfigController.java │ │ │ ├── setting │ │ │ │ └── controller │ │ │ │ │ └── SettingController.java │ │ │ ├── member │ │ │ │ └── controller │ │ │ │ │ └── MemberBalanceChangeLogController.java │ │ │ └── notice │ │ │ │ └── controller │ │ │ │ └── NoticeController.java │ │ │ └── MemberApplication.java │ │ └── resources │ │ └── application.yml └── pom.xml ├── README.md └── pom.xml /img/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/1.jpg -------------------------------------------------------------------------------- /img/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/2.jpg -------------------------------------------------------------------------------- /img/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/3.jpg -------------------------------------------------------------------------------- /img/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/4.jpg -------------------------------------------------------------------------------- /img/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/5.jpg -------------------------------------------------------------------------------- /img/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/6.jpg -------------------------------------------------------------------------------- /img/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/7.jpg -------------------------------------------------------------------------------- /img/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/8.jpg -------------------------------------------------------------------------------- /img/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/img/9.jpg -------------------------------------------------------------------------------- /imgkkpay/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/1.jpg -------------------------------------------------------------------------------- /imgkkpay/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/2.jpg -------------------------------------------------------------------------------- /imgkkpay/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/3.jpg -------------------------------------------------------------------------------- /imgkkpay/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/4.jpg -------------------------------------------------------------------------------- /imgkkpay/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/5.jpg -------------------------------------------------------------------------------- /imgkkpay/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/6.jpg -------------------------------------------------------------------------------- /imgkkpay/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/7.jpg -------------------------------------------------------------------------------- /imgkkpay/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/8.jpg -------------------------------------------------------------------------------- /imgkkpay/9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/muyu8848/c2cpay/HEAD/imgkkpay/9.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .classpath 3 | .factorypath 4 | .project 5 | .settings 6 | .springBeans 7 | *.apk 8 | unpackage/ 9 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/TradeOrderSubtotalVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class TradeOrderSubtotalVO { 7 | 8 | private Double successAmount = 0d; 9 | 10 | private Integer successCount = 0; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/ReceiptSubtotalVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class ReceiptSubtotalVO { 7 | 8 | private Double successAmount = 0d; 9 | 10 | private Integer successCount = 0; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/TransferSubtotalVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class TransferSubtotalVO { 7 | 8 | private Double successAmount = 0d; 9 | 10 | private Integer successCount = 0; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/PreTradeOrderSubtotalVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class PreTradeOrderSubtotalVO { 7 | 8 | private Double totalAmount = 0d; 9 | 10 | private Double successAmount = 0d; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/MerchantReceiptSubtotalVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MerchantReceiptSubtotalVO { 7 | 8 | private Double successAmount = 0d; 9 | 10 | private Integer successCount = 0; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/MerchantTransferSubtotalVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MerchantTransferSubtotalVO { 7 | 8 | private Double successAmount = 0d; 9 | 10 | private Integer successCount = 0; 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/PageController.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | 6 | @Controller 7 | @RequestMapping("/page") 8 | public class PageController { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/LoginParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class LoginParam { 9 | 10 | @NotBlank 11 | private String mobile; 12 | 13 | @NotBlank 14 | private String loginPwd; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/vo/MemberStatisticDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MemberStatisticDataVO { 7 | 8 | private Integer accountCount = 0; 9 | 10 | private Integer realNameCount = 0; 11 | 12 | private Integer todayRegisterCount = 0; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/vo/MerchantStatisticDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MerchantStatisticDataVO { 7 | 8 | private Integer accountCount = 0; 9 | 10 | private Integer activeCount = 0; 11 | 12 | private Integer todayRegisterCount = 0; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/BuyerCancelTradeParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class BuyerCancelTradeParam { 9 | 10 | @NotBlank 11 | private String buyerId; 12 | 13 | @NotBlank 14 | private String tradeOrderId; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/SellerConfirmOrderParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class SellerConfirmOrderParam { 9 | 10 | @NotBlank 11 | private String tradeOrderId; 12 | 13 | @NotBlank 14 | private String sellerId; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/SellerRejectOrderParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class SellerRejectOrderParam { 9 | 10 | @NotBlank 11 | private String sellerId; 12 | 13 | @NotBlank 14 | private String tradeOrderId; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/CancelPreTradeOrderParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class CancelPreTradeOrderParam { 9 | 10 | @NotBlank 11 | private String memberId; 12 | 13 | @NotBlank 14 | private String preTradeOrderId; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/notice/param/NoticeQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.notice.param; 2 | 3 | import com.c2cpay.common.param.PageParam; 4 | 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | @Data 9 | @EqualsAndHashCode(callSuper = false) 10 | public class NoticeQueryCondParam extends PageParam { 11 | 12 | private String title; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/InitiatorCancelAppealParam.java: -------------------------------------------------------------------------------- 1 | 2 | package com.c2cpay.trade.param; 3 | 4 | import javax.validation.constraints.NotBlank; 5 | 6 | import lombok.Data; 7 | 8 | @Data 9 | public class InitiatorCancelAppealParam { 10 | 11 | @NotBlank 12 | private String initiatorId; 13 | 14 | @NotBlank 15 | private String tradeOrderId; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/LockPreReceiptOrderParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class LockPreReceiptOrderParam { 9 | 10 | @NotBlank 11 | private String transferAccountId; 12 | 13 | @NotBlank 14 | private String orderNo; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/param/AssignMenuParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.param; 2 | 3 | import java.util.List; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class AssignMenuParam { 11 | 12 | @NotBlank 13 | private String roleId; 14 | 15 | private List menuIds; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/statistic/TradeStatisticDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo.statistic; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class TradeStatisticDataVO { 7 | 8 | private Double todayAmount = 0d; 9 | 10 | private Integer todayCount = 0; 11 | 12 | private Double yesterdayAmount = 0d; 13 | 14 | private Double totalAmount = 0d; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/param/AssignRoleParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.param; 2 | 3 | import java.util.List; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class AssignRoleParam { 11 | 12 | @NotBlank 13 | private String accountId; 14 | 15 | private List roleIds; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/AddMemberParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class AddMemberParam { 9 | 10 | @NotBlank 11 | private String nickName; 12 | 13 | @NotBlank 14 | private String mobile; 15 | 16 | @NotBlank 17 | private String loginPwd; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/exception/BizError.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.exception; 2 | 3 | import lombok.AllArgsConstructor; 4 | import lombok.Getter; 5 | 6 | @Getter 7 | @AllArgsConstructor 8 | public enum BizError { 9 | 10 | 请登录(999, "请登录"), 11 | 12 | 参数异常(1000, "参数异常"), 13 | 14 | 业务异常(1001, "业务异常"); 15 | 16 | private Integer code; 17 | 18 | private String msg; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/ModifyLoginPwdParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ModifyLoginPwdParam { 9 | 10 | @NotBlank 11 | private String oldPwd; 12 | 13 | @NotBlank 14 | private String newPwd; 15 | 16 | @NotBlank 17 | private String memberId; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/param/ModifyPayPwdParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ModifyPayPwdParam { 9 | 10 | @NotBlank 11 | private String oldPwd; 12 | 13 | @NotBlank 14 | private String newPwd; 15 | 16 | @NotBlank 17 | private String merchantId; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/BuyerMarkPaidParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class BuyerMarkPaidParam { 9 | 10 | @NotBlank 11 | private String buyerId; 12 | 13 | @NotBlank 14 | private String tradeOrderId; 15 | 16 | private String paymentCertificate; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/SellerConfirmTradeCompletedParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class SellerConfirmTradeCompletedParam { 9 | 10 | @NotBlank 11 | private String sellerId; 12 | 13 | private String tradeOrderId; 14 | 15 | private String payPwd; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/ForgetLoginPwdParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ForgetLoginPwdParam { 9 | 10 | @NotBlank 11 | private String verificationCode; 12 | 13 | @NotBlank 14 | private String newPwd; 15 | 16 | @NotBlank 17 | private String mobile; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/ModifyPayPwdParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ModifyPayPwdParam { 9 | 10 | @NotBlank 11 | private String verificationCode; 12 | 13 | @NotBlank 14 | private String newPwd; 15 | 16 | @NotBlank 17 | private String memberId; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/param/ModifyLoginPwdParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ModifyLoginPwdParam { 9 | 10 | @NotBlank 11 | private String oldPwd; 12 | 13 | @NotBlank 14 | private String newPwd; 15 | 16 | @NotBlank 17 | private String merchantId; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MemberReceiptStatisticDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MemberReceiptStatisticDataVO { 7 | 8 | private Double todayAmount = 0d; 9 | 10 | private Integer todayCount = 0; 11 | 12 | private Double yesterdayAmount = 0d; 13 | 14 | private Double totalAmount = 0d; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/storage/repo/StorageRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.storage.repo; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.storage.domain.Storage; 7 | 8 | public interface StorageRepo extends JpaRepository, JpaSpecificationExecutor { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MemberTransferStatisticDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MemberTransferStatisticDataVO { 7 | 8 | private Double todayAmount = 0d; 9 | 10 | private Integer todayCount = 0; 11 | 12 | private Double yesterdayAmount = 0d; 13 | 14 | private Double totalAmount = 0d; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MerchantReceiptStatisticDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MerchantReceiptStatisticDataVO { 7 | 8 | private Double todayAmount = 0d; 9 | 10 | private Integer todayCount = 0; 11 | 12 | private Double yesterdayAmount = 0d; 13 | 14 | private Double totalAmount = 0d; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MerchantTransferStatisticDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class MerchantTransferStatisticDataVO { 7 | 8 | private Double todayAmount = 0d; 9 | 10 | private Integer todayCount = 0; 11 | 12 | private Double yesterdayAmount = 0d; 13 | 14 | private Double totalAmount = 0d; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/param/BackgroundAccountQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.param; 2 | 3 | import com.c2cpay.common.param.PageParam; 4 | 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | @Data 9 | @EqualsAndHashCode(callSuper=false) 10 | public class BackgroundAccountQueryCondParam extends PageParam { 11 | 12 | private String userName; 13 | 14 | } 15 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/PreReceiptTransferParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class PreReceiptTransferParam { 9 | 10 | @NotBlank 11 | private String transferAccountId; 12 | 13 | @NotBlank 14 | private String orderNo; 15 | 16 | @NotBlank 17 | private String payPwd; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/param/BackgroundAccountEditParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class BackgroundAccountEditParam { 9 | 10 | @NotBlank 11 | private String id; 12 | 13 | @NotBlank 14 | private String userName; 15 | 16 | 17 | @NotBlank 18 | private String state; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/param/DictTypeQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.param; 2 | 3 | import com.c2cpay.common.param.PageParam; 4 | 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | @Data 9 | @EqualsAndHashCode(callSuper = false) 10 | public class DictTypeQueryCondParam extends PageParam { 11 | 12 | private String dictTypeCode; 13 | 14 | private String dictTypeName; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/param/UpdateDictDataParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.param; 2 | 3 | import java.util.List; 4 | 5 | import javax.validation.Valid; 6 | import javax.validation.constraints.NotBlank; 7 | 8 | import lombok.Data; 9 | 10 | @Data 11 | public class UpdateDictDataParam { 12 | 13 | @NotBlank 14 | private String dictTypeId; 15 | 16 | @Valid 17 | private List dictDatas; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/RegisterParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class RegisterParam { 9 | 10 | @NotBlank 11 | private String mobile; 12 | 13 | @NotBlank 14 | private String verificationCode; 15 | 16 | @NotBlank 17 | private String nickName; 18 | 19 | @NotBlank 20 | private String loginPwd; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/utils/IdUtils.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.utils; 2 | 3 | import cn.hutool.core.lang.Snowflake; 4 | import cn.hutool.core.util.IdUtil; 5 | 6 | public class IdUtils { 7 | 8 | private static final Snowflake snowflake = IdUtil.createSnowflake(0, 0); 9 | 10 | /** 11 | * Snowflake ID 12 | * 13 | * @return 14 | */ 15 | public static String getId() { 16 | return snowflake.nextId() + ""; 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/AppealProcessParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | import javax.validation.constraints.NotNull; 5 | 6 | import lombok.Data; 7 | 8 | @Data 9 | public class AppealProcessParam { 10 | 11 | @NotBlank 12 | private String tradeOrderId; 13 | 14 | @NotBlank 15 | private String processWay; 16 | 17 | @NotNull 18 | private Boolean approveAppeal; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/TradeChatRecordQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | @Data 9 | @EqualsAndHashCode(callSuper = false) 10 | public class TradeChatRecordQueryCondParam { 11 | 12 | private String memberId; 13 | 14 | @NotBlank 15 | private String tradeOrderId; 16 | 17 | private Long lastTimeStamp; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/receiptpaymentinfo/param/UpdateActivatedFlagParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.receiptpaymentinfo.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | import javax.validation.constraints.NotNull; 5 | 6 | import lombok.Data; 7 | 8 | @Data 9 | public class UpdateActivatedFlagParam { 10 | 11 | @NotBlank 12 | private String id; 13 | 14 | @NotNull 15 | private Boolean activated; 16 | 17 | @NotBlank 18 | private String memberId; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/repo/DictTypeRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.repo; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.dictconfig.domain.DictType; 7 | 8 | public interface DictTypeRepo extends JpaRepository, JpaSpecificationExecutor { 9 | 10 | DictType findByDictTypeCode(String dictTypeCode); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/statistic/EverydayTradeDataRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo.statistic; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.trade.domain.statistic.EverydayTradeData; 7 | 8 | public interface EverydayTradeDataRepo 9 | extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/repo/MerchantRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.repo; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.merchant.domain.Merchant; 7 | 8 | public interface MerchantRepo extends JpaRepository, JpaSpecificationExecutor { 9 | 10 | Merchant findByUserNameAndDeletedFlagIsFalse(String userName); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/receiptpaymentinfo/param/ReceiptPaymentInfoQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.receiptpaymentinfo.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | @Data 9 | @EqualsAndHashCode(callSuper = false) 10 | public class ReceiptPaymentInfoQueryCondParam { 11 | 12 | @NotBlank 13 | private String memberId; 14 | 15 | private Boolean activated; 16 | 17 | private String type; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/param/ConfigItemQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.param; 2 | 3 | import com.c2cpay.common.param.PageParam; 4 | 5 | import lombok.Data; 6 | import lombok.EqualsAndHashCode; 7 | 8 | @Data 9 | @EqualsAndHashCode(callSuper = false) 10 | public class ConfigItemQueryCondParam extends PageParam { 11 | 12 | /** 13 | * 配置项code 14 | */ 15 | private String configCode; 16 | 17 | /** 18 | * 配置项名称 19 | */ 20 | private String configName; 21 | 22 | } 23 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/repo/RoleRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.backgroundaccount.domain.Role; 9 | 10 | public interface RoleRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | List findByDeletedFlagFalse(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/param/UpdateMerchantParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class UpdateMerchantParam { 9 | 10 | @NotBlank 11 | private String id; 12 | 13 | @NotBlank 14 | private String userName; 15 | 16 | @NotBlank 17 | private String merchantName; 18 | 19 | @NotBlank 20 | private String apiSecretKey; 21 | 22 | @NotBlank 23 | private String state; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/repo/SystemSettingRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.repo; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.setting.domain.SystemSetting; 7 | 8 | public interface SystemSettingRepo 9 | extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | SystemSetting findTopByOrderByLatelyUpdateTime(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/notice/repo/NoticeRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.notice.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.notice.domain.Notice; 9 | 10 | public interface NoticeRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | List findByIdInAndDeletedFlagIsFalse(List ids); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/repo/TradeRiskSettingRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.repo; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.setting.domain.TradeRiskSetting; 7 | 8 | public interface TradeRiskSettingRepo 9 | extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | TradeRiskSetting findTopByOrderByLatelyUpdateTime(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/statistic/MemberEverydayReceiptDataRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo.statistic; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.transfer.domain.statistic.MemberEverydayReceiptData; 7 | 8 | public interface MemberEverydayReceiptDataRepo 9 | extends JpaRepository, JpaSpecificationExecutor { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/statistic/MemberEverydayTransferDataRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo.statistic; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.transfer.domain.statistic.MemberEverydayTransferData; 7 | 8 | public interface MemberEverydayTransferDataRepo extends JpaRepository, 9 | JpaSpecificationExecutor { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/MemberRegisterParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | import javax.validation.constraints.Pattern; 5 | 6 | import lombok.Data; 7 | 8 | @Data 9 | public class MemberRegisterParam { 10 | 11 | private String inviteCode; 12 | 13 | @NotBlank 14 | @Pattern(regexp = "^[A-Za-z][A-Za-z0-9]{2,11}$") 15 | private String userName; 16 | 17 | @NotBlank 18 | @Pattern(regexp = "^[A-Za-z][A-Za-z0-9]{5,14}$") 19 | private String loginPwd; 20 | 21 | } 22 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/statistic/MerchantEverydayReceiptDataRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo.statistic; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.transfer.domain.statistic.MerchantEverydayReceiptData; 7 | 8 | public interface MerchantEverydayReceiptDataRepo extends JpaRepository, 9 | JpaSpecificationExecutor { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/param/PageParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.param; 2 | 3 | import javax.validation.constraints.DecimalMin; 4 | import javax.validation.constraints.NotNull; 5 | 6 | import lombok.Data; 7 | 8 | @Data 9 | public class PageParam { 10 | 11 | @NotNull 12 | @DecimalMin(value = "1", inclusive = true) 13 | private Integer pageNum; 14 | 15 | @NotNull 16 | @DecimalMin(value = "1", inclusive = true) 17 | private Integer pageSize; 18 | 19 | private String propertie; 20 | 21 | private String direction; 22 | 23 | } 24 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/statistic/MerchantEverydayTransferDataRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo.statistic; 2 | 3 | import org.springframework.data.jpa.repository.JpaRepository; 4 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 5 | 6 | import com.c2cpay.transfer.domain.statistic.MerchantEverydayTransferData; 7 | 8 | public interface MerchantEverydayTransferDataRepo extends JpaRepository, 9 | JpaSpecificationExecutor { 10 | 11 | } 12 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/UpdateMemberParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class UpdateMemberParam { 9 | 10 | @NotBlank 11 | private String id; 12 | 13 | @NotBlank 14 | private String nickName; 15 | 16 | private String realName; 17 | 18 | @NotBlank 19 | private String mobile; 20 | 21 | @NotBlank 22 | private String state; 23 | 24 | @NotBlank 25 | private String buyState; 26 | 27 | @NotBlank 28 | private String sellState; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/repo/RoleMenuRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.backgroundaccount.domain.RoleMenu; 9 | 10 | public interface RoleMenuRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | List findByRoleId(String roleId); 13 | 14 | List findByRoleIdIn(List roleIds); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/operlog/OperLog.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.operlog; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Retention; 6 | import java.lang.annotation.RetentionPolicy; 7 | import java.lang.annotation.Target; 8 | 9 | @Target({ ElementType.METHOD }) 10 | @Retention(RetentionPolicy.RUNTIME) 11 | @Documented 12 | public @interface OperLog { 13 | 14 | public String subSystem() default ""; 15 | 16 | public String module() default ""; 17 | 18 | public String operate() default ""; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/vo/LatestAppInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.vo; 2 | 3 | import org.springframework.beans.BeanUtils; 4 | 5 | import com.c2cpay.setting.domain.SystemSetting; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class LatestAppInfoVO { 11 | 12 | private String appUrl; 13 | 14 | private Double appVersion; 15 | 16 | public static LatestAppInfoVO convertFor(SystemSetting setting) { 17 | LatestAppInfoVO vo = new LatestAppInfoVO(); 18 | if (setting != null) { 19 | BeanUtils.copyProperties(setting, vo); 20 | } 21 | return vo; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dataclean/param/DataCleanParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dataclean.param; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import javax.validation.constraints.NotNull; 7 | 8 | import org.springframework.format.annotation.DateTimeFormat; 9 | 10 | import lombok.Data; 11 | 12 | @Data 13 | public class DataCleanParam { 14 | 15 | private List dataTypes; 16 | 17 | @NotNull 18 | @DateTimeFormat(pattern = "yyyy-MM-dd") 19 | private Date startTime; 20 | 21 | @NotNull 22 | @DateTimeFormat(pattern = "yyyy-MM-dd") 23 | private Date endTime; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/TransferParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.DecimalMin; 4 | import javax.validation.constraints.NotBlank; 5 | import javax.validation.constraints.NotNull; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class TransferParam { 11 | 12 | @NotBlank 13 | private String transferAccountId; 14 | 15 | @NotNull 16 | @DecimalMin(value = "0", inclusive = false) 17 | private Double amount; 18 | 19 | @NotBlank 20 | private String receiptAddr; 21 | 22 | @NotBlank 23 | private String payPwd; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/CreatePreReceiptReturnVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class CreatePreReceiptReturnVO { 7 | 8 | /** 9 | * 平台订单号 10 | */ 11 | private String platformOrderNo; 12 | 13 | /** 14 | * 支付页面地址 15 | */ 16 | private String payUrl; 17 | 18 | public static CreatePreReceiptReturnVO build(String platformOrderNo, String payUrl) { 19 | CreatePreReceiptReturnVO vo = new CreatePreReceiptReturnVO(); 20 | vo.setPlatformOrderNo(platformOrderNo); 21 | vo.setPayUrl(payUrl); 22 | return vo; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/param/SystemSettingParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.param; 2 | 3 | import javax.validation.constraints.DecimalMin; 4 | import javax.validation.constraints.NotBlank; 5 | import javax.validation.constraints.NotNull; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class SystemSettingParam { 11 | 12 | @NotBlank 13 | private String appUrl; 14 | 15 | @NotNull 16 | @DecimalMin(value = "0", inclusive = true) 17 | private Double appVersion; 18 | 19 | @NotBlank 20 | private String apiGateway; 21 | 22 | @NotBlank 23 | private String localStoragePath; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/repo/MemberRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.member.domain.Member; 9 | 10 | public interface MemberRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | List findByDeletedFlagIsFalse(); 13 | 14 | Member findByMobileAndDeletedFlagIsFalse(String mobile); 15 | 16 | Member findTopByWalletAddrAndDeletedFlagIsFalse(String walletAddr); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/PreReceiptParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.DecimalMin; 4 | import javax.validation.constraints.NotBlank; 5 | import javax.validation.constraints.NotNull; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class PreReceiptParam { 11 | 12 | @NotBlank 13 | private String receiptAccountId; 14 | 15 | @NotNull 16 | @DecimalMin(value = "0", inclusive = false) 17 | private Double amount; 18 | 19 | private String merchantOrderNo; 20 | 21 | private String notifyUrl; 22 | 23 | @NotBlank 24 | private String payPwd; 25 | 26 | } 27 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/repo/AccountRoleRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.backgroundaccount.domain.AccountRole; 9 | 10 | public interface AccountRoleRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | List findByAccountId(String accountId); 13 | 14 | List findByAccountIdAndRoleDeletedFlagFalse(String accountId); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/vo/TokenInfo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.vo; 2 | 3 | import cn.dev33.satoken.stp.SaTokenInfo; 4 | import cn.dev33.satoken.stp.StpUtil; 5 | import lombok.Data; 6 | 7 | @Data 8 | public class TokenInfo { 9 | 10 | private String tokenName; 11 | 12 | private String tokenValue; 13 | 14 | private String accountId; 15 | 16 | public static TokenInfo build() { 17 | SaTokenInfo saTokenInfo = StpUtil.getTokenInfo(); 18 | TokenInfo tokenInfo = new TokenInfo(); 19 | tokenInfo.setTokenName(saTokenInfo.getTokenName()); 20 | tokenInfo.setTokenValue(saTokenInfo.getTokenValue()); 21 | return tokenInfo; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/MerchantTransferParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.DecimalMin; 4 | import javax.validation.constraints.NotBlank; 5 | import javax.validation.constraints.NotNull; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class MerchantTransferParam { 11 | 12 | @NotBlank 13 | private String transferAccountId; 14 | 15 | @NotNull 16 | @DecimalMin(value = "0", inclusive = false) 17 | private Double amount; 18 | 19 | @NotBlank 20 | private String receiptAddr; 21 | 22 | private String merchantOrderNo; 23 | 24 | @NotBlank 25 | private String payPwd; 26 | 27 | } 28 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/vo/SystemSettingVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.vo; 2 | 3 | import org.springframework.beans.BeanUtils; 4 | 5 | import com.c2cpay.setting.domain.SystemSetting; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class SystemSettingVO { 11 | 12 | private String appUrl; 13 | 14 | private Double appVersion; 15 | 16 | private String apiGateway; 17 | 18 | private String localStoragePath; 19 | 20 | public static SystemSettingVO convertFor(SystemSetting po) { 21 | SystemSettingVO vo = new SystemSettingVO(); 22 | if (po != null) { 23 | BeanUtils.copyProperties(po, vo); 24 | } 25 | return vo; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/repo/MenuRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.backgroundaccount.domain.Menu; 9 | 10 | public interface MenuRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | List findByDeletedFlagFalseOrderByOrderNo(); 13 | 14 | List findByParentIdAndDeletedFlagFalse(String parentId); 15 | 16 | List findByIdInAndDeletedFlagFalseOrderByOrderNo(List ids); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/PreReceiptApiParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class PreReceiptApiParam { 9 | 10 | /** 11 | * 商户号 12 | */ 13 | @NotBlank 14 | private String merchantNum; 15 | 16 | /** 17 | * 商户订单号 18 | */ 19 | @NotBlank 20 | private String orderNo; 21 | 22 | /** 23 | * 金额 24 | */ 25 | @NotBlank 26 | private String amount; 27 | 28 | /** 29 | * 异步通知地址 30 | */ 31 | @NotBlank 32 | private String notifyUrl; 33 | 34 | /** 35 | * 签名,见上方签名规则 36 | */ 37 | @NotBlank 38 | private String sign; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/param/DictDataParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.common.utils.IdUtils; 8 | import com.c2cpay.dictconfig.domain.DictItem; 9 | 10 | import lombok.Data; 11 | 12 | @Data 13 | public class DictDataParam { 14 | 15 | @NotBlank 16 | private String dictItemCode; 17 | 18 | @NotBlank 19 | private String dictItemName; 20 | 21 | public DictItem convertToPo() { 22 | DictItem po = new DictItem(); 23 | BeanUtils.copyProperties(this, po); 24 | po.setId(IdUtils.getId()); 25 | return po; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/MerchantTransferApiParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class MerchantTransferApiParam { 9 | 10 | /** 11 | * 商户号 12 | */ 13 | @NotBlank 14 | private String merchantNum; 15 | 16 | /** 17 | * 商户订单号 18 | */ 19 | @NotBlank 20 | private String orderNo; 21 | 22 | /** 23 | * 金额 24 | */ 25 | @NotBlank 26 | private String amount; 27 | 28 | /** 29 | * 收款地址 30 | */ 31 | @NotBlank 32 | private String receiptAddr; 33 | 34 | /** 35 | * 签名,见上方签名规则 36 | */ 37 | @NotBlank 38 | private String sign; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/param/OperLogQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.param; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import com.c2cpay.common.param.PageParam; 8 | 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | 12 | @Data 13 | @EqualsAndHashCode(callSuper = false) 14 | public class OperLogQueryCondParam extends PageParam { 15 | 16 | private String ipAddr; 17 | 18 | private String userName; 19 | 20 | private String operAccountId; 21 | 22 | @DateTimeFormat(pattern = "yyyy-MM-dd") 23 | private Date startTime; 24 | 25 | @DateTimeFormat(pattern = "yyyy-MM-dd") 26 | private Date endTime; 27 | 28 | } 29 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/repo/DictItemRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.dictconfig.domain.DictItem; 9 | 10 | public interface DictItemRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | DictItem findByDictTypeDictTypeCodeAndDictItemCode(String dictTypeCode, String dictItemCode); 13 | 14 | List findByDictTypeDictTypeCodeOrderByOrderNo(String dictTypeCode); 15 | 16 | List findByDictTypeIdOrderByOrderNo(String dictTypeId); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/repo/OperLogRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.log.domain.OperLog; 11 | 12 | public interface OperLogRepo extends JpaRepository, JpaSpecificationExecutor { 13 | 14 | @Modifying 15 | @Query(nativeQuery = true, value = "delete from oper_log where oper_time >= ?1 and oper_time <= ?2") 16 | Integer dataClean(Date startTime, Date endTime); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/vo/AccountAuthInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.vo; 2 | 3 | import org.springframework.beans.BeanUtils; 4 | 5 | import com.c2cpay.member.domain.Member; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class AccountAuthInfoVO { 11 | 12 | private String id; 13 | 14 | private String mobile; 15 | 16 | private String loginPwd; 17 | 18 | private String state; 19 | 20 | private Integer keepLoginDuration; 21 | 22 | public static AccountAuthInfoVO convertFor(Member userAccount) { 23 | if (userAccount == null) { 24 | return null; 25 | } 26 | AccountAuthInfoVO vo = new AccountAuthInfoVO(); 27 | BeanUtils.copyProperties(userAccount, vo); 28 | return vo; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/vo/TradeRiskSettingVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.vo; 2 | 3 | import org.springframework.beans.BeanUtils; 4 | 5 | import com.c2cpay.setting.domain.TradeRiskSetting; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class TradeRiskSettingVO { 11 | 12 | private Long buyerCancelTrade; 13 | 14 | private Long sellerRejectOrder; 15 | 16 | private Long buyerUnPaid; 17 | 18 | private Long notMySelfPaid; 19 | 20 | private Long paidSellerUnConfirm; 21 | 22 | public static TradeRiskSettingVO convertFor(TradeRiskSetting po) { 23 | TradeRiskSettingVO vo = new TradeRiskSettingVO(); 24 | if (po != null) { 25 | BeanUtils.copyProperties(po, vo); 26 | } 27 | return vo; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/param/LoginLogQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.param; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.format.annotation.DateTimeFormat; 6 | 7 | import com.c2cpay.common.param.PageParam; 8 | 9 | import lombok.Data; 10 | import lombok.EqualsAndHashCode; 11 | 12 | @Data 13 | @EqualsAndHashCode(callSuper = false) 14 | public class LoginLogQueryCondParam extends PageParam { 15 | 16 | private String ipAddr; 17 | 18 | private String userName; 19 | 20 | private String subSystem; 21 | 22 | private String state; 23 | 24 | @DateTimeFormat(pattern = "yyyy-MM-dd") 25 | private Date startTime; 26 | 27 | @DateTimeFormat(pattern = "yyyy-MM-dd") 28 | private Date endTime; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/repo/LoginLogRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.log.domain.LoginLog; 11 | 12 | public interface LoginLogRepo extends JpaRepository, JpaSpecificationExecutor { 13 | 14 | @Modifying 15 | @Query(nativeQuery = true, value = "delete from login_log where login_time >= ?1 and login_time <= ?2") 16 | Integer dataClean(Date startTime, Date endTime); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/param/RoleParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.backgroundaccount.domain.Role; 10 | import com.c2cpay.common.utils.IdUtils; 11 | 12 | import lombok.Data; 13 | 14 | @Data 15 | public class RoleParam { 16 | 17 | private String id; 18 | 19 | @NotBlank 20 | private String name; 21 | 22 | public Role convertToPo() { 23 | Role po = new Role(); 24 | BeanUtils.copyProperties(this, po); 25 | po.setId(IdUtils.getId()); 26 | po.setCreateTime(new Date()); 27 | po.setDeletedFlag(false); 28 | return po; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/notice/param/AddOrUpdateNoticeParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.notice.param; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.common.utils.IdUtils; 8 | import com.c2cpay.notice.domain.Notice; 9 | 10 | import lombok.Data; 11 | 12 | @Data 13 | public class AddOrUpdateNoticeParam { 14 | 15 | private String id; 16 | 17 | private String title; 18 | 19 | private Boolean importantFlag; 20 | 21 | private String content; 22 | 23 | public Notice convertToPo() { 24 | Notice po = new Notice(); 25 | BeanUtils.copyProperties(this, po); 26 | po.setId(IdUtils.getId()); 27 | po.setPublishTime(new Date()); 28 | po.setDeletedFlag(false); 29 | return po; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/vo/AccountAuthInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.vo; 2 | 3 | import org.springframework.beans.BeanUtils; 4 | 5 | import com.c2cpay.merchant.domain.Merchant; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class AccountAuthInfoVO { 11 | 12 | private String id; 13 | 14 | private String userName; 15 | 16 | private String loginPwd; 17 | 18 | private String googleSecretKey; 19 | 20 | private String state; 21 | 22 | private String ipWhiteList; 23 | 24 | public static AccountAuthInfoVO convertFor(Merchant merchant) { 25 | if (merchant == null) { 26 | return null; 27 | } 28 | AccountAuthInfoVO vo = new AccountAuthInfoVO(); 29 | BeanUtils.copyProperties(merchant, vo); 30 | return vo; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/sms/repo/SmsSendRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.sms.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.sms.domain.SmsSendRecord; 11 | 12 | public interface SmsSendRecordRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from sms_send_record where create_time >= ?1 and create_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/PreTradeOrderRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.trade.domain.PreTradeOrder; 11 | 12 | public interface PreTradeOrderRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from pre_trade_order where create_time >= ?1 and create_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/TradeRiskRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.trade.domain.TradeRiskRecord; 11 | 12 | public interface TradeRiskRecordRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from trade_risk_record where create_time >= ?1 and create_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/exception/BizException.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.exception; 2 | 3 | import lombok.Getter; 4 | 5 | @Getter 6 | public class BizException extends RuntimeException { 7 | 8 | /** 9 | * 10 | */ 11 | private static final long serialVersionUID = 1L; 12 | 13 | private Integer code; 14 | 15 | private String msg; 16 | 17 | public BizException(BizError bizError) { 18 | super(bizError.getMsg()); 19 | this.code = bizError.getCode(); 20 | this.msg = bizError.getMsg(); 21 | } 22 | 23 | public BizException(String msg) { 24 | super(msg); 25 | this.code = BizError.业务异常.getCode(); 26 | this.msg = msg; 27 | } 28 | 29 | public BizException(Integer code, String msg) { 30 | super(msg); 31 | this.code = code; 32 | this.msg = msg; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/googleauth/GoogleAuthInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.googleauth; 2 | 3 | import java.util.Date; 4 | 5 | import com.fasterxml.jackson.annotation.JsonFormat; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class GoogleAuthInfoVO { 11 | 12 | private String userName; 13 | 14 | private String googleSecretKey; 15 | 16 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 17 | private Date googleAuthBindTime; 18 | 19 | public static GoogleAuthInfoVO convertFor(String userName, String googleSecretKey, Date googleAuthBindTime) { 20 | GoogleAuthInfoVO vo = new GoogleAuthInfoVO(); 21 | vo.setUserName(userName); 22 | vo.setGoogleSecretKey(googleSecretKey); 23 | vo.setGoogleAuthBindTime(googleAuthBindTime); 24 | return vo; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/repo/BackgroundAccountRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.backgroundaccount.domain.BackgroundAccount; 9 | 10 | public interface BackgroundAccountRepo extends JpaRepository, JpaSpecificationExecutor { 11 | 12 | BackgroundAccount findByIdAndDeletedFlagIsFalse(String id); 13 | 14 | BackgroundAccount findByUserNameAndDeletedFlagIsFalse(String userName); 15 | 16 | List findByIdNotIn(List ids); 17 | 18 | List findBySuperAdminFlagTrueAndDeletedFlagIsFalse(); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/config/xss/XssStringJsonDeserializer.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.config.xss; 2 | 3 | import java.io.IOException; 4 | 5 | import com.fasterxml.jackson.core.JsonParser; 6 | import com.fasterxml.jackson.core.JsonProcessingException; 7 | import com.fasterxml.jackson.databind.DeserializationContext; 8 | import com.fasterxml.jackson.databind.JsonDeserializer; 9 | 10 | import cn.hutool.core.util.EscapeUtil; 11 | 12 | public class XssStringJsonDeserializer extends JsonDeserializer { 13 | 14 | @Override 15 | public String deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException { 16 | String value = p.getValueAsString(); 17 | if (value != null) { 18 | return EscapeUtil.escapeHtml4(value.toString()); 19 | } 20 | return value; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/vo/AccountAuthInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.vo; 2 | 3 | import org.springframework.beans.BeanUtils; 4 | 5 | import com.c2cpay.backgroundaccount.domain.BackgroundAccount; 6 | 7 | import lombok.Data; 8 | 9 | @Data 10 | public class AccountAuthInfoVO { 11 | 12 | private String id; 13 | 14 | private String userName; 15 | 16 | private String loginPwd; 17 | 18 | private String googleSecretKey; 19 | 20 | private String state; 21 | 22 | private Boolean superAdminFlag; 23 | 24 | public static AccountAuthInfoVO convertFor(BackgroundAccount userAccount) { 25 | if (userAccount == null) { 26 | return null; 27 | } 28 | AccountAuthInfoVO vo = new AccountAuthInfoVO(); 29 | BeanUtils.copyProperties(userAccount, vo); 30 | return vo; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/param/TradeRiskSettingParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.param; 2 | 3 | import javax.validation.constraints.DecimalMin; 4 | import javax.validation.constraints.NotNull; 5 | 6 | import lombok.Data; 7 | 8 | @Data 9 | public class TradeRiskSettingParam { 10 | 11 | @NotNull 12 | @DecimalMin(value = "0", inclusive = false) 13 | private Long buyerCancelTrade; 14 | 15 | @NotNull 16 | @DecimalMin(value = "0", inclusive = false) 17 | private Long sellerRejectOrder; 18 | 19 | @NotNull 20 | @DecimalMin(value = "0", inclusive = false) 21 | private Long buyerUnPaid; 22 | 23 | @NotNull 24 | @DecimalMin(value = "0", inclusive = false) 25 | private Long notMySelfPaid; 26 | 27 | @NotNull 28 | @DecimalMin(value = "0", inclusive = false) 29 | private Long paidSellerUnConfirm; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/param/MenuParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.backgroundaccount.domain.Menu; 8 | import com.c2cpay.common.utils.IdUtils; 9 | 10 | import lombok.Data; 11 | 12 | @Data 13 | public class MenuParam { 14 | 15 | private String id; 16 | 17 | @NotBlank 18 | private String name; 19 | 20 | private String url; 21 | 22 | @NotBlank 23 | private String type; 24 | 25 | private Double orderNo; 26 | 27 | private String parentId; 28 | 29 | public Menu convertToPo() { 30 | Menu po = new Menu(); 31 | BeanUtils.copyProperties(this, po); 32 | po.setId(IdUtils.getId()); 33 | po.setDeletedFlag(false); 34 | return po; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/repo/MemberBalanceChangeLogRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.log.domain.MemberBalanceChangeLog; 11 | 12 | public interface MemberBalanceChangeLogRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from member_balance_change_log where change_time >= ?1 and change_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/MemberTransferRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.transfer.domain.MemberTransferRecord; 11 | 12 | public interface MemberTransferRecordRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from member_transfer_record where create_time >= ?1 and create_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/param/AddOrUpdateDictTypeParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.common.utils.IdUtils; 10 | import com.c2cpay.dictconfig.domain.DictType; 11 | 12 | import lombok.Data; 13 | 14 | @Data 15 | public class AddOrUpdateDictTypeParam { 16 | 17 | private String id; 18 | 19 | @NotBlank 20 | private String dictTypeCode; 21 | 22 | @NotBlank 23 | private String dictTypeName; 24 | 25 | private String note; 26 | 27 | public DictType convertToPo() { 28 | DictType po = new DictType(); 29 | BeanUtils.copyProperties(this, po); 30 | po.setId(IdUtils.getId()); 31 | po.setLastModifyTime(new Date()); 32 | return po; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/repo/MerchantBalanceChangeLogRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.log.domain.MerchantBalanceChangeLog; 11 | 12 | public interface MerchantBalanceChangeLogRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from merchant_balance_change_log where change_time >= ?1 and change_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/MerchantTransferRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.transfer.domain.MerchantTransferRecord; 11 | 12 | public interface MerchantTransferRecordRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from merchant_transfer_record where create_time >= ?1 and create_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/TradeChatRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.trade.domain.TradeChatRecord; 11 | 12 | public interface TradeChatRecordRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from trade_chat_record where trade_order_id in (select id from trade_order where create_time >= ?1 and create_time <= ?2)") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/param/ReceiptAsynNoticeParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.param; 2 | 3 | import javax.validation.constraints.NotBlank; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class ReceiptAsynNoticeParam { 9 | 10 | /** 11 | * 商户号 12 | */ 13 | @NotBlank 14 | private String merchantNum; 15 | 16 | /** 17 | * 订单号 18 | */ 19 | @NotBlank 20 | private String orderNo; 21 | 22 | /** 23 | * 平台订单号 24 | */ 25 | @NotBlank 26 | private String platformOrderNo; 27 | 28 | /** 29 | * 金额 30 | */ 31 | @NotBlank 32 | private String amount; 33 | 34 | /** 35 | * 状态
1-支付成功
0-支付失败 36 | */ 37 | @NotBlank 38 | private String state; 39 | 40 | /** 41 | * 完结时间 42 | */ 43 | @NotBlank 44 | private String endTime; 45 | 46 | /** 47 | * 签名,见上方签名规则 48 | */ 49 | private String sign; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/MemberReceiptDetailVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.transfer.domain.MemberReceiptRecord; 8 | import com.fasterxml.jackson.annotation.JsonFormat; 9 | 10 | import lombok.Data; 11 | 12 | @Data 13 | public class MemberReceiptDetailVO { 14 | 15 | private String id; 16 | 17 | private Double amount; 18 | 19 | private String transferAddr; 20 | 21 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 22 | private Date createTime; 23 | 24 | public static MemberReceiptDetailVO convertFor(MemberReceiptRecord po) { 25 | if (po == null) { 26 | return null; 27 | } 28 | MemberReceiptDetailVO vo = new MemberReceiptDetailVO(); 29 | BeanUtils.copyProperties(po, vo); 30 | return vo; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/dictconfig/controller/DictConfigController.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.controller; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import com.c2cpay.common.vo.Result; 11 | import com.c2cpay.dictconfig.DictHolder; 12 | import com.c2cpay.dictconfig.vo.DictItemVO; 13 | 14 | @Controller 15 | @RequestMapping("/dictconfig") 16 | public class DictConfigController { 17 | 18 | @GetMapping("/findDictItemInCache") 19 | @ResponseBody 20 | public Result> findDictItemInCache(String dictTypeCode) { 21 | return Result.success(DictHolder.findDictItem(dictTypeCode)); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/CustomerServiceSendMsgParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.common.utils.IdUtils; 10 | import com.c2cpay.trade.domain.TradeChatRecord; 11 | 12 | import lombok.Data; 13 | 14 | @Data 15 | public class CustomerServiceSendMsgParam { 16 | 17 | @NotBlank 18 | private String tradeOrderId; 19 | 20 | @NotBlank 21 | private String msgType; 22 | 23 | @NotBlank 24 | private String content; 25 | 26 | public TradeChatRecord convertToPo() { 27 | TradeChatRecord po = new TradeChatRecord(); 28 | BeanUtils.copyProperties(this, po); 29 | po.setId(IdUtils.getId()); 30 | po.setCreateTime(new Date()); 31 | po.setDeletedFlag(false); 32 | return po; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/MemberTransferDetailVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.transfer.domain.MemberTransferRecord; 8 | import com.fasterxml.jackson.annotation.JsonFormat; 9 | 10 | import lombok.Data; 11 | 12 | @Data 13 | public class MemberTransferDetailVO { 14 | 15 | private String id; 16 | 17 | private Double amount; 18 | 19 | private String receiptAddr; 20 | 21 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 22 | private Date createTime; 23 | 24 | public static MemberTransferDetailVO convertFor(MemberTransferRecord po) { 25 | if (po == null) { 26 | return null; 27 | } 28 | MemberTransferDetailVO vo = new MemberTransferDetailVO(); 29 | BeanUtils.copyProperties(po, vo); 30 | return vo; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/domain/statistic/EverydayTradeData.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.domain.statistic; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Entity; 7 | import javax.persistence.Id; 8 | import javax.persistence.Table; 9 | 10 | import org.hibernate.annotations.DynamicInsert; 11 | import org.hibernate.annotations.DynamicUpdate; 12 | 13 | import lombok.Getter; 14 | import lombok.Setter; 15 | 16 | @Getter 17 | @Setter 18 | @Entity 19 | @Table(name = "v_everyday_trade_data") 20 | @DynamicInsert(true) 21 | @DynamicUpdate(true) 22 | public class EverydayTradeData implements Serializable { 23 | 24 | /** 25 | * 26 | */ 27 | private static final long serialVersionUID = 1L; 28 | 29 | @Id 30 | private String id; 31 | 32 | private Date everyday; 33 | 34 | private Double successAmount; 35 | 36 | private Integer successCount; 37 | 38 | } 39 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/setting/controller/SettingController.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.controller; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Controller; 5 | import org.springframework.web.bind.annotation.GetMapping; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.ResponseBody; 8 | 9 | import com.c2cpay.common.vo.Result; 10 | import com.c2cpay.setting.service.SettingService; 11 | import com.c2cpay.setting.vo.SystemSettingVO; 12 | 13 | @Controller 14 | @RequestMapping("/setting") 15 | public class SettingController { 16 | 17 | @Autowired 18 | private SettingService service; 19 | 20 | @GetMapping("/getSystemSetting") 21 | @ResponseBody 22 | public Result getSystemSetting() { 23 | return Result.success(service.getSystemSetting()); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/MemberApplication.java: -------------------------------------------------------------------------------- 1 | package com; 2 | 3 | import org.springframework.boot.ApplicationArguments; 4 | import org.springframework.boot.ApplicationRunner; 5 | import org.springframework.boot.SpringApplication; 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; 7 | 8 | import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation; 9 | import com.alicp.jetcache.anno.config.EnableMethodCache; 10 | import com.zengtengpeng.annotation.EnableCache; 11 | 12 | @SpringBootApplication 13 | @EnableMethodCache(basePackages = "com.c2cpay") 14 | @EnableCreateCacheAnnotation 15 | @EnableCache(value = {}) 16 | public class MemberApplication implements ApplicationRunner { 17 | 18 | public static void main(String[] args) { 19 | SpringApplication.run(MemberApplication.class, args); 20 | } 21 | 22 | @Override 23 | public void run(ApplicationArguments args) throws Exception { 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/receiptpaymentinfo/repo/ReceiptPaymentInfoRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.receiptpaymentinfo.repo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | 8 | import com.c2cpay.receiptpaymentinfo.domain.ReceiptPaymentInfo; 9 | 10 | public interface ReceiptPaymentInfoRepo 11 | extends JpaRepository, JpaSpecificationExecutor { 12 | 13 | List findByMemberIdAndDeletedFlagFalseOrderByActivatedTimeDesc(String memberId); 14 | 15 | List findByMemberIdAndActivatedTrueAndDeletedFlagFalseOrderByActivatedTimeDesc( 16 | String memberId); 17 | 18 | ReceiptPaymentInfo findTopByMemberIdAndTypeAndActivatedTrueAndDeletedFlagIsFalseOrderByActivatedTimeDesc( 19 | String memberId, String type); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/MemberReceiptRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | 11 | import com.c2cpay.transfer.domain.MemberReceiptRecord; 12 | 13 | public interface MemberReceiptRecordRepo 14 | extends JpaRepository, JpaSpecificationExecutor { 15 | 16 | @Modifying 17 | @Query(nativeQuery = true, value = "delete from member_receipt_record where create_time >= ?1 and create_time <= ?2") 18 | Integer dataClean(Date startTime, Date endTime); 19 | 20 | List findByStateAndReceiptFundSyncFalse(String state); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/utils/RedisUtils.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.utils; 2 | 3 | import javax.annotation.PostConstruct; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.redis.core.StringRedisTemplate; 7 | import org.springframework.stereotype.Component; 8 | 9 | @Component 10 | public class RedisUtils { 11 | 12 | @Autowired 13 | private StringRedisTemplate redisTemplate; 14 | 15 | private static RedisUtils redisUtils; 16 | 17 | @PostConstruct 18 | public void init() { 19 | redisUtils = this; 20 | redisUtils.redisTemplate = this.redisTemplate; 21 | } 22 | 23 | public static String opsForValueGet(String key) { 24 | String value = redisUtils.redisTemplate.opsForValue().get(key); 25 | return value; 26 | } 27 | 28 | public static void opsForValueSet(String key, String value) { 29 | redisUtils.redisTemplate.opsForValue().set(key, value); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/vo/PageResult.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.vo; 2 | 3 | import java.util.List; 4 | 5 | import lombok.Data; 6 | 7 | @Data 8 | public class PageResult { 9 | 10 | /** 11 | * 页码 12 | */ 13 | private int pageNum; 14 | 15 | /** 16 | * 每页大小 17 | */ 18 | private int pageSize; 19 | 20 | /** 21 | * 总页数 22 | */ 23 | private long totalPage; 24 | 25 | /** 26 | * 总记录数 27 | */ 28 | private long total; 29 | 30 | /** 31 | * 实际记录数 32 | */ 33 | private int size; 34 | 35 | /** 36 | * 数据集 37 | */ 38 | private List content; 39 | 40 | public PageResult(List content, int pageNum, int pageSize, long total) { 41 | this.content = content; 42 | this.pageNum = pageNum; 43 | this.pageSize = pageSize; 44 | this.totalPage = total == 0 ? 0 : total % pageSize == 0 ? (total / pageSize) : (total / pageSize + 1); 45 | this.total = total; 46 | this.size = content.size(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/SendMsgParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.common.utils.IdUtils; 10 | import com.c2cpay.trade.domain.TradeChatRecord; 11 | 12 | import lombok.Data; 13 | 14 | @Data 15 | public class SendMsgParam { 16 | 17 | @NotBlank 18 | private String senderId; 19 | 20 | @NotBlank 21 | private String tradeOrderId; 22 | 23 | @NotBlank 24 | private String msgType; 25 | 26 | @NotBlank 27 | private String content; 28 | 29 | public TradeChatRecord convertToPo(String receiverId) { 30 | TradeChatRecord po = new TradeChatRecord(); 31 | BeanUtils.copyProperties(this, po); 32 | po.setId(IdUtils.getId()); 33 | po.setCreateTime(new Date()); 34 | po.setReceiverId(receiverId); 35 | po.setDeletedFlag(false); 36 | return po; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/TradeAppealRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.data.jpa.repository.JpaRepository; 6 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 7 | import org.springframework.data.jpa.repository.Modifying; 8 | import org.springframework.data.jpa.repository.Query; 9 | 10 | import com.c2cpay.trade.domain.TradeAppealRecord; 11 | 12 | public interface TradeAppealRecordRepo 13 | extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from trade_appeal_record where trade_order_id in (select id from trade_order where create_time >= ?1 and create_time <= ?2)") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | TradeAppealRecord findTopByTradeOrderIdOrderByProcessTimeDesc(String tradeOrderId); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/domain/TradeOrderStateLog.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import lombok.Getter; 15 | import lombok.Setter; 16 | 17 | @Getter 18 | @Setter 19 | @Entity 20 | @Table(name = "trade_order_state_log") 21 | @DynamicInsert(true) 22 | @DynamicUpdate(true) 23 | public class TradeOrderStateLog implements Serializable { 24 | 25 | /** 26 | * 27 | */ 28 | private static final long serialVersionUID = 1L; 29 | 30 | @Id 31 | @Column(name = "id", length = 32) 32 | private String id; 33 | 34 | private String state; 35 | 36 | private Date logTime; 37 | 38 | private String tradeOrderId; 39 | 40 | } 41 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/param/AddBackgroundAccountParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.backgroundaccount.domain.BackgroundAccount; 10 | import com.c2cpay.common.utils.IdUtils; 11 | import com.c2cpay.constants.Constant; 12 | 13 | import lombok.Data; 14 | 15 | @Data 16 | public class AddBackgroundAccountParam { 17 | 18 | @NotBlank 19 | private String userName; 20 | 21 | @NotBlank 22 | private String loginPwd; 23 | 24 | public BackgroundAccount convertToPo() { 25 | BackgroundAccount po = new BackgroundAccount(); 26 | BeanUtils.copyProperties(this, po); 27 | po.setId(IdUtils.getId()); 28 | po.setState(Constant.功能状态_启用); 29 | po.setDeletedFlag(false); 30 | po.setRegisteredTime(new Date()); 31 | po.setSuperAdminFlag(false); 32 | return po; 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/TradeOrderStateLogRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | 11 | import com.c2cpay.trade.domain.TradeOrderStateLog; 12 | 13 | public interface TradeOrderStateLogRepo 14 | extends JpaRepository, JpaSpecificationExecutor { 15 | 16 | @Modifying 17 | @Query(nativeQuery = true, value = "delete from trade_order_state_log where trade_order_id in (select id from trade_order where create_time >= ?1 and create_time <= ?2)") 18 | Integer dataClean(Date startTime, Date endTime); 19 | 20 | List findByTradeOrderIdOrderByLogTimeAsc(String tradeOrderId); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/StpInterfaceImpl.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.springframework.stereotype.Component; 7 | 8 | import cn.dev33.satoken.stp.StpInterface; 9 | import cn.dev33.satoken.stp.StpUtil; 10 | 11 | @Component 12 | public class StpInterfaceImpl implements StpInterface { 13 | 14 | @Override 15 | public List getPermissionList(Object loginId, String loginType) { 16 | List list = new ArrayList(); 17 | return list; 18 | } 19 | 20 | @Override 21 | public List getRoleList(Object loginId, String loginType) { 22 | List list = new ArrayList(); 23 | String tokenName = StpUtil.getTokenName(); 24 | if ("admin_token".equals(tokenName)) { 25 | list.add("admin"); 26 | } else if ("member_token".equals(tokenName)) { 27 | list.add("member"); 28 | } else if ("merchant_token".equals(tokenName)) { 29 | list.add("merchant"); 30 | } 31 | return list; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/vo/MemberSecurityInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.vo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.member.domain.Member; 8 | import com.fasterxml.jackson.annotation.JsonFormat; 9 | 10 | import cn.hutool.core.util.StrUtil; 11 | import lombok.Data; 12 | 13 | @Data 14 | public class MemberSecurityInfoVO { 15 | 16 | private String nickName; 17 | 18 | private String realName; 19 | 20 | private String mobile; 21 | 22 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 23 | private Date latelyLoginTime; 24 | 25 | private Integer keepLoginDuration; 26 | 27 | private Boolean notSetPayPwd; 28 | 29 | public static MemberSecurityInfoVO convertFor(Member po) { 30 | if (po == null) { 31 | return null; 32 | } 33 | MemberSecurityInfoVO vo = new MemberSecurityInfoVO(); 34 | BeanUtils.copyProperties(po, vo); 35 | vo.setNotSetPayPwd(StrUtil.isBlank(po.getPayPwd())); 36 | return vo; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/receiptpaymentinfo/param/AddReceiptPaymentInfoParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.receiptpaymentinfo.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.common.utils.IdUtils; 10 | import com.c2cpay.receiptpaymentinfo.domain.ReceiptPaymentInfo; 11 | 12 | import lombok.Data; 13 | 14 | @Data 15 | public class AddReceiptPaymentInfoParam { 16 | 17 | @NotBlank 18 | private String memberId; 19 | 20 | @NotBlank 21 | private String type; 22 | 23 | private String cardNumber; 24 | 25 | private String bankName; 26 | 27 | private String account; 28 | 29 | private String qrcode; 30 | 31 | public ReceiptPaymentInfo convertToPo() { 32 | ReceiptPaymentInfo po = new ReceiptPaymentInfo(); 33 | BeanUtils.copyProperties(this, po); 34 | po.setId(IdUtils.getId()); 35 | po.setCreateTime(new Date()); 36 | po.setActivated(false); 37 | po.setDeletedFlag(false); 38 | return po; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/InitiateAppealParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.common.utils.IdUtils; 10 | import com.c2cpay.constants.Constant; 11 | import com.c2cpay.trade.domain.TradeAppealRecord; 12 | 13 | import lombok.Data; 14 | 15 | @Data 16 | public class InitiateAppealParam { 17 | 18 | @NotBlank 19 | private String initiatorId; 20 | 21 | @NotBlank 22 | private String tradeOrderId; 23 | 24 | @NotBlank 25 | private String appealType; 26 | 27 | private String appealDesc; 28 | 29 | public TradeAppealRecord convertToPo(String defendantId) { 30 | TradeAppealRecord po = new TradeAppealRecord(); 31 | BeanUtils.copyProperties(this, po); 32 | po.setId(IdUtils.getId()); 33 | po.setOrderNo(po.getId()); 34 | po.setCreateTime(new Date()); 35 | po.setState(Constant.申诉状态_待处理); 36 | po.setDefendantId(defendantId); 37 | return po; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/common/utils/ThreadPoolUtils.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.common.utils; 2 | 3 | import java.util.concurrent.ScheduledThreadPoolExecutor; 4 | 5 | public class ThreadPoolUtils { 6 | 7 | private static ScheduledThreadPoolExecutor unreadNoticePool = new ScheduledThreadPoolExecutor(2); 8 | 9 | private static ScheduledThreadPoolExecutor riskPool = new ScheduledThreadPoolExecutor(6); 10 | 11 | private static ScheduledThreadPoolExecutor transferPool = new ScheduledThreadPoolExecutor(8); 12 | 13 | private static ScheduledThreadPoolExecutor sendSmsPool = new ScheduledThreadPoolExecutor(4); 14 | 15 | public static ScheduledThreadPoolExecutor getUnreadNoticePool() { 16 | return unreadNoticePool; 17 | } 18 | 19 | public static ScheduledThreadPoolExecutor getRiskPool() { 20 | return riskPool; 21 | } 22 | 23 | public static ScheduledThreadPoolExecutor getTransferPool() { 24 | return transferPool; 25 | } 26 | 27 | public static ScheduledThreadPoolExecutor getSendSmsPool() { 28 | return sendSmsPool; 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/vo/MemberFinanceDetailVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.vo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.dictconfig.DictHolder; 8 | import com.c2cpay.log.domain.MemberBalanceChangeLog; 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | 11 | import lombok.Data; 12 | 13 | @Data 14 | public class MemberFinanceDetailVO { 15 | 16 | private String id; 17 | 18 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 19 | private Date changeTime; 20 | 21 | private String changeType; 22 | 23 | private String changeTypeName; 24 | 25 | private Double balanceChange; 26 | 27 | public static MemberFinanceDetailVO convertFor(MemberBalanceChangeLog po) { 28 | if (po == null) { 29 | return null; 30 | } 31 | MemberFinanceDetailVO vo = new MemberFinanceDetailVO(); 32 | BeanUtils.copyProperties(po, vo); 33 | vo.setChangeTypeName(DictHolder.getDictItemName("memberBalanceChangeType", vo.getChangeType())); 34 | return vo; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/TradeOrderRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | 11 | import com.c2cpay.trade.domain.TradeOrder; 12 | 13 | public interface TradeOrderRepo extends JpaRepository, JpaSpecificationExecutor { 14 | 15 | @Modifying 16 | @Query(nativeQuery = true, value = "delete from trade_order where create_time >= ?1 and create_time <= ?2") 17 | Integer dataClean(Date startTime, Date endTime); 18 | 19 | List findByPreTradeOrderId(String preTradeOrderId); 20 | 21 | List findByStateAndOrderDeadlineLessThan(String state, Date orderDeadline); 22 | 23 | List findByStateAndTradeDeadlineLessThan(String state, Date tradeDeadline); 24 | 25 | } 26 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/domain/DictType.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | import javax.persistence.Version; 11 | 12 | import org.hibernate.annotations.DynamicInsert; 13 | import org.hibernate.annotations.DynamicUpdate; 14 | 15 | import lombok.Getter; 16 | import lombok.Setter; 17 | 18 | @Getter 19 | @Setter 20 | @Entity 21 | @Table(name = "dict_type") 22 | @DynamicInsert(true) 23 | @DynamicUpdate(true) 24 | public class DictType implements Serializable { 25 | 26 | /** 27 | * 28 | */ 29 | private static final long serialVersionUID = 1L; 30 | 31 | @Id 32 | @Column(name = "id", length = 32) 33 | private String id; 34 | 35 | private String dictTypeCode; 36 | 37 | private String dictTypeName; 38 | 39 | private String note; 40 | 41 | private Date lastModifyTime; 42 | 43 | @Version 44 | private Long version; 45 | 46 | } 47 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/storage/vo/StorageVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.storage.vo; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import org.springframework.beans.BeanUtils; 7 | 8 | import com.c2cpay.storage.domain.Storage; 9 | import com.fasterxml.jackson.annotation.JsonFormat; 10 | 11 | import lombok.Data; 12 | 13 | @Data 14 | public class StorageVO implements Serializable { 15 | 16 | /** 17 | * 18 | */ 19 | private static final long serialVersionUID = 1L; 20 | 21 | private String id; 22 | 23 | private String fileName; 24 | 25 | private String fileType; 26 | 27 | private Long fileSize; 28 | 29 | private String url; 30 | 31 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 32 | private Date uploadTime; 33 | 34 | private String associateBiz; 35 | 36 | private String associateId; 37 | 38 | public static StorageVO convertFor(Storage storage) { 39 | if (storage == null) { 40 | return null; 41 | } 42 | StorageVO vo = new StorageVO(); 43 | BeanUtils.copyProperties(storage, vo); 44 | return vo; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/BuyParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.DecimalMin; 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import org.springframework.beans.BeanUtils; 10 | 11 | import com.c2cpay.common.utils.IdUtils; 12 | import com.c2cpay.constants.Constant; 13 | import com.c2cpay.trade.domain.TradeOrder; 14 | 15 | import lombok.Data; 16 | 17 | @Data 18 | public class BuyParam { 19 | 20 | @NotBlank 21 | private String buyerId; 22 | 23 | @NotNull 24 | @DecimalMin(value = "0", inclusive = false) 25 | private Double amount; 26 | 27 | @NotBlank 28 | private String preTradeOrderId; 29 | 30 | @NotBlank 31 | private String paymentInfoId; 32 | 33 | public TradeOrder convertToPo() { 34 | TradeOrder po = new TradeOrder(); 35 | BeanUtils.copyProperties(this, po); 36 | po.setId(IdUtils.getId()); 37 | po.setOrderNo(po.getId()); 38 | po.setCreateTime(new Date()); 39 | po.setState(Constant.交易订单状态_待接单); 40 | return po; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/SellParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.DecimalMin; 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import org.springframework.beans.BeanUtils; 10 | 11 | import com.c2cpay.common.utils.IdUtils; 12 | import com.c2cpay.constants.Constant; 13 | import com.c2cpay.trade.domain.TradeOrder; 14 | 15 | import lombok.Data; 16 | 17 | @Data 18 | public class SellParam { 19 | 20 | @NotBlank 21 | private String sellerId; 22 | 23 | @NotNull 24 | @DecimalMin(value = "0", inclusive = false) 25 | private Double amount; 26 | 27 | @NotBlank 28 | private String receiptInfoId; 29 | 30 | @NotBlank 31 | private String preTradeOrderId; 32 | 33 | public TradeOrder convertToPo() { 34 | TradeOrder po = new TradeOrder(); 35 | BeanUtils.copyProperties(this, po); 36 | po.setId(IdUtils.getId()); 37 | po.setOrderNo(po.getId()); 38 | po.setCreateTime(new Date()); 39 | po.setState(Constant.交易订单状态_待接单); 40 | return po; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/domain/Role.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import lombok.Getter; 15 | import lombok.Setter; 16 | 17 | @Getter 18 | @Setter 19 | @Entity 20 | @Table(name = "role") 21 | @DynamicInsert(true) 22 | @DynamicUpdate(true) 23 | public class Role implements Serializable { 24 | 25 | /** 26 | * 27 | */ 28 | private static final long serialVersionUID = 1L; 29 | 30 | /** 31 | * 主键id 32 | */ 33 | @Id 34 | @Column(name = "id", length = 32) 35 | private String id; 36 | 37 | private String name; 38 | 39 | private Date createTime; 40 | 41 | private Boolean deletedFlag; 42 | 43 | private Date deletedTime; 44 | 45 | public void deleted() { 46 | this.setDeletedFlag(true); 47 | this.setDeletedTime(new Date()); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/statistic/EverydayTradeDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo.statistic; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.trade.domain.statistic.EverydayTradeData; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class EverydayTradeDataVO { 17 | 18 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") 19 | private Date everyday; 20 | 21 | private Double successAmount; 22 | 23 | private Integer successCount; 24 | 25 | public static List convertFor(List pos) { 26 | if (CollectionUtil.isEmpty(pos)) { 27 | return new ArrayList<>(); 28 | } 29 | List vos = new ArrayList<>(); 30 | for (EverydayTradeData po : pos) { 31 | EverydayTradeDataVO vo = new EverydayTradeDataVO(); 32 | BeanUtils.copyProperties(po, vo); 33 | vos.add(vo); 34 | } 35 | return vos; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/storage/domain/Storage.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.storage.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | import javax.persistence.Version; 11 | 12 | import org.hibernate.annotations.DynamicInsert; 13 | import org.hibernate.annotations.DynamicUpdate; 14 | 15 | import lombok.Getter; 16 | import lombok.Setter; 17 | 18 | @Getter 19 | @Setter 20 | @Entity 21 | @Table(name = "storage") 22 | @DynamicInsert(true) 23 | @DynamicUpdate(true) 24 | public class Storage implements Serializable { 25 | 26 | /** 27 | * 28 | */ 29 | private static final long serialVersionUID = 1L; 30 | 31 | @Id 32 | @Column(name = "id", length = 32) 33 | private String id; 34 | 35 | private String fileName; 36 | 37 | private String fileType; 38 | 39 | private Long fileSize; 40 | 41 | private String url; 42 | 43 | private Date uploadTime; 44 | 45 | private String associateBiz; 46 | 47 | private String associateId; 48 | 49 | @Version 50 | private Long version; 51 | 52 | } 53 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/vo/RoleVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.backgroundaccount.domain.Role; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class RoleVO { 17 | 18 | private String id; 19 | 20 | private String name; 21 | 22 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 23 | private Date createTime; 24 | 25 | public static List convertFor(List roles) { 26 | if (CollectionUtil.isEmpty(roles)) { 27 | return new ArrayList<>(); 28 | } 29 | List vos = new ArrayList<>(); 30 | for (Role role : roles) { 31 | vos.add(convertFor(role)); 32 | } 33 | return vos; 34 | } 35 | 36 | public static RoleVO convertFor(Role role) { 37 | if (role == null) { 38 | return null; 39 | } 40 | RoleVO vo = new RoleVO(); 41 | BeanUtils.copyProperties(role, vo); 42 | return vo; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/vo/DictItemVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.vo; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.domain.DictItem; 10 | 11 | import cn.hutool.core.collection.CollectionUtil; 12 | import lombok.Data; 13 | 14 | @Data 15 | public class DictItemVO implements Serializable { 16 | 17 | private static final long serialVersionUID = 1L; 18 | 19 | private String dictItemCode; 20 | 21 | private String dictItemName; 22 | 23 | 24 | public static List convertFor(List dictItems) { 25 | if (CollectionUtil.isEmpty(dictItems)) { 26 | return new ArrayList<>(); 27 | } 28 | List vos = new ArrayList<>(); 29 | for (DictItem dictItem : dictItems) { 30 | vos.add(convertFor(dictItem)); 31 | } 32 | return vos; 33 | } 34 | 35 | public static DictItemVO convertFor(DictItem dictItem) { 36 | if (dictItem == null) { 37 | return null; 38 | } 39 | DictItemVO vo = new DictItemVO(); 40 | BeanUtils.copyProperties(dictItem, vo); 41 | return vo; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/vo/MerchantInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.vo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.merchant.domain.Merchant; 8 | import com.fasterxml.jackson.annotation.JsonFormat; 9 | 10 | import lombok.Data; 11 | 12 | @Data 13 | public class MerchantInfoVO { 14 | 15 | private String id; 16 | 17 | private String userName; 18 | 19 | private String merchantName; 20 | 21 | private String walletAddr; 22 | 23 | private String apiSecretKey; 24 | 25 | private String ipWhiteList; 26 | 27 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 28 | private Date createTime; 29 | 30 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 31 | private Date latelyLoginTime; 32 | 33 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 34 | private Date googleAuthBindTime; 35 | 36 | public static MerchantInfoVO convertFor(Merchant merchant) { 37 | if (merchant == null) { 38 | return null; 39 | } 40 | MerchantInfoVO vo = new MerchantInfoVO(); 41 | BeanUtils.copyProperties(merchant, vo); 42 | return vo; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/domain/OperLog.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import lombok.Getter; 15 | import lombok.Setter; 16 | 17 | @Getter 18 | @Setter 19 | @Entity 20 | @Table(name = "oper_log") 21 | @DynamicInsert(true) 22 | @DynamicUpdate(true) 23 | public class OperLog implements Serializable { 24 | 25 | /** 26 | * 27 | */ 28 | private static final long serialVersionUID = 1L; 29 | 30 | @Id 31 | @Column(name = "id", length = 32) 32 | private String id; 33 | 34 | private String subSystem; 35 | 36 | private String module; 37 | 38 | private String operate; 39 | 40 | private String requestMethod; 41 | 42 | private String requestUrl; 43 | 44 | private String requestParam; 45 | 46 | private String ipAddr; 47 | 48 | private String operAccountId; 49 | 50 | private String operName; 51 | 52 | private Date operTime; 53 | 54 | } 55 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/DictHolder.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig; 2 | 3 | import java.util.List; 4 | 5 | import javax.annotation.PostConstruct; 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Component; 9 | 10 | import com.c2cpay.dictconfig.service.DictService; 11 | import com.c2cpay.dictconfig.vo.DictItemVO; 12 | 13 | @Component 14 | public class DictHolder { 15 | 16 | @Autowired 17 | private DictService dictService; 18 | 19 | private static DictHolder dictHolder; 20 | 21 | @PostConstruct 22 | public void init() { 23 | dictHolder = this; 24 | dictHolder.dictService = this.dictService; 25 | } 26 | 27 | public static String getDictItemName(String dictTypeCode, String dictItemCode) { 28 | DictItemVO dictItemVO = dictHolder.dictService.findDictItemByDictTypeCodeAndDictItemCode(dictTypeCode, 29 | dictItemCode); 30 | if (dictItemVO == null) { 31 | return null; 32 | } 33 | return dictItemVO.getDictItemName(); 34 | } 35 | 36 | public static List findDictItem(String dictTypeCode) { 37 | return dictHolder.dictService.findDictItemByDictTypeCode(dictTypeCode); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/repo/TradeChatUnreadRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.repo; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | 11 | import com.c2cpay.trade.domain.TradeChatUnread; 12 | 13 | public interface TradeChatUnreadRepo 14 | extends JpaRepository, JpaSpecificationExecutor { 15 | 16 | @Modifying 17 | @Query(nativeQuery = true, value = "delete from trade_chat_unread where trade_order_id in (select id from trade_order where create_time >= ?1 and create_time <= ?2)") 18 | Integer dataClean(Date startTime, Date endTime); 19 | 20 | List findByTradeOrderIdAndReceiverIdAndUnreadFlagIsTrue(String tradeOrderId, String receiverId); 21 | 22 | Long countByTradeOrderIdAndReceiverIdAndUnreadFlagIsTrue(String tradeOrderId, String receiverId); 23 | 24 | List findByTradeChatRecordIdAndUnreadFlagIsTrue(String tradeChatRecordId); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/domain/Menu.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import lombok.Getter; 15 | import lombok.Setter; 16 | 17 | @Getter 18 | @Setter 19 | @Entity 20 | @Table(name = "menu") 21 | @DynamicInsert(true) 22 | @DynamicUpdate(true) 23 | public class Menu implements Serializable { 24 | 25 | /** 26 | * 27 | */ 28 | private static final long serialVersionUID = 1L; 29 | 30 | /** 31 | * 主键id 32 | */ 33 | @Id 34 | @Column(name = "id", length = 32) 35 | private String id; 36 | 37 | private String name; 38 | 39 | private String url; 40 | 41 | private String type; 42 | 43 | private Double orderNo; 44 | 45 | private String parentId; 46 | 47 | private Boolean deletedFlag; 48 | 49 | private Date deletedTime; 50 | 51 | public void deleted() { 52 | this.setDeletedFlag(true); 53 | this.setDeletedTime(new Date()); 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/notice/domain/Notice.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.notice.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | import javax.persistence.Version; 11 | 12 | import org.hibernate.annotations.DynamicInsert; 13 | import org.hibernate.annotations.DynamicUpdate; 14 | 15 | import lombok.Getter; 16 | import lombok.Setter; 17 | 18 | @Getter 19 | @Setter 20 | @Entity 21 | @Table(name = "notice") 22 | @DynamicInsert(true) 23 | @DynamicUpdate(true) 24 | public class Notice implements Serializable { 25 | 26 | /** 27 | * 28 | */ 29 | private static final long serialVersionUID = 1L; 30 | 31 | @Id 32 | @Column(name = "id", length = 32) 33 | private String id; 34 | 35 | private String title; 36 | 37 | private String content; 38 | 39 | private Boolean importantFlag; 40 | 41 | private Date publishTime; 42 | 43 | private Boolean deletedFlag; 44 | 45 | private Date deletedTime; 46 | 47 | @Version 48 | private Long version; 49 | 50 | public void deleted() { 51 | this.setDeletedFlag(true); 52 | this.setDeletedTime(new Date()); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/param/CreatePreTradeOrderParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.DecimalMin; 6 | import javax.validation.constraints.NotBlank; 7 | import javax.validation.constraints.NotNull; 8 | 9 | import org.springframework.beans.BeanUtils; 10 | 11 | import com.c2cpay.common.utils.IdUtils; 12 | import com.c2cpay.constants.Constant; 13 | import com.c2cpay.trade.domain.PreTradeOrder; 14 | 15 | import lombok.Data; 16 | 17 | @Data 18 | public class CreatePreTradeOrderParam { 19 | 20 | @NotBlank 21 | private String memberId; 22 | 23 | @NotBlank 24 | private String tradeType; 25 | 26 | @NotBlank 27 | private String receiptPaymentType; 28 | 29 | @NotNull 30 | @DecimalMin(value = "0", inclusive = false) 31 | private Double amount; 32 | 33 | private Double minAmount; 34 | 35 | public PreTradeOrder convertToPo() { 36 | PreTradeOrder po = new PreTradeOrder(); 37 | BeanUtils.copyProperties(this, po); 38 | po.setId(IdUtils.getId()); 39 | po.setOrderNo(po.getId()); 40 | po.setCreateTime(new Date()); 41 | po.setState(Constant.预交易订单状态_进行中); 42 | po.setMaxAmount(po.getAmount()); 43 | po.setAvailableAmount(po.getAmount()); 44 | return po; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/config/xss/XssFilter.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.config.xss; 2 | 3 | import java.io.IOException; 4 | 5 | import javax.servlet.Filter; 6 | import javax.servlet.FilterChain; 7 | import javax.servlet.FilterConfig; 8 | import javax.servlet.ServletException; 9 | import javax.servlet.ServletRequest; 10 | import javax.servlet.ServletResponse; 11 | import javax.servlet.http.HttpServletRequest; 12 | 13 | /** 14 | * Xss攻击过滤器 15 | * 16 | */ 17 | public class XssFilter implements Filter { 18 | 19 | @Override 20 | public void init(FilterConfig filterConfig) throws ServletException { 21 | } 22 | 23 | @Override 24 | public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 25 | throws IOException, ServletException { 26 | HttpServletRequest httpRequest = (HttpServletRequest) request; 27 | String path = httpRequest.getServletPath(); 28 | String[] exclusionsUrls = { ".js", ".gif", ".jpg", ".png", ".css", ".ico" }; 29 | for (String str : exclusionsUrls) { 30 | if (path.contains(str)) { 31 | chain.doFilter(request, response); 32 | return; 33 | } 34 | } 35 | chain.doFilter(new XssHttpServletRequestWrapper(httpRequest), response); 36 | } 37 | 38 | @Override 39 | public void destroy() { 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/MemberReceiptRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.transfer.domain.MemberReceiptRecord; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class MemberReceiptRecordVO { 17 | 18 | private String id; 19 | 20 | private Double amount; 21 | 22 | @JsonFormat(pattern = "HH:mm dd/MM/yyyy", timezone = "GMT+8") 23 | private Date createTime; 24 | 25 | public static List convertFor(List pos) { 26 | if (CollectionUtil.isEmpty(pos)) { 27 | return new ArrayList<>(); 28 | } 29 | List vos = new ArrayList<>(); 30 | for (MemberReceiptRecord po : pos) { 31 | vos.add(convertFor(po)); 32 | } 33 | return vos; 34 | } 35 | 36 | public static MemberReceiptRecordVO convertFor(MemberReceiptRecord po) { 37 | if (po == null) { 38 | return null; 39 | } 40 | MemberReceiptRecordVO vo = new MemberReceiptRecordVO(); 41 | BeanUtils.copyProperties(po, vo); 42 | return vo; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/vo/MerchantFundInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.vo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.merchant.domain.Merchant; 8 | 9 | import cn.hutool.core.util.NumberUtil; 10 | import lombok.Data; 11 | 12 | @Data 13 | public class MerchantFundInfoVO { 14 | 15 | private Double balance = 0d; 16 | 17 | private Double freezeFund = 0d; 18 | 19 | private Double totalFund = 0d; 20 | 21 | public static MerchantFundInfoVO convertFor(Merchant po) { 22 | if (po == null) { 23 | return null; 24 | } 25 | MerchantFundInfoVO vo = new MerchantFundInfoVO(); 26 | BeanUtils.copyProperties(po, vo); 27 | vo.setTotalFund(NumberUtil.round(vo.getBalance() + vo.getFreezeFund(), 2).doubleValue()); 28 | return vo; 29 | } 30 | 31 | public static MerchantFundInfoVO convertFor(List pos) { 32 | MerchantFundInfoVO vo = new MerchantFundInfoVO(); 33 | for (Merchant po : pos) { 34 | vo.setBalance(NumberUtil.round(vo.getBalance() + po.getBalance(), 2).doubleValue()); 35 | vo.setFreezeFund(NumberUtil.round(vo.getFreezeFund() + 0, 2).doubleValue()); 36 | } 37 | vo.setTotalFund(NumberUtil.round(vo.getBalance() + vo.getFreezeFund(), 2).doubleValue()); 38 | return vo; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/MemberTransferRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.transfer.domain.MemberTransferRecord; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class MemberTransferRecordVO { 17 | 18 | private String id; 19 | 20 | private Double amount; 21 | 22 | @JsonFormat(pattern = "HH:mm dd/MM/yyyy", timezone = "GMT+8") 23 | private Date createTime; 24 | 25 | public static List convertFor(List pos) { 26 | if (CollectionUtil.isEmpty(pos)) { 27 | return new ArrayList<>(); 28 | } 29 | List vos = new ArrayList<>(); 30 | for (MemberTransferRecord po : pos) { 31 | vos.add(convertFor(po)); 32 | } 33 | return vos; 34 | } 35 | 36 | public static MemberTransferRecordVO convertFor(MemberTransferRecord po) { 37 | if (po == null) { 38 | return null; 39 | } 40 | MemberTransferRecordVO vo = new MemberTransferRecordVO(); 41 | BeanUtils.copyProperties(po, vo); 42 | return vo; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/vo/DictTypeVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.domain.DictType; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class DictTypeVO { 17 | 18 | private String id; 19 | 20 | private String dictTypeCode; 21 | 22 | private String dictTypeName; 23 | 24 | private String note; 25 | 26 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 27 | private Date lastModifyTime; 28 | 29 | public static List convertFor(List dictTypes) { 30 | if (CollectionUtil.isEmpty(dictTypes)) { 31 | return new ArrayList<>(); 32 | } 33 | List vos = new ArrayList<>(); 34 | for (DictType dictType : dictTypes) { 35 | vos.add(convertFor(dictType)); 36 | } 37 | return vos; 38 | } 39 | 40 | public static DictTypeVO convertFor(DictType dictType) { 41 | if (dictType == null) { 42 | return null; 43 | } 44 | DictTypeVO vo = new DictTypeVO(); 45 | BeanUtils.copyProperties(dictType, vo); 46 | return vo; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/vo/SuperAdminVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.backgroundaccount.domain.BackgroundAccount; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class SuperAdminVO { 17 | 18 | private String id; 19 | 20 | private String userName; 21 | 22 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 23 | private Date latelyLoginTime; 24 | 25 | public static List convertFor(List userAccounts) { 26 | if (CollectionUtil.isEmpty(userAccounts)) { 27 | return new ArrayList<>(); 28 | } 29 | List vos = new ArrayList<>(); 30 | for (BackgroundAccount userAccount : userAccounts) { 31 | vos.add(convertFor(userAccount)); 32 | } 33 | return vos; 34 | } 35 | 36 | public static SuperAdminVO convertFor(BackgroundAccount userAccount) { 37 | if (userAccount == null) { 38 | return null; 39 | } 40 | SuperAdminVO vo = new SuperAdminVO(); 41 | BeanUtils.copyProperties(userAccount, vo); 42 | return vo; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/vo/MemberFundInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.vo; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.member.domain.Member; 8 | 9 | import cn.hutool.core.util.NumberUtil; 10 | import lombok.Data; 11 | 12 | @Data 13 | public class MemberFundInfoVO { 14 | 15 | private Double balance = 0d; 16 | 17 | private Double freezeFund = 0d; 18 | 19 | private Double totalFund = 0d; 20 | 21 | private String walletAddr; 22 | 23 | public static MemberFundInfoVO convertFor(Member po) { 24 | if (po == null) { 25 | return null; 26 | } 27 | MemberFundInfoVO vo = new MemberFundInfoVO(); 28 | BeanUtils.copyProperties(po, vo); 29 | vo.setTotalFund(NumberUtil.round(vo.getBalance() + vo.getFreezeFund(), 2).doubleValue()); 30 | return vo; 31 | } 32 | 33 | public static MemberFundInfoVO convertFor(List pos) { 34 | MemberFundInfoVO vo = new MemberFundInfoVO(); 35 | for (Member po : pos) { 36 | vo.setBalance(NumberUtil.round(vo.getBalance() + po.getBalance(), 2).doubleValue()); 37 | vo.setFreezeFund(NumberUtil.round(vo.getFreezeFund() + po.getFreezeFund(), 2).doubleValue()); 38 | } 39 | vo.setTotalFund(NumberUtil.round(vo.getBalance() + vo.getFreezeFund(), 2).doubleValue()); 40 | return vo; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/AvailableTradeOrderVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.springframework.beans.BeanUtils; 7 | 8 | import com.c2cpay.trade.domain.PreTradeOrder; 9 | 10 | import cn.hutool.core.collection.CollectionUtil; 11 | import lombok.Data; 12 | 13 | @Data 14 | public class AvailableTradeOrderVO { 15 | 16 | private String id; 17 | 18 | private String tradeType; 19 | 20 | private String receiptPaymentType; 21 | 22 | private Double minAmount; 23 | 24 | private Double maxAmount; 25 | 26 | private Double availableAmount; 27 | 28 | private String nickName; 29 | 30 | public static List convertFor(List pos) { 31 | if (CollectionUtil.isEmpty(pos)) { 32 | return new ArrayList<>(); 33 | } 34 | List vos = new ArrayList<>(); 35 | for (PreTradeOrder po : pos) { 36 | vos.add(convertFor(po)); 37 | } 38 | return vos; 39 | } 40 | 41 | public static AvailableTradeOrderVO convertFor(PreTradeOrder po) { 42 | if (po == null) { 43 | return null; 44 | } 45 | AvailableTradeOrderVO vo = new AvailableTradeOrderVO(); 46 | BeanUtils.copyProperties(po, vo); 47 | vo.setNickName(po.getMember().getNickName()); 48 | return vo; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/vo/MenuVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.vo; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.backgroundaccount.domain.Menu; 10 | 11 | import cn.hutool.core.collection.CollectionUtil; 12 | import lombok.Data; 13 | 14 | @Data 15 | public class MenuVO implements Serializable { 16 | 17 | /** 18 | * 19 | */ 20 | private static final long serialVersionUID = 1L; 21 | 22 | private String id; 23 | 24 | private String name; 25 | 26 | private String url; 27 | 28 | private String type; 29 | 30 | private Double orderNo; 31 | 32 | private String parentId; 33 | 34 | private List subMenus = new ArrayList(); 35 | 36 | public static List convertFor(List menus) { 37 | if (CollectionUtil.isEmpty(menus)) { 38 | return new ArrayList<>(); 39 | } 40 | List vos = new ArrayList<>(); 41 | for (Menu menu : menus) { 42 | vos.add(convertFor(menu)); 43 | } 44 | return vos; 45 | } 46 | 47 | public static MenuVO convertFor(Menu menu) { 48 | if (menu == null) { 49 | return null; 50 | } 51 | MenuVO vo = new MenuVO(); 52 | BeanUtils.copyProperties(menu, vo); 53 | return vo; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/notice/vo/NoticeVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.notice.vo; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | import java.util.Date; 6 | import java.util.List; 7 | 8 | import org.springframework.beans.BeanUtils; 9 | 10 | import com.c2cpay.notice.domain.Notice; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class NoticeVO implements Serializable { 18 | 19 | /** 20 | * 21 | */ 22 | private static final long serialVersionUID = 1L; 23 | 24 | private String id; 25 | 26 | private String title; 27 | 28 | private String content; 29 | 30 | private Boolean importantFlag; 31 | 32 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 33 | private Date publishTime; 34 | 35 | public static List convertFor(List pos) { 36 | if (CollectionUtil.isEmpty(pos)) { 37 | return new ArrayList<>(); 38 | } 39 | List vos = new ArrayList<>(); 40 | for (Notice po : pos) { 41 | vos.add(convertFor(po)); 42 | } 43 | return vos; 44 | } 45 | 46 | public static NoticeVO convertFor(Notice po) { 47 | if (po == null) { 48 | return null; 49 | } 50 | NoticeVO vo = new NoticeVO(); 51 | BeanUtils.copyProperties(po, vo); 52 | return vo; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/domain/SystemSetting.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import com.c2cpay.common.utils.IdUtils; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Getter; 18 | import lombok.NoArgsConstructor; 19 | import lombok.Setter; 20 | 21 | @Getter 22 | @Setter 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | @Entity 26 | @Table(name = "system_setting") 27 | @DynamicInsert(true) 28 | @DynamicUpdate(true) 29 | public class SystemSetting implements Serializable { 30 | 31 | /** 32 | * 33 | */ 34 | private static final long serialVersionUID = 1L; 35 | 36 | @Id 37 | @Column(name = "id", length = 32) 38 | private String id; 39 | 40 | private String appUrl; 41 | 42 | private Double appVersion; 43 | 44 | private String apiGateway; 45 | 46 | private String localStoragePath; 47 | 48 | private Date latelyUpdateTime; 49 | 50 | public static SystemSetting build() { 51 | SystemSetting setting = new SystemSetting(); 52 | setting.setId(IdUtils.getId()); 53 | return setting; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/notice/vo/NoticeAbstractVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.notice.vo; 2 | 3 | import java.io.Serializable; 4 | import java.util.ArrayList; 5 | import java.util.Date; 6 | import java.util.List; 7 | 8 | import org.springframework.beans.BeanUtils; 9 | 10 | import com.c2cpay.notice.domain.Notice; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class NoticeAbstractVO implements Serializable { 18 | 19 | /** 20 | * 21 | */ 22 | private static final long serialVersionUID = 1L; 23 | 24 | private String id; 25 | 26 | private String title; 27 | 28 | private Boolean importantFlag; 29 | 30 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 31 | private Date publishTime; 32 | 33 | public static List convertFor(List pos) { 34 | if (CollectionUtil.isEmpty(pos)) { 35 | return new ArrayList<>(); 36 | } 37 | List vos = new ArrayList<>(); 38 | for (Notice po : pos) { 39 | vos.add(convertFor(po)); 40 | } 41 | return vos; 42 | } 43 | 44 | public static NoticeAbstractVO convertFor(Notice po) { 45 | if (po == null) { 46 | return null; 47 | } 48 | NoticeAbstractVO vo = new NoticeAbstractVO(); 49 | BeanUtils.copyProperties(po, vo); 50 | return vo; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/repo/MerchantReceiptRecordRepo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.repo; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | import org.springframework.data.jpa.repository.JpaRepository; 7 | import org.springframework.data.jpa.repository.JpaSpecificationExecutor; 8 | import org.springframework.data.jpa.repository.Modifying; 9 | import org.springframework.data.jpa.repository.Query; 10 | 11 | import com.c2cpay.transfer.domain.MerchantReceiptRecord; 12 | 13 | public interface MerchantReceiptRecordRepo 14 | extends JpaRepository, JpaSpecificationExecutor { 15 | 16 | @Modifying 17 | @Query(nativeQuery = true, value = "delete from merchant_receipt_record where create_time >= ?1 and create_time <= ?2") 18 | Integer dataClean(Date startTime, Date endTime); 19 | 20 | MerchantReceiptRecord findTopByOrderNo(String orderNo); 21 | 22 | List findByStateAndReceiptFundSyncFalse(String state); 23 | 24 | List findByStateAndLockDeadlineLessThan(String state, Date lockDeadline); 25 | 26 | List findByStateAndTransferDeadlineLessThan(String state, Date transferDeadline); 27 | 28 | @Modifying 29 | @Query("update MerchantReceiptRecord m set m.noticeState=?2 where m.id=?1") 30 | void updateNoticeState(String id, String state); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/TradeOrderStateLogVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.trade.domain.TradeOrderStateLog; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class TradeOrderStateLogVO { 18 | 19 | private String state; 20 | 21 | private String stateName; 22 | 23 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 24 | private Date logTime; 25 | 26 | public static List convertFor(List pos) { 27 | if (CollectionUtil.isEmpty(pos)) { 28 | return new ArrayList<>(); 29 | } 30 | List vos = new ArrayList<>(); 31 | for (TradeOrderStateLog po : pos) { 32 | vos.add(convertFor(po)); 33 | } 34 | return vos; 35 | } 36 | 37 | public static TradeOrderStateLogVO convertFor(TradeOrderStateLog po) { 38 | if (po == null) { 39 | return null; 40 | } 41 | TradeOrderStateLogVO vo = new TradeOrderStateLogVO(); 42 | BeanUtils.copyProperties(po, vo); 43 | vo.setStateName(DictHolder.getDictItemName("tradeOrderState", vo.getState())); 44 | return vo; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/param/AddMerchantParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.param; 2 | 3 | import java.util.Date; 4 | 5 | import javax.validation.constraints.NotBlank; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.common.utils.IdUtils; 10 | import com.c2cpay.constants.Constant; 11 | import com.c2cpay.merchant.domain.Merchant; 12 | 13 | import cn.dev33.satoken.secure.SaSecureUtil; 14 | import cn.hutool.core.lang.UUID; 15 | import cn.hutool.core.util.IdUtil; 16 | import cn.hutool.crypto.SecureUtil; 17 | import lombok.Data; 18 | 19 | @Data 20 | public class AddMerchantParam { 21 | 22 | @NotBlank 23 | private String userName; 24 | 25 | @NotBlank 26 | private String loginPwd; 27 | 28 | @NotBlank 29 | private String payPwd; 30 | 31 | @NotBlank 32 | private String merchantName; 33 | 34 | public Merchant convertToPo() { 35 | Merchant po = new Merchant(); 36 | BeanUtils.copyProperties(this, po); 37 | po.setId(IdUtils.getId()); 38 | po.setDeletedFlag(false); 39 | po.setCreateTime(new Date()); 40 | po.setBalance(0d); 41 | po.setState(Constant.功能状态_启用); 42 | po.setWalletAddr(IdUtil.fastSimpleUUID().substring(0, 16)); 43 | po.setLoginPwd(SaSecureUtil.sha256(po.getLoginPwd())); 44 | po.setPayPwd(SaSecureUtil.sha256(po.getPayPwd())); 45 | po.setApiSecretKey(SecureUtil.md5(UUID.fastUUID().toString())); 46 | return po; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/config/xss/XssConfig.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.config.xss; 2 | 3 | import javax.servlet.Filter; 4 | 5 | import org.springframework.boot.web.servlet.FilterRegistrationBean; 6 | import org.springframework.context.annotation.Bean; 7 | import org.springframework.context.annotation.Configuration; 8 | import org.springframework.context.annotation.Primary; 9 | import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; 10 | 11 | import com.fasterxml.jackson.databind.ObjectMapper; 12 | import com.fasterxml.jackson.databind.module.SimpleModule; 13 | 14 | @Configuration 15 | public class XssConfig { 16 | 17 | @Bean 18 | public FilterRegistrationBean xssFilterRegistrationBean() { 19 | FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean(new XssFilter()); 20 | filterRegistrationBean.setOrder(1); 21 | filterRegistrationBean.setEnabled(true); 22 | filterRegistrationBean.addUrlPatterns("/*"); 23 | return filterRegistrationBean; 24 | } 25 | 26 | @Bean 27 | @Primary 28 | public ObjectMapper xssObjectMapper(Jackson2ObjectMapperBuilder builder) { 29 | ObjectMapper objectMapper = builder.createXmlMapper(false).build(); 30 | SimpleModule xssModule = new SimpleModule(); 31 | xssModule.addDeserializer(String.class, new XssStringJsonDeserializer()); 32 | objectMapper.registerModule(xssModule); 33 | return objectMapper; 34 | } 35 | 36 | } -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MemberEverydayReceiptDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.transfer.domain.statistic.MemberEverydayReceiptData; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class MemberEverydayReceiptDataVO { 17 | 18 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") 19 | private Date everyday; 20 | 21 | private Double successAmount; 22 | 23 | private Integer successCount; 24 | 25 | private String mobile; 26 | 27 | private String realName; 28 | 29 | public static List convertFor(List pos) { 30 | if (CollectionUtil.isEmpty(pos)) { 31 | return new ArrayList<>(); 32 | } 33 | List vos = new ArrayList<>(); 34 | for (MemberEverydayReceiptData po : pos) { 35 | MemberEverydayReceiptDataVO vo = new MemberEverydayReceiptDataVO(); 36 | BeanUtils.copyProperties(po, vo); 37 | if (po.getAccount() != null) { 38 | vo.setMobile(po.getAccount().getMobile()); 39 | vo.setRealName(po.getAccount().getRealName()); 40 | } 41 | vos.add(vo); 42 | } 43 | return vos; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MemberEverydayTransferDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.transfer.domain.statistic.MemberEverydayTransferData; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class MemberEverydayTransferDataVO { 17 | 18 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") 19 | private Date everyday; 20 | 21 | private Double successAmount; 22 | 23 | private Integer successCount; 24 | 25 | private String mobile; 26 | 27 | private String realName; 28 | 29 | public static List convertFor(List pos) { 30 | if (CollectionUtil.isEmpty(pos)) { 31 | return new ArrayList<>(); 32 | } 33 | List vos = new ArrayList<>(); 34 | for (MemberEverydayTransferData po : pos) { 35 | MemberEverydayTransferDataVO vo = new MemberEverydayTransferDataVO(); 36 | BeanUtils.copyProperties(po, vo); 37 | if (po.getAccount() != null) { 38 | vo.setMobile(po.getAccount().getMobile()); 39 | vo.setRealName(po.getAccount().getRealName()); 40 | } 41 | vos.add(vo); 42 | } 43 | return vos; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/setting/domain/TradeRiskSetting.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.setting.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import com.c2cpay.common.utils.IdUtils; 15 | 16 | import lombok.AllArgsConstructor; 17 | import lombok.Getter; 18 | import lombok.NoArgsConstructor; 19 | import lombok.Setter; 20 | 21 | @Getter 22 | @Setter 23 | @AllArgsConstructor 24 | @NoArgsConstructor 25 | @Entity 26 | @Table(name = "trade_risk_setting") 27 | @DynamicInsert(true) 28 | @DynamicUpdate(true) 29 | public class TradeRiskSetting implements Serializable { 30 | 31 | /** 32 | * 33 | */ 34 | private static final long serialVersionUID = 1L; 35 | 36 | @Id 37 | @Column(name = "id", length = 32) 38 | private String id; 39 | 40 | private Long buyerCancelTrade; 41 | 42 | private Long sellerRejectOrder; 43 | 44 | private Long buyerUnPaid; 45 | 46 | private Long notMySelfPaid; 47 | 48 | private Long paidSellerUnConfirm; 49 | 50 | private Date latelyUpdateTime; 51 | 52 | public static TradeRiskSetting build() { 53 | TradeRiskSetting setting = new TradeRiskSetting(); 54 | setting.setId(IdUtils.getId()); 55 | return setting; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/domain/TradeChatUnread.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import com.c2cpay.common.utils.IdUtils; 15 | 16 | import lombok.Getter; 17 | import lombok.Setter; 18 | 19 | @Getter 20 | @Setter 21 | @Entity 22 | @Table(name = "trade_chat_unread") 23 | @DynamicInsert(true) 24 | @DynamicUpdate(true) 25 | public class TradeChatUnread implements Serializable { 26 | 27 | /** 28 | * 29 | */ 30 | private static final long serialVersionUID = 1L; 31 | 32 | @Id 33 | @Column(name = "id", length = 32) 34 | private String id; 35 | 36 | private Boolean unreadFlag; 37 | 38 | private Date readTime; 39 | 40 | private String tradeChatRecordId; 41 | 42 | private String receiverId; 43 | 44 | private String tradeOrderId; 45 | 46 | public static TradeChatUnread build(String tradeChatRecordId, String receiverId, String tradeOrderId) { 47 | TradeChatUnread po = new TradeChatUnread(); 48 | po.setId(IdUtils.getId()); 49 | po.setUnreadFlag(true); 50 | po.setTradeChatRecordId(tradeChatRecordId); 51 | po.setReceiverId(receiverId); 52 | po.setTradeOrderId(tradeOrderId); 53 | return po; 54 | } 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MerchantEverydayReceiptDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.transfer.domain.statistic.MerchantEverydayReceiptData; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class MerchantEverydayReceiptDataVO { 17 | 18 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") 19 | private Date everyday; 20 | 21 | private Double successAmount; 22 | 23 | private Integer successCount; 24 | 25 | private String userName; 26 | 27 | private String merchantName; 28 | 29 | public static List convertFor(List pos) { 30 | if (CollectionUtil.isEmpty(pos)) { 31 | return new ArrayList<>(); 32 | } 33 | List vos = new ArrayList<>(); 34 | for (MerchantEverydayReceiptData po : pos) { 35 | MerchantEverydayReceiptDataVO vo = new MerchantEverydayReceiptDataVO(); 36 | BeanUtils.copyProperties(po, vo); 37 | if (po.getAccount() != null) { 38 | vo.setUserName(po.getAccount().getUserName()); 39 | vo.setMerchantName(po.getAccount().getMerchantName()); 40 | } 41 | vos.add(vo); 42 | } 43 | return vos; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/statistic/MerchantEverydayTransferDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo.statistic; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.transfer.domain.statistic.MerchantEverydayTransferData; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class MerchantEverydayTransferDataVO { 17 | 18 | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") 19 | private Date everyday; 20 | 21 | private Double successAmount; 22 | 23 | private Integer successCount; 24 | 25 | private String userName; 26 | 27 | private String merchantName; 28 | 29 | public static List convertFor(List pos) { 30 | if (CollectionUtil.isEmpty(pos)) { 31 | return new ArrayList<>(); 32 | } 33 | List vos = new ArrayList<>(); 34 | for (MerchantEverydayTransferData po : pos) { 35 | MerchantEverydayTransferDataVO vo = new MerchantEverydayTransferDataVO(); 36 | BeanUtils.copyProperties(po, vo); 37 | if (po.getAccount() != null) { 38 | vo.setUserName(po.getAccount().getUserName()); 39 | vo.setMerchantName(po.getAccount().getMerchantName()); 40 | } 41 | vos.add(vo); 42 | } 43 | return vos; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/member/controller/MemberBalanceChangeLogController.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.controller; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.web.bind.annotation.GetMapping; 5 | import org.springframework.web.bind.annotation.RequestMapping; 6 | import org.springframework.web.bind.annotation.RestController; 7 | 8 | import com.c2cpay.common.vo.PageResult; 9 | import com.c2cpay.common.vo.Result; 10 | import com.c2cpay.log.param.MemberBalanceChangeLogQueryCondParam; 11 | import com.c2cpay.log.service.MemberBalanceChangeLogService; 12 | import com.c2cpay.log.vo.MemberFinanceDetailVO; 13 | import com.c2cpay.log.vo.MemberFinanceRecordVO; 14 | 15 | import cn.dev33.satoken.stp.StpUtil; 16 | 17 | @RestController 18 | @RequestMapping("/memberBalanceChangeLog") 19 | public class MemberBalanceChangeLogController { 20 | 21 | @Autowired 22 | private MemberBalanceChangeLogService memberBalanceChangeLogService; 23 | 24 | @GetMapping("/getDetail") 25 | public Result getDetail(String id) { 26 | return Result.success(memberBalanceChangeLogService.getDetail(id)); 27 | } 28 | 29 | @GetMapping("/findByPage") 30 | public Result> findByPage(MemberBalanceChangeLogQueryCondParam param) { 31 | param.setMemberId(StpUtil.getLoginIdAsString()); 32 | return Result.success(memberBalanceChangeLogService.findMemberFinanceRecordByPage(param)); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## 介绍 2 | 3 | 该项目基于Java开发。 4 | 5 | * 后端采用Spring Boot、Spring Data Jpa、Sa Token、 Redis、Mysql。 6 | * 前端采用uniapp跨端开发,一套代码,可发布到iOS、Android、Web(响应式)等多个平台,另外还有更流畅的flutter版本。 7 | * 本项目主要供交流学习,请不要用于商业项目。 8 | 9 | 10 | ## 联系我们 11 | 如需获取最新版本,请联系我们:纸飞机 Telegram:muyu8848 12 | 13 | ## 在线体验 14 | 15 | ##### h5版本:http://45.125.34.26:8888 16 | 测试账号:13533333333,密码:123 17 | 也可以自行注册账号 18 | ##### 商户系统:http://45.125.34.26:8880/page/login 19 | 测试账号:sh1,密码:123 20 | ##### 运营后台:http://45.125.34.26:8887/page/login 21 | 测试账号:admin,密码:123 22 | 23 | ## 演示图 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/dictconfig/domain/DictItem.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.dictconfig.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.ConstraintMode; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.ForeignKey; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.ManyToOne; 13 | import javax.persistence.Table; 14 | import javax.persistence.Version; 15 | 16 | import org.hibernate.annotations.DynamicInsert; 17 | import org.hibernate.annotations.DynamicUpdate; 18 | 19 | import lombok.Getter; 20 | import lombok.Setter; 21 | 22 | @Getter 23 | @Setter 24 | @Entity 25 | @Table(name = "dict_item") 26 | @DynamicInsert(true) 27 | @DynamicUpdate(true) 28 | public class DictItem implements Serializable { 29 | 30 | /** 31 | * 32 | */ 33 | private static final long serialVersionUID = 1L; 34 | 35 | @Id 36 | @Column(name = "id", length = 32) 37 | private String id; 38 | 39 | private String dictItemCode; 40 | 41 | private String dictItemName; 42 | 43 | private Double orderNo; 44 | 45 | @Version 46 | private Long version; 47 | 48 | @Column(name = "dict_type_id", length = 32) 49 | private String dictTypeId; 50 | 51 | @ManyToOne(fetch = FetchType.LAZY) 52 | @JoinColumn(name = "dict_type_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 53 | private DictType dictType; 54 | 55 | } 56 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/vo/MemberFinanceRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.log.domain.MemberBalanceChangeLog; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class MemberFinanceRecordVO { 18 | 19 | private String id; 20 | 21 | @JsonFormat(pattern = "HH:mm dd/MM/yyyy", timezone = "GMT+8") 22 | private Date changeTime; 23 | 24 | private String changeType; 25 | 26 | private String changeTypeName; 27 | 28 | private Double balanceChange; 29 | 30 | public static List convertFor(List pos) { 31 | if (CollectionUtil.isEmpty(pos)) { 32 | return new ArrayList<>(); 33 | } 34 | List vos = new ArrayList<>(); 35 | for (MemberBalanceChangeLog po : pos) { 36 | vos.add(convertFor(po)); 37 | } 38 | return vos; 39 | } 40 | 41 | public static MemberFinanceRecordVO convertFor(MemberBalanceChangeLog po) { 42 | if (po == null) { 43 | return null; 44 | } 45 | MemberFinanceRecordVO vo = new MemberFinanceRecordVO(); 46 | BeanUtils.copyProperties(po, vo); 47 | vo.setChangeTypeName(DictHolder.getDictItemName("memberBalanceChangeType", vo.getChangeType())); 48 | return vo; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /c2cpay-member/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 4.0.0 7 | 8 | com.c2cpay 9 | c2cpay 10 | 0.0.1-SNAPSHOT 11 | 12 | c2cpay-member 13 | c2cpay-member 14 | jar 15 | 16 | UTF-8 17 | 18 | 19 | 20 | com.c2cpay 21 | c2cpay-biz 22 | 0.0.1-SNAPSHOT 23 | 24 | 25 | org.springframework.boot 26 | spring-boot-starter-web 27 | 28 | 29 | org.springframework.session 30 | spring-session-data-redis 31 | 32 | 33 | org.springframework.boot 34 | spring-boot-starter-thymeleaf 35 | 36 | 37 | 38 | 39 | 40 | org.springframework.boot 41 | spring-boot-maven-plugin 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/config/xss/XssHttpServletRequestWrapper.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.config.xss; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletRequestWrapper; 5 | 6 | import cn.hutool.core.util.EscapeUtil; 7 | 8 | public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper { 9 | 10 | public XssHttpServletRequestWrapper(HttpServletRequest request) { 11 | super(request); 12 | } 13 | 14 | @Override 15 | public String getHeader(String name) { 16 | String value = super.getHeader(name); 17 | if (value != null) { 18 | value = EscapeUtil.escapeHtml4(value); 19 | } 20 | return value; 21 | } 22 | 23 | @Override 24 | public String getQueryString() { 25 | String value = super.getQueryString(); 26 | if (value != null) { 27 | value = EscapeUtil.escapeHtml4(value); 28 | } 29 | return value; 30 | } 31 | 32 | @Override 33 | public String getParameter(String name) { 34 | String value = super.getParameter(name); 35 | if (value != null) { 36 | value = EscapeUtil.escapeHtml4(value); 37 | } 38 | return value; 39 | } 40 | 41 | @Override 42 | public String[] getParameterValues(String name) { 43 | String[] values = super.getParameterValues(name); 44 | if (values != null) { 45 | int length = values.length; 46 | String[] escapseValues = new String[length]; 47 | for (int i = 0; i < length; i++) { 48 | escapseValues[i] = EscapeUtil.escapeHtml4(values[i]); 49 | } 50 | return escapseValues; 51 | } 52 | return values; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/member/param/MemberQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.member.param; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.persistence.criteria.CriteriaBuilder; 7 | import javax.persistence.criteria.CriteriaQuery; 8 | import javax.persistence.criteria.Predicate; 9 | import javax.persistence.criteria.Root; 10 | 11 | import org.springframework.data.jpa.domain.Specification; 12 | 13 | import com.c2cpay.common.param.PageParam; 14 | import com.c2cpay.member.domain.Member; 15 | 16 | import cn.hutool.core.util.StrUtil; 17 | import lombok.Data; 18 | import lombok.EqualsAndHashCode; 19 | 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | public class MemberQueryCondParam extends PageParam { 23 | 24 | private String mobile; 25 | 26 | public Specification buildSpecification() { 27 | MemberQueryCondParam param = this; 28 | Specification spec = new Specification() { 29 | /** 30 | * 31 | */ 32 | private static final long serialVersionUID = 1L; 33 | 34 | public Predicate toPredicate(Root root, CriteriaQuery query, CriteriaBuilder builder) { 35 | List predicates = new ArrayList(); 36 | predicates.add(builder.equal(root.get("deletedFlag"), false)); 37 | if (StrUtil.isNotEmpty(param.getMobile())) { 38 | predicates.add(builder.equal(root.get("mobile"), param.getMobile())); 39 | } 40 | return predicates.size() > 0 ? builder.and(predicates.toArray(new Predicate[predicates.size()])) : null; 41 | } 42 | }; 43 | return spec; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/param/MerchantQueryCondParam.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.param; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import javax.persistence.criteria.CriteriaBuilder; 7 | import javax.persistence.criteria.CriteriaQuery; 8 | import javax.persistence.criteria.Predicate; 9 | import javax.persistence.criteria.Root; 10 | 11 | import org.springframework.data.jpa.domain.Specification; 12 | 13 | import com.c2cpay.common.param.PageParam; 14 | import com.c2cpay.merchant.domain.Merchant; 15 | 16 | import cn.hutool.core.util.StrUtil; 17 | import lombok.Data; 18 | import lombok.EqualsAndHashCode; 19 | 20 | @Data 21 | @EqualsAndHashCode(callSuper = false) 22 | public class MerchantQueryCondParam extends PageParam { 23 | 24 | private String userName; 25 | 26 | public Specification buildSpecification() { 27 | MerchantQueryCondParam param = this; 28 | Specification spec = new Specification() { 29 | /** 30 | * 31 | */ 32 | private static final long serialVersionUID = 1L; 33 | 34 | public Predicate toPredicate(Root root, CriteriaQuery query, CriteriaBuilder builder) { 35 | List predicates = new ArrayList(); 36 | predicates.add(builder.equal(root.get("deletedFlag"), false)); 37 | if (StrUtil.isNotBlank(param.getUserName())) { 38 | predicates.add(builder.equal(root.get("userName"), param.getUserName())); 39 | } 40 | return predicates.size() > 0 ? builder.and(predicates.toArray(new Predicate[predicates.size()])) : null; 41 | } 42 | }; 43 | return spec; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/vo/OperLogVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.log.domain.OperLog; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class OperLogVO { 18 | 19 | private String id; 20 | 21 | private String subSystem; 22 | 23 | private String subSystemName; 24 | 25 | private String module; 26 | 27 | private String operate; 28 | 29 | private String requestMethod; 30 | 31 | private String requestUrl; 32 | 33 | private String requestParam; 34 | 35 | private String ipAddr; 36 | 37 | private String operAccountId; 38 | 39 | private String operName; 40 | 41 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 42 | private Date operTime; 43 | 44 | public static List convertFor(List operLogs) { 45 | if (CollectionUtil.isEmpty(operLogs)) { 46 | return new ArrayList<>(); 47 | } 48 | List vos = new ArrayList<>(); 49 | for (OperLog operLog : operLogs) { 50 | vos.add(convertFor(operLog)); 51 | } 52 | return vos; 53 | } 54 | 55 | public static OperLogVO convertFor(OperLog operLog) { 56 | if (operLog == null) { 57 | return null; 58 | } 59 | OperLogVO vo = new OperLogVO(); 60 | BeanUtils.copyProperties(operLog, vo); 61 | vo.setSubSystemName(DictHolder.getDictItemName("subSystem", vo.getSubSystem())); 62 | return vo; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/domain/statistic/MemberEverydayReceiptData.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.domain.statistic; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.ConstraintMode; 8 | import javax.persistence.Entity; 9 | import javax.persistence.FetchType; 10 | import javax.persistence.ForeignKey; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | import javax.persistence.ManyToOne; 14 | import javax.persistence.Table; 15 | 16 | import org.hibernate.annotations.DynamicInsert; 17 | import org.hibernate.annotations.DynamicUpdate; 18 | import org.hibernate.annotations.NotFound; 19 | import org.hibernate.annotations.NotFoundAction; 20 | 21 | import com.c2cpay.member.domain.Member; 22 | 23 | import lombok.Getter; 24 | import lombok.Setter; 25 | 26 | @Getter 27 | @Setter 28 | @Entity 29 | @Table(name = "v_member_everyday_receipt_data") 30 | @DynamicInsert(true) 31 | @DynamicUpdate(true) 32 | public class MemberEverydayReceiptData implements Serializable { 33 | 34 | /** 35 | * 36 | */ 37 | private static final long serialVersionUID = 1L; 38 | 39 | @Id 40 | private String id; 41 | 42 | @Column(name = "account_id", length = 32) 43 | private String accountId; 44 | 45 | private Date everyday; 46 | 47 | private Double successAmount; 48 | 49 | private Integer successCount; 50 | 51 | @NotFound(action = NotFoundAction.IGNORE) 52 | @ManyToOne(fetch = FetchType.LAZY) 53 | @JoinColumn(name = "account_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 54 | private Member account; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/domain/statistic/MemberEverydayTransferData.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.domain.statistic; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.ConstraintMode; 8 | import javax.persistence.Entity; 9 | import javax.persistence.FetchType; 10 | import javax.persistence.ForeignKey; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | import javax.persistence.ManyToOne; 14 | import javax.persistence.Table; 15 | 16 | import org.hibernate.annotations.DynamicInsert; 17 | import org.hibernate.annotations.DynamicUpdate; 18 | import org.hibernate.annotations.NotFound; 19 | import org.hibernate.annotations.NotFoundAction; 20 | 21 | import com.c2cpay.member.domain.Member; 22 | 23 | import lombok.Getter; 24 | import lombok.Setter; 25 | 26 | @Getter 27 | @Setter 28 | @Entity 29 | @Table(name = "v_member_everyday_transfer_data") 30 | @DynamicInsert(true) 31 | @DynamicUpdate(true) 32 | public class MemberEverydayTransferData implements Serializable { 33 | 34 | /** 35 | * 36 | */ 37 | private static final long serialVersionUID = 1L; 38 | 39 | @Id 40 | private String id; 41 | 42 | @Column(name = "account_id", length = 32) 43 | private String accountId; 44 | 45 | private Date everyday; 46 | 47 | private Double successAmount; 48 | 49 | private Integer successCount; 50 | 51 | @NotFound(action = NotFoundAction.IGNORE) 52 | @ManyToOne(fetch = FetchType.LAZY) 53 | @JoinColumn(name = "account_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 54 | private Member account; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/domain/statistic/MerchantEverydayReceiptData.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.domain.statistic; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.ConstraintMode; 8 | import javax.persistence.Entity; 9 | import javax.persistence.FetchType; 10 | import javax.persistence.ForeignKey; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | import javax.persistence.ManyToOne; 14 | import javax.persistence.Table; 15 | 16 | import org.hibernate.annotations.DynamicInsert; 17 | import org.hibernate.annotations.DynamicUpdate; 18 | import org.hibernate.annotations.NotFound; 19 | import org.hibernate.annotations.NotFoundAction; 20 | 21 | import com.c2cpay.merchant.domain.Merchant; 22 | 23 | import lombok.Getter; 24 | import lombok.Setter; 25 | 26 | @Getter 27 | @Setter 28 | @Entity 29 | @Table(name = "v_merchant_everyday_receipt_data") 30 | @DynamicInsert(true) 31 | @DynamicUpdate(true) 32 | public class MerchantEverydayReceiptData implements Serializable { 33 | 34 | /** 35 | * 36 | */ 37 | private static final long serialVersionUID = 1L; 38 | 39 | @Id 40 | private String id; 41 | 42 | @Column(name = "account_id", length = 32) 43 | private String accountId; 44 | 45 | private Date everyday; 46 | 47 | private Double successAmount; 48 | 49 | private Integer successCount; 50 | 51 | @NotFound(action = NotFoundAction.IGNORE) 52 | @ManyToOne(fetch = FetchType.LAZY) 53 | @JoinColumn(name = "account_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 54 | private Merchant account; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/domain/statistic/MerchantEverydayTransferData.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.domain.statistic; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.ConstraintMode; 8 | import javax.persistence.Entity; 9 | import javax.persistence.FetchType; 10 | import javax.persistence.ForeignKey; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | import javax.persistence.ManyToOne; 14 | import javax.persistence.Table; 15 | 16 | import org.hibernate.annotations.DynamicInsert; 17 | import org.hibernate.annotations.DynamicUpdate; 18 | import org.hibernate.annotations.NotFound; 19 | import org.hibernate.annotations.NotFoundAction; 20 | 21 | import com.c2cpay.merchant.domain.Merchant; 22 | 23 | import lombok.Getter; 24 | import lombok.Setter; 25 | 26 | @Getter 27 | @Setter 28 | @Entity 29 | @Table(name = "v_merchant_everyday_transfer_data") 30 | @DynamicInsert(true) 31 | @DynamicUpdate(true) 32 | public class MerchantEverydayTransferData implements Serializable { 33 | 34 | /** 35 | * 36 | */ 37 | private static final long serialVersionUID = 1L; 38 | 39 | @Id 40 | private String id; 41 | 42 | @Column(name = "account_id", length = 32) 43 | private String accountId; 44 | 45 | private Date everyday; 46 | 47 | private Double successAmount; 48 | 49 | private Integer successCount; 50 | 51 | @NotFound(action = NotFoundAction.IGNORE) 52 | @ManyToOne(fetch = FetchType.LAZY) 53 | @JoinColumn(name = "account_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 54 | private Merchant account; 55 | 56 | } 57 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 8080 3 | spring: 4 | datasource: 5 | url: jdbc:mysql://localhost:3306/c2cpay?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai 6 | username: root 7 | password: 123 8 | driverClassName: com.mysql.cj.jdbc.Driver 9 | jpa: 10 | show-sql: false 11 | generate-ddl: true 12 | database-platform: 13 | hibernate: 14 | ddl-auto: none 15 | properties: 16 | hibernate: 17 | dialect: org.hibernate.dialect.MySQL5InnoDBDialect 18 | thymeleaf: 19 | cache: false 20 | redis: 21 | port: 6379 22 | host: localhost 23 | timeout: 5000 #连接超时时间 24 | servlet: 25 | multipart: 26 | max-file-size: 10MB 27 | max-request-size: 10MB 28 | redisson: 29 | singleServerConfig: 30 | address: 127.0.0.1:6379 31 | jetcache: 32 | areaInCacheName: false 33 | local: 34 | default: 35 | type: linkedhashmap 36 | keyConvertor: fastjson 37 | remote: 38 | default: 39 | type: redis.lettuce 40 | keyConvertor: fastjson 41 | uri: redis://@127.0.0.1:6379/ 42 | # Sa-Token配置 43 | sa-token: 44 | # token名称 (同时也是cookie名称) 45 | token-name: member_token 46 | # token有效期,单位s 默认30天, -1代表永不过期 47 | timeout: 2592000 48 | is-read-cookie: true 49 | is-read-head: true 50 | # token临时有效期 (指定时间内无操作就视为token过期) 单位: 秒 51 | activity-timeout: -1 52 | # 是否允许同一账号并发登录 (为true时允许一起登录, 为false时新登录挤掉旧登录) 53 | is-concurrent: true 54 | # 在多人登录同一账号时,是否共用一个token (为true时所有登录共用一个token, 为false时每次登录新建一个token) 55 | is-share: false 56 | # token风格 57 | token-style: random-64 58 | # 是否输出操作日志 59 | is-log: false -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/sms/vo/SmsSendRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.sms.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.sms.domain.SmsSendRecord; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class SmsSendRecordVO { 18 | 19 | private String id; 20 | 21 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 22 | private Date createTime; 23 | 24 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 25 | private Date sendTime; 26 | 27 | private String smsType; 28 | 29 | private String smsTypeName; 30 | 31 | private String mobile; 32 | 33 | private String verificationCode; 34 | 35 | private String errorMsg; 36 | 37 | private String state; 38 | 39 | private String stateName; 40 | 41 | public static List convertFor(List pos) { 42 | if (CollectionUtil.isEmpty(pos)) { 43 | return new ArrayList<>(); 44 | } 45 | List vos = new ArrayList<>(); 46 | for (SmsSendRecord po : pos) { 47 | vos.add(convertFor(po)); 48 | } 49 | return vos; 50 | } 51 | 52 | public static SmsSendRecordVO convertFor(SmsSendRecord po) { 53 | if (po == null) { 54 | return null; 55 | } 56 | SmsSendRecordVO vo = new SmsSendRecordVO(); 57 | BeanUtils.copyProperties(po, vo); 58 | vo.setSmsTypeName(DictHolder.getDictItemName("smsType", vo.getSmsType())); 59 | vo.setStateName(DictHolder.getDictItemName("smsSendState", vo.getState())); 60 | return vo; 61 | } 62 | 63 | } 64 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/domain/BackgroundAccount.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | import javax.persistence.Version; 11 | 12 | import org.hibernate.annotations.DynamicInsert; 13 | import org.hibernate.annotations.DynamicUpdate; 14 | 15 | import lombok.Getter; 16 | import lombok.Setter; 17 | 18 | @Getter 19 | @Setter 20 | @Entity 21 | @Table(name = "background_account") 22 | @DynamicInsert(true) 23 | @DynamicUpdate(true) 24 | public class BackgroundAccount implements Serializable { 25 | 26 | /** 27 | * 28 | */ 29 | private static final long serialVersionUID = 1L; 30 | 31 | @Id 32 | @Column(name = "id", length = 32) 33 | private String id; 34 | 35 | private String userName; 36 | 37 | private String googleSecretKey; 38 | 39 | private Date googleAuthBindTime; 40 | 41 | private String loginPwd; 42 | 43 | private Boolean superAdminFlag; 44 | 45 | private String state; 46 | 47 | private Date registeredTime; 48 | 49 | private Date latelyLoginTime; 50 | 51 | private Boolean deletedFlag; 52 | 53 | private Date deletedTime; 54 | 55 | @Version 56 | private Long version; 57 | 58 | public void deleted() { 59 | this.setDeletedFlag(true); 60 | this.setDeletedTime(new Date()); 61 | } 62 | 63 | public void bindGoogleAuth(String googleSecretKey) { 64 | this.setGoogleSecretKey(googleSecretKey); 65 | this.setGoogleAuthBindTime(new Date()); 66 | } 67 | 68 | public void unBindGoogleAuth() { 69 | this.setGoogleSecretKey(null); 70 | this.setGoogleAuthBindTime(null); 71 | } 72 | 73 | } 74 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/service/MerchantBalanceChangeLogService.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.service; 2 | 3 | import javax.validation.Valid; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.data.domain.Page; 7 | import org.springframework.data.domain.PageRequest; 8 | import org.springframework.data.domain.Sort; 9 | import org.springframework.data.jpa.domain.Specification; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.transaction.annotation.Transactional; 12 | import org.springframework.validation.annotation.Validated; 13 | 14 | import com.c2cpay.common.vo.PageResult; 15 | import com.c2cpay.log.domain.MerchantBalanceChangeLog; 16 | import com.c2cpay.log.param.MerchantBalanceChangeLogQueryCondParam; 17 | import com.c2cpay.log.repo.MerchantBalanceChangeLogRepo; 18 | import com.c2cpay.log.vo.MerchantBalanceChangeLogVO; 19 | 20 | @Validated 21 | @Service 22 | public class MerchantBalanceChangeLogService { 23 | 24 | @Autowired 25 | private MerchantBalanceChangeLogRepo merchantBalanceChangeLogRepo; 26 | 27 | @Transactional(readOnly = true) 28 | public PageResult findByPage(@Valid MerchantBalanceChangeLogQueryCondParam param) { 29 | Specification spec = param.buildSpecification(); 30 | Page result = merchantBalanceChangeLogRepo.findAll(spec, 31 | PageRequest.of(param.getPageNum() - 1, param.getPageSize(), Sort.by(Sort.Order.desc("changeTime")))); 32 | PageResult pageResult = new PageResult<>( 33 | MerchantBalanceChangeLogVO.convertFor(result.getContent()), param.getPageNum(), param.getPageSize(), 34 | result.getTotalElements()); 35 | return pageResult; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/receiptpaymentinfo/vo/ReceiptPaymentInfoVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.receiptpaymentinfo.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.receiptpaymentinfo.domain.ReceiptPaymentInfo; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class ReceiptPaymentInfoVO { 18 | 19 | private String id; 20 | 21 | private String realName; 22 | 23 | private String type; 24 | 25 | private String typeName; 26 | 27 | private Boolean activated; 28 | 29 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 30 | private Date createTime; 31 | 32 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 33 | private Date activatedTime; 34 | 35 | private String cardNumber; 36 | 37 | private String bankName; 38 | 39 | private String account; 40 | 41 | private String qrcode; 42 | 43 | public static List convertFor(List pos) { 44 | if (CollectionUtil.isEmpty(pos)) { 45 | return new ArrayList<>(); 46 | } 47 | List vos = new ArrayList<>(); 48 | for (ReceiptPaymentInfo po : pos) { 49 | vos.add(convertFor(po)); 50 | } 51 | return vos; 52 | } 53 | 54 | public static ReceiptPaymentInfoVO convertFor(ReceiptPaymentInfo po) { 55 | if (po == null) { 56 | return null; 57 | } 58 | ReceiptPaymentInfoVO vo = new ReceiptPaymentInfoVO(); 59 | BeanUtils.copyProperties(po, vo); 60 | vo.setTypeName(DictHolder.getDictItemName("receiptPaymentType", vo.getType())); 61 | return vo; 62 | } 63 | 64 | } 65 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/vo/MerchantVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.merchant.domain.Merchant; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class MerchantVO { 18 | 19 | private String id; 20 | 21 | private String userName; 22 | 23 | private String merchantName; 24 | 25 | private String walletAddr; 26 | 27 | private Double balance; 28 | 29 | private String ipWhiteList; 30 | 31 | private String apiSecretKey; 32 | 33 | private String state; 34 | 35 | private String stateName; 36 | 37 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 38 | private Date createTime; 39 | 40 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 41 | private Date latelyLoginTime; 42 | 43 | private String googleSecretKey; 44 | 45 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 46 | private Date googleAuthBindTime; 47 | 48 | public static List convertFor(List pos) { 49 | if (CollectionUtil.isEmpty(pos)) { 50 | return new ArrayList<>(); 51 | } 52 | List vos = new ArrayList<>(); 53 | for (Merchant po : pos) { 54 | vos.add(convertFor(po)); 55 | } 56 | return vos; 57 | } 58 | 59 | public static MerchantVO convertFor(Merchant po) { 60 | if (po == null) { 61 | return null; 62 | } 63 | MerchantVO vo = new MerchantVO(); 64 | BeanUtils.copyProperties(po, vo); 65 | vo.setStateName(DictHolder.getDictItemName("functionState", vo.getState())); 66 | return vo; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/vo/LoginLogVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.log.domain.LoginLog; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class LoginLogVO { 18 | 19 | private String id; 20 | 21 | private String sessionId; 22 | 23 | private String subSystem; 24 | 25 | private String subSystemName; 26 | 27 | private String state; 28 | 29 | private String stateName; 30 | 31 | private String ipAddr; 32 | 33 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 34 | private Date loginTime; 35 | 36 | private String browser; 37 | 38 | private String os; 39 | 40 | private String msg; 41 | 42 | private String userName; 43 | 44 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 45 | private Date lastAccessTime; 46 | 47 | public static List convertFor(List loginLogs) { 48 | if (CollectionUtil.isEmpty(loginLogs)) { 49 | return new ArrayList<>(); 50 | } 51 | List vos = new ArrayList<>(); 52 | for (LoginLog loginLog : loginLogs) { 53 | vos.add(convertFor(loginLog)); 54 | } 55 | return vos; 56 | } 57 | 58 | public static LoginLogVO convertFor(LoginLog loginLog) { 59 | if (loginLog == null) { 60 | return null; 61 | } 62 | LoginLogVO vo = new LoginLogVO(); 63 | BeanUtils.copyProperties(loginLog, vo); 64 | vo.setStateName(DictHolder.getDictItemName("loginState", vo.getState())); 65 | vo.setSubSystemName(DictHolder.getDictItemName("subSystem", vo.getSubSystem())); 66 | return vo; 67 | } 68 | 69 | } 70 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/MerchantTransferRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.transfer.domain.MerchantTransferRecord; 10 | import com.fasterxml.jackson.annotation.JsonFormat; 11 | 12 | import cn.hutool.core.collection.CollectionUtil; 13 | import lombok.Data; 14 | 15 | @Data 16 | public class MerchantTransferRecordVO { 17 | 18 | private String id; 19 | 20 | private String orderNo; 21 | 22 | private String merchantOrderNo; 23 | 24 | private String receiptAddr; 25 | 26 | private Double amount; 27 | 28 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 29 | private Date createTime; 30 | 31 | private String transferAddr; 32 | 33 | private String transferUserName; 34 | 35 | private String transferMerchantName; 36 | 37 | public static List convertFor(List pos) { 38 | if (CollectionUtil.isEmpty(pos)) { 39 | return new ArrayList<>(); 40 | } 41 | List vos = new ArrayList<>(); 42 | for (MerchantTransferRecord po : pos) { 43 | vos.add(convertFor(po)); 44 | } 45 | return vos; 46 | } 47 | 48 | public static MerchantTransferRecordVO convertFor(MerchantTransferRecord po) { 49 | if (po == null) { 50 | return null; 51 | } 52 | MerchantTransferRecordVO vo = new MerchantTransferRecordVO(); 53 | BeanUtils.copyProperties(po, vo); 54 | if (po.getTransferAccount() != null) { 55 | vo.setTransferAddr(po.getTransferAccount().getWalletAddr()); 56 | vo.setTransferUserName(po.getTransferAccount().getUserName()); 57 | vo.setTransferMerchantName(po.getTransferAccount().getMerchantName()); 58 | } 59 | return vo; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/MemberPreTradeOrderVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.trade.domain.PreTradeOrder; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import cn.hutool.core.util.NumberUtil; 15 | import lombok.Data; 16 | 17 | @Data 18 | public class MemberPreTradeOrderVO { 19 | 20 | private String id; 21 | 22 | private Double amount; 23 | 24 | private Double minAmount; 25 | 26 | private Double maxAmount; 27 | 28 | private Double availableAmount; 29 | 30 | private Double completedAmount; 31 | 32 | private String state; 33 | 34 | private String stateName; 35 | 36 | @JsonFormat(pattern = "HH:mm dd/MM/yyyy", timezone = "GMT+8") 37 | private Date createTime; 38 | 39 | private String tradeType; 40 | 41 | private String receiptPaymentType; 42 | 43 | public static List convertFor(List pos) { 44 | if (CollectionUtil.isEmpty(pos)) { 45 | return new ArrayList<>(); 46 | } 47 | List vos = new ArrayList<>(); 48 | for (PreTradeOrder po : pos) { 49 | vos.add(convertFor(po)); 50 | } 51 | return vos; 52 | } 53 | 54 | public static MemberPreTradeOrderVO convertFor(PreTradeOrder po) { 55 | if (po == null) { 56 | return null; 57 | } 58 | MemberPreTradeOrderVO vo = new MemberPreTradeOrderVO(); 59 | BeanUtils.copyProperties(po, vo); 60 | vo.setStateName(DictHolder.getDictItemName("preTradeOrderState", vo.getState())); 61 | vo.setCompletedAmount(NumberUtil.round(vo.getAmount() - vo.getAvailableAmount(), 2).doubleValue()); 62 | return vo; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | com.c2cpay 7 | c2cpay 8 | 0.0.1-SNAPSHOT 9 | pom 10 | 11 | 1.8 12 | 1.8 13 | UTF-8 14 | UTF-8 15 | 2.4.5 16 | 2.17.0 17 | 18 | 19 | org.springframework.boot 20 | spring-boot-starter-parent 21 | 2.4.5 22 | 23 | 24 | 25 | 26 | c2cpay-biz 27 | c2cpay-member 28 | c2cpay-merchant 29 | c2cpay-admin 30 | 31 | 32 | 33 | 34 | com.github.shalousun 35 | smart-doc-maven-plugin 36 | 2.4.0 37 | 38 | ./src/main/resources/smart-doc.json 39 | 接口文档 40 | 41 | com.alibaba:fastjson 42 | 43 | 44 | 45 | 46 | 47 | html 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/vo/MemberBalanceChangeLogVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.log.domain.MemberBalanceChangeLog; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class MemberBalanceChangeLogVO { 18 | 19 | private String id; 20 | 21 | private String bizOrderNo; 22 | 23 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 24 | private Date changeTime; 25 | 26 | private String changeType; 27 | 28 | private String changeTypeName; 29 | 30 | private Double balanceChange; 31 | 32 | private Double balanceBefore; 33 | 34 | private Double balanceAfter; 35 | 36 | private String mobile; 37 | 38 | private String realName; 39 | 40 | public static List convertFor(List pos) { 41 | if (CollectionUtil.isEmpty(pos)) { 42 | return new ArrayList<>(); 43 | } 44 | List vos = new ArrayList<>(); 45 | for (MemberBalanceChangeLog po : pos) { 46 | vos.add(convertFor(po)); 47 | } 48 | return vos; 49 | } 50 | 51 | public static MemberBalanceChangeLogVO convertFor(MemberBalanceChangeLog po) { 52 | if (po == null) { 53 | return null; 54 | } 55 | MemberBalanceChangeLogVO vo = new MemberBalanceChangeLogVO(); 56 | BeanUtils.copyProperties(po, vo); 57 | if (po.getMember() != null) { 58 | vo.setMobile(po.getMember().getMobile()); 59 | vo.setRealName(po.getMember().getRealName()); 60 | } 61 | vo.setChangeTypeName(DictHolder.getDictItemName("memberBalanceChangeType", vo.getChangeType())); 62 | return vo; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/vo/BackgroundAccountVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.backgroundaccount.domain.BackgroundAccount; 10 | import com.c2cpay.dictconfig.DictHolder; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class BackgroundAccountVO { 18 | 19 | private String id; 20 | 21 | private String userName; 22 | 23 | private String state; 24 | 25 | private String stateName; 26 | 27 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 28 | private Date registeredTime; 29 | 30 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 31 | private Date latelyLoginTime; 32 | 33 | private String googleSecretKey; 34 | 35 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 36 | private Date googleAuthBindTime; 37 | 38 | private Boolean superAdminFlag; 39 | 40 | public static List convertFor(List userAccounts) { 41 | if (CollectionUtil.isEmpty(userAccounts)) { 42 | return new ArrayList<>(); 43 | } 44 | List vos = new ArrayList<>(); 45 | for (BackgroundAccount userAccount : userAccounts) { 46 | vos.add(convertFor(userAccount)); 47 | } 48 | return vos; 49 | } 50 | 51 | public static BackgroundAccountVO convertFor(BackgroundAccount userAccount) { 52 | if (userAccount == null) { 53 | return null; 54 | } 55 | BackgroundAccountVO vo = new BackgroundAccountVO(); 56 | BeanUtils.copyProperties(userAccount, vo); 57 | vo.setStateName(DictHolder.getDictItemName("functionState", vo.getState())); 58 | return vo; 59 | } 60 | 61 | } 62 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/merchant/domain/Merchant.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.merchant.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | import javax.persistence.Version; 11 | 12 | import org.hibernate.annotations.DynamicInsert; 13 | import org.hibernate.annotations.DynamicUpdate; 14 | 15 | import lombok.Getter; 16 | import lombok.Setter; 17 | 18 | @Getter 19 | @Setter 20 | @Entity 21 | @Table(name = "merchant") 22 | @DynamicInsert(true) 23 | @DynamicUpdate(true) 24 | public class Merchant implements Serializable { 25 | 26 | /** 27 | * 28 | */ 29 | private static final long serialVersionUID = 1L; 30 | 31 | @Id 32 | @Column(name = "id", length = 32) 33 | private String id; 34 | 35 | private String userName; 36 | 37 | private String merchantName; 38 | 39 | private Double balance; 40 | 41 | private String walletAddr; 42 | 43 | private String ipWhiteList; 44 | 45 | private String loginPwd; 46 | 47 | private String payPwd; 48 | 49 | private String apiSecretKey; 50 | 51 | private String googleSecretKey; 52 | 53 | private Date googleAuthBindTime; 54 | 55 | private String state; 56 | 57 | private Date createTime; 58 | 59 | private Date latelyLoginTime; 60 | 61 | private Boolean deletedFlag; 62 | 63 | private Date deletedTime; 64 | 65 | @Version 66 | private Long version; 67 | 68 | public void deleted() { 69 | this.setDeletedFlag(true); 70 | this.setDeletedTime(new Date()); 71 | } 72 | 73 | public void unBindGoogleAuth() { 74 | this.setGoogleSecretKey(null); 75 | this.setGoogleAuthBindTime(null); 76 | } 77 | 78 | public void bindGoogleAuth(String googleSecretKey) { 79 | this.setGoogleSecretKey(googleSecretKey); 80 | this.setGoogleAuthBindTime(new Date()); 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/ReceiptRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.transfer.domain.MemberReceiptRecord; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class ReceiptRecordVO { 18 | 19 | private String id; 20 | 21 | private String orderNo; 22 | 23 | private String transferAddr; 24 | 25 | private String bizType; 26 | 27 | private String bizTypeName; 28 | 29 | private Double amount; 30 | 31 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 32 | private Date createTime; 33 | 34 | private String receiptAddr; 35 | 36 | private String receiptRealName; 37 | 38 | private String receiptMobile; 39 | 40 | public static List convertFor(List pos) { 41 | if (CollectionUtil.isEmpty(pos)) { 42 | return new ArrayList<>(); 43 | } 44 | List vos = new ArrayList<>(); 45 | for (MemberReceiptRecord po : pos) { 46 | vos.add(convertFor(po)); 47 | } 48 | return vos; 49 | } 50 | 51 | public static ReceiptRecordVO convertFor(MemberReceiptRecord po) { 52 | if (po == null) { 53 | return null; 54 | } 55 | ReceiptRecordVO vo = new ReceiptRecordVO(); 56 | BeanUtils.copyProperties(po, vo); 57 | if (po.getReceiptAccount() != null) { 58 | vo.setReceiptAddr(po.getReceiptAccount().getWalletAddr()); 59 | vo.setReceiptRealName(po.getReceiptAccount().getRealName()); 60 | vo.setReceiptMobile(po.getReceiptAccount().getMobile()); 61 | } 62 | vo.setBizTypeName(DictHolder.getDictItemName("transferBizType", vo.getBizType())); 63 | return vo; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/PreReceiptOrderDetailVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.Date; 4 | 5 | import org.springframework.beans.BeanUtils; 6 | 7 | import com.c2cpay.transfer.domain.MerchantReceiptRecord; 8 | 9 | import cn.hutool.core.date.DateUnit; 10 | import cn.hutool.core.date.DateUtil; 11 | import lombok.Data; 12 | 13 | @Data 14 | public class PreReceiptOrderDetailVO { 15 | 16 | private String orderNo; 17 | 18 | private String state; 19 | 20 | private Double amount; 21 | 22 | private String merchantName; 23 | 24 | private Long lockMinuteCount = 0L; 25 | 26 | private Long lockRemainingTime = 0L; 27 | 28 | private Long transferMinuteCount = 0L; 29 | 30 | private Long transferRemainingTime = 0L; 31 | 32 | public static PreReceiptOrderDetailVO convertFor(MerchantReceiptRecord po) { 33 | if (po == null) { 34 | return null; 35 | } 36 | PreReceiptOrderDetailVO vo = new PreReceiptOrderDetailVO(); 37 | BeanUtils.copyProperties(po, vo); 38 | if (po.getReceiptAccount() != null) { 39 | vo.setMerchantName(po.getReceiptAccount().getMerchantName()); 40 | } 41 | vo.setLockMinuteCount(DateUtil.between(po.getCreateTime(), po.getLockDeadline(), DateUnit.MINUTE)); 42 | long lockRemainingTime = DateUtil.between(new Date(), po.getLockDeadline(), DateUnit.SECOND, false); 43 | if (lockRemainingTime < 0) { 44 | lockRemainingTime = 0; 45 | } 46 | vo.setLockRemainingTime(lockRemainingTime); 47 | if (po.getTransferDeadline() != null) { 48 | vo.setTransferMinuteCount(DateUtil.between(po.getLockTime(), po.getTransferDeadline(), DateUnit.MINUTE)); 49 | long transferRemainingTime = DateUtil.between(new Date(), po.getTransferDeadline(), DateUnit.SECOND, false); 50 | if (transferRemainingTime < 0) { 51 | transferRemainingTime = 0; 52 | } 53 | vo.setTransferRemainingTime(transferRemainingTime); 54 | } 55 | return vo; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/vo/MerchantBalanceChangeLogVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.log.domain.MerchantBalanceChangeLog; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class MerchantBalanceChangeLogVO { 18 | 19 | private String id; 20 | 21 | private String bizOrderNo; 22 | 23 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 24 | private Date changeTime; 25 | 26 | private String changeType; 27 | 28 | private String changeTypeName; 29 | 30 | private Double balanceChange; 31 | 32 | private Double balanceBefore; 33 | 34 | private Double balanceAfter; 35 | 36 | private String userName; 37 | 38 | private String merchantName; 39 | 40 | public static List convertFor(List pos) { 41 | if (CollectionUtil.isEmpty(pos)) { 42 | return new ArrayList<>(); 43 | } 44 | List vos = new ArrayList<>(); 45 | for (MerchantBalanceChangeLog po : pos) { 46 | vos.add(convertFor(po)); 47 | } 48 | return vos; 49 | } 50 | 51 | public static MerchantBalanceChangeLogVO convertFor(MerchantBalanceChangeLog po) { 52 | if (po == null) { 53 | return null; 54 | } 55 | MerchantBalanceChangeLogVO vo = new MerchantBalanceChangeLogVO(); 56 | BeanUtils.copyProperties(po, vo); 57 | if (po.getMerchant() != null) { 58 | vo.setUserName(po.getMerchant().getUserName()); 59 | vo.setMerchantName(po.getMerchant().getMerchantName()); 60 | } 61 | vo.setChangeTypeName(DictHolder.getDictItemName("merchantBalanceChangeType", vo.getChangeType())); 62 | return vo; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/ExportMerchantTransferDataVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.alibaba.excel.annotation.ExcelProperty; 10 | import com.alibaba.excel.annotation.format.DateTimeFormat; 11 | import com.c2cpay.transfer.domain.MerchantTransferRecord; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class ExportMerchantTransferDataVO { 18 | 19 | @ExcelProperty("平台订单号") 20 | private String orderNo; 21 | 22 | @ExcelProperty("商户订单号") 23 | private String merchantOrderNo; 24 | 25 | @ExcelProperty("转账金额") 26 | private Double amount; 27 | 28 | @ExcelProperty("转账地址") 29 | private String transferAddr; 30 | 31 | @ExcelProperty("转账商户号") 32 | private String transferUserName; 33 | 34 | @ExcelProperty("转账商户名") 35 | private String transferMerchantName; 36 | 37 | @ExcelProperty("收款地址") 38 | private String receiptAddr; 39 | 40 | @ExcelProperty("创建时间") 41 | @DateTimeFormat("yyyy-MM-dd HH:mm:ss") 42 | private Date createTime; 43 | 44 | public static List convertFor(List pos) { 45 | if (CollectionUtil.isEmpty(pos)) { 46 | return new ArrayList<>(); 47 | } 48 | List vos = new ArrayList<>(); 49 | for (MerchantTransferRecord po : pos) { 50 | ExportMerchantTransferDataVO vo = new ExportMerchantTransferDataVO(); 51 | BeanUtils.copyProperties(po, vo); 52 | if (po.getTransferAccount() != null) { 53 | vo.setTransferAddr(po.getTransferAccount().getWalletAddr()); 54 | vo.setTransferUserName(po.getTransferAccount().getUserName()); 55 | vo.setTransferMerchantName(po.getTransferAccount().getMerchantName()); 56 | } 57 | vos.add(vo); 58 | } 59 | return vos; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/transfer/vo/TransferRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.transfer.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.transfer.domain.MemberTransferRecord; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class TransferRecordVO { 18 | 19 | private String id; 20 | 21 | private String orderNo; 22 | 23 | private String receiptAddr; 24 | 25 | private String bizType; 26 | 27 | private String bizTypeName; 28 | 29 | private Double amount; 30 | 31 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 32 | private Date createTime; 33 | 34 | private String transferAddr; 35 | 36 | private String transferRealName; 37 | 38 | private String transferMobile; 39 | 40 | public static List convertFor(List pos) { 41 | if (CollectionUtil.isEmpty(pos)) { 42 | return new ArrayList<>(); 43 | } 44 | List vos = new ArrayList<>(); 45 | for (MemberTransferRecord po : pos) { 46 | vos.add(convertFor(po)); 47 | } 48 | return vos; 49 | } 50 | 51 | public static TransferRecordVO convertFor(MemberTransferRecord po) { 52 | if (po == null) { 53 | return null; 54 | } 55 | TransferRecordVO vo = new TransferRecordVO(); 56 | BeanUtils.copyProperties(po, vo); 57 | if (po.getTransferAccount() != null) { 58 | vo.setTransferAddr(po.getTransferAccount().getWalletAddr()); 59 | vo.setTransferRealName(po.getTransferAccount().getRealName()); 60 | vo.setTransferMobile(po.getTransferAccount().getMobile()); 61 | } 62 | vo.setBizTypeName(DictHolder.getDictItemName("transferBizType", vo.getBizType())); 63 | return vo; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/domain/RoleMenu.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.ConstraintMode; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.ForeignKey; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.ManyToOne; 13 | import javax.persistence.Table; 14 | 15 | import org.hibernate.annotations.DynamicInsert; 16 | import org.hibernate.annotations.DynamicUpdate; 17 | 18 | import com.c2cpay.common.utils.IdUtils; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | 23 | @Getter 24 | @Setter 25 | @Entity 26 | @Table(name = "role_menu") 27 | @DynamicInsert(true) 28 | @DynamicUpdate(true) 29 | public class RoleMenu implements Serializable { 30 | 31 | /** 32 | * 33 | */ 34 | private static final long serialVersionUID = 1L; 35 | 36 | /** 37 | * 主键id 38 | */ 39 | @Id 40 | @Column(name = "id", length = 32) 41 | private String id; 42 | 43 | @Column(name = "role_id", length = 32) 44 | private String roleId; 45 | 46 | @Column(name = "menu_id", length = 32) 47 | private String menuId; 48 | 49 | @ManyToOne(fetch = FetchType.LAZY) 50 | @JoinColumn(name = "role_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 51 | private Role role; 52 | 53 | @ManyToOne(fetch = FetchType.LAZY) 54 | @JoinColumn(name = "menu_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 55 | private Menu menu; 56 | 57 | public static RoleMenu build(String roleId, String menuId) { 58 | RoleMenu roleMenu = new RoleMenu(); 59 | roleMenu.setId(IdUtils.getId()); 60 | roleMenu.setRoleId(roleId); 61 | roleMenu.setMenuId(menuId); 62 | return roleMenu; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/sms/domain/SmsSendRecord.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.sms.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | import javax.persistence.Version; 11 | 12 | import org.hibernate.annotations.DynamicInsert; 13 | import org.hibernate.annotations.DynamicUpdate; 14 | 15 | import com.c2cpay.common.utils.IdUtils; 16 | import com.c2cpay.constants.Constant; 17 | 18 | import lombok.Getter; 19 | import lombok.Setter; 20 | 21 | @Getter 22 | @Setter 23 | @Entity 24 | @Table(name = "sms_send_record") 25 | @DynamicInsert(true) 26 | @DynamicUpdate(true) 27 | public class SmsSendRecord implements Serializable { 28 | 29 | /** 30 | * 31 | */ 32 | private static final long serialVersionUID = 1L; 33 | 34 | @Id 35 | @Column(name = "id", length = 32) 36 | private String id; 37 | 38 | private Date createTime; 39 | 40 | private Date sendTime; 41 | 42 | private String smsType; 43 | 44 | private String mobile; 45 | 46 | private String verificationCode; 47 | 48 | private String errorMsg; 49 | 50 | private String state; 51 | 52 | @Version 53 | private Long version; 54 | 55 | public void fail(String errorMsg) { 56 | this.setState(Constant.短信发送状态_发送失败); 57 | this.setErrorMsg(errorMsg); 58 | this.setSendTime(new Date()); 59 | } 60 | 61 | public void success() { 62 | this.setState(Constant.短信发送状态_发送成功); 63 | this.setSendTime(new Date()); 64 | } 65 | 66 | public static SmsSendRecord build(String mobile, String smsType, String verificationCode) { 67 | SmsSendRecord po = new SmsSendRecord(); 68 | po.setId(IdUtils.getId()); 69 | po.setCreateTime(new Date()); 70 | po.setMobile(mobile); 71 | po.setSmsType(smsType); 72 | po.setVerificationCode(verificationCode); 73 | po.setState(Constant.短信发送状态_未发送); 74 | return po; 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/vo/TradeRiskRecordVO.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.vo; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Date; 5 | import java.util.List; 6 | 7 | import org.springframework.beans.BeanUtils; 8 | 9 | import com.c2cpay.dictconfig.DictHolder; 10 | import com.c2cpay.trade.domain.TradeRiskRecord; 11 | import com.fasterxml.jackson.annotation.JsonFormat; 12 | 13 | import cn.hutool.core.collection.CollectionUtil; 14 | import lombok.Data; 15 | 16 | @Data 17 | public class TradeRiskRecordVO { 18 | 19 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 20 | private Date createTime; 21 | 22 | private String riskCause; 23 | 24 | private String riskCauseName; 25 | 26 | private Long hitCount; 27 | 28 | private String riskPunish; 29 | 30 | private String riskPunishName; 31 | 32 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 33 | private Date riskFinishTime; 34 | 35 | private String memberRealName; 36 | 37 | private String memberMobile; 38 | 39 | public static List convertFor(List pos) { 40 | if (CollectionUtil.isEmpty(pos)) { 41 | return new ArrayList<>(); 42 | } 43 | List vos = new ArrayList<>(); 44 | for (TradeRiskRecord po : pos) { 45 | vos.add(convertFor(po)); 46 | } 47 | return vos; 48 | } 49 | 50 | public static TradeRiskRecordVO convertFor(TradeRiskRecord po) { 51 | if (po == null) { 52 | return null; 53 | } 54 | TradeRiskRecordVO vo = new TradeRiskRecordVO(); 55 | BeanUtils.copyProperties(po, vo); 56 | if (po.getMember() != null) { 57 | vo.setMemberRealName(po.getMember().getRealName()); 58 | vo.setMemberMobile(po.getMember().getMobile()); 59 | } 60 | vo.setRiskCauseName(DictHolder.getDictItemName("riskCause", vo.getRiskCause())); 61 | vo.setRiskPunishName(DictHolder.getDictItemName("riskPunish", vo.getRiskPunish())); 62 | return vo; 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /c2cpay-member/src/main/java/com/c2cpay/notice/controller/NoticeController.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.notice.controller; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.web.bind.annotation.GetMapping; 7 | import org.springframework.web.bind.annotation.PostMapping; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import com.c2cpay.common.vo.PageResult; 12 | import com.c2cpay.common.vo.Result; 13 | import com.c2cpay.notice.param.NoticeQueryCondParam; 14 | import com.c2cpay.notice.service.NoticeService; 15 | import com.c2cpay.notice.vo.NoticeAbstractVO; 16 | import com.c2cpay.notice.vo.NoticeVO; 17 | 18 | import cn.dev33.satoken.stp.StpUtil; 19 | 20 | @RestController 21 | @RequestMapping("/notice") 22 | public class NoticeController { 23 | 24 | @Autowired 25 | private NoticeService noticeService; 26 | 27 | @PostMapping("/allMarkRead") 28 | public Result allMarkRead() { 29 | noticeService.allMarkRead(StpUtil.getLoginIdAsString()); 30 | return Result.success(); 31 | } 32 | 33 | @PostMapping("/markRead") 34 | public Result markRead(String id) { 35 | noticeService.markRead(id, StpUtil.getLoginIdAsString()); 36 | return Result.success(); 37 | } 38 | 39 | @GetMapping("/findUnreadNoticeId") 40 | public Result> findUnreadNoticeId() { 41 | return Result.success(noticeService.findUnreadNoticeId(StpUtil.getLoginIdAsString())); 42 | } 43 | 44 | @GetMapping("/getNoticeDetail") 45 | public Result getNoticeDetail(String id) { 46 | return Result.success(noticeService.findById(id)); 47 | } 48 | 49 | @GetMapping("/findNoticeAbstractByPage") 50 | public Result> findNoticeAbstractByPage(NoticeQueryCondParam param) { 51 | return Result.success(noticeService.findNoticeAbstractByPage(param)); 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/backgroundaccount/domain/AccountRole.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.backgroundaccount.domain; 2 | 3 | import java.io.Serializable; 4 | 5 | import javax.persistence.Column; 6 | import javax.persistence.ConstraintMode; 7 | import javax.persistence.Entity; 8 | import javax.persistence.FetchType; 9 | import javax.persistence.ForeignKey; 10 | import javax.persistence.Id; 11 | import javax.persistence.JoinColumn; 12 | import javax.persistence.ManyToOne; 13 | import javax.persistence.Table; 14 | 15 | import org.hibernate.annotations.DynamicInsert; 16 | import org.hibernate.annotations.DynamicUpdate; 17 | 18 | import com.c2cpay.common.utils.IdUtils; 19 | 20 | import lombok.Getter; 21 | import lombok.Setter; 22 | 23 | @Getter 24 | @Setter 25 | @Entity 26 | @Table(name = "account_role") 27 | @DynamicInsert(true) 28 | @DynamicUpdate(true) 29 | public class AccountRole implements Serializable { 30 | 31 | /** 32 | * 33 | */ 34 | private static final long serialVersionUID = 1L; 35 | 36 | @Id 37 | @Column(name = "id", length = 32) 38 | private String id; 39 | 40 | @Column(name = "account_id", length = 32) 41 | private String accountId; 42 | 43 | @Column(name = "role_id", length = 32) 44 | private String roleId; 45 | 46 | @ManyToOne(fetch = FetchType.LAZY) 47 | @JoinColumn(name = "account_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 48 | private BackgroundAccount backgroundAccount; 49 | 50 | @ManyToOne(fetch = FetchType.LAZY) 51 | @JoinColumn(name = "role_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 52 | private Role role; 53 | 54 | public static AccountRole build(String accountId, String roleId) { 55 | AccountRole accountRole = new AccountRole(); 56 | accountRole.setId(IdUtils.getId()); 57 | accountRole.setAccountId(accountId); 58 | accountRole.setRoleId(roleId); 59 | return accountRole; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/log/domain/LoginLog.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.log.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.Entity; 8 | import javax.persistence.Id; 9 | import javax.persistence.Table; 10 | 11 | import org.hibernate.annotations.DynamicInsert; 12 | import org.hibernate.annotations.DynamicUpdate; 13 | 14 | import com.c2cpay.common.utils.IdUtils; 15 | import com.c2cpay.constants.Constant; 16 | 17 | import cn.hutool.http.useragent.UserAgent; 18 | import lombok.Getter; 19 | import lombok.Setter; 20 | 21 | @Getter 22 | @Setter 23 | @Entity 24 | @Table(name = "login_log") 25 | @DynamicInsert(true) 26 | @DynamicUpdate(true) 27 | public class LoginLog implements Serializable { 28 | 29 | /** 30 | * 31 | */ 32 | private static final long serialVersionUID = 1L; 33 | 34 | @Id 35 | @Column(name = "id", length = 32) 36 | private String id; 37 | 38 | private String subSystem; 39 | 40 | private String state; 41 | 42 | private String ipAddr; 43 | 44 | private Date loginTime; 45 | 46 | private String browser; 47 | 48 | private String os; 49 | 50 | private String msg; 51 | 52 | private String userName; 53 | 54 | public LoginLog loginFail(String msg) { 55 | this.setState(Constant.登录状态_失败); 56 | this.setMsg(msg); 57 | return this; 58 | } 59 | 60 | public LoginLog loginSuccess() { 61 | this.setState(Constant.登录状态_成功); 62 | this.setMsg(Constant.登录提示_登录成功); 63 | return this; 64 | } 65 | 66 | public static LoginLog buildLog(String userName, String subSystem, String ipAddr, UserAgent userAgent) { 67 | LoginLog loginLog = new LoginLog(); 68 | loginLog.setId(IdUtils.getId()); 69 | loginLog.setUserName(userName); 70 | loginLog.setSubSystem(subSystem); 71 | loginLog.setIpAddr(ipAddr); 72 | loginLog.setLoginTime(new Date()); 73 | loginLog.setBrowser(userAgent.getBrowser().getName()); 74 | loginLog.setOs(userAgent.getOs().getName()); 75 | return loginLog; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/trade/domain/PreTradeOrder.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.trade.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.ConstraintMode; 8 | import javax.persistence.Entity; 9 | import javax.persistence.FetchType; 10 | import javax.persistence.ForeignKey; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | import javax.persistence.ManyToOne; 14 | import javax.persistence.Table; 15 | import javax.persistence.Version; 16 | 17 | import org.hibernate.annotations.DynamicInsert; 18 | import org.hibernate.annotations.DynamicUpdate; 19 | import org.hibernate.annotations.NotFound; 20 | import org.hibernate.annotations.NotFoundAction; 21 | 22 | import com.c2cpay.member.domain.Member; 23 | 24 | import lombok.Getter; 25 | import lombok.Setter; 26 | 27 | @Getter 28 | @Setter 29 | @Entity 30 | @Table(name = "pre_trade_order") 31 | @DynamicInsert(true) 32 | @DynamicUpdate(true) 33 | public class PreTradeOrder implements Serializable { 34 | 35 | /** 36 | * 37 | */ 38 | private static final long serialVersionUID = 1L; 39 | 40 | @Id 41 | @Column(name = "id", length = 32) 42 | private String id; 43 | 44 | private String orderNo; 45 | 46 | private String tradeType; 47 | 48 | private String receiptPaymentType; 49 | 50 | private Date createTime; 51 | 52 | private Date completedTime; 53 | 54 | private Date cancelTime; 55 | 56 | private String state; 57 | 58 | private Double amount; 59 | 60 | private Double minAmount; 61 | 62 | private Double maxAmount; 63 | 64 | private Double availableAmount; 65 | 66 | @Version 67 | private Long version; 68 | 69 | @Column(name = "member_id", length = 32) 70 | private String memberId; 71 | 72 | @NotFound(action = NotFoundAction.IGNORE) 73 | @ManyToOne(fetch = FetchType.LAZY) 74 | @JoinColumn(name = "member_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 75 | private Member member; 76 | 77 | } 78 | -------------------------------------------------------------------------------- /c2cpay-biz/src/main/java/com/c2cpay/receiptpaymentinfo/domain/ReceiptPaymentInfo.java: -------------------------------------------------------------------------------- 1 | package com.c2cpay.receiptpaymentinfo.domain; 2 | 3 | import java.io.Serializable; 4 | import java.util.Date; 5 | 6 | import javax.persistence.Column; 7 | import javax.persistence.ConstraintMode; 8 | import javax.persistence.Entity; 9 | import javax.persistence.FetchType; 10 | import javax.persistence.ForeignKey; 11 | import javax.persistence.Id; 12 | import javax.persistence.JoinColumn; 13 | import javax.persistence.ManyToOne; 14 | import javax.persistence.Table; 15 | 16 | import org.hibernate.annotations.DynamicInsert; 17 | import org.hibernate.annotations.DynamicUpdate; 18 | import org.hibernate.annotations.NotFound; 19 | import org.hibernate.annotations.NotFoundAction; 20 | 21 | import com.c2cpay.member.domain.Member; 22 | 23 | import lombok.Getter; 24 | import lombok.Setter; 25 | 26 | @Getter 27 | @Setter 28 | @Entity 29 | @Table(name = "receipt_payment_info") 30 | @DynamicInsert(true) 31 | @DynamicUpdate(true) 32 | public class ReceiptPaymentInfo implements Serializable { 33 | 34 | /** 35 | * 36 | */ 37 | private static final long serialVersionUID = 1L; 38 | 39 | @Id 40 | @Column(name = "id", length = 32) 41 | private String id; 42 | 43 | private String realName; 44 | 45 | private String type; 46 | 47 | private Boolean activated; 48 | 49 | private Date activatedTime; 50 | 51 | private String cardNumber; 52 | 53 | private String bankName; 54 | 55 | private String account; 56 | 57 | private String qrcode; 58 | 59 | private Date createTime; 60 | 61 | private Boolean deletedFlag; 62 | 63 | private Date deletedTime; 64 | 65 | @Column(name = "member_id", length = 32) 66 | private String memberId; 67 | 68 | @NotFound(action = NotFoundAction.IGNORE) 69 | @ManyToOne(fetch = FetchType.LAZY) 70 | @JoinColumn(name = "member_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT)) 71 | private Member member; 72 | 73 | public void deleted() { 74 | this.setDeletedFlag(true); 75 | this.setDeletedTime(new Date()); 76 | } 77 | 78 | } 79 | --------------------------------------------------------------------------------