yy_dev
胡锐 1 year ago
parent cfca477260
commit 2eb0c4de42
  1. 2
      bweb/src/main/resources/dev/application.yml
  2. 27
      cweb/src/main/java/com/cweb/controller/TestController.java
  3. 65
      schedule/src/main/java/com/hfkj/schedule/TradeOrderSchedule.java
  4. 34
      service/src/main/java/com/hfkj/dao/BsTradeOrderMapperExt.java
  5. 28
      service/src/main/java/com/hfkj/dao/BsTradeOrderRefundMapper.java
  6. 14
      service/src/main/java/com/hfkj/dao/BsTradeOrderRefundSqlProvider.java
  7. 17
      service/src/main/java/com/hfkj/dao/BsTradeSettleMapper.java
  8. 14
      service/src/main/java/com/hfkj/dao/BsTradeSettleSqlProvider.java
  9. 16
      service/src/main/java/com/hfkj/entity/BsTradeOrderRefund.java
  10. 87
      service/src/main/java/com/hfkj/entity/BsTradeOrderRefundExample.java
  11. 18
      service/src/main/java/com/hfkj/entity/BsTradeSettle.java
  12. 60
      service/src/main/java/com/hfkj/entity/BsTradeSettleExample.java
  13. 3
      service/src/main/java/com/hfkj/service/impl/BsTradeSettleServiceImpl.java
  14. 37
      service/src/main/java/com/hfkj/sysenum/TradeSettleTradeType.java
  15. 81
      service/src/main/java/com/hfkj/unipush/UniPushService.java

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置 #datasource数据源设置
spring: spring:
datasource: datasource:
url: jdbc:mysql://139.9.154.68:3306/gratia_pay?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false url: jdbc:mysql://139.9.154.68:3306/gratia_pay_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root username: root
password: HF123456. password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource

@ -14,9 +14,11 @@ import com.hfkj.channel.saas.utils.SaasMerRequest;
import com.hfkj.channel.weixin.WeiXinMerService; import com.hfkj.channel.weixin.WeiXinMerService;
import com.hfkj.channel.weixin.utils.WxUtils; import com.hfkj.channel.weixin.utils.WxUtils;
import com.hfkj.channel.weixin.utils.sdk.WXPayConstants; import com.hfkj.channel.weixin.utils.sdk.WXPayConstants;
import com.hfkj.common.Base64Util;
import com.hfkj.common.utils.DateUtil; import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.HttpsUtils; import com.hfkj.common.utils.HttpsUtils;
import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.common.utils.UnionUtils;
import com.hfkj.config.CommonSysConst; import com.hfkj.config.CommonSysConst;
import com.hfkj.config.device.SoundService; import com.hfkj.config.device.SoundService;
import com.hfkj.config.mqtt.MqttProviderService; import com.hfkj.config.mqtt.MqttProviderService;
@ -29,6 +31,7 @@ import com.hfkj.sysenum.PlatformTypeEnum;
import com.hfkj.sysenum.StoreCreateTypeEnum; import com.hfkj.sysenum.StoreCreateTypeEnum;
import com.hfkj.sysenum.StoreStatusEnum; import com.hfkj.sysenum.StoreStatusEnum;
import com.hfkj.tts.HWYunSisService; import com.hfkj.tts.HWYunSisService;
import com.hfkj.unipush.UniPushService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
@ -282,6 +285,30 @@ public class TestController {
} }
} }
@RequestMapping(value="/pushToSingleByCid",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "pushToSingleByCid")
public ResponseData pushToSingleByCid(@RequestParam(value = "code", required = true) String code) {
try {
JSONObject object = new JSONObject();
object.put("cid", "69511c3be97a4f02fb99d8ab181980b6");
object.put("price", "0.01");
// 获取语音播报地址
String auditPath = HWYunSisService.ttsCustomDemo(object);
String taskNo = Base64Util.generateOrderNo();
String msg = CommonSysConst.getSysConfig().getDomainName() + auditPath + "!@#PUSH#@!" + taskNo + "!@#PUSH#@!" + "惠支付收款:" + object.getBigDecimal("price");
object.put("body", msg);
return ResponseMsgUtil.success(UniPushService.pushToSingleByCid(object));
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/saasUpdateFee",method = RequestMethod.GET) @RequestMapping(value="/saasUpdateFee",method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "saasUpdateFee") @ApiOperation(value = "saasUpdateFee")

@ -5,10 +5,7 @@ import com.hfkj.channel.lakala.LaKaLaTradeSeparateService;
import com.hfkj.channel.lakala.LaKaLaTradeService; import com.hfkj.channel.lakala.LaKaLaTradeService;
import com.hfkj.channel.weixin.utils.WxOrderConfig; import com.hfkj.channel.weixin.utils.WxOrderConfig;
import com.hfkj.common.utils.DateUtil; import com.hfkj.common.utils.DateUtil;
import com.hfkj.entity.BsTradeOrder; import com.hfkj.entity.*;
import com.hfkj.entity.BsTradeOrderProfitSharing;
import com.hfkj.entity.BsTradeOrderProfitSharingReceiver;
import com.hfkj.entity.BsTradeOrderRefund;
import com.hfkj.service.*; import com.hfkj.service.*;
import com.hfkj.sysenum.*; import com.hfkj.sysenum.*;
import org.apache.commons.collections4.MapUtils; import org.apache.commons.collections4.MapUtils;
@ -43,6 +40,8 @@ public class TradeOrderSchedule {
private BsTradeOrderRefundService tradeOrderRefundService; private BsTradeOrderRefundService tradeOrderRefundService;
@Resource @Resource
private LaKaLaTradeService laKaLaTradeService; private LaKaLaTradeService laKaLaTradeService;
@Resource
private BsTradeSettleService tradeSettleService;
/** /**
* 订单发起分账 * 订单发起分账
@ -277,6 +276,33 @@ public class TradeOrderSchedule {
tradeOrder.setSettleDate(queryTrans.getDate("clear_date")); tradeOrder.setSettleDate(queryTrans.getDate("clear_date"));
tradeOrder.setFeeRate(new BigDecimal(queryTrans.getString("fee_rate").split(",")[0])); tradeOrder.setFeeRate(new BigDecimal(queryTrans.getString("fee_rate").split(",")[0]));
tradeOrderService.editOrder(tradeOrder); tradeOrderService.editOrder(tradeOrder);
BsTradeSettle tradeSettle = new BsTradeSettle();
tradeSettle.setCompanyId(tradeOrder.getCompanyId());
tradeSettle.setAgentId(tradeOrder.getAgentId());
tradeSettle.setSalesmanId(tradeOrder.getSalesmanId());
tradeSettle.setSalesmanName(tradeOrder.getSalesmanName());
tradeSettle.setMerId(tradeOrder.getMerId());
tradeSettle.setMerNo(tradeOrder.getMerNo());
tradeSettle.setMerName(tradeOrder.getMerName());
tradeSettle.setMerAbbreviate(tradeOrder.getMerAbbreviate());
tradeSettle.setStoreId(tradeOrder.getStoreId());
tradeSettle.setStoreName(tradeOrder.getStoreName());
tradeSettle.setPlatformType(tradeOrder.getPlatformType());
tradeSettle.setPlatformMerNo(tradeOrder.getPlatformMerNo());
tradeSettle.setPlatformTradeNo(tradeOrder.getPlatformTradeNo());
tradeSettle.setPlatformLogNo(tradeOrder.getPlatformLogNo());
tradeSettle.setPayMode(tradeOrder.getPayMode());
tradeSettle.setOutTradeNo(tradeOrder.getOutTradeNo());
tradeSettle.setTradeAmount(tradeOrder.getAccSettleAmount());
tradeSettle.setTradeType(TradeSettleTradeType.type1.getNumber());
tradeSettle.setSettleAmount(tradeOrder.getAccSettleAmount());
tradeSettle.setTradeTime(tradeOrder.getPayTime());
tradeSettle.setShdFeeAmt(tradeOrder.getShdFeeAmt());
tradeSettle.setSettleAmount(tradeOrder.getSettleAmount());
tradeSettle.setSettleDate(tradeOrder.getSettleDate());
tradeSettle.setFeeRate(tradeOrder.getFeeRate());
tradeSettleService.editData(tradeSettle);
} }
} catch (Exception e) { } catch (Exception e) {
System.out.println(e); System.out.println(e);
@ -307,6 +333,7 @@ public class TradeOrderSchedule {
if (queryTrans != null) { if (queryTrans != null) {
tradeOrderRefund.setShdFeeAmt(new BigDecimal(queryTrans.getString("fee_amount").replace("-",""))); tradeOrderRefund.setShdFeeAmt(new BigDecimal(queryTrans.getString("fee_amount").replace("-","")));
tradeOrderRefund.setSettleAmount(new BigDecimal(queryTrans.getString("settle_amount").replace(",","").replace("-",""))); tradeOrderRefund.setSettleAmount(new BigDecimal(queryTrans.getString("settle_amount").replace(",","").replace("-","")));
tradeOrderRefund.setSettleDate(queryTrans.getDate("clear_date"));
tradeOrderRefundService.editOrderRefund(tradeOrderRefund); tradeOrderRefundService.editOrderRefund(tradeOrderRefund);
// 查询交易 // 查询交易
@ -326,6 +353,33 @@ public class TradeOrderSchedule {
tradeOrder.setShdFeeAmt(tradeOrder.getShdFeeAmt().subtract(tradeOrderRefund.getShdFeeAmt())); tradeOrder.setShdFeeAmt(tradeOrder.getShdFeeAmt().subtract(tradeOrderRefund.getShdFeeAmt()));
tradeOrder.setSettleAmount(tradeOrder.getSettleAmount().subtract(tradeOrderRefund.getSettleAmount())); tradeOrder.setSettleAmount(tradeOrder.getSettleAmount().subtract(tradeOrderRefund.getSettleAmount()));
tradeOrderService.editOrder(tradeOrder); tradeOrderService.editOrder(tradeOrder);
BsTradeSettle tradeSettle = new BsTradeSettle();
tradeSettle.setCompanyId(tradeOrder.getCompanyId());
tradeSettle.setAgentId(tradeOrder.getAgentId());
tradeSettle.setSalesmanId(tradeOrder.getSalesmanId());
tradeSettle.setSalesmanName(tradeOrder.getSalesmanName());
tradeSettle.setMerId(tradeOrder.getMerId());
tradeSettle.setMerNo(tradeOrder.getMerNo());
tradeSettle.setMerName(tradeOrder.getMerName());
tradeSettle.setMerAbbreviate(tradeOrder.getMerAbbreviate());
tradeSettle.setStoreId(tradeOrder.getStoreId());
tradeSettle.setStoreName(tradeOrder.getStoreName());
tradeSettle.setPlatformType(tradeOrder.getPlatformType());
tradeSettle.setPlatformMerNo(tradeOrder.getPlatformMerNo());
tradeSettle.setPlatformTradeNo(tradeOrderRefund.getPlatformOrderNo());
tradeSettle.setPlatformLogNo(tradeOrderRefund.getPlatformLogNo());
tradeSettle.setPayMode(tradeOrder.getPayMode());
tradeSettle.setOutTradeNo(tradeOrderRefund.getRefundNo());
tradeSettle.setTradeType(TradeSettleTradeType.type2.getNumber());
tradeSettle.setTradeAmount(tradeOrderRefund.getRefundAmount());
tradeSettle.setTradeTime(tradeOrderRefund.getRefundTime());
tradeSettle.setShdFeeAmt(tradeOrderRefund.getShdFeeAmt());
tradeSettle.setSettleAmount(tradeOrderRefund.getSettleAmount());
tradeSettle.setSettleDate(tradeOrderRefund.getSettleDate());
tradeSettle.setFeeRate(tradeOrder.getFeeRate());
tradeSettleService.editData(tradeSettle);
} }
} }
} catch (Exception e) { } catch (Exception e) {
@ -334,7 +388,4 @@ public class TradeOrderSchedule {
} }
} }
public static void main(String[] args) {
System.out.println(new BigDecimal("-1.00".replace("-","")).toString());
}
} }

@ -45,15 +45,39 @@ public interface BsTradeOrderMapperExt {
" SELECT date_add(date_sub(#{param.settleTimeS},interval 1 day), INTERVAL ( cast( help_topic_id AS signed INTEGER ) + 1 ) day) days " + " SELECT date_add(date_sub(#{param.settleTimeS},interval 1 day), INTERVAL ( cast( help_topic_id AS signed INTEGER ) + 1 ) day) days " +
" FROM mysql.help_topic " + " FROM mysql.help_topic " +
" WHERE help_topic_id <![CDATA[ < ]]> DATEDIFF(#{param.settleTimeE},date_sub(#{param.settleTimeS},interval 1 day)) ORDER BY help_topic_id) a " + " WHERE help_topic_id <![CDATA[ < ]]> DATEDIFF(#{param.settleTimeE},date_sub(#{param.settleTimeS},interval 1 day)) ORDER BY help_topic_id) a " +
" LEFT JOIN (select " + " LEFT JOIN (" +
" select " +
" a.settle_date settle_date," +
" (a.tradeNum + b.tradeNum) tradeNum," +
" (a.tradeAmount - b.tradeAmount) tradeAmount, " +
" (a.settleAmount - b.settleAmount) settleAmount, " +
" (a.shdFeeAmount - b.shdFeeAmount) shdFeeAmount " +
" from (select " +
" settle_date, " + " settle_date, " +
" count(1) tradeNum, " + " count(1) tradeNum, " +
" sum(trade_actual_amount) tradeAmount, " + " sum(trade_amount) tradeAmount, " +
" sum(settle_amount) settleAmount, " + " sum(settle_amount) settleAmount, " +
" sum(shd_fee_amt) shdFeeAmount " + " sum(shd_fee_amt) shdFeeAmount " +
" from bs_trade_order " + " from bs_trade_settle " +
" where mer_no = #{param.merNo} and `status` = 3 and settle_date between #{param.settleTimeS} and #{param.settleTimeE} GROUP BY settle_date) b on b.settle_date = a.days " + " where settle_date between #{param.settleTimeS} and #{param.settleTimeE} " +
" ORDER BY a.days desc " + " and mer_no = #{param.merNo} " +
" and trade_type = 1" +
" and `status` = 1" +
" GROUP BY settle_date) a," +
" (select " +
" settle_date, " +
" count(1) tradeNum, " +
" sum(trade_amount) tradeAmount, " +
" sum(settle_amount) settleAmount, " +
" sum(shd_fee_amt) shdFeeAmount " +
" from bs_trade_settle " +
" where settle_date between #{param.settleTimeS} and #{param.settleTimeE} " +
" and mer_no = #{param.merNo} " +
" and trade_type = 2" +
" and `status` = 1" +
" GROUP BY settle_date) b where a.settle_date = b.settle_date GROUP BY a.settle_date" +
" ) b on b.settle_date = a.days " +
" ORDER BY a.days desc;" +
" </script>") " </script>")
List<Map<String,Object>> queryTradeOrderDetailCount(@Param("param") Map<String, Object> param); List<Map<String,Object>> queryTradeOrderDetailCount(@Param("param") Map<String, Object> param);

@ -46,11 +46,11 @@ public interface BsTradeOrderRefundMapper extends BsTradeOrderRefundMapperExt {
"refund_no, total_amount, ", "refund_no, total_amount, ",
"refund_amount, payer_amount, ", "refund_amount, payer_amount, ",
"shd_fee_amt, settle_amount, ", "shd_fee_amt, settle_amount, ",
"refund_reason, `status`, ", "settle_date, refund_reason, ",
"refund_time, create_time, ", "`status`, refund_time, ",
"update_time, operator_id, ", "create_time, update_time, ",
"operator_name, ext_1, ", "operator_id, operator_name, ",
"ext_2, ext_3)", "ext_1, ext_2, ext_3)",
"values (#{tradeOrderId,jdbcType=BIGINT}, #{outTradeNo,jdbcType=VARCHAR}, ", "values (#{tradeOrderId,jdbcType=BIGINT}, #{outTradeNo,jdbcType=VARCHAR}, ",
"#{agentId,jdbcType=BIGINT}, #{salesmanId,jdbcType=BIGINT}, ", "#{agentId,jdbcType=BIGINT}, #{salesmanId,jdbcType=BIGINT}, ",
"#{merId,jdbcType=BIGINT}, #{storeId,jdbcType=BIGINT}, #{platformType,jdbcType=INTEGER}, ", "#{merId,jdbcType=BIGINT}, #{storeId,jdbcType=BIGINT}, #{platformType,jdbcType=INTEGER}, ",
@ -58,11 +58,11 @@ public interface BsTradeOrderRefundMapper extends BsTradeOrderRefundMapperExt {
"#{refundNo,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, ", "#{refundNo,jdbcType=VARCHAR}, #{totalAmount,jdbcType=DECIMAL}, ",
"#{refundAmount,jdbcType=DECIMAL}, #{payerAmount,jdbcType=DECIMAL}, ", "#{refundAmount,jdbcType=DECIMAL}, #{payerAmount,jdbcType=DECIMAL}, ",
"#{shdFeeAmt,jdbcType=DECIMAL}, #{settleAmount,jdbcType=DECIMAL}, ", "#{shdFeeAmt,jdbcType=DECIMAL}, #{settleAmount,jdbcType=DECIMAL}, ",
"#{refundReason,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ", "#{settleDate,jdbcType=DATE}, #{refundReason,jdbcType=VARCHAR}, ",
"#{refundTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, ", "#{status,jdbcType=INTEGER}, #{refundTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{operatorId,jdbcType=BIGINT}, ", "#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{operatorName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ", "#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsTradeOrderRefund record); int insert(BsTradeOrderRefund record);
@ -89,6 +89,7 @@ public interface BsTradeOrderRefundMapper extends BsTradeOrderRefundMapperExt {
@Result(column="payer_amount", property="payerAmount", jdbcType=JdbcType.DECIMAL), @Result(column="payer_amount", property="payerAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL), @Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), @Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
@Result(column="refund_reason", property="refundReason", jdbcType=JdbcType.VARCHAR), @Result(column="refund_reason", property="refundReason", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@ -106,8 +107,9 @@ public interface BsTradeOrderRefundMapper extends BsTradeOrderRefundMapperExt {
"select", "select",
"id, trade_order_id, out_trade_no, agent_id, salesman_id, mer_id, store_id, platform_type, ", "id, trade_order_id, out_trade_no, agent_id, salesman_id, mer_id, store_id, platform_type, ",
"platform_order_no, platform_log_no, refund_no, total_amount, refund_amount, ", "platform_order_no, platform_log_no, refund_no, total_amount, refund_amount, ",
"payer_amount, shd_fee_amt, settle_amount, refund_reason, `status`, refund_time, ", "payer_amount, shd_fee_amt, settle_amount, settle_date, refund_reason, `status`, ",
"create_time, update_time, operator_id, operator_name, ext_1, ext_2, ext_3", "refund_time, create_time, update_time, operator_id, operator_name, ext_1, ext_2, ",
"ext_3",
"from bs_trade_order_refund", "from bs_trade_order_refund",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -128,6 +130,7 @@ public interface BsTradeOrderRefundMapper extends BsTradeOrderRefundMapperExt {
@Result(column="payer_amount", property="payerAmount", jdbcType=JdbcType.DECIMAL), @Result(column="payer_amount", property="payerAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL), @Result(column="shd_fee_amt", property="shdFeeAmt", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), @Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
@Result(column="refund_reason", property="refundReason", jdbcType=JdbcType.VARCHAR), @Result(column="refund_reason", property="refundReason", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER), @Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@ -167,6 +170,7 @@ public interface BsTradeOrderRefundMapper extends BsTradeOrderRefundMapperExt {
"payer_amount = #{payerAmount,jdbcType=DECIMAL},", "payer_amount = #{payerAmount,jdbcType=DECIMAL},",
"shd_fee_amt = #{shdFeeAmt,jdbcType=DECIMAL},", "shd_fee_amt = #{shdFeeAmt,jdbcType=DECIMAL},",
"settle_amount = #{settleAmount,jdbcType=DECIMAL},", "settle_amount = #{settleAmount,jdbcType=DECIMAL},",
"settle_date = #{settleDate,jdbcType=DATE},",
"refund_reason = #{refundReason,jdbcType=VARCHAR},", "refund_reason = #{refundReason,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},", "`status` = #{status,jdbcType=INTEGER},",
"refund_time = #{refundTime,jdbcType=TIMESTAMP},", "refund_time = #{refundTime,jdbcType=TIMESTAMP},",

@ -88,6 +88,10 @@ public class BsTradeOrderRefundSqlProvider {
sql.VALUES("settle_amount", "#{settleAmount,jdbcType=DECIMAL}"); sql.VALUES("settle_amount", "#{settleAmount,jdbcType=DECIMAL}");
} }
if (record.getSettleDate() != null) {
sql.VALUES("settle_date", "#{settleDate,jdbcType=DATE}");
}
if (record.getRefundReason() != null) { if (record.getRefundReason() != null) {
sql.VALUES("refund_reason", "#{refundReason,jdbcType=VARCHAR}"); sql.VALUES("refund_reason", "#{refundReason,jdbcType=VARCHAR}");
} }
@ -153,6 +157,7 @@ public class BsTradeOrderRefundSqlProvider {
sql.SELECT("payer_amount"); sql.SELECT("payer_amount");
sql.SELECT("shd_fee_amt"); sql.SELECT("shd_fee_amt");
sql.SELECT("settle_amount"); sql.SELECT("settle_amount");
sql.SELECT("settle_date");
sql.SELECT("refund_reason"); sql.SELECT("refund_reason");
sql.SELECT("`status`"); sql.SELECT("`status`");
sql.SELECT("refund_time"); sql.SELECT("refund_time");
@ -244,6 +249,10 @@ public class BsTradeOrderRefundSqlProvider {
sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}"); sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}");
} }
if (record.getSettleDate() != null) {
sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}");
}
if (record.getRefundReason() != null) { if (record.getRefundReason() != null) {
sql.SET("refund_reason = #{record.refundReason,jdbcType=VARCHAR}"); sql.SET("refund_reason = #{record.refundReason,jdbcType=VARCHAR}");
} }
@ -308,6 +317,7 @@ public class BsTradeOrderRefundSqlProvider {
sql.SET("payer_amount = #{record.payerAmount,jdbcType=DECIMAL}"); sql.SET("payer_amount = #{record.payerAmount,jdbcType=DECIMAL}");
sql.SET("shd_fee_amt = #{record.shdFeeAmt,jdbcType=DECIMAL}"); sql.SET("shd_fee_amt = #{record.shdFeeAmt,jdbcType=DECIMAL}");
sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}"); sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}");
sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}");
sql.SET("refund_reason = #{record.refundReason,jdbcType=VARCHAR}"); sql.SET("refund_reason = #{record.refundReason,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}"); sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}"); sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
@ -388,6 +398,10 @@ public class BsTradeOrderRefundSqlProvider {
sql.SET("settle_amount = #{settleAmount,jdbcType=DECIMAL}"); sql.SET("settle_amount = #{settleAmount,jdbcType=DECIMAL}");
} }
if (record.getSettleDate() != null) {
sql.SET("settle_date = #{settleDate,jdbcType=DATE}");
}
if (record.getRefundReason() != null) { if (record.getRefundReason() != null) {
sql.SET("refund_reason = #{refundReason,jdbcType=VARCHAR}"); sql.SET("refund_reason = #{refundReason,jdbcType=VARCHAR}");
} }

@ -49,8 +49,9 @@ public interface BsTradeSettleMapper extends BsTradeSettleMapperExt {
"trade_type, trade_amount, ", "trade_type, trade_amount, ",
"trade_time, shd_fee_amt, ", "trade_time, shd_fee_amt, ",
"settle_amount, settle_date, ", "settle_amount, settle_date, ",
"fee_rate, create_time, ", "fee_rate, `status`, ",
"ext_1, ext_2, ext_3)", "create_time, ext_1, ",
"ext_2, ext_3)",
"values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ", "values (#{companyId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ", "#{salesmanId,jdbcType=BIGINT}, #{salesmanName,jdbcType=VARCHAR}, ",
"#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ", "#{merId,jdbcType=BIGINT}, #{merName,jdbcType=VARCHAR}, #{merAbbreviate,jdbcType=VARCHAR}, ",
@ -61,8 +62,9 @@ public interface BsTradeSettleMapper extends BsTradeSettleMapperExt {
"#{tradeType,jdbcType=INTEGER}, #{tradeAmount,jdbcType=DECIMAL}, ", "#{tradeType,jdbcType=INTEGER}, #{tradeAmount,jdbcType=DECIMAL}, ",
"#{tradeTime,jdbcType=TIMESTAMP}, #{shdFeeAmt,jdbcType=DECIMAL}, ", "#{tradeTime,jdbcType=TIMESTAMP}, #{shdFeeAmt,jdbcType=DECIMAL}, ",
"#{settleAmount,jdbcType=DECIMAL}, #{settleDate,jdbcType=DATE}, ", "#{settleAmount,jdbcType=DECIMAL}, #{settleDate,jdbcType=DATE}, ",
"#{feeRate,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ", "#{feeRate,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})" "#{createTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsTradeSettle record); int insert(BsTradeSettle record);
@ -97,6 +99,7 @@ public interface BsTradeSettleMapper extends BsTradeSettleMapperExt {
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), @Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE), @Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
@Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.DECIMAL), @Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@ -109,8 +112,8 @@ public interface BsTradeSettleMapper extends BsTradeSettleMapperExt {
"id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_abbreviate, ", "id, company_id, agent_id, salesman_id, salesman_name, mer_id, mer_name, mer_abbreviate, ",
"mer_no, store_id, store_name, platform_type, platform_mer_no, platform_trade_no, ", "mer_no, store_id, store_name, platform_type, platform_mer_no, platform_trade_no, ",
"platform_log_no, pay_mode, out_trade_no, trade_type, trade_amount, trade_time, ", "platform_log_no, pay_mode, out_trade_no, trade_type, trade_amount, trade_time, ",
"shd_fee_amt, settle_amount, settle_date, fee_rate, create_time, ext_1, ext_2, ", "shd_fee_amt, settle_amount, settle_date, fee_rate, `status`, create_time, ext_1, ",
"ext_3", "ext_2, ext_3",
"from bs_trade_settle", "from bs_trade_settle",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -139,6 +142,7 @@ public interface BsTradeSettleMapper extends BsTradeSettleMapperExt {
@Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL), @Result(column="settle_amount", property="settleAmount", jdbcType=JdbcType.DECIMAL),
@Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE), @Result(column="settle_date", property="settleDate", jdbcType=JdbcType.DATE),
@Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.DECIMAL), @Result(column="fee_rate", property="feeRate", jdbcType=JdbcType.DECIMAL),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR), @Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR), @Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@ -180,6 +184,7 @@ public interface BsTradeSettleMapper extends BsTradeSettleMapperExt {
"settle_amount = #{settleAmount,jdbcType=DECIMAL},", "settle_amount = #{settleAmount,jdbcType=DECIMAL},",
"settle_date = #{settleDate,jdbcType=DATE},", "settle_date = #{settleDate,jdbcType=DATE},",
"fee_rate = #{feeRate,jdbcType=DECIMAL},", "fee_rate = #{feeRate,jdbcType=DECIMAL},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},", "create_time = #{createTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},", "ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},", "ext_2 = #{ext2,jdbcType=VARCHAR},",

@ -120,6 +120,10 @@ public class BsTradeSettleSqlProvider {
sql.VALUES("fee_rate", "#{feeRate,jdbcType=DECIMAL}"); sql.VALUES("fee_rate", "#{feeRate,jdbcType=DECIMAL}");
} }
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) { if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}"); sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
} }
@ -169,6 +173,7 @@ public class BsTradeSettleSqlProvider {
sql.SELECT("settle_amount"); sql.SELECT("settle_amount");
sql.SELECT("settle_date"); sql.SELECT("settle_date");
sql.SELECT("fee_rate"); sql.SELECT("fee_rate");
sql.SELECT("`status`");
sql.SELECT("create_time"); sql.SELECT("create_time");
sql.SELECT("ext_1"); sql.SELECT("ext_1");
sql.SELECT("ext_2"); sql.SELECT("ext_2");
@ -286,6 +291,10 @@ public class BsTradeSettleSqlProvider {
sql.SET("fee_rate = #{record.feeRate,jdbcType=DECIMAL}"); sql.SET("fee_rate = #{record.feeRate,jdbcType=DECIMAL}");
} }
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) { if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
} }
@ -334,6 +343,7 @@ public class BsTradeSettleSqlProvider {
sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}"); sql.SET("settle_amount = #{record.settleAmount,jdbcType=DECIMAL}");
sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}"); sql.SET("settle_date = #{record.settleDate,jdbcType=DATE}");
sql.SET("fee_rate = #{record.feeRate,jdbcType=DECIMAL}"); sql.SET("fee_rate = #{record.feeRate,jdbcType=DECIMAL}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}"); sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}"); sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
@ -440,6 +450,10 @@ public class BsTradeSettleSqlProvider {
sql.SET("fee_rate = #{feeRate,jdbcType=DECIMAL}"); sql.SET("fee_rate = #{feeRate,jdbcType=DECIMAL}");
} }
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) { if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}"); sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
} }

@ -94,6 +94,11 @@ public class BsTradeOrderRefund implements Serializable {
*/ */
private BigDecimal settleAmount; private BigDecimal settleAmount;
/**
* 结算日期
*/
private Date settleDate;
/** /**
* 退款原因 * 退款原因
*/ */
@ -265,6 +270,14 @@ public class BsTradeOrderRefund implements Serializable {
this.settleAmount = settleAmount; this.settleAmount = settleAmount;
} }
public Date getSettleDate() {
return settleDate;
}
public void setSettleDate(Date settleDate) {
this.settleDate = settleDate;
}
public String getRefundReason() { public String getRefundReason() {
return refundReason; return refundReason;
} }
@ -373,6 +386,7 @@ public class BsTradeOrderRefund implements Serializable {
&& (this.getPayerAmount() == null ? other.getPayerAmount() == null : this.getPayerAmount().equals(other.getPayerAmount())) && (this.getPayerAmount() == null ? other.getPayerAmount() == null : this.getPayerAmount().equals(other.getPayerAmount()))
&& (this.getShdFeeAmt() == null ? other.getShdFeeAmt() == null : this.getShdFeeAmt().equals(other.getShdFeeAmt())) && (this.getShdFeeAmt() == null ? other.getShdFeeAmt() == null : this.getShdFeeAmt().equals(other.getShdFeeAmt()))
&& (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount())) && (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount()))
&& (this.getSettleDate() == null ? other.getSettleDate() == null : this.getSettleDate().equals(other.getSettleDate()))
&& (this.getRefundReason() == null ? other.getRefundReason() == null : this.getRefundReason().equals(other.getRefundReason())) && (this.getRefundReason() == null ? other.getRefundReason() == null : this.getRefundReason().equals(other.getRefundReason()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus())) && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime())) && (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime()))
@ -405,6 +419,7 @@ public class BsTradeOrderRefund implements Serializable {
result = prime * result + ((getPayerAmount() == null) ? 0 : getPayerAmount().hashCode()); result = prime * result + ((getPayerAmount() == null) ? 0 : getPayerAmount().hashCode());
result = prime * result + ((getShdFeeAmt() == null) ? 0 : getShdFeeAmt().hashCode()); result = prime * result + ((getShdFeeAmt() == null) ? 0 : getShdFeeAmt().hashCode());
result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode()); result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode());
result = prime * result + ((getSettleDate() == null) ? 0 : getSettleDate().hashCode());
result = prime * result + ((getRefundReason() == null) ? 0 : getRefundReason().hashCode()); result = prime * result + ((getRefundReason() == null) ? 0 : getRefundReason().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode()); result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode()); result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode());
@ -440,6 +455,7 @@ public class BsTradeOrderRefund implements Serializable {
sb.append(", payerAmount=").append(payerAmount); sb.append(", payerAmount=").append(payerAmount);
sb.append(", shdFeeAmt=").append(shdFeeAmt); sb.append(", shdFeeAmt=").append(shdFeeAmt);
sb.append(", settleAmount=").append(settleAmount); sb.append(", settleAmount=").append(settleAmount);
sb.append(", settleDate=").append(settleDate);
sb.append(", refundReason=").append(refundReason); sb.append(", refundReason=").append(refundReason);
sb.append(", status=").append(status); sb.append(", status=").append(status);
sb.append(", refundTime=").append(refundTime); sb.append(", refundTime=").append(refundTime);

@ -3,6 +3,7 @@ package com.hfkj.entity;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.Iterator;
import java.util.List; import java.util.List;
public class BsTradeOrderRefundExample { public class BsTradeOrderRefundExample {
@ -126,6 +127,32 @@ public class BsTradeOrderRefundExample {
criteria.add(new Criterion(condition, value1, value2)); criteria.add(new Criterion(condition, value1, value2));
} }
protected void addCriterionForJDBCDate(String condition, Date value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value.getTime()), property);
}
protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
if (values == null || values.size() == 0) {
throw new RuntimeException("Value list for " + property + " cannot be null or empty");
}
List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
Iterator<Date> iter = values.iterator();
while (iter.hasNext()) {
dateList.add(new java.sql.Date(iter.next().getTime()));
}
addCriterion(condition, dateList, property);
}
protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
}
public Criteria andIdIsNull() { public Criteria andIdIsNull() {
addCriterion("id is null"); addCriterion("id is null");
return (Criteria) this; return (Criteria) this;
@ -1126,6 +1153,66 @@ public class BsTradeOrderRefundExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andSettleDateIsNull() {
addCriterion("settle_date is null");
return (Criteria) this;
}
public Criteria andSettleDateIsNotNull() {
addCriterion("settle_date is not null");
return (Criteria) this;
}
public Criteria andSettleDateEqualTo(Date value) {
addCriterionForJDBCDate("settle_date =", value, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateNotEqualTo(Date value) {
addCriterionForJDBCDate("settle_date <>", value, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateGreaterThan(Date value) {
addCriterionForJDBCDate("settle_date >", value, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateGreaterThanOrEqualTo(Date value) {
addCriterionForJDBCDate("settle_date >=", value, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateLessThan(Date value) {
addCriterionForJDBCDate("settle_date <", value, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateLessThanOrEqualTo(Date value) {
addCriterionForJDBCDate("settle_date <=", value, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateIn(List<Date> values) {
addCriterionForJDBCDate("settle_date in", values, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateNotIn(List<Date> values) {
addCriterionForJDBCDate("settle_date not in", values, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateBetween(Date value1, Date value2) {
addCriterionForJDBCDate("settle_date between", value1, value2, "settleDate");
return (Criteria) this;
}
public Criteria andSettleDateNotBetween(Date value1, Date value2) {
addCriterionForJDBCDate("settle_date not between", value1, value2, "settleDate");
return (Criteria) this;
}
public Criteria andRefundReasonIsNull() { public Criteria andRefundReasonIsNull() {
addCriterion("refund_reason is null"); addCriterion("refund_reason is null");
return (Criteria) this; return (Criteria) this;

@ -104,7 +104,7 @@ public class BsTradeSettle implements Serializable {
private String outTradeNo; private String outTradeNo;
/** /**
* 交易类型 1支付 2退款 * 交易类型 1支付 2交易退款
*/ */
private Integer tradeType; private Integer tradeType;
@ -138,6 +138,11 @@ public class BsTradeSettle implements Serializable {
*/ */
private BigDecimal feeRate; private BigDecimal feeRate;
/**
* 状态 0删除 1正常
*/
private Integer status;
/** /**
* 创建时间 * 创建时间
*/ */
@ -343,6 +348,14 @@ public class BsTradeSettle implements Serializable {
this.feeRate = feeRate; this.feeRate = feeRate;
} }
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() { public Date getCreateTime() {
return createTime; return createTime;
} }
@ -411,6 +424,7 @@ public class BsTradeSettle implements Serializable {
&& (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount())) && (this.getSettleAmount() == null ? other.getSettleAmount() == null : this.getSettleAmount().equals(other.getSettleAmount()))
&& (this.getSettleDate() == null ? other.getSettleDate() == null : this.getSettleDate().equals(other.getSettleDate())) && (this.getSettleDate() == null ? other.getSettleDate() == null : this.getSettleDate().equals(other.getSettleDate()))
&& (this.getFeeRate() == null ? other.getFeeRate() == null : this.getFeeRate().equals(other.getFeeRate())) && (this.getFeeRate() == null ? other.getFeeRate() == null : this.getFeeRate().equals(other.getFeeRate()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1())) && (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2())) && (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
@ -445,6 +459,7 @@ public class BsTradeSettle implements Serializable {
result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode()); result = prime * result + ((getSettleAmount() == null) ? 0 : getSettleAmount().hashCode());
result = prime * result + ((getSettleDate() == null) ? 0 : getSettleDate().hashCode()); result = prime * result + ((getSettleDate() == null) ? 0 : getSettleDate().hashCode());
result = prime * result + ((getFeeRate() == null) ? 0 : getFeeRate().hashCode()); result = prime * result + ((getFeeRate() == null) ? 0 : getFeeRate().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode()); result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode()); result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode()); result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
@ -482,6 +497,7 @@ public class BsTradeSettle implements Serializable {
sb.append(", settleAmount=").append(settleAmount); sb.append(", settleAmount=").append(settleAmount);
sb.append(", settleDate=").append(settleDate); sb.append(", settleDate=").append(settleDate);
sb.append(", feeRate=").append(feeRate); sb.append(", feeRate=").append(feeRate);
sb.append(", status=").append(status);
sb.append(", createTime=").append(createTime); sb.append(", createTime=").append(createTime);
sb.append(", ext1=").append(ext1); sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2); sb.append(", ext2=").append(ext2);

@ -1693,6 +1693,66 @@ public class BsTradeSettleExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("`status` is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("`status` =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("`status` <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("`status` >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("`status` >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("`status` <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("`status` <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("`status` in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("`status` not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("`status` between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("`status` not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() { public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null"); addCriterion("create_time is null");
return (Criteria) this; return (Criteria) this;

@ -6,6 +6,7 @@ import com.hfkj.service.BsTradeSettleService;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
@ -23,6 +24,8 @@ public class BsTradeSettleServiceImpl implements BsTradeSettleService {
@Override @Override
public void editData(BsTradeSettle tradeSettle) { public void editData(BsTradeSettle tradeSettle) {
if (tradeSettle.getId() == null) { if (tradeSettle.getId() == null) {
tradeSettle.setStatus(1);
tradeSettle.setCreateTime(new Date());
tradeSettleMapper.insert(tradeSettle); tradeSettleMapper.insert(tradeSettle);
} else { } else {
tradeSettleMapper.updateByPrimaryKey(tradeSettle); tradeSettleMapper.updateByPrimaryKey(tradeSettle);

@ -0,0 +1,37 @@
package com.hfkj.sysenum;
/**
* @className: TradeSettleTradeType
* @author: HuRui
* @date: 2023/8/4
**/
public enum TradeSettleTradeType {
type1(1, "支付"),
type2(2, "交易退款"),
;
private Integer number;
private String name;
TradeSettleTradeType(int number, String name) {
this.number = number;
this.name = name;
}
public Integer getNumber() {
return number;
}
public void setNumber(Integer number) {
this.number = number;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}

@ -7,11 +7,19 @@ import com.getui.push.v2.sdk.GtApiConfiguration;
import com.getui.push.v2.sdk.api.PushApi; import com.getui.push.v2.sdk.api.PushApi;
import com.getui.push.v2.sdk.common.ApiResult; import com.getui.push.v2.sdk.common.ApiResult;
import com.getui.push.v2.sdk.dto.req.Audience; import com.getui.push.v2.sdk.dto.req.Audience;
import com.getui.push.v2.sdk.dto.req.message.PushChannel;
import com.getui.push.v2.sdk.dto.req.message.PushDTO; import com.getui.push.v2.sdk.dto.req.message.PushDTO;
import com.getui.push.v2.sdk.dto.req.message.PushMessage; import com.getui.push.v2.sdk.dto.req.message.PushMessage;
import com.getui.push.v2.sdk.dto.req.message.android.AndroidDTO;
import com.getui.push.v2.sdk.dto.req.message.android.ThirdNotification;
import com.getui.push.v2.sdk.dto.req.message.android.Ups;
import com.getui.push.v2.sdk.dto.req.message.ios.Alert;
import com.getui.push.v2.sdk.dto.req.message.ios.Aps;
import com.getui.push.v2.sdk.dto.req.message.ios.IosDTO;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
@ -81,6 +89,79 @@ public class UniPushService {
} }
} }
/* *//**
* @Author Sum1Dream
* @Name androidTemplate
* @Description // 安卓模版
* @Date 16:08 2023/6/9
* @Param [uniPushModel]
* @Return void
*//*
public static Boolean pushToSingleByCid(JSONObject object) {
log.info("========= START 个推手机端推送 START ===========");
PushApi pushApi = createClient();
//根据cid进行单推
PushDTO<Audience> pushDTO = new PushDTO<>();
// 设置推送参数
pushDTO.setRequestId(System.currentTimeMillis() + "");
// 设置个推通道参数
PushMessage pushMessage = new PushMessage();
pushDTO.setPushMessage(pushMessage);
pushMessage.setTransmission(object.getString("body"));
Alert alert = new Alert();
alert.setTitle("离线标题");
alert.setBody(object.getString("body"));
Aps aps = new Aps();
aps.setAlert(alert);
PushChannel pushChannel = new PushChannel();
IosDTO iosDTO = new IosDTO();
iosDTO.setType("notify");
iosDTO.setAps(aps);
pushChannel.setIos(iosDTO);
AndroidDTO androidDTO = new AndroidDTO();
ThirdNotification thirdNotification = new ThirdNotification();
thirdNotification.setTitle("离线标题");
thirdNotification.setBody("离线内容");
thirdNotification.setClickType("startapp");
Ups ups = new Ups();
ups.setNotification(thirdNotification);
Map<String, Map<String, Object>> paramMap = new HashMap<>();
Map<String,Object> huaweiMap = new HashMap<>();
huaweiMap.put("/message/android/category", "FINANCE");
huaweiMap.put("/message/android/ttl", "60");
paramMap.put("HW", huaweiMap);
ups.setOptions(paramMap);
androidDTO.setUps(ups);
pushChannel.setAndroid(androidDTO);
pushDTO.setPushChannel(pushChannel);
*//*设置接收人信息*//*
Audience audience = new Audience();
pushDTO.setAudience(audience);
audience.addCid(object.getString("cid"));
log.info("个推-请求参数: " + JSON.toJSONString(pushDTO));
// 进行cid单推
ApiResult<Map<String, Map<String, String>>> apiResult = pushApi.pushToSingleByCid(pushDTO);
log.info("个推-返回参数: " + JSON.toJSONString(apiResult));
log.info("========= END 个推手机端推送 END ===========");
if (apiResult.isSuccess()) {
return apiResult.getData().toString().contains("successed_online");
} else {
return false;
}
}*/
} }

Loading…
Cancel
Save