| @@ -47,10 +47,10 @@ public class WxProfitSharingOrder implements Serializable { | |||
| private String tenantId; | |||
| /*商户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | |||
| private String merchantId; | |||
| private Long merchantId; | |||
| /*订单ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="订单ID",name="orderId") | |||
| private String orderId; | |||
| private Long orderId; | |||
| /*分账总金额(分)**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账总金额(分)",name="payAmount") | |||
| private Integer payAmount; | |||
| @@ -65,7 +65,7 @@ public class WxProfitSharingOrder implements Serializable { | |||
| private String transactionId; | |||
| /*微信生成分账单号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信生成分账单号",name="sharingOrderId") | |||
| private String sharingOrderId; | |||
| private String sharingOrderNo; | |||
| /*分账申请失败原因**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账申请失败原因",name="errorMsg") | |||
| private String errorMsg; | |||
| @@ -84,16 +84,16 @@ public class WxProfitSharingOrder implements Serializable { | |||
| public void setTenantId(String _tenantId) { | |||
| tenantId = _tenantId; | |||
| } | |||
| public String getMerchantId() { | |||
| public Long getMerchantId() { | |||
| return merchantId; | |||
| } | |||
| public void setMerchantId(String _merchantId) { | |||
| public void setMerchantId(Long _merchantId) { | |||
| merchantId = _merchantId; | |||
| } | |||
| public String getOrderId() { | |||
| public Long getOrderId() { | |||
| return orderId; | |||
| } | |||
| public void setOrderId(String _orderId) { | |||
| public void setOrderId(Long _orderId) { | |||
| orderId = _orderId; | |||
| } | |||
| public Integer getPayAmount() { | |||
| @@ -114,17 +114,17 @@ public class WxProfitSharingOrder implements Serializable { | |||
| public void setPayTimeStart(Date _payTimeStart) { | |||
| payTimeStart = _payTimeStart; | |||
| } | |||
| public String getTransactionId() { | |||
| public String getTransaction() { | |||
| return transactionId; | |||
| } | |||
| public void setTransactionId(String _transactionId) { | |||
| transactionId = _transactionId; | |||
| } | |||
| public String getSharingOrderId() { | |||
| return sharingOrderId; | |||
| public String getSharingOrderNo() { | |||
| return sharingOrderNo; | |||
| } | |||
| public void setSharingOrderId(String _sharingOrderId) { | |||
| sharingOrderId = _sharingOrderId; | |||
| public void setSharingOrderNo(String _sharingOrderNo) { | |||
| sharingOrderNo = _sharingOrderNo; | |||
| } | |||
| public String getErrorMsg() { | |||
| return errorMsg; | |||
| @@ -44,7 +44,7 @@ public class WxProfitSharingReceiver implements Serializable { | |||
| /*商户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") | |||
| private String merchantId; | |||
| private Long merchantId; | |||
| /*分账接收方类型,1 = MERCHANT_ID(商户 ID) 2 = PERSONAL_WECHATID(个人微信号) 3 = PERSONAL_OPENID(个人openid(由父商 户 APPID 转换得到) 4 = PERSONAL_SUB_OPENID(个人 sub_openid(由子商户 APPID 转换得到))**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账接收方类型,1 = MERCHANT_ID(商户 ID) 2 = PERSONAL_WECHATID(个人微信号) 3 = PERSONAL_OPENID(个人openid(由父商 户 APPID 转换得到) 4 = PERSONAL_SUB_OPENID(个人 sub_openid(由子商户 APPID 转换得到))",name="receiverType") | |||
| private Integer receiverType; | |||
| @@ -72,10 +72,10 @@ public class WxProfitSharingReceiver implements Serializable { | |||
| /***/ | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="bankCode") | |||
| private String bankCode; | |||
| public String getMerchantId() { | |||
| public Long getMerchantId() { | |||
| return merchantId; | |||
| } | |||
| public void setMerchantId(String _merchantId) { | |||
| public void setMerchantId(Long _merchantId) { | |||
| merchantId = _merchantId; | |||
| } | |||
| public Integer getReceiverType() { | |||
| @@ -44,10 +44,10 @@ public class WxProfitSharingResult implements Serializable { | |||
| /*分账订单号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账订单号",name="sharingOrderId") | |||
| private String sharingOrderId; | |||
| private Long sharingOrderId; | |||
| /*分账接收方id**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账接收方id",name="sharingReceiverId") | |||
| private String sharingReceiverId; | |||
| private Long sharingReceiverId; | |||
| /*分账金额(分)**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账金额(分)",name="payAmount") | |||
| private Integer payAmount; | |||
| @@ -66,16 +66,16 @@ public class WxProfitSharingResult implements Serializable { | |||
| /*微信返回的失败原因**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信返回的失败原因",name="failedReason") | |||
| private String failedReason; | |||
| public String getSharingOrderId() { | |||
| public Long getSharingOrderId() { | |||
| return sharingOrderId; | |||
| } | |||
| public void setSharingOrderId(String _sharingOrderId) { | |||
| public void setSharingOrderId(Long _sharingOrderId) { | |||
| sharingOrderId = _sharingOrderId; | |||
| } | |||
| public String getSharingReceiverId() { | |||
| public Long getSharingReceiverId() { | |||
| return sharingReceiverId; | |||
| } | |||
| public void setSharingReceiverId(String _sharingReceiverId) { | |||
| public void setSharingReceiverId(Long _sharingReceiverId) { | |||
| sharingReceiverId = _sharingReceiverId; | |||
| } | |||
| public Integer getPayAmount() { | |||
| @@ -151,7 +151,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| //是否已创建分账订单 | |||
| WxProfitSharingOrder record = new WxProfitSharingOrder(); | |||
| record.setOrderId(wxPayOrder.getId().toString()); | |||
| record.setOrderId(wxPayOrder.getId()); | |||
| record = wxProfitSharingOrderMapper.selectOne(record); | |||
| if (record == null) { | |||
| //创建分账订单 | |||
| @@ -160,9 +160,9 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| record.setId(idworker.nextId()); | |||
| record.setTenantId(wxPayOrder.getTenantId()); | |||
| record.setTransactionId(wxPayOrder.getTransactionId()); | |||
| record.setOrderId(wxPayOrder.getId().toString()); | |||
| record.setOrderId(wxPayOrder.getId()); | |||
| record.setPayAmount(wxPayOrder.getPayAmount()); | |||
| record.setMerchantId(wxOrder.getMerchantId().toString()); | |||
| record.setMerchantId(wxOrder.getMerchantId()); | |||
| record.setCreateTime(currentDate); | |||
| record.setUpdateTime(currentDate); | |||
| record.setPayTimeStart(currentDate); | |||
| @@ -185,7 +185,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| //添加分账接受方 | |||
| WxProfitSharingReceiver wxProfitSharingReceiver = new WxProfitSharingReceiver(); | |||
| wxProfitSharingReceiver.setMerchantId(wxOrder.getMerchantId().toString()); | |||
| wxProfitSharingReceiver.setMerchantId(wxOrder.getMerchantId()); | |||
| wxProfitSharingReceiver.setSharingType(EnumProfitSharingType.PROFIT_SHARING_TYPE_WECHAT.getCode()); | |||
| List<WxProfitSharingReceiver> wxProfitSharingReceiverList = wxProfitSharingReceiverMapper.findList(wxProfitSharingReceiver); | |||
| if (wxProfitSharingReceiverList.size()<=0 || wxProfitSharingReceiverList.size() > 50) { | |||
| @@ -206,8 +206,8 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| WxProfitSharingResult result = new WxProfitSharingResult(); | |||
| result.setId(idworker.nextId()); | |||
| result.setSharingOrderId(record.getSharingOrderId()); | |||
| result.setSharingReceiverId(receiver.getId().toString()); | |||
| result.setSharingOrderId(record.getId()); | |||
| result.setSharingReceiverId(receiver.getId()); | |||
| result.setCreateTime(currentDate); | |||
| result.setUpdateTime(currentDate); | |||
| resultList.add(result); | |||
| @@ -239,7 +239,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| return new ResultData(ErrorCode.PROFIT_SHARING_APPLY_FAILED.getCode(), returnMap.get("result_msg")); | |||
| } | |||
| record.setSharingOrderId(returnMap.get("order_id")); | |||
| record.setSharingOrderNo(returnMap.get("order_id")); | |||
| record.setSharingStatus(EnumProfitSharingStatus.PROFIT_SHARING_ACCEPTED.getCode()); | |||
| record.setUpdateTime(new Date()); | |||
| wxProfitSharingOrderMapper.updateByPrimaryKey(record); | |||
| @@ -263,7 +263,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| WxOrder wxOrder = wxOrderMapper.selectByPrimaryKey(wxPayOrder.getOrderId()); | |||
| //是否已创建分账订单 | |||
| record.setOrderId(wxPayOrder.getId().toString()); | |||
| record.setOrderId(wxPayOrder.getId()); | |||
| record = wxProfitSharingOrderMapper.selectOne(record); | |||
| if (record == null) | |||
| throw new MallinkException(ErrorCode.ORDER_IS_NOT_FIND.getCode(), ErrorCode.ORDER_IS_NOT_FIND.getMessage()); | |||
| @@ -308,7 +308,7 @@ public class WxProfitSharingOrderServiceImpl implements WxProfitSharingOrderServ | |||
| JSONArray jReceivers = JSONArray.parseArray(receivers); | |||
| WxProfitSharingResult result = new WxProfitSharingResult(); | |||
| result.setSharingOrderId(record.getId().toString()); | |||
| result.setSharingOrderId(record.getId()); | |||
| List <WxProfitSharingResult> wxProfitSharingResultList = wxProfitSharingResultMapper.findList(result); | |||
| @@ -96,7 +96,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| WxProfitSharingReceiver receiver = new WxProfitSharingReceiver(); | |||
| receiver.setMerchantId(merchant.getId().toString()); | |||
| receiver.setMerchantId(merchant.getId()); | |||
| receiver.setSharingType(EnumProfitSharingType.PROFIT_SHARING_TYPE_WECHAT.getCode()); | |||
| receiver.setId(IdWorker.get().nextId()); | |||
| receiver.setCreateTime(new Date()); | |||
| @@ -162,7 +162,7 @@ public class WxProfitSharingReceiverServiceImpl implements WxProfitSharingReceiv | |||
| WxProfitSharingReceiver receiver = new WxProfitSharingReceiver(); | |||
| receiver.setMerchantId(merchant.getId().toString()); | |||
| receiver.setMerchantId(merchant.getId()); | |||
| receiver.setSharingType(EnumProfitSharingType.PROFIT_SHARING_TYPE_WECHAT.getCode()); | |||
| //receiver.setReceiverAccount(merchant.getReceiverAccount().toString()); | |||
| receiver.setReceiverType(EnumProfitSharingReceiverType.PROFIT_SHARING_RECEIVER_MERCHANT_ID.getCode()); | |||
| @@ -4,13 +4,13 @@ | |||
| <resultMap id="BaseResultMap" type="com.simple.domain.po.WxProfitSharingOrder"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> | |||
| <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" /> | |||
| <result column="order_id" jdbcType="VARCHAR" property="orderId" /> | |||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | |||
| <result column="order_id" jdbcType="BIGINT" property="orderId" /> | |||
| <result column="pay_amount" jdbcType="INTEGER" property="payAmount" /> | |||
| <result column="pay_time_end" jdbcType="TIMESTAMP" property="payTimeEnd" /> | |||
| <result column="pay_time_start" jdbcType="TIMESTAMP" property="payTimeStart" /> | |||
| <result column="transaction_id" jdbcType="VARCHAR" property="transactionId" /> | |||
| <result column="sharing_order_id" jdbcType="VARCHAR" property="sharingOrderId" /> | |||
| <result column="sharing_order_no" jdbcType="VARCHAR" property="sharingOrderId" /> | |||
| <result column="error_msg" jdbcType="VARCHAR" property="errorMsg" /> | |||
| <result column="sharing_status" jdbcType="INTEGER" property="sharingStatus" /> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | |||
| @@ -18,7 +18,7 @@ | |||
| </resultMap> | |||
| <sql id="allColumns"> | |||
| `id`,`tenant_id`,`merchant_id`,`order_id`,`pay_amount`,`pay_time_end`,`pay_time_start`,`transaction_id`,`sharing_order_id`,`error_msg`,`sharing_status`,`update_time`,`create_time` | |||
| `id`,`tenant_id`,`merchant_id`,`order_id`,`pay_amount`,`pay_time_end`,`pay_time_start`,`transaction_id`,`sharing_order_no`,`error_msg`,`sharing_status`,`update_time`,`create_time` | |||
| </sql> | |||
| <sql id="dynamicWhereConditions"> | |||
| @@ -64,7 +64,7 @@ | |||
| </if> | |||
| <if test=" null != sharingOrderId "> | |||
| <if test=" null != sharingOrderNo "> | |||
| and `sharing_order_id` like concat('%', #{sharingOrderId},'%') | |||
| </if> | |||
| @@ -3,7 +3,7 @@ | |||
| <mapper namespace="com.simple.mapper.WxProfitSharingReceiverMapper"> | |||
| <resultMap id="BaseResultMap" type="com.simple.domain.po.WxProfitSharingReceiver"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="merchant_id" jdbcType="VARCHAR" property="merchantId" /> | |||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId" /> | |||
| <result column="receiver_type" jdbcType="INTEGER" property="receiverType" /> | |||
| <result column="receiver_account" jdbcType="VARCHAR" property="receiverAccount" /> | |||
| <result column="receiver_comments" jdbcType="VARCHAR" property="receiverComments" /> | |||
| @@ -3,8 +3,8 @@ | |||
| <mapper namespace="com.simple.mapper.WxProfitSharingResultMapper"> | |||
| <resultMap id="BaseResultMap" type="com.simple.domain.po.WxProfitSharingResult"> | |||
| <id column="id" jdbcType="BIGINT" property="id" /> | |||
| <result column="sharing_order_id" jdbcType="VARCHAR" property="sharingOrderId" /> | |||
| <result column="sharing_receiver_id" jdbcType="VARCHAR" property="sharingReceiverId" /> | |||
| <result column="sharing_order_id" jdbcType="BIGINT" property="sharingOrderId" /> | |||
| <result column="sharing_receiver_id" jdbcType="BIGINT" property="sharingReceiverId" /> | |||
| <result column="pay_amount" jdbcType="INTEGER" property="payAmount" /> | |||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> | |||
| <result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> | |||