提交 d3b8a353 authored 作者: jacksmith1988's avatar jacksmith1988

//init

上级 ed53a40a
......@@ -160,4 +160,8 @@ public class Constant {
public static final String 下级账号查询范围_指定账号及直接下级 = "20";
public static final String 支付渠道_银行卡 = "bankcard";
public static final String 支付渠道_微信码 = "wechat";
public static final String 支付渠道_支付宝码 = "alipay";
}
......@@ -29,52 +29,64 @@ import me.zohar.runscore.useraccount.domain.UserAccount;
@DynamicUpdate(true)
public class GatheringCode {
/**
* 主键id
*/
@Id
@Column(name = "id", length = 32)
private String id;
/**
* 收款渠道
*/
private String gatheringChannelCode;
/**
* 状态,启用:1;禁用:0
*/
private String state;
private Boolean fixedGatheringAmount;
/**
* 收款金额
*/
private Double gatheringAmount;
/**
* 收款人
*/
private String payee;
/**
* 创建时间
*/
private Date createTime;
@Column(name = "storage_id", length = 32)
private String storageId;
/**
* 用户账号id
*/
@Column(name = "user_account_id", length = 32)
private String userAccountId;
@NotFound(action = NotFoundAction.IGNORE)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_account_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
private UserAccount userAccount;
/**
* 主键id
*/
@Id
@Column(name = "id", length = 32)
private String id;
/**
* 收款渠道
*/
private String gatheringChannelCode;
/**
* 状态,启用:1;禁用:0
*/
private String state;
private Boolean fixedGatheringAmount;
/**
* 收款金额
*/
private Double gatheringAmount;
/**
* 收款人
*/
private String payee;
/**
* 开户行
*/
private String bankAddress;
/**
* 卡号
*/
private String bankCode;
/**
* 卡户主
*/
private String bankUsername;
/**
* 创建时间
*/
private Date createTime;
@Column(name = "storage_id", length = 32)
private String storageId;
/**
* 用户账号id
*/
@Column(name = "user_account_id", length = 32)
private String userAccountId;
@NotFound(action = NotFoundAction.IGNORE)
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "user_account_id", updatable = false, insertable = false, foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
private UserAccount userAccount;
}
......@@ -54,6 +54,19 @@ public class GatheringCodeParam {
private String storageId;
/**
* 开户行
*/
private String bankAddress;
/**
* 卡号
*/
private String bankCode;
/**
* 卡户主
*/
private String bankUsername;
public GatheringCode convertToPo(String userAccountId) {
GatheringCode po = new GatheringCode();
BeanUtils.copyProperties(this, po);
......
......@@ -8,6 +8,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import me.zohar.runscore.dictconfig.DictHolder;
import me.zohar.runscore.gatheringcode.domain.GatheringCode;
import me.zohar.runscore.merchant.domain.MerchantOrder;
@Data
......@@ -58,6 +59,8 @@ public class OrderGatheringCodeVO {
private String gatheringCodeUrl;
private GatheringCode gatheringCode;
/**
* 同步通知地址
*/
......@@ -75,4 +78,5 @@ public class OrderGatheringCodeVO {
return vo;
}
}
......@@ -32,6 +32,7 @@ public class LoginLog {
/**
* 登录系统
*/
@Column(name="`system`")
private String system;
/**
......
......@@ -3,6 +3,8 @@ package me.zohar.runscore.useraccount.repo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import java.util.List;
import me.zohar.runscore.useraccount.domain.UserAccount;
......@@ -12,4 +14,5 @@ public interface UserAccountRepo extends JpaRepository<UserAccount, String>, Jpa
Long countByInviterId(String inviterId);
List<UserAccount> findAllByAccountType(String accountType);
}
......@@ -19,6 +19,11 @@ public class ApiController {
@Autowired
private MerchantOrderService platformOrderService;
/**
* 商户开单,获取支付方式,返回银行卡信息或者支付码信息
* @param param
* @return
*/
@PostMapping("/startOrder")
@ResponseBody
public Result startOrder(StartOrderParam param) {
......
......@@ -15,11 +15,12 @@ public class StartOrderTest {
*/
public static void main(String[] args) {
String merchantNum = "201906001";
String merchantOrderNo = "20190629023134U936283877";
String merchantNum = "1001";
String merchantOrderNo = "20190629023134U936283878";
Double amount = 100d;
String notifyUrl = "http://xhbc10.com/index.php/Pay/Paynotify";
String secretKey = "l54x9426o68962464";
//String returnUrl = "http://xhbc10.com/index.php/Pay/Paynotify";
String secretKey = "456";
String sign = merchantNum + merchantOrderNo
+ new DecimalFormat("###################.###########").format(amount) + notifyUrl + secretKey;
System.out.println(sign);
......
......@@ -135,9 +135,12 @@ var gatheringCodeVM = new Vue({
that.editGatheringCode = {
gatheringChannelCode : '',
state : '',
fixedGatheringAmount : true,
fixedGatheringAmount : false,
gatheringAmount : '',
payee : ''
payee : '',
bankAddress:'',
bankCode:'',
bankUsername:''
};
that.showEditGatheringCodePageInner();
that.initFileUploadWidget();
......@@ -187,24 +190,24 @@ var gatheringCodeVM = new Vue({
});
return;
}
if (editGatheringCode.fixedGatheringAmount == null) {
layer.alert('请选择是否固定收款金额', {
title : '提示',
icon : 7,
time : 3000
});
return;
}
if (editGatheringCode.fixedGatheringAmount) {
if (editGatheringCode.gatheringAmount == null || editGatheringCode.gatheringAmount == '') {
layer.alert('请输入收款金额', {
title : '提示',
icon : 7,
time : 3000
});
return;
}
}
// if (editGatheringCode.fixedGatheringAmount == null) {
// layer.alert('请选择是否固定收款金额', {
// title : '提示',
// icon : 7,
// time : 3000
// });
// return;
// }
// if (editGatheringCode.fixedGatheringAmount) {
// if (editGatheringCode.gatheringAmount == null || editGatheringCode.gatheringAmount == '') {
// layer.alert('请输入收款金额', {
// title : '提示',
// icon : 7,
// time : 3000
// });
// return;
// }
// }
if (editGatheringCode.payee == null || editGatheringCode.payee == '') {
layer.alert('请选择收款人', {
title : '提示',
......@@ -214,11 +217,12 @@ var gatheringCodeVM = new Vue({
return;
}
if ($('.gathering-code-pic').fileinput('getPreview').content.length != 0) {
if ($('.gathering-code-pic').fileinput('getPreview').content.length != 0 || editGatheringCode.gatheringChannelCode =='bankcard') {
that.addOrUpdateGatheringCodeInner();
} else {
var filesCount = $('.gathering-code-pic').fileinput('getFilesCount');
if (filesCount == 0) {
console.log(editGatheringCode.gatheringChannelCode);
if (filesCount == 0 ) {
layer.alert('请选择要上传的图片', {
title : '提示',
icon : 7,
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论