dev-discount
袁野 3 years ago
parent c1f18d94aa
commit 8f3663aa9a
  1. 14
      hai-bweb/src/main/java/com/bweb/excelListener/ImportRechargeOrderListener.java
  2. 2
      hai-bweb/src/main/java/com/bweb/model/ExportOutRechargeOrder.java
  3. 4
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  4. 8
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  5. 25
      hai-cweb/src/main/java/com/cweb/controller/WechatController.java
  6. 5
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java
  7. 49
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java
  8. 28
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java
  9. 34
      hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java
  10. 130
      hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java
  11. 2
      hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java
  12. 15
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
  13. 10
      hai-service/src/main/java/com/hai/service/pay/impl/RechargeOrderServiceImpl.java

@ -53,10 +53,16 @@ public class ImportRechargeOrderListener extends AnalysisEventListener<ExportOut
}
if (Objects.equals(data.getStatusName(), "已完成")) {
rechargeOrder.setStatus(3);
rechargeOrder.setFinishTime(new Date());
outRechargeOrderService.finishOrder(rechargeOrder.getId());
} else if (Objects.equals(data.getStatusName(), "失败")){
rechargeOrder.setStatus(6);
try {
outRechargeOrderService.rechargeOrderToRefund(rechargeOrder.getId());
} catch (Exception exception) {
data.setErrorMessage("退款失败。");
errorData.add(data);
return;
}
}
@ -67,7 +73,7 @@ public class ImportRechargeOrderListener extends AnalysisEventListener<ExportOut
public void doAfterAllAnalysed(AnalysisContext context) {
if (successData.size() > 0) {
try {
outRechargeOrderService.updateOrderList(successData);
// outRechargeOrderService.updateOrderList(successData);
} catch (Exception e) {
e.printStackTrace();
}

@ -37,7 +37,7 @@ public class ExportOutRechargeOrder {
@ExcelProperty("应付金额")
private BigDecimal payPrice;
@ExcelProperty("充值类型")
@ExcelProperty("充值方式")
private String rechargeTypeName;
@ExcelProperty("实付金额")

@ -118,21 +118,19 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/order/orderToPay")
.excludePathPatterns("/cmsContent/*")
.excludePathPatterns("/highGas/*")
.excludePathPatterns("/outRechargeOrder/*")
.excludePathPatterns("/wechat/*")
.excludePathPatterns("/tuanyou/*")
.excludePathPatterns("/unionPay/*")
.excludePathPatterns("/highGas/*")
.excludePathPatterns("/common/*")
.excludePathPatterns("/order/qzOrderToPay")
.excludePathPatterns("/czOrder/orderRefundNotify")
.excludePathPatterns("/cmsContent/*")
.excludePathPatterns("/highBrand/*")
.excludePathPatterns("/highGoodsType/*")
.excludePathPatterns("/sendSms/*")
.excludePathPatterns("/sms/*")
.excludePathPatterns("/outRechargePrice/*")
.excludePathPatterns("/czOrder/*")
.excludePathPatterns("/outRechargeOrder/*")
;
}

@ -477,8 +477,12 @@ public class OutRechargeOrderController {
if (order.getRechargeType() != null && order.getRechargeType() == 1) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo());
if (object.getInteger("code") != 200) {
outRechargeOrderService.rechargeOrderToRefund(orderId);
return ResponseMsgUtil.success("充值失败");
order.setRechargeStatus(1);
order.setStatus(2);
order.setPayType(3);
order.setPayTime(new Date()); // 支付时间
order.setAbnormalMsg(object.getString("message"));
outRechargeOrderService.updateOrder(order);
}
}

@ -158,6 +158,31 @@ public class WechatController {
}
}
@RequestMapping(value = "/loginByTel", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "小程序根据手机号登录或注册")
public ResponseData loginByPhone(@RequestParam(value = "loginByTel", required = true) String loginByTel,
HttpServletRequest request, HttpServletResponse response) {
try {
// 根据手机号查询用户
HighUser user = highUserService.findByPhone(loginByTel);
// 定义个人所有数据
HighUserModel highUserModel = new HighUserModel();
HighUser detailData = highUserService.getDetailDataByUser(user.getId());
detailData.setPassword(null);
highUserModel.setHighUser(detailData);
SessionObject so = new SessionObject(user.getPhone(), 1 , highUserModel);
userCenter.save(request, response, so);
return ResponseMsgUtil.success(so);
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getUserInfo", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "小程序获取用户信息")

@ -391,13 +391,14 @@ public class UnionPayController {
order.setStatus(2);
order.setPayType(4);
order.setPayTime(new Date()); // 支付时间
outRechargeOrderService.updateOrder(order);
if (order.getRechargeType() != null && order.getRechargeType() == 1) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo());
if (object.getInteger("code") != 200) {
outRechargeOrderService.rechargeOrderToRefund(order.getId());
order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message"));
}
}
outRechargeOrderService.updateOrder(order);
}
}

@ -47,13 +47,14 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"recharge_type, pay_real_price, ",
"pay_serial_no, deduction_price, ",
"`status`, recharge_content, ",
"recharge_name, id_card, ",
"create_timed, pay_time, ",
"cancel_time, finish_time, ",
"remarks, out_refund_no, ",
"refund_time, refund_id, ",
"refund_fee, agent_key, ",
"object_id, Identification_code)",
"recharge_name, recharge_status, ",
"id_card, create_timed, ",
"pay_time, cancel_time, ",
"finish_time, remarks, ",
"out_refund_no, refund_time, ",
"refund_id, refund_fee, ",
"agent_key, object_id, ",
"Identification_code, abnormal_msg)",
"values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ",
"#{memDiscountName,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ",
"#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, ",
@ -62,13 +63,14 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"#{rechargeType,jdbcType=INTEGER}, #{payRealPrice,jdbcType=DECIMAL}, ",
"#{paySerialNo,jdbcType=VARCHAR}, #{deductionPrice,jdbcType=DECIMAL}, ",
"#{status,jdbcType=INTEGER}, #{rechargeContent,jdbcType=VARCHAR}, ",
"#{rechargeName,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, ",
"#{createTimed,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ",
"#{cancelTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{remarks,jdbcType=VARCHAR}, #{outRefundNo,jdbcType=VARCHAR}, ",
"#{refundTime,jdbcType=TIMESTAMP}, #{refundId,jdbcType=VARCHAR}, ",
"#{refundFee,jdbcType=DECIMAL}, #{agentKey,jdbcType=VARCHAR}, ",
"#{objectId,jdbcType=INTEGER}, #{identificationCode,jdbcType=BIGINT})"
"#{rechargeName,jdbcType=VARCHAR}, #{rechargeStatus,jdbcType=INTEGER}, ",
"#{idCard,jdbcType=VARCHAR}, #{createTimed,jdbcType=TIMESTAMP}, ",
"#{payTime,jdbcType=TIMESTAMP}, #{cancelTime,jdbcType=TIMESTAMP}, ",
"#{finishTime,jdbcType=TIMESTAMP}, #{remarks,jdbcType=VARCHAR}, ",
"#{outRefundNo,jdbcType=VARCHAR}, #{refundTime,jdbcType=TIMESTAMP}, ",
"#{refundId,jdbcType=VARCHAR}, #{refundFee,jdbcType=DECIMAL}, ",
"#{agentKey,jdbcType=VARCHAR}, #{objectId,jdbcType=INTEGER}, ",
"#{identificationCode,jdbcType=BIGINT}, #{abnormalMsg,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(OutRechargeOrder record);
@ -97,6 +99,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="recharge_content", property="rechargeContent", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_status", property="rechargeStatus", jdbcType=JdbcType.INTEGER),
@Result(column="id_card", property="idCard", jdbcType=JdbcType.VARCHAR),
@Result(column="create_timed", property="createTimed", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@ -109,7 +112,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL),
@Result(column="agent_key", property="agentKey", jdbcType=JdbcType.VARCHAR),
@Result(column="object_id", property="objectId", jdbcType=JdbcType.INTEGER),
@Result(column="Identification_code", property="identificationCode", jdbcType=JdbcType.BIGINT)
@Result(column="Identification_code", property="identificationCode", jdbcType=JdbcType.BIGINT),
@Result(column="abnormal_msg", property="abnormalMsg", jdbcType=JdbcType.VARCHAR)
})
List<OutRechargeOrder> selectByExample(OutRechargeOrderExample example);
@ -117,9 +121,10 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"select",
"id, order_no, mem_discount_id, mem_discount_name, user_id, user_name, user_phone, ",
"recharge_model, pay_type, pay_price, order_price, recharge_type, pay_real_price, ",
"pay_serial_no, deduction_price, `status`, recharge_content, recharge_name, id_card, ",
"create_timed, pay_time, cancel_time, finish_time, remarks, out_refund_no, refund_time, ",
"refund_id, refund_fee, agent_key, object_id, Identification_code",
"pay_serial_no, deduction_price, `status`, recharge_content, recharge_name, recharge_status, ",
"id_card, create_timed, pay_time, cancel_time, finish_time, remarks, out_refund_no, ",
"refund_time, refund_id, refund_fee, agent_key, object_id, Identification_code, ",
"abnormal_msg",
"from out_recharge_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -142,6 +147,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="recharge_content", property="rechargeContent", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_status", property="rechargeStatus", jdbcType=JdbcType.INTEGER),
@Result(column="id_card", property="idCard", jdbcType=JdbcType.VARCHAR),
@Result(column="create_timed", property="createTimed", jdbcType=JdbcType.TIMESTAMP),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@ -154,7 +160,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL),
@Result(column="agent_key", property="agentKey", jdbcType=JdbcType.VARCHAR),
@Result(column="object_id", property="objectId", jdbcType=JdbcType.INTEGER),
@Result(column="Identification_code", property="identificationCode", jdbcType=JdbcType.BIGINT)
@Result(column="Identification_code", property="identificationCode", jdbcType=JdbcType.BIGINT),
@Result(column="abnormal_msg", property="abnormalMsg", jdbcType=JdbcType.VARCHAR)
})
OutRechargeOrder selectByPrimaryKey(Long id);
@ -186,6 +193,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"`status` = #{status,jdbcType=INTEGER},",
"recharge_content = #{rechargeContent,jdbcType=VARCHAR},",
"recharge_name = #{rechargeName,jdbcType=VARCHAR},",
"recharge_status = #{rechargeStatus,jdbcType=INTEGER},",
"id_card = #{idCard,jdbcType=VARCHAR},",
"create_timed = #{createTimed,jdbcType=TIMESTAMP},",
"pay_time = #{payTime,jdbcType=TIMESTAMP},",
@ -198,7 +206,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"refund_fee = #{refundFee,jdbcType=DECIMAL},",
"agent_key = #{agentKey,jdbcType=VARCHAR},",
"object_id = #{objectId,jdbcType=INTEGER},",
"Identification_code = #{identificationCode,jdbcType=BIGINT}",
"Identification_code = #{identificationCode,jdbcType=BIGINT},",
"abnormal_msg = #{abnormalMsg,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(OutRechargeOrder record);

@ -96,6 +96,10 @@ public class OutRechargeOrderSqlProvider {
sql.VALUES("recharge_name", "#{rechargeName,jdbcType=VARCHAR}");
}
if (record.getRechargeStatus() != null) {
sql.VALUES("recharge_status", "#{rechargeStatus,jdbcType=INTEGER}");
}
if (record.getIdCard() != null) {
sql.VALUES("id_card", "#{idCard,jdbcType=VARCHAR}");
}
@ -148,6 +152,10 @@ public class OutRechargeOrderSqlProvider {
sql.VALUES("Identification_code", "#{identificationCode,jdbcType=BIGINT}");
}
if (record.getAbnormalMsg() != null) {
sql.VALUES("abnormal_msg", "#{abnormalMsg,jdbcType=VARCHAR}");
}
return sql.toString();
}
@ -175,6 +183,7 @@ public class OutRechargeOrderSqlProvider {
sql.SELECT("`status`");
sql.SELECT("recharge_content");
sql.SELECT("recharge_name");
sql.SELECT("recharge_status");
sql.SELECT("id_card");
sql.SELECT("create_timed");
sql.SELECT("pay_time");
@ -188,6 +197,7 @@ public class OutRechargeOrderSqlProvider {
sql.SELECT("agent_key");
sql.SELECT("object_id");
sql.SELECT("Identification_code");
sql.SELECT("abnormal_msg");
sql.FROM("out_recharge_order");
applyWhere(sql, example, false);
@ -277,6 +287,10 @@ public class OutRechargeOrderSqlProvider {
sql.SET("recharge_name = #{record.rechargeName,jdbcType=VARCHAR}");
}
if (record.getRechargeStatus() != null) {
sql.SET("recharge_status = #{record.rechargeStatus,jdbcType=INTEGER}");
}
if (record.getIdCard() != null) {
sql.SET("id_card = #{record.idCard,jdbcType=VARCHAR}");
}
@ -329,6 +343,10 @@ public class OutRechargeOrderSqlProvider {
sql.SET("Identification_code = #{record.identificationCode,jdbcType=BIGINT}");
}
if (record.getAbnormalMsg() != null) {
sql.SET("abnormal_msg = #{record.abnormalMsg,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
@ -355,6 +373,7 @@ public class OutRechargeOrderSqlProvider {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("recharge_content = #{record.rechargeContent,jdbcType=VARCHAR}");
sql.SET("recharge_name = #{record.rechargeName,jdbcType=VARCHAR}");
sql.SET("recharge_status = #{record.rechargeStatus,jdbcType=INTEGER}");
sql.SET("id_card = #{record.idCard,jdbcType=VARCHAR}");
sql.SET("create_timed = #{record.createTimed,jdbcType=TIMESTAMP}");
sql.SET("pay_time = #{record.payTime,jdbcType=TIMESTAMP}");
@ -368,6 +387,7 @@ public class OutRechargeOrderSqlProvider {
sql.SET("agent_key = #{record.agentKey,jdbcType=VARCHAR}");
sql.SET("object_id = #{record.objectId,jdbcType=INTEGER}");
sql.SET("Identification_code = #{record.identificationCode,jdbcType=BIGINT}");
sql.SET("abnormal_msg = #{record.abnormalMsg,jdbcType=VARCHAR}");
OutRechargeOrderExample example = (OutRechargeOrderExample) parameter.get("example");
applyWhere(sql, example, true);
@ -446,6 +466,10 @@ public class OutRechargeOrderSqlProvider {
sql.SET("recharge_name = #{rechargeName,jdbcType=VARCHAR}");
}
if (record.getRechargeStatus() != null) {
sql.SET("recharge_status = #{rechargeStatus,jdbcType=INTEGER}");
}
if (record.getIdCard() != null) {
sql.SET("id_card = #{idCard,jdbcType=VARCHAR}");
}
@ -498,6 +522,10 @@ public class OutRechargeOrderSqlProvider {
sql.SET("Identification_code = #{identificationCode,jdbcType=BIGINT}");
}
if (record.getAbnormalMsg() != null) {
sql.SET("abnormal_msg = #{abnormalMsg,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();

@ -104,6 +104,11 @@ public class OutRechargeOrder implements Serializable {
*/
private String rechargeName;
/**
* 1:充值异常
*/
private Integer rechargeStatus;
/**
* 中石油需要持卡人身份证
*/
@ -163,6 +168,11 @@ public class OutRechargeOrder implements Serializable {
private Long identificationCode;
/**
* 异常信息
*/
private String abnormalMsg;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -309,6 +319,14 @@ public class OutRechargeOrder implements Serializable {
this.rechargeName = rechargeName;
}
public Integer getRechargeStatus() {
return rechargeStatus;
}
public void setRechargeStatus(Integer rechargeStatus) {
this.rechargeStatus = rechargeStatus;
}
public String getIdCard() {
return idCard;
}
@ -413,6 +431,14 @@ public class OutRechargeOrder implements Serializable {
this.identificationCode = identificationCode;
}
public String getAbnormalMsg() {
return abnormalMsg;
}
public void setAbnormalMsg(String abnormalMsg) {
this.abnormalMsg = abnormalMsg;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -443,6 +469,7 @@ public class OutRechargeOrder implements Serializable {
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getRechargeContent() == null ? other.getRechargeContent() == null : this.getRechargeContent().equals(other.getRechargeContent()))
&& (this.getRechargeName() == null ? other.getRechargeName() == null : this.getRechargeName().equals(other.getRechargeName()))
&& (this.getRechargeStatus() == null ? other.getRechargeStatus() == null : this.getRechargeStatus().equals(other.getRechargeStatus()))
&& (this.getIdCard() == null ? other.getIdCard() == null : this.getIdCard().equals(other.getIdCard()))
&& (this.getCreateTimed() == null ? other.getCreateTimed() == null : this.getCreateTimed().equals(other.getCreateTimed()))
&& (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
@ -455,7 +482,8 @@ public class OutRechargeOrder implements Serializable {
&& (this.getRefundFee() == null ? other.getRefundFee() == null : this.getRefundFee().equals(other.getRefundFee()))
&& (this.getAgentKey() == null ? other.getAgentKey() == null : this.getAgentKey().equals(other.getAgentKey()))
&& (this.getObjectId() == null ? other.getObjectId() == null : this.getObjectId().equals(other.getObjectId()))
&& (this.getIdentificationCode() == null ? other.getIdentificationCode() == null : this.getIdentificationCode().equals(other.getIdentificationCode()));
&& (this.getIdentificationCode() == null ? other.getIdentificationCode() == null : this.getIdentificationCode().equals(other.getIdentificationCode()))
&& (this.getAbnormalMsg() == null ? other.getAbnormalMsg() == null : this.getAbnormalMsg().equals(other.getAbnormalMsg()));
}
@Override
@ -480,6 +508,7 @@ public class OutRechargeOrder implements Serializable {
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getRechargeContent() == null) ? 0 : getRechargeContent().hashCode());
result = prime * result + ((getRechargeName() == null) ? 0 : getRechargeName().hashCode());
result = prime * result + ((getRechargeStatus() == null) ? 0 : getRechargeStatus().hashCode());
result = prime * result + ((getIdCard() == null) ? 0 : getIdCard().hashCode());
result = prime * result + ((getCreateTimed() == null) ? 0 : getCreateTimed().hashCode());
result = prime * result + ((getPayTime() == null) ? 0 : getPayTime().hashCode());
@ -493,6 +522,7 @@ public class OutRechargeOrder implements Serializable {
result = prime * result + ((getAgentKey() == null) ? 0 : getAgentKey().hashCode());
result = prime * result + ((getObjectId() == null) ? 0 : getObjectId().hashCode());
result = prime * result + ((getIdentificationCode() == null) ? 0 : getIdentificationCode().hashCode());
result = prime * result + ((getAbnormalMsg() == null) ? 0 : getAbnormalMsg().hashCode());
return result;
}
@ -520,6 +550,7 @@ public class OutRechargeOrder implements Serializable {
sb.append(", status=").append(status);
sb.append(", rechargeContent=").append(rechargeContent);
sb.append(", rechargeName=").append(rechargeName);
sb.append(", rechargeStatus=").append(rechargeStatus);
sb.append(", idCard=").append(idCard);
sb.append(", createTimed=").append(createTimed);
sb.append(", payTime=").append(payTime);
@ -533,6 +564,7 @@ public class OutRechargeOrder implements Serializable {
sb.append(", agentKey=").append(agentKey);
sb.append(", objectId=").append(objectId);
sb.append(", identificationCode=").append(identificationCode);
sb.append(", abnormalMsg=").append(abnormalMsg);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -1276,6 +1276,66 @@ public class OutRechargeOrderExample {
return (Criteria) this;
}
public Criteria andRechargeStatusIsNull() {
addCriterion("recharge_status is null");
return (Criteria) this;
}
public Criteria andRechargeStatusIsNotNull() {
addCriterion("recharge_status is not null");
return (Criteria) this;
}
public Criteria andRechargeStatusEqualTo(Integer value) {
addCriterion("recharge_status =", value, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusNotEqualTo(Integer value) {
addCriterion("recharge_status <>", value, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusGreaterThan(Integer value) {
addCriterion("recharge_status >", value, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("recharge_status >=", value, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusLessThan(Integer value) {
addCriterion("recharge_status <", value, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusLessThanOrEqualTo(Integer value) {
addCriterion("recharge_status <=", value, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusIn(List<Integer> values) {
addCriterion("recharge_status in", values, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusNotIn(List<Integer> values) {
addCriterion("recharge_status not in", values, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusBetween(Integer value1, Integer value2) {
addCriterion("recharge_status between", value1, value2, "rechargeStatus");
return (Criteria) this;
}
public Criteria andRechargeStatusNotBetween(Integer value1, Integer value2) {
addCriterion("recharge_status not between", value1, value2, "rechargeStatus");
return (Criteria) this;
}
public Criteria andIdCardIsNull() {
addCriterion("id_card is null");
return (Criteria) this;
@ -2105,6 +2165,76 @@ public class OutRechargeOrderExample {
addCriterion("Identification_code not between", value1, value2, "identificationCode");
return (Criteria) this;
}
public Criteria andAbnormalMsgIsNull() {
addCriterion("abnormal_msg is null");
return (Criteria) this;
}
public Criteria andAbnormalMsgIsNotNull() {
addCriterion("abnormal_msg is not null");
return (Criteria) this;
}
public Criteria andAbnormalMsgEqualTo(String value) {
addCriterion("abnormal_msg =", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotEqualTo(String value) {
addCriterion("abnormal_msg <>", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgGreaterThan(String value) {
addCriterion("abnormal_msg >", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgGreaterThanOrEqualTo(String value) {
addCriterion("abnormal_msg >=", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgLessThan(String value) {
addCriterion("abnormal_msg <", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgLessThanOrEqualTo(String value) {
addCriterion("abnormal_msg <=", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgLike(String value) {
addCriterion("abnormal_msg like", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotLike(String value) {
addCriterion("abnormal_msg not like", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgIn(List<String> values) {
addCriterion("abnormal_msg in", values, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotIn(List<String> values) {
addCriterion("abnormal_msg not in", values, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgBetween(String value1, String value2) {
addCriterion("abnormal_msg between", value1, value2, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotBetween(String value1, String value2) {
addCriterion("abnormal_msg not between", value1, value2, "abnormalMsg");
return (Criteria) this;
}
}
/**

@ -158,7 +158,7 @@ public interface OutRechargeOrderService {
/**
* @Author Sum1Dream
* @name orderToRefund.java
* @name orderToRefund.java
* @Description // 话费订单退款
* @Date 4:44 下午 2022/1/24
* @Param [java.lang.Long]

@ -346,7 +346,8 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
if (order.getRechargeType() != null && order.getRechargeType() == 1) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo());
if (object.getInteger("code") != 200) {
outRechargeOrderService.rechargeOrderToRefund(orderId);
order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message"));
}
}
order.setStatus(2);
@ -370,12 +371,6 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
highUserService.goldHandle(userId, goldNum, 2, 2, order.getId());
order.setPayRealPrice(order.getPayPrice()); // 实付金额
order.setStatus(2);
if (order.getRechargeType() != null && order.getRechargeType() == 1) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo());
if (object.getInteger("code") != 200) {
outRechargeOrderService.rechargeOrderToRefund(orderId);
}
}
order.setPayType(3);
order.setPayTime(new Date()); // 支付时间
outRechargeOrderService.updateOrder(order);
@ -417,7 +412,6 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
public void rechargeOrderToRefund(Long orderId) throws Exception {
OutRechargeOrder order = outRechargeOrderService.findByOrderId(orderId);
// 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款 6:退款中
if (order.getStatus() != 2) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法退款,订单不处于已支付状态");
@ -479,6 +473,11 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
// 金币退款
if (order.getPayType() == 3) {
highUserService.goldHandle(order.getUserId(), order.getPayRealPrice().intValue() * 100, 1, 3, order.getId());
order.setStatus(5);
order.setRefundTime(new Date());
order.setOutRefundNo("HFR"+new Date().getTime() );
order.setRefundFee(order.getPayRealPrice());
outRechargeOrderService.updateOrder(order);
}
// 银联退款

@ -50,11 +50,6 @@ public class RechargeOrderServiceImpl implements PayService {
@Resource
private OutRechargeOrderService outRechargeOrderService;
@Resource OutRechargePriceService outRechargePriceService;
@Resource
private HighProfitSharingRecordService highProfitSharingRecordService;
@Resource
private HighGasOrderPushMapper highGasOrderPushMapper;
@ -75,13 +70,14 @@ public class RechargeOrderServiceImpl implements PayService {
order.setPayRealPrice(new BigDecimal(map.get("total_fee")).divide(new BigDecimal("100"))); // 实付金额
order.setPayTime(new Date()); // 支付时间
order.setStatus(2); // 订单状态 : 1.待支付 2.已支付 3.已完成 4.已取消 5.已退款
outRechargeOrderService.updateOrder(order);
if (order.getRechargeType() != null && order.getRechargeType() == 1) {
JSONObject object = outRechargeOrderService.getMobile(order.getRechargeContent() , order.getOrderPrice().intValue() , order.getOrderNo());
if (object.getInteger("code") != 200) {
outRechargeOrderService.rechargeOrderToRefund(order.getId());
order.setRechargeStatus(1);
order.setAbnormalMsg(object.getString("message"));
}
}
outRechargeOrderService.updateOrder(order);
// 推送订单记录
HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
highGasOrderPush.setType(OrderPushType.type2.getType());

Loading…
Cancel
Save