袁野 3 years ago
commit e4f2e5f203
  1. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  2. 4
      hai-cweb/src/test/common/test.java
  3. 42
      hai-service/src/main/java/com/hai/config/UnionStagingPayConfig.java
  4. 29
      hai-service/src/main/java/com/hai/dao/OutRechargePriceMapper.java
  5. 14
      hai-service/src/main/java/com/hai/dao/OutRechargePriceSqlProvider.java
  6. 16
      hai-service/src/main/java/com/hai/entity/OutRechargePrice.java
  7. 60
      hai-service/src/main/java/com/hai/entity/OutRechargePriceExample.java

File diff suppressed because one or more lines are too long

@ -46,7 +46,7 @@ public class test {
@Test
public void test(){
List<HighDiscountAgentCode> codeList = highDiscountAgentCodeService.getDiscountCodeByDiscountAgentId(55L);
/* List<HighDiscountAgentCode> codeList = highDiscountAgentCodeService.getDiscountCodeByDiscountAgentId(55L);
List<HighUser> userList = highUserService.getUserList();
@ -55,7 +55,7 @@ public class test {
// 领取优惠券
highDiscountUserRelService.receiveDiscount(user.getId(), codeList.get(num).getId());
num++;
}
}*/
}

@ -56,6 +56,15 @@ public class UnionStagingPayConfig {
return responseParam;
}
/**
* 订单查询接口
* @param orgTrace 订单号
* @param oriOrgTrace 原机构交易流水号
* @param prodCode 产品代码
* @param oriBizDate 原交易日期
* @return
* @throws Exception
*/
public static JSONObject query(String orgTrace, String oriOrgTrace,String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
@ -75,6 +84,15 @@ public class UnionStagingPayConfig {
return responseParam;
}
/**
* 分期交易查询
* @param orgTrace 交易流水
* @param oriOrgTrace 原机构交易流水号
* @param prodCode 产品代码
* @param oriBizDate 原交易日期
* @return
* @throws Exception
*/
public static JSONObject queryStaging(String orgTrace, String oriOrgTrace, String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
@ -94,7 +112,17 @@ public class UnionStagingPayConfig {
return responseParam;
}
public static JSONObject mposrefund(String orgTrace, String oriOrgTrace, BigDecimal transAmt,String prodCode,Date oriBizDate) throws Exception {
/**
* 交易退款
* @param orgTrace
* @param oriOrgTrace
* @param transAmt
* @param prodCode
* @param oriBizDate
* @return
* @throws Exception
*/
public static JSONObject standardRefund(String orgTrace, String oriOrgTrace, BigDecimal transAmt,String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
paramMap.put("orgMerCode", CommonSysConst.getSysConfig().getUnionStagingPayOrgMerCode());
@ -110,10 +138,19 @@ public class UnionStagingPayConfig {
paramMap.put("bizData", bizDataMap);
paramMap.put("sign", generateSign(bizDataMap));
JSONObject responseParam = HttpsUtils.doPost(CommonSysConst.getSysConfig().getUnionStagingPayUrl()+"ledger/mposrefund", paramMap, new HashMap<>());
JSONObject responseParam = HttpsUtils.doPost(CommonSysConst.getSysConfig().getUnionStagingPayUrl()+"cashier/trade/standardRefund", paramMap, new HashMap<>());
return responseParam;
}
/**
* 分期交易退货
* @param orgTrace 交易流水
* @param oriOrgTrace 原机构交易流水号
* @param prodCode 产品代码
* @param oriBizDate 原交易日期
* @return
* @throws Exception
*/
public static JSONObject mposfindrefund(String orgTrace, String oriOrgTrace,String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
@ -178,4 +215,5 @@ public class UnionStagingPayConfig {
}
return signStr;
}
}

@ -39,16 +39,16 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
"insert into out_recharge_price (`type`, show_type, ",
"company_id, price, ",
"real_price, create_time, ",
"goods_id, discount, sort, ",
"`status`)",
"values (#{type,jdbcType=INTEGER}, #{showType,jdbcType=INTEGER}, ",
"#{companyId,jdbcType=BIGINT}, #{price,jdbcType=DECIMAL}, ",
"#{realPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{goodsId,jdbcType=BIGINT}, #{discount,jdbcType=REAL}, #{sort,jdbcType=INTEGER}, ",
"#{status,jdbcType=INTEGER})"
"insert into out_recharge_price (recharge_type, `type`, ",
"show_type, company_id, ",
"price, real_price, ",
"create_time, goods_id, ",
"discount, sort, `status`)",
"values (#{rechargeType,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, ",
"#{showType,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, ",
"#{price,jdbcType=DECIMAL}, #{realPrice,jdbcType=DECIMAL}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{goodsId,jdbcType=BIGINT}, ",
"#{discount,jdbcType=REAL}, #{sort,jdbcType=INTEGER}, #{status,jdbcType=INTEGER})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(OutRechargePrice record);
@ -60,6 +60,7 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@SelectProvider(type=OutRechargePriceSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="recharge_type", property="rechargeType", jdbcType=JdbcType.INTEGER),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@ -75,13 +76,14 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Select({
"select",
"id, `type`, show_type, company_id, price, real_price, create_time, goods_id, ",
"discount, sort, `status`",
"id, recharge_type, `type`, show_type, company_id, price, real_price, create_time, ",
"goods_id, discount, sort, `status`",
"from out_recharge_price",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="recharge_type", property="rechargeType", jdbcType=JdbcType.INTEGER),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@ -106,7 +108,8 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Update({
"update out_recharge_price",
"set `type` = #{type,jdbcType=INTEGER},",
"set recharge_type = #{rechargeType,jdbcType=INTEGER},",
"`type` = #{type,jdbcType=INTEGER},",
"show_type = #{showType,jdbcType=INTEGER},",
"company_id = #{companyId,jdbcType=BIGINT},",
"price = #{price,jdbcType=DECIMAL},",

@ -28,6 +28,10 @@ public class OutRechargePriceSqlProvider {
SQL sql = new SQL();
sql.INSERT_INTO("out_recharge_price");
if (record.getRechargeType() != null) {
sql.VALUES("recharge_type", "#{rechargeType,jdbcType=INTEGER}");
}
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
@ -78,6 +82,7 @@ public class OutRechargePriceSqlProvider {
} else {
sql.SELECT("id");
}
sql.SELECT("recharge_type");
sql.SELECT("`type`");
sql.SELECT("show_type");
sql.SELECT("company_id");
@ -109,6 +114,10 @@ public class OutRechargePriceSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getRechargeType() != null) {
sql.SET("recharge_type = #{record.rechargeType,jdbcType=INTEGER}");
}
if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
@ -158,6 +167,7 @@ public class OutRechargePriceSqlProvider {
sql.UPDATE("out_recharge_price");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("recharge_type = #{record.rechargeType,jdbcType=INTEGER}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("show_type = #{record.showType,jdbcType=INTEGER}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
@ -178,6 +188,10 @@ public class OutRechargePriceSqlProvider {
SQL sql = new SQL();
sql.UPDATE("out_recharge_price");
if (record.getRechargeType() != null) {
sql.SET("recharge_type = #{rechargeType,jdbcType=INTEGER}");
}
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}

@ -19,6 +19,11 @@ public class OutRechargePrice implements Serializable {
*/
private Long id;
/**
* 1.快充 2慢充
*/
private Integer rechargeType;
/**
* 1 电信 2.移动 3.联通
*/
@ -79,6 +84,14 @@ public class OutRechargePrice implements Serializable {
this.id = id;
}
public Integer getRechargeType() {
return rechargeType;
}
public void setRechargeType(Integer rechargeType) {
this.rechargeType = rechargeType;
}
public Integer getType() {
return type;
}
@ -172,6 +185,7 @@ public class OutRechargePrice implements Serializable {
}
OutRechargePrice other = (OutRechargePrice) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getRechargeType() == null ? other.getRechargeType() == null : this.getRechargeType().equals(other.getRechargeType()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getShowType() == null ? other.getShowType() == null : this.getShowType().equals(other.getShowType()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
@ -189,6 +203,7 @@ public class OutRechargePrice implements Serializable {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getRechargeType() == null) ? 0 : getRechargeType().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getShowType() == null) ? 0 : getShowType().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
@ -209,6 +224,7 @@ public class OutRechargePrice implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", rechargeType=").append(rechargeType);
sb.append(", type=").append(type);
sb.append(", showType=").append(showType);
sb.append(", companyId=").append(companyId);

@ -186,6 +186,66 @@ public class OutRechargePriceExample {
return (Criteria) this;
}
public Criteria andRechargeTypeIsNull() {
addCriterion("recharge_type is null");
return (Criteria) this;
}
public Criteria andRechargeTypeIsNotNull() {
addCriterion("recharge_type is not null");
return (Criteria) this;
}
public Criteria andRechargeTypeEqualTo(Integer value) {
addCriterion("recharge_type =", value, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeNotEqualTo(Integer value) {
addCriterion("recharge_type <>", value, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeGreaterThan(Integer value) {
addCriterion("recharge_type >", value, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("recharge_type >=", value, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeLessThan(Integer value) {
addCriterion("recharge_type <", value, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeLessThanOrEqualTo(Integer value) {
addCriterion("recharge_type <=", value, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeIn(List<Integer> values) {
addCriterion("recharge_type in", values, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeNotIn(List<Integer> values) {
addCriterion("recharge_type not in", values, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeBetween(Integer value1, Integer value2) {
addCriterion("recharge_type between", value1, value2, "rechargeType");
return (Criteria) this;
}
public Criteria andRechargeTypeNotBetween(Integer value1, Integer value2) {
addCriterion("recharge_type not between", value1, value2, "rechargeType");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;

Loading…
Cancel
Save