parent
fa93ea3404
commit
b3482bf70f
@ -0,0 +1,182 @@ |
||||
package com.hfkj.common.alipay; |
||||
|
||||
import com.alipay.api.AlipayClient; |
||||
import com.alipay.api.FileItem; |
||||
import com.alipay.api.domain.ZftSubMerchantOrder; |
||||
import com.alipay.api.request.AntMerchantExpandIndirectImageUploadRequest; |
||||
import com.alipay.api.request.AntMerchantExpandIndirectZftConsultRequest; |
||||
import com.alipay.api.request.AntMerchantExpandIndirectZftSettlementmodifyRequest; |
||||
import com.alipay.api.request.AntMerchantExpandIndirectZftorderQueryRequest; |
||||
import com.alipay.api.response.AntMerchantExpandIndirectImageUploadResponse; |
||||
import com.alipay.api.response.AntMerchantExpandIndirectZftConsultResponse; |
||||
import com.alipay.api.response.AntMerchantExpandIndirectZftSettlementmodifyResponse; |
||||
import com.alipay.api.response.AntMerchantExpandIndirectZftorderQueryResponse; |
||||
import com.hfkj.common.exception.ErrorCode; |
||||
import com.hfkj.common.exception.ErrorHelp; |
||||
import com.hfkj.common.exception.SysCode; |
||||
import org.apache.commons.lang3.StringUtils; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* 支付业务请求 |
||||
* @className: MerchantRequest |
||||
* @author: HuRui |
||||
* @date: 2023/2/17 |
||||
**/ |
||||
public class AlipayRequest { |
||||
|
||||
private static Logger log = LoggerFactory.getLogger(AlipayRequest.class); |
||||
|
||||
/** |
||||
* 商户创建预校验咨询 |
||||
* @param bizContent 进件参数 |
||||
* @return |
||||
* @throws Exception |
||||
*/ |
||||
public static void merchantIndirectConsult(String bizContent) { |
||||
log.info("========== START 商户创建预校验咨询 =========="); |
||||
log.info("请求参数:" + bizContent); |
||||
try { |
||||
AlipayClient alipayClient = AlipayUtils.initClient(); |
||||
AntMerchantExpandIndirectZftConsultRequest request = new AntMerchantExpandIndirectZftConsultRequest(); |
||||
request.setBizContent(bizContent); |
||||
AntMerchantExpandIndirectZftConsultResponse response = alipayClient.certificateExecute(request); |
||||
log.info("响应参数:" + response); |
||||
if (response.isSuccess() != true || response.getAccountAudit() != true || response.getRiskAudit() != true) { |
||||
throw new Exception(response.getSubMsg()); |
||||
} |
||||
} catch (Exception e) { |
||||
log.info("出现异常:" + e); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); |
||||
} finally { |
||||
log.info("========== END 商户创建预校验咨询 =========="); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 商户创建 |
||||
* @param bizContent 进件参数 |
||||
* @return 申请单号 |
||||
* @throws Exception |
||||
*/ |
||||
public static String merchantIndirectCreate(String bizContent) { |
||||
log.info("========== START 商户创建 =========="); |
||||
log.info("请求参数:" + bizContent); |
||||
try { |
||||
AlipayClient alipayClient = AlipayUtils.initClient(); |
||||
AntMerchantExpandIndirectZftConsultRequest request = new AntMerchantExpandIndirectZftConsultRequest(); |
||||
request.setBizContent(bizContent); |
||||
AntMerchantExpandIndirectZftConsultResponse response = alipayClient.certificateExecute(request); |
||||
log.info("响应参数:" + response); |
||||
if (response.isSuccess()) { |
||||
return response.getOrderId(); |
||||
} |
||||
throw new Exception(response.getSubMsg()); |
||||
|
||||
} catch (Exception e) { |
||||
log.info("出现异常:" + e); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); |
||||
|
||||
} finally { |
||||
log.info("========== END 商户创建 =========="); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 商户入驻进度查询 |
||||
* @param bizContent 进件参数 |
||||
* @return 申请单号 |
||||
* @throws Exception |
||||
*/ |
||||
public static List<ZftSubMerchantOrder> merchantIndirectQuery(String bizContent) { |
||||
log.info("========== START 商户入驻进度查询 =========="); |
||||
log.info("请求参数:" + bizContent); |
||||
try { |
||||
AlipayClient alipayClient = AlipayUtils.initClient(); |
||||
AntMerchantExpandIndirectZftorderQueryRequest request = new AntMerchantExpandIndirectZftorderQueryRequest(); |
||||
request.setBizContent(bizContent); |
||||
AntMerchantExpandIndirectZftorderQueryResponse response = alipayClient.certificateExecute(request); |
||||
log.info("响应参数:" + response); |
||||
if (response.isSuccess()) { |
||||
return response.getOrders(); |
||||
} |
||||
throw new Exception(response.getSubMsg()); |
||||
|
||||
} catch (Exception e) { |
||||
log.info("出现异常:" + e); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); |
||||
|
||||
} finally { |
||||
log.info("========== END 商户入驻进度查询 =========="); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 商户结算信息修改 |
||||
* @param bizContent 参数 |
||||
* @return |
||||
* @throws Exception |
||||
*/ |
||||
public static String merchantIndirectSettlementModify(String bizContent) { |
||||
log.info("========== START 商户结算信息修改 =========="); |
||||
log.info("请求参数:" + bizContent); |
||||
try { |
||||
AlipayClient alipayClient = AlipayUtils.initClient(); |
||||
AntMerchantExpandIndirectZftSettlementmodifyRequest request = new AntMerchantExpandIndirectZftSettlementmodifyRequest (); |
||||
request.setBizContent(bizContent); |
||||
AntMerchantExpandIndirectZftSettlementmodifyResponse response = alipayClient.certificateExecute(request); |
||||
log.info("响应参数:" + response); |
||||
if (response.isSuccess()) { |
||||
return response.getOrderId(); |
||||
} |
||||
throw new Exception(response.getSubMsg()); |
||||
|
||||
} catch (Exception e) { |
||||
log.info("出现异常:" + e); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); |
||||
|
||||
} finally { |
||||
log.info("========== END 商户结算信息修改 =========="); |
||||
} |
||||
} |
||||
|
||||
/** |
||||
* 图片上传 |
||||
* @param fileUrl 本地路径 |
||||
* @return |
||||
* @throws Exception |
||||
*/ |
||||
public static String imageUpload(String fileUrl) { |
||||
log.info("========== START 图片上传 =========="); |
||||
log.info("请求参数:" + fileUrl); |
||||
try { |
||||
AlipayClient alipayClient = AlipayUtils.initClient(); |
||||
// 读取本地文件
|
||||
FileItem imageContent = new FileItem(fileUrl); |
||||
|
||||
// 截取文件格式
|
||||
String imageType = StringUtils.substringAfterLast(fileUrl, "."); |
||||
|
||||
AntMerchantExpandIndirectImageUploadRequest request = new AntMerchantExpandIndirectImageUploadRequest(); |
||||
request.setImageContent(imageContent); |
||||
request.setImageType(imageType); |
||||
AntMerchantExpandIndirectImageUploadResponse response = alipayClient.certificateExecute(request); |
||||
log.info("响应参数:" + response); |
||||
if (response.isSuccess()) { |
||||
return response.getImageId(); |
||||
} |
||||
throw new Exception(response.getSubMsg()); |
||||
|
||||
} catch (Exception e) { |
||||
log.info("出现异常:" + e); |
||||
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, e.getMessage()); |
||||
|
||||
} finally { |
||||
log.info("========== END 图片上传 =========="); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,49 @@ |
||||
package com.hfkj.common.alipay; |
||||
|
||||
import com.alipay.api.AlipayClient; |
||||
import com.alipay.api.AlipayConfig; |
||||
import com.alipay.api.DefaultAlipayClient; |
||||
|
||||
/** |
||||
* 支付宝配置 |
||||
* @className: AlipayConfig |
||||
* @author: HuRui |
||||
* @date: 2023/2/13 |
||||
**/ |
||||
public class AlipayUtils { |
||||
private final static String serverUrl = "https://openapi.alipay.com/gateway.do"; |
||||
private final static String appId = "2021004149636316"; |
||||
private final static String APP_PRIVATE_KEY = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCBObA50oioZEmUGTsSPJghAUf/lRT+TC+9HNyu0To3bSkLZSlEide2kszQnJk32+60QM26OudBaUnUCHkzv0++232hKPzSXHVVUykvu74itAtH66YxO2RqLt/OuTRBnFpiYPs0lXEoNeAsUQ92I6TOCrS8db/76Tvuye0nSH5lAJ6mwq8Hgo/+RQNRvIq3RFvWQOMD5lTp2lWsZ7x4FONtSmPCXd4fdYbKd1QrBHMZCQjBAn12YA+X+lmSNlnFo/xOu5rvKwMGJgvFLYxFdNHXgZUZfrjzOKA+sqq8lRfyVo4YHqRDi5bH1Ln2VUqZL9HidIHZx0YSKlfvdeuzR8abAgMBAAECggEAOOpwrLcGy6wIIDuQofKgSoEm9fHyoiJqMFAC/thWXM0uc79lkrNnmBlGLmeasFik5S1Zrzl8W3oFM2dcAqezdutzhMTpvblNUHxlOonlL6G/CjlHJI31JzNoDcPSuUclJAl0+u8LPNul1b8KIU2Hq9xZSFxQZ6KNbBnx4whx6wfZBvV06oy7hu7vfnWvobidooiGAxJuffRKuWQS8w6BPC7h2vz8AbiADHMA1YgCwIwroPbhU8QFY07PGeirAyJnrphZOIKSKwY9m8RK/AyBKL0iDopX/7nhdJ1LEiVbBlw50ej2VMAqfb0bA7z7zhhxwYCi6LN9DZfLQW9/Z3W8mQKBgQDyHdT/tex+s07zg4TUgAmTTqSyqp64j9Qbgdde2tTHUPjmOXXOpL5PvvT6xOu6dTwq5TwwqdsyVLh5T/cnYzqqXaZZzv6iWi1qajbLElf1r7bPquF2KCa0n2ZdxcYBH78bvIIuD7kGfmJDSA5a+1cgHJYZVer7MvYFf2id6H617wKBgQCIoqlgvYzTVDdXevI5LcOr1CfsBsuXoUdc8aUyFa1D6rj41wHXonqtmr/3tlo03HbUAQT0u/CjMf8raoW/2D1Sv7EnL3udb51qzYYj082x0DNUAs9CQq+AO8qhs8h4sXJGki7rjtJUtOfs1VFg84I5Z7IT9xKQMvsp2gmErpTGFQKBgQDIQYBxWEmZqjl9FKUDFjvVSVDULmdFhEEN12EJpbokeYbE9XXJS13Vm74IxGOtP1ZarGwSXAtfH8/NFyT3wQ0+6GK1GY5nPmsd/2f+otd58LImJdKB5kfNUaJboT9aoqVxDYQnEP4aruIbgDfPbN/tQXes0PGgf9AZT/55zVkwpQKBgFD9kkbctKADuHYrU28fOHAe5rcaZA3yNHncZt5kSPsMJC6kS9xE3FERfJ7ZwWi6Edmi7QwgZwhlN2rFzpgkFl15cQnYNH7izT2kq9GK18+BqRswOyh8nMj3KCpnhfo8vI8mUZehZf196kfRPlaooNVkKQN6nc9J2OU68A9s6JTtAoGBAOTabPjBoxWeNQwF2pR4E5SfXaMBKC7a6/+AMn9oUb9lvTPZtxXkIZkvn5iRz2UmrygLw4UCWKC3T7ujFIO0lHWktzVv2qPbINbfW10p0S/ioFvNxzP+ZDfSFrN03Zoh05H+0NXj1e4REMtIrbx5R+sJn6CVftpYfFcQd/lXy8MR"; |
||||
private final static String APP_CERT_PATH = "/home/project/oil/cert/alipay/appCertPublicKey_2021004149636316.crt"; |
||||
private final static String ALIPAY_CERT_PATH = "/home/project/oil/cert/alipay/alipayCertPublicKey_RSA2.crt"; |
||||
private final static String ALIPAY_ROOT_CERT_PATH = "/home/project/oil/cert/alipay/alipayRootCert.crt"; |
||||
|
||||
/** |
||||
* 初始化客户端请求 |
||||
* @return |
||||
*/ |
||||
public static AlipayClient initClient() throws Exception { |
||||
AlipayConfig alipayConfig = new AlipayConfig(); |
||||
// 设置网关地址
|
||||
alipayConfig.setServerUrl(serverUrl); |
||||
// 设置应用APPID
|
||||
alipayConfig.setAppId(appId); |
||||
// 设置应用私钥
|
||||
alipayConfig.setPrivateKey(APP_PRIVATE_KEY); |
||||
// 设置应用公钥证书路径
|
||||
alipayConfig.setAppCertPath(APP_CERT_PATH); |
||||
// 设置支付宝公钥证书路径
|
||||
alipayConfig.setAlipayPublicCertPath(ALIPAY_CERT_PATH); |
||||
// 设置支付宝根证书路径
|
||||
alipayConfig.setRootCertPath(ALIPAY_ROOT_CERT_PATH); |
||||
// 设置请求格式,固定值json
|
||||
alipayConfig.setFormat("json"); |
||||
// 设置字符集
|
||||
alipayConfig.setCharset("utf-8"); |
||||
// 设置签名类型
|
||||
alipayConfig.setSignType("RSA2"); |
||||
return new DefaultAlipayClient(alipayConfig); |
||||
} |
||||
|
||||
|
||||
} |
@ -1,6 +1,7 @@ |
||||
package com.hfkj.common.utils; |
||||
package com.hfkj.common.alipay; |
||||
|
||||
import com.alibaba.fastjson.JSONObject; |
||||
import com.hfkj.common.utils.HttpUtils; |
||||
import org.apache.http.HttpResponse; |
||||
import org.apache.http.util.EntityUtils; |
||||
|
@ -0,0 +1,134 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsOrderSettleLedger; |
||||
import com.hfkj.entity.BsOrderSettleLedgerExample; |
||||
import java.util.List; |
||||
import org.apache.ibatis.annotations.Delete; |
||||
import org.apache.ibatis.annotations.DeleteProvider; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.InsertProvider; |
||||
import org.apache.ibatis.annotations.Options; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.annotations.SelectProvider; |
||||
import org.apache.ibatis.annotations.Update; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface BsOrderSettleLedgerMapper extends BsOrderSettleLedgerMapperExt { |
||||
@SelectProvider(type=BsOrderSettleLedgerSqlProvider.class, method="countByExample") |
||||
long countByExample(BsOrderSettleLedgerExample example); |
||||
|
||||
@DeleteProvider(type=BsOrderSettleLedgerSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsOrderSettleLedgerExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_order_settle_ledger", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into bs_order_settle_ledger (order_settle_id, ratio, ", |
||||
"sharing_amount, receiver_mer_no, ", |
||||
"receiver_mer_name, receiver_amount, ", |
||||
"`status`, create_time, ", |
||||
"profit_sharing_time, finish_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{orderSettleId,jdbcType=BIGINT}, #{ratio,jdbcType=DECIMAL}, ", |
||||
"#{sharingAmount,jdbcType=DECIMAL}, #{receiverMerNo,jdbcType=VARCHAR}, ", |
||||
"#{receiverMerName,jdbcType=VARCHAR}, #{receiverAmount,jdbcType=DECIMAL}, ", |
||||
"#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ", |
||||
"#{profitSharingTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(BsOrderSettleLedger record); |
||||
|
||||
@InsertProvider(type=BsOrderSettleLedgerSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(BsOrderSettleLedger record); |
||||
|
||||
@SelectProvider(type=BsOrderSettleLedgerSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="order_settle_id", property="orderSettleId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="sharing_amount", property="sharingAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="receiver_mer_no", property="receiverMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="receiver_mer_name", property="receiverMerName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="receiver_amount", property="receiverAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<BsOrderSettleLedger> selectByExample(BsOrderSettleLedgerExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, order_settle_id, ratio, sharing_amount, receiver_mer_no, receiver_mer_name, ", |
||||
"receiver_amount, `status`, create_time, profit_sharing_time, finish_time, ext_1, ", |
||||
"ext_2, ext_3", |
||||
"from bs_order_settle_ledger", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="order_settle_id", property="orderSettleId", jdbcType=JdbcType.BIGINT), |
||||
@Result(column="ratio", property="ratio", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="sharing_amount", property="sharingAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="receiver_mer_no", property="receiverMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="receiver_mer_name", property="receiverMerName", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="receiver_amount", property="receiverAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="profit_sharing_time", property="profitSharingTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
BsOrderSettleLedger selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=BsOrderSettleLedgerSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsOrderSettleLedger record, @Param("example") BsOrderSettleLedgerExample example); |
||||
|
||||
@UpdateProvider(type=BsOrderSettleLedgerSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsOrderSettleLedger record, @Param("example") BsOrderSettleLedgerExample example); |
||||
|
||||
@UpdateProvider(type=BsOrderSettleLedgerSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsOrderSettleLedger record); |
||||
|
||||
@Update({ |
||||
"update bs_order_settle_ledger", |
||||
"set order_settle_id = #{orderSettleId,jdbcType=BIGINT},", |
||||
"ratio = #{ratio,jdbcType=DECIMAL},", |
||||
"sharing_amount = #{sharingAmount,jdbcType=DECIMAL},", |
||||
"receiver_mer_no = #{receiverMerNo,jdbcType=VARCHAR},", |
||||
"receiver_mer_name = #{receiverMerName,jdbcType=VARCHAR},", |
||||
"receiver_amount = #{receiverAmount,jdbcType=DECIMAL},", |
||||
"`status` = #{status,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"profit_sharing_time = #{profitSharingTime,jdbcType=TIMESTAMP},", |
||||
"finish_time = #{finishTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(BsOrderSettleLedger record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsOrderSettleLedgerMapperExt { |
||||
} |
@ -0,0 +1,360 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsOrderSettleLedger; |
||||
import com.hfkj.entity.BsOrderSettleLedgerExample.Criteria; |
||||
import com.hfkj.entity.BsOrderSettleLedgerExample.Criterion; |
||||
import com.hfkj.entity.BsOrderSettleLedgerExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsOrderSettleLedgerSqlProvider { |
||||
|
||||
public String countByExample(BsOrderSettleLedgerExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_order_settle_ledger"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsOrderSettleLedgerExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_order_settle_ledger"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsOrderSettleLedger record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_order_settle_ledger"); |
||||
|
||||
if (record.getOrderSettleId() != null) { |
||||
sql.VALUES("order_settle_id", "#{orderSettleId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getRatio() != null) { |
||||
sql.VALUES("ratio", "#{ratio,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSharingAmount() != null) { |
||||
sql.VALUES("sharing_amount", "#{sharingAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getReceiverMerNo() != null) { |
||||
sql.VALUES("receiver_mer_no", "#{receiverMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getReceiverMerName() != null) { |
||||
sql.VALUES("receiver_mer_name", "#{receiverMerName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getReceiverAmount() != null) { |
||||
sql.VALUES("receiver_amount", "#{receiverAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingTime() != null) { |
||||
sql.VALUES("profit_sharing_time", "#{profitSharingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getFinishTime() != null) { |
||||
sql.VALUES("finish_time", "#{finishTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(BsOrderSettleLedgerExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("order_settle_id"); |
||||
sql.SELECT("ratio"); |
||||
sql.SELECT("sharing_amount"); |
||||
sql.SELECT("receiver_mer_no"); |
||||
sql.SELECT("receiver_mer_name"); |
||||
sql.SELECT("receiver_amount"); |
||||
sql.SELECT("`status`"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("profit_sharing_time"); |
||||
sql.SELECT("finish_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("bs_order_settle_ledger"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
BsOrderSettleLedger record = (BsOrderSettleLedger) parameter.get("record"); |
||||
BsOrderSettleLedgerExample example = (BsOrderSettleLedgerExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_order_settle_ledger"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrderSettleId() != null) { |
||||
sql.SET("order_settle_id = #{record.orderSettleId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getRatio() != null) { |
||||
sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSharingAmount() != null) { |
||||
sql.SET("sharing_amount = #{record.sharingAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getReceiverMerNo() != null) { |
||||
sql.SET("receiver_mer_no = #{record.receiverMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getReceiverMerName() != null) { |
||||
sql.SET("receiver_mer_name = #{record.receiverMerName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getReceiverAmount() != null) { |
||||
sql.SET("receiver_amount = #{record.receiverAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingTime() != null) { |
||||
sql.SET("profit_sharing_time = #{record.profitSharingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getFinishTime() != null) { |
||||
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_order_settle_ledger"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("order_settle_id = #{record.orderSettleId,jdbcType=BIGINT}"); |
||||
sql.SET("ratio = #{record.ratio,jdbcType=DECIMAL}"); |
||||
sql.SET("sharing_amount = #{record.sharingAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("receiver_mer_no = #{record.receiverMerNo,jdbcType=VARCHAR}"); |
||||
sql.SET("receiver_mer_name = #{record.receiverMerName,jdbcType=VARCHAR}"); |
||||
sql.SET("receiver_amount = #{record.receiverAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("profit_sharing_time = #{record.profitSharingTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
BsOrderSettleLedgerExample example = (BsOrderSettleLedgerExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsOrderSettleLedger record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_order_settle_ledger"); |
||||
|
||||
if (record.getOrderSettleId() != null) { |
||||
sql.SET("order_settle_id = #{orderSettleId,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getRatio() != null) { |
||||
sql.SET("ratio = #{ratio,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getSharingAmount() != null) { |
||||
sql.SET("sharing_amount = #{sharingAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getReceiverMerNo() != null) { |
||||
sql.SET("receiver_mer_no = #{receiverMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getReceiverMerName() != null) { |
||||
sql.SET("receiver_mer_name = #{receiverMerName,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getReceiverAmount() != null) { |
||||
sql.SET("receiver_amount = #{receiverAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getStatus() != null) { |
||||
sql.SET("`status` = #{status,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getProfitSharingTime() != null) { |
||||
sql.SET("profit_sharing_time = #{profitSharingTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getFinishTime() != null) { |
||||
sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, BsOrderSettleLedgerExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,133 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsOrderSettle; |
||||
import com.hfkj.entity.BsOrderSettleExample; |
||||
import java.util.List; |
||||
import org.apache.ibatis.annotations.Delete; |
||||
import org.apache.ibatis.annotations.DeleteProvider; |
||||
import org.apache.ibatis.annotations.Insert; |
||||
import org.apache.ibatis.annotations.InsertProvider; |
||||
import org.apache.ibatis.annotations.Options; |
||||
import org.apache.ibatis.annotations.Param; |
||||
import org.apache.ibatis.annotations.Result; |
||||
import org.apache.ibatis.annotations.Results; |
||||
import org.apache.ibatis.annotations.Select; |
||||
import org.apache.ibatis.annotations.SelectProvider; |
||||
import org.apache.ibatis.annotations.Update; |
||||
import org.apache.ibatis.annotations.UpdateProvider; |
||||
import org.apache.ibatis.type.JdbcType; |
||||
import org.springframework.stereotype.Repository; |
||||
|
||||
/** |
||||
* |
||||
* 代码由工具生成,请勿修改!!! |
||||
* 如果需要扩展请在其父类进行扩展 |
||||
* |
||||
**/ |
||||
@Repository |
||||
public interface BsOrderSettleMapper extends BsOrderSettleMapperExt { |
||||
@SelectProvider(type=BsOrderSettleSqlProvider.class, method="countByExample") |
||||
long countByExample(BsOrderSettleExample example); |
||||
|
||||
@DeleteProvider(type=BsOrderSettleSqlProvider.class, method="deleteByExample") |
||||
int deleteByExample(BsOrderSettleExample example); |
||||
|
||||
@Delete({ |
||||
"delete from bs_order_settle", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int deleteByPrimaryKey(Long id); |
||||
|
||||
@Insert({ |
||||
"insert into bs_order_settle (order_no, settle_mer_no, ", |
||||
"settle_mer_key, settle_amount, ", |
||||
"ledger_flag, ledger_order_no, ", |
||||
"ledger_amount, ledger_status, ", |
||||
"create_time, update_time, ", |
||||
"ext_1, ext_2, ext_3)", |
||||
"values (#{orderNo,jdbcType=VARCHAR}, #{settleMerNo,jdbcType=VARCHAR}, ", |
||||
"#{settleMerKey,jdbcType=VARCHAR}, #{settleAmount,jdbcType=DECIMAL}, ", |
||||
"#{ledgerFlag,jdbcType=BIT}, #{ledgerOrderNo,jdbcType=VARCHAR}, ", |
||||
"#{ledgerAmount,jdbcType=DECIMAL}, #{ledgerStatus,jdbcType=INTEGER}, ", |
||||
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", |
||||
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" |
||||
}) |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insert(BsOrderSettle record); |
||||
|
||||
@InsertProvider(type=BsOrderSettleSqlProvider.class, method="insertSelective") |
||||
@Options(useGeneratedKeys=true,keyProperty="id") |
||||
int insertSelective(BsOrderSettle record); |
||||
|
||||
@SelectProvider(type=BsOrderSettleSqlProvider.class, method="selectByExample") |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="settle_mer_no", property="settleMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="settle_mer_key", property="settleMerKey", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="ledger_flag", property="ledgerFlag", jdbcType=JdbcType.BIT), |
||||
@Result(column="ledger_order_no", property="ledgerOrderNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ledger_amount", property="ledgerAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="ledger_status", property="ledgerStatus", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
List<BsOrderSettle> selectByExample(BsOrderSettleExample example); |
||||
|
||||
@Select({ |
||||
"select", |
||||
"id, order_no, settle_mer_no, settle_mer_key, settle_amount, ledger_flag, ledger_order_no, ", |
||||
"ledger_amount, ledger_status, create_time, update_time, ext_1, ext_2, ext_3", |
||||
"from bs_order_settle", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
@Results({ |
||||
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), |
||||
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="settle_mer_no", property="settleMerNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="settle_mer_key", property="settleMerKey", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="ledger_flag", property="ledgerFlag", jdbcType=JdbcType.BIT), |
||||
@Result(column="ledger_order_no", property="ledgerOrderNo", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ledger_amount", property="ledgerAmount", jdbcType=JdbcType.DECIMAL), |
||||
@Result(column="ledger_status", property="ledgerStatus", jdbcType=JdbcType.INTEGER), |
||||
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP), |
||||
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), |
||||
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR) |
||||
}) |
||||
BsOrderSettle selectByPrimaryKey(Long id); |
||||
|
||||
@UpdateProvider(type=BsOrderSettleSqlProvider.class, method="updateByExampleSelective") |
||||
int updateByExampleSelective(@Param("record") BsOrderSettle record, @Param("example") BsOrderSettleExample example); |
||||
|
||||
@UpdateProvider(type=BsOrderSettleSqlProvider.class, method="updateByExample") |
||||
int updateByExample(@Param("record") BsOrderSettle record, @Param("example") BsOrderSettleExample example); |
||||
|
||||
@UpdateProvider(type=BsOrderSettleSqlProvider.class, method="updateByPrimaryKeySelective") |
||||
int updateByPrimaryKeySelective(BsOrderSettle record); |
||||
|
||||
@Update({ |
||||
"update bs_order_settle", |
||||
"set order_no = #{orderNo,jdbcType=VARCHAR},", |
||||
"settle_mer_no = #{settleMerNo,jdbcType=VARCHAR},", |
||||
"settle_mer_key = #{settleMerKey,jdbcType=VARCHAR},", |
||||
"settle_amount = #{settleAmount,jdbcType=DECIMAL},", |
||||
"ledger_flag = #{ledgerFlag,jdbcType=BIT},", |
||||
"ledger_order_no = #{ledgerOrderNo,jdbcType=VARCHAR},", |
||||
"ledger_amount = #{ledgerAmount,jdbcType=DECIMAL},", |
||||
"ledger_status = #{ledgerStatus,jdbcType=INTEGER},", |
||||
"create_time = #{createTime,jdbcType=TIMESTAMP},", |
||||
"update_time = #{updateTime,jdbcType=TIMESTAMP},", |
||||
"ext_1 = #{ext1,jdbcType=VARCHAR},", |
||||
"ext_2 = #{ext2,jdbcType=VARCHAR},", |
||||
"ext_3 = #{ext3,jdbcType=VARCHAR}", |
||||
"where id = #{id,jdbcType=BIGINT}" |
||||
}) |
||||
int updateByPrimaryKey(BsOrderSettle record); |
||||
} |
@ -0,0 +1,7 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
/** |
||||
* mapper扩展类 |
||||
*/ |
||||
public interface BsOrderSettleMapperExt { |
||||
} |
@ -0,0 +1,360 @@ |
||||
package com.hfkj.dao; |
||||
|
||||
import com.hfkj.entity.BsOrderSettle; |
||||
import com.hfkj.entity.BsOrderSettleExample.Criteria; |
||||
import com.hfkj.entity.BsOrderSettleExample.Criterion; |
||||
import com.hfkj.entity.BsOrderSettleExample; |
||||
import java.util.List; |
||||
import java.util.Map; |
||||
import org.apache.ibatis.jdbc.SQL; |
||||
|
||||
public class BsOrderSettleSqlProvider { |
||||
|
||||
public String countByExample(BsOrderSettleExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.SELECT("count(*)").FROM("bs_order_settle"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String deleteByExample(BsOrderSettleExample example) { |
||||
SQL sql = new SQL(); |
||||
sql.DELETE_FROM("bs_order_settle"); |
||||
applyWhere(sql, example, false); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String insertSelective(BsOrderSettle record) { |
||||
SQL sql = new SQL(); |
||||
sql.INSERT_INTO("bs_order_settle"); |
||||
|
||||
if (record.getOrderNo() != null) { |
||||
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleMerNo() != null) { |
||||
sql.VALUES("settle_mer_no", "#{settleMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleMerKey() != null) { |
||||
sql.VALUES("settle_mer_key", "#{settleMerKey,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleAmount() != null) { |
||||
sql.VALUES("settle_amount", "#{settleAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getLedgerFlag() != null) { |
||||
sql.VALUES("ledger_flag", "#{ledgerFlag,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getLedgerOrderNo() != null) { |
||||
sql.VALUES("ledger_order_no", "#{ledgerOrderNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLedgerAmount() != null) { |
||||
sql.VALUES("ledger_amount", "#{ledgerAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getLedgerStatus() != null) { |
||||
sql.VALUES("ledger_status", "#{ledgerStatus,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String selectByExample(BsOrderSettleExample example) { |
||||
SQL sql = new SQL(); |
||||
if (example != null && example.isDistinct()) { |
||||
sql.SELECT_DISTINCT("id"); |
||||
} else { |
||||
sql.SELECT("id"); |
||||
} |
||||
sql.SELECT("order_no"); |
||||
sql.SELECT("settle_mer_no"); |
||||
sql.SELECT("settle_mer_key"); |
||||
sql.SELECT("settle_amount"); |
||||
sql.SELECT("ledger_flag"); |
||||
sql.SELECT("ledger_order_no"); |
||||
sql.SELECT("ledger_amount"); |
||||
sql.SELECT("ledger_status"); |
||||
sql.SELECT("create_time"); |
||||
sql.SELECT("update_time"); |
||||
sql.SELECT("ext_1"); |
||||
sql.SELECT("ext_2"); |
||||
sql.SELECT("ext_3"); |
||||
sql.FROM("bs_order_settle"); |
||||
applyWhere(sql, example, false); |
||||
|
||||
if (example != null && example.getOrderByClause() != null) { |
||||
sql.ORDER_BY(example.getOrderByClause()); |
||||
} |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExampleSelective(Map<String, Object> parameter) { |
||||
BsOrderSettle record = (BsOrderSettle) parameter.get("record"); |
||||
BsOrderSettleExample example = (BsOrderSettleExample) parameter.get("example"); |
||||
|
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_order_settle"); |
||||
|
||||
if (record.getId() != null) { |
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
} |
||||
|
||||
if (record.getOrderNo() != null) { |
||||
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleMerNo() != null) { |
||||
sql.SET("settle_mer_no = #{record.settleMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleMerKey() != null) { |
||||
sql.SET("settle_mer_key = #{record.settleMerKey,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleAmount() != null) { |
||||
sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getLedgerFlag() != null) { |
||||
sql.SET("ledger_flag = #{record.ledgerFlag,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getLedgerOrderNo() != null) { |
||||
sql.SET("ledger_order_no = #{record.ledgerOrderNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLedgerAmount() != null) { |
||||
sql.SET("ledger_amount = #{record.ledgerAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getLedgerStatus() != null) { |
||||
sql.SET("ledger_status = #{record.ledgerStatus,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByExample(Map<String, Object> parameter) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_order_settle"); |
||||
|
||||
sql.SET("id = #{record.id,jdbcType=BIGINT}"); |
||||
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); |
||||
sql.SET("settle_mer_no = #{record.settleMerNo,jdbcType=VARCHAR}"); |
||||
sql.SET("settle_mer_key = #{record.settleMerKey,jdbcType=VARCHAR}"); |
||||
sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("ledger_flag = #{record.ledgerFlag,jdbcType=BIT}"); |
||||
sql.SET("ledger_order_no = #{record.ledgerOrderNo,jdbcType=VARCHAR}"); |
||||
sql.SET("ledger_amount = #{record.ledgerAmount,jdbcType=DECIMAL}"); |
||||
sql.SET("ledger_status = #{record.ledgerStatus,jdbcType=INTEGER}"); |
||||
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}"); |
||||
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); |
||||
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}"); |
||||
|
||||
BsOrderSettleExample example = (BsOrderSettleExample) parameter.get("example"); |
||||
applyWhere(sql, example, true); |
||||
return sql.toString(); |
||||
} |
||||
|
||||
public String updateByPrimaryKeySelective(BsOrderSettle record) { |
||||
SQL sql = new SQL(); |
||||
sql.UPDATE("bs_order_settle"); |
||||
|
||||
if (record.getOrderNo() != null) { |
||||
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleMerNo() != null) { |
||||
sql.SET("settle_mer_no = #{settleMerNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleMerKey() != null) { |
||||
sql.SET("settle_mer_key = #{settleMerKey,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getSettleAmount() != null) { |
||||
sql.SET("settle_amount = #{settleAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getLedgerFlag() != null) { |
||||
sql.SET("ledger_flag = #{ledgerFlag,jdbcType=BIT}"); |
||||
} |
||||
|
||||
if (record.getLedgerOrderNo() != null) { |
||||
sql.SET("ledger_order_no = #{ledgerOrderNo,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getLedgerAmount() != null) { |
||||
sql.SET("ledger_amount = #{ledgerAmount,jdbcType=DECIMAL}"); |
||||
} |
||||
|
||||
if (record.getLedgerStatus() != null) { |
||||
sql.SET("ledger_status = #{ledgerStatus,jdbcType=INTEGER}"); |
||||
} |
||||
|
||||
if (record.getCreateTime() != null) { |
||||
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getUpdateTime() != null) { |
||||
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}"); |
||||
} |
||||
|
||||
if (record.getExt1() != null) { |
||||
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt2() != null) { |
||||
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
if (record.getExt3() != null) { |
||||
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}"); |
||||
} |
||||
|
||||
sql.WHERE("id = #{id,jdbcType=BIGINT}"); |
||||
|
||||
return sql.toString(); |
||||
} |
||||
|
||||
protected void applyWhere(SQL sql, BsOrderSettleExample example, boolean includeExamplePhrase) { |
||||
if (example == null) { |
||||
return; |
||||
} |
||||
|
||||
String parmPhrase1; |
||||
String parmPhrase1_th; |
||||
String parmPhrase2; |
||||
String parmPhrase2_th; |
||||
String parmPhrase3; |
||||
String parmPhrase3_th; |
||||
if (includeExamplePhrase) { |
||||
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} else { |
||||
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}"; |
||||
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}"; |
||||
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}"; |
||||
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}"; |
||||
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}"; |
||||
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}"; |
||||
} |
||||
|
||||
StringBuilder sb = new StringBuilder(); |
||||
List<Criteria> oredCriteria = example.getOredCriteria(); |
||||
boolean firstCriteria = true; |
||||
for (int i = 0; i < oredCriteria.size(); i++) { |
||||
Criteria criteria = oredCriteria.get(i); |
||||
if (criteria.isValid()) { |
||||
if (firstCriteria) { |
||||
firstCriteria = false; |
||||
} else { |
||||
sb.append(" or "); |
||||
} |
||||
|
||||
sb.append('('); |
||||
List<Criterion> criterions = criteria.getAllCriteria(); |
||||
boolean firstCriterion = true; |
||||
for (int j = 0; j < criterions.size(); j++) { |
||||
Criterion criterion = criterions.get(j); |
||||
if (firstCriterion) { |
||||
firstCriterion = false; |
||||
} else { |
||||
sb.append(" and "); |
||||
} |
||||
|
||||
if (criterion.isNoValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
} else if (criterion.isSingleValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isBetweenValue()) { |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler())); |
||||
} |
||||
} else if (criterion.isListValue()) { |
||||
sb.append(criterion.getCondition()); |
||||
sb.append(" ("); |
||||
List<?> listItems = (List<?>) criterion.getValue(); |
||||
boolean comma = false; |
||||
for (int k = 0; k < listItems.size(); k++) { |
||||
if (comma) { |
||||
sb.append(", "); |
||||
} else { |
||||
comma = true; |
||||
} |
||||
if (criterion.getTypeHandler() == null) { |
||||
sb.append(String.format(parmPhrase3, i, j, k)); |
||||
} else { |
||||
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler())); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
sb.append(')'); |
||||
} |
||||
} |
||||
|
||||
if (sb.length() > 0) { |
||||
sql.WHERE(sb.toString()); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,265 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* bs_order_settle |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsOrderSettle implements Serializable { |
||||
/** |
||||
* 主键ID |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 订单号 |
||||
*/ |
||||
private String orderNo; |
||||
|
||||
/** |
||||
* 入账商户号 |
||||
*/ |
||||
private String settleMerNo; |
||||
|
||||
/** |
||||
* 入账商户key |
||||
*/ |
||||
private String settleMerKey; |
||||
|
||||
/** |
||||
* 入账金额 |
||||
*/ |
||||
private BigDecimal settleAmount; |
||||
|
||||
/** |
||||
* 是否分账 0:否 1:是 |
||||
*/ |
||||
private Boolean ledgerFlag; |
||||
|
||||
/** |
||||
* 分账订单号 |
||||
*/ |
||||
private String ledgerOrderNo; |
||||
|
||||
/** |
||||
* 分账金额 |
||||
*/ |
||||
private BigDecimal ledgerAmount; |
||||
|
||||
/** |
||||
* 分账状态 0:待处理 1:已完成 2:处理中 3:已受理 4:失败 |
||||
*/ |
||||
private Integer ledgerStatus; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 修改时间 |
||||
*/ |
||||
private Date updateTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public String getOrderNo() { |
||||
return orderNo; |
||||
} |
||||
|
||||
public void setOrderNo(String orderNo) { |
||||
this.orderNo = orderNo; |
||||
} |
||||
|
||||
public String getSettleMerNo() { |
||||
return settleMerNo; |
||||
} |
||||
|
||||
public void setSettleMerNo(String settleMerNo) { |
||||
this.settleMerNo = settleMerNo; |
||||
} |
||||
|
||||
public String getSettleMerKey() { |
||||
return settleMerKey; |
||||
} |
||||
|
||||
public void setSettleMerKey(String settleMerKey) { |
||||
this.settleMerKey = settleMerKey; |
||||
} |
||||
|
||||
public BigDecimal getSettleAmount() { |
||||
return settleAmount; |
||||
} |
||||
|
||||
public void setSettleAmount(BigDecimal settleAmount) { |
||||
this.settleAmount = settleAmount; |
||||
} |
||||
|
||||
public Boolean getLedgerFlag() { |
||||
return ledgerFlag; |
||||
} |
||||
|
||||
public void setLedgerFlag(Boolean ledgerFlag) { |
||||
this.ledgerFlag = ledgerFlag; |
||||
} |
||||
|
||||
public String getLedgerOrderNo() { |
||||
return ledgerOrderNo; |
||||
} |
||||
|
||||
public void setLedgerOrderNo(String ledgerOrderNo) { |
||||
this.ledgerOrderNo = ledgerOrderNo; |
||||
} |
||||
|
||||
public BigDecimal getLedgerAmount() { |
||||
return ledgerAmount; |
||||
} |
||||
|
||||
public void setLedgerAmount(BigDecimal ledgerAmount) { |
||||
this.ledgerAmount = ledgerAmount; |
||||
} |
||||
|
||||
public Integer getLedgerStatus() { |
||||
return ledgerStatus; |
||||
} |
||||
|
||||
public void setLedgerStatus(Integer ledgerStatus) { |
||||
this.ledgerStatus = ledgerStatus; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getUpdateTime() { |
||||
return updateTime; |
||||
} |
||||
|
||||
public void setUpdateTime(Date updateTime) { |
||||
this.updateTime = updateTime; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
BsOrderSettle other = (BsOrderSettle) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) |
||||
&& (this.getSettleMerNo() == null ? other.getSettleMerNo() == null : this.getSettleMerNo().equals(other.getSettleMerNo())) |
||||
&& (this.getSettleMerKey() == null ? other.getSettleMerKey() == null : this.getSettleMerKey().equals(other.getSettleMerKey())) |
||||
&& (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount())) |
||||
&& (this.getLedgerFlag() == null ? other.getLedgerFlag() == null : this.getLedgerFlag().equals(other.getLedgerFlag())) |
||||
&& (this.getLedgerOrderNo() == null ? other.getLedgerOrderNo() == null : this.getLedgerOrderNo().equals(other.getLedgerOrderNo())) |
||||
&& (this.getLedgerAmount() == null ? other.getLedgerAmount() == null : this.getLedgerAmount().equals(other.getLedgerAmount())) |
||||
&& (this.getLedgerStatus() == null ? other.getLedgerStatus() == null : this.getLedgerStatus().equals(other.getLedgerStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); |
||||
result = prime * result + ((getSettleMerNo() == null) ? 0 : getSettleMerNo().hashCode()); |
||||
result = prime * result + ((getSettleMerKey() == null) ? 0 : getSettleMerKey().hashCode()); |
||||
result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode()); |
||||
result = prime * result + ((getLedgerFlag() == null) ? 0 : getLedgerFlag().hashCode()); |
||||
result = prime * result + ((getLedgerOrderNo() == null) ? 0 : getLedgerOrderNo().hashCode()); |
||||
result = prime * result + ((getLedgerAmount() == null) ? 0 : getLedgerAmount().hashCode()); |
||||
result = prime * result + ((getLedgerStatus() == null) ? 0 : getLedgerStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", orderNo=").append(orderNo); |
||||
sb.append(", settleMerNo=").append(settleMerNo); |
||||
sb.append(", settleMerKey=").append(settleMerKey); |
||||
sb.append(", settleAmount=").append(settleAmount); |
||||
sb.append(", ledgerFlag=").append(ledgerFlag); |
||||
sb.append(", ledgerOrderNo=").append(ledgerOrderNo); |
||||
sb.append(", ledgerAmount=").append(ledgerAmount); |
||||
sb.append(", ledgerStatus=").append(ledgerStatus); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", updateTime=").append(updateTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,265 @@ |
||||
package com.hfkj.entity; |
||||
|
||||
import java.io.Serializable; |
||||
import java.math.BigDecimal; |
||||
import java.util.Date; |
||||
|
||||
/** |
||||
* bs_order_settle_ledger |
||||
* @author |
||||
*/ |
||||
/** |
||||
* |
||||
* 代码由工具生成 |
||||
* |
||||
**/ |
||||
public class BsOrderSettleLedger implements Serializable { |
||||
/** |
||||
* 主键ID |
||||
*/ |
||||
private Long id; |
||||
|
||||
/** |
||||
* 交易入账记录id |
||||
*/ |
||||
private Long orderSettleId; |
||||
|
||||
/** |
||||
* 分账比例 单位:% |
||||
*/ |
||||
private BigDecimal ratio; |
||||
|
||||
/** |
||||
* 分账金额 |
||||
*/ |
||||
private BigDecimal sharingAmount; |
||||
|
||||
/** |
||||
* 分账接收方账户编号 |
||||
*/ |
||||
private String receiverMerNo; |
||||
|
||||
/** |
||||
* 分账接收方账户名称 |
||||
*/ |
||||
private String receiverMerName; |
||||
|
||||
/** |
||||
* 分账接收金额 |
||||
*/ |
||||
private BigDecimal receiverAmount; |
||||
|
||||
/** |
||||
* 分账状态 0:未分账 1:已分账 |
||||
*/ |
||||
private Integer status; |
||||
|
||||
/** |
||||
* 创建时间 |
||||
*/ |
||||
private Date createTime; |
||||
|
||||
/** |
||||
* 分账时间 |
||||
*/ |
||||
private Date profitSharingTime; |
||||
|
||||
/** |
||||
* 完成时间 |
||||
*/ |
||||
private Date finishTime; |
||||
|
||||
private String ext1; |
||||
|
||||
private String ext2; |
||||
|
||||
private String ext3; |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
public Long getId() { |
||||
return id; |
||||
} |
||||
|
||||
public void setId(Long id) { |
||||
this.id = id; |
||||
} |
||||
|
||||
public Long getOrderSettleId() { |
||||
return orderSettleId; |
||||
} |
||||
|
||||
public void setOrderSettleId(Long orderSettleId) { |
||||
this.orderSettleId = orderSettleId; |
||||
} |
||||
|
||||
public BigDecimal getRatio() { |
||||
return ratio; |
||||
} |
||||
|
||||
public void setRatio(BigDecimal ratio) { |
||||
this.ratio = ratio; |
||||
} |
||||
|
||||
public BigDecimal getSharingAmount() { |
||||
return sharingAmount; |
||||
} |
||||
|
||||
public void setSharingAmount(BigDecimal sharingAmount) { |
||||
this.sharingAmount = sharingAmount; |
||||
} |
||||
|
||||
public String getReceiverMerNo() { |
||||
return receiverMerNo; |
||||
} |
||||
|
||||
public void setReceiverMerNo(String receiverMerNo) { |
||||
this.receiverMerNo = receiverMerNo; |
||||
} |
||||
|
||||
public String getReceiverMerName() { |
||||
return receiverMerName; |
||||
} |
||||
|
||||
public void setReceiverMerName(String receiverMerName) { |
||||
this.receiverMerName = receiverMerName; |
||||
} |
||||
|
||||
public BigDecimal getReceiverAmount() { |
||||
return receiverAmount; |
||||
} |
||||
|
||||
public void setReceiverAmount(BigDecimal receiverAmount) { |
||||
this.receiverAmount = receiverAmount; |
||||
} |
||||
|
||||
public Integer getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public void setStatus(Integer status) { |
||||
this.status = status; |
||||
} |
||||
|
||||
public Date getCreateTime() { |
||||
return createTime; |
||||
} |
||||
|
||||
public void setCreateTime(Date createTime) { |
||||
this.createTime = createTime; |
||||
} |
||||
|
||||
public Date getProfitSharingTime() { |
||||
return profitSharingTime; |
||||
} |
||||
|
||||
public void setProfitSharingTime(Date profitSharingTime) { |
||||
this.profitSharingTime = profitSharingTime; |
||||
} |
||||
|
||||
public Date getFinishTime() { |
||||
return finishTime; |
||||
} |
||||
|
||||
public void setFinishTime(Date finishTime) { |
||||
this.finishTime = finishTime; |
||||
} |
||||
|
||||
public String getExt1() { |
||||
return ext1; |
||||
} |
||||
|
||||
public void setExt1(String ext1) { |
||||
this.ext1 = ext1; |
||||
} |
||||
|
||||
public String getExt2() { |
||||
return ext2; |
||||
} |
||||
|
||||
public void setExt2(String ext2) { |
||||
this.ext2 = ext2; |
||||
} |
||||
|
||||
public String getExt3() { |
||||
return ext3; |
||||
} |
||||
|
||||
public void setExt3(String ext3) { |
||||
this.ext3 = ext3; |
||||
} |
||||
|
||||
@Override |
||||
public boolean equals(Object that) { |
||||
if (this == that) { |
||||
return true; |
||||
} |
||||
if (that == null) { |
||||
return false; |
||||
} |
||||
if (getClass() != that.getClass()) { |
||||
return false; |
||||
} |
||||
BsOrderSettleLedger other = (BsOrderSettleLedger) that; |
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) |
||||
&& (this.getOrderSettleId() == null ? other.getOrderSettleId() == null : this.getOrderSettleId().equals(other.getOrderSettleId())) |
||||
&& (this.getRatio() == null ? other.getRatio() == null : this.getRatio().equals(other.getRatio())) |
||||
&& (this.getSharingAmount() == null ? other.getSharingAmount() == null : this.getSharingAmount().equals(other.getSharingAmount())) |
||||
&& (this.getReceiverMerNo() == null ? other.getReceiverMerNo() == null : this.getReceiverMerNo().equals(other.getReceiverMerNo())) |
||||
&& (this.getReceiverMerName() == null ? other.getReceiverMerName() == null : this.getReceiverMerName().equals(other.getReceiverMerName())) |
||||
&& (this.getReceiverAmount() == null ? other.getReceiverAmount() == null : this.getReceiverAmount().equals(other.getReceiverAmount())) |
||||
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) |
||||
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) |
||||
&& (this.getProfitSharingTime() == null ? other.getProfitSharingTime() == null : this.getProfitSharingTime().equals(other.getProfitSharingTime())) |
||||
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime())) |
||||
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) |
||||
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) |
||||
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3())); |
||||
} |
||||
|
||||
@Override |
||||
public int hashCode() { |
||||
final int prime = 31; |
||||
int result = 1; |
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); |
||||
result = prime * result + ((getOrderSettleId() == null) ? 0 : getOrderSettleId().hashCode()); |
||||
result = prime * result + ((getRatio() == null) ? 0 : getRatio().hashCode()); |
||||
result = prime * result + ((getSharingAmount() == null) ? 0 : getSharingAmount().hashCode()); |
||||
result = prime * result + ((getReceiverMerNo() == null) ? 0 : getReceiverMerNo().hashCode()); |
||||
result = prime * result + ((getReceiverMerName() == null) ? 0 : getReceiverMerName().hashCode()); |
||||
result = prime * result + ((getReceiverAmount() == null) ? 0 : getReceiverAmount().hashCode()); |
||||
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); |
||||
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); |
||||
result = prime * result + ((getProfitSharingTime() == null) ? 0 : getProfitSharingTime().hashCode()); |
||||
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode()); |
||||
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); |
||||
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); |
||||
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode()); |
||||
return result; |
||||
} |
||||
|
||||
@Override |
||||
public String toString() { |
||||
StringBuilder sb = new StringBuilder(); |
||||
sb.append(getClass().getSimpleName()); |
||||
sb.append(" ["); |
||||
sb.append("Hash = ").append(hashCode()); |
||||
sb.append(", id=").append(id); |
||||
sb.append(", orderSettleId=").append(orderSettleId); |
||||
sb.append(", ratio=").append(ratio); |
||||
sb.append(", sharingAmount=").append(sharingAmount); |
||||
sb.append(", receiverMerNo=").append(receiverMerNo); |
||||
sb.append(", receiverMerName=").append(receiverMerName); |
||||
sb.append(", receiverAmount=").append(receiverAmount); |
||||
sb.append(", status=").append(status); |
||||
sb.append(", createTime=").append(createTime); |
||||
sb.append(", profitSharingTime=").append(profitSharingTime); |
||||
sb.append(", finishTime=").append(finishTime); |
||||
sb.append(", ext1=").append(ext1); |
||||
sb.append(", ext2=").append(ext2); |
||||
sb.append(", ext3=").append(ext3); |
||||
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
sb.append("]"); |
||||
return sb.toString(); |
||||
} |
||||
} |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,42 @@ |
||||
package com.hfkj.sysenum.order; |
||||
|
||||
import lombok.Getter; |
||||
|
||||
/** |
||||
* @className: OrderSettleLedgerStatusEnum |
||||
* @author: HuRui |
||||
* @date: 2024/6/14 |
||||
**/ |
||||
@Getter |
||||
public enum OrderSettleLedgerStatusEnum { |
||||
/** |
||||
* 待处理 |
||||
*/ |
||||
status0(0, "待处理"), |
||||
/** |
||||
* 已完成 |
||||
*/ |
||||
status1(1, "已完成"), |
||||
/** |
||||
* 处理中 |
||||
*/ |
||||
status2(2, "处理中"), |
||||
/** |
||||
* 已受理 |
||||
*/ |
||||
status3(3, "已受理"), |
||||
/** |
||||
* 失败 |
||||
*/ |
||||
status4(4, "失败"), |
||||
; |
||||
|
||||
private final int code; |
||||
|
||||
private final String name; |
||||
|
||||
OrderSettleLedgerStatusEnum(int code, String name) { |
||||
this.code = code; |
||||
this.name = name; |
||||
} |
||||
} |
Loading…
Reference in new issue