dev-discount
= 4 years ago
commit a9368a6404
  1. 3
      hai-bweb/src/main/java/com/bweb/controller/LoginController.java
  2. 129
      hai-bweb/src/main/java/com/bweb/controller/OutRechargePriceController.java
  3. 2
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  4. 64
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  5. 11
      hai-cweb/src/main/java/com/cweb/controller/OutRechargePriceController.java
  6. 4
      hai-cweb/src/main/resources/dev/application.yml
  7. 21
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java
  8. 28
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java
  9. 37
      hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java
  10. 130
      hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java
  11. 4
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
  12. 15
      hai-service/src/main/java/com/hai/service/impl/OutRechargePriceServiceImpl.java

@ -173,6 +173,9 @@ public class LoginController {
}
userInfoModel.setHighAgent(highAgent);
} else if (secUser.getObjectType() == 5) {
// 查询管理人员
} else {
log.error("login error!","用户信息错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");

@ -0,0 +1,129 @@
package com.bweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighAgent;
import com.hai.entity.OutRechargePrice;
import com.hai.model.HighAgentModel;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.OutRechargePriceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Controller
@RequestMapping(value = "/outRechargePrice")
@Api(value = "查询充值金额接口")
public class OutRechargePriceController {
private static Logger log = LoggerFactory.getLogger(HighMerchantStoreController.class);
@Autowired
private UserCenter userCenter;
@Resource
private OutRechargePriceService outRechargePriceService;
@RequestMapping(value = "/getListOutRechargePrice", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询充值金额列表")
public ResponseData getListOutRechargePrice(
@RequestParam(value = "type", required = false) Integer type ,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request
) {
try {
Map<String, String> map = new HashMap<>();
if (type != null ) {
map.put("type", String.valueOf(type));
}
PageHelper.startPage(pageNum, pageSize);
List<OutRechargePrice> outRechargePrices = outRechargePriceService.getListRechargePrice(map);
return ResponseMsgUtil.success(new PageInfo<>(outRechargePrices));
} catch (Exception e) {
log.error("OutRechargePriceController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/insertPrice", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "新增金额")
public ResponseData insertAgent(@RequestBody OutRechargePrice outRechargePrice, HttpServletRequest request) {
try {
if (outRechargePrice.getType() == null
|| outRechargePrice.getPrice() == null
|| outRechargePrice.getRealPrice() == null
) {
log.error("SecOrganizationController -> insertPrice() error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
outRechargePrice.setCreateTime(new Date());
outRechargePriceService.insertRechargePrice(outRechargePrice);
return ResponseMsgUtil.success("新增成功");
} catch (Exception e) {
log.error("OutRechargePriceController --> insertPrice() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/updatePrice", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "修改金额")
public ResponseData updatePrice(@RequestBody OutRechargePrice outRechargePrice) {
try {
if (outRechargePrice.getType() == null
|| outRechargePrice.getId() == null
|| outRechargePrice.getPrice() == null
|| outRechargePrice.getRealPrice() == null
) {
log.error("SecOrganizationController -> updatePrice() error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
OutRechargePrice outRechargePrice1 = outRechargePriceService.findById(outRechargePrice.getId());
if (outRechargePrice1 == null ) {
log.error("SecOrganizationController -> updatePrice() error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.UPDATE_DATA_ERROR, "");
}
outRechargePriceService.updateRechargePrice(outRechargePrice);
return ResponseMsgUtil.success("修改成功");
} catch (Exception e) {
log.error("OutRechargePriceController --> insertPrice() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -111,6 +111,8 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/test/*")
.excludePathPatterns("/outRechargeOrder/refundOrder")
.excludePathPatterns("/wechat/*")
.excludePathPatterns("/outRechargeOrder/*")
.excludePathPatterns("/outRechargePrice/*")
;
}

@ -75,9 +75,12 @@ public class OutRechargeOrderController {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
// SessionObject sessionObject = userCenter.getSessionObject(request);
// HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
// if(sessionObject == null){
// log.error("SecOrganizationController --> addOrganization() error!", "");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.SEC_USER_EXPIRED, "");
// }
if (StringUtils.isBlank(outRechargeOrder.getRechargeContent()) ||
outRechargeOrder.getPayPrice() == null ||
outRechargeOrder.getOrderPrice() == null
@ -91,10 +94,15 @@ public class OutRechargeOrderController {
// 判断充值模式:1 话费充值 2. 中石化 3. 中石油
if (outRechargeOrder.getRechargeModel() == 1) {
JSONObject telObject = telApiService.outApiTel(outRechargeOrder.getRechargeContent());
JSONObject o = telObject.getObject("result",JSONObject.class);
// 拼接内容
remarks = o.get("province").toString() + o.get("company").toString() + "充值" + outRechargeOrder.getOrderPrice() + "元";
} else if (outRechargeOrder.getRechargeModel() == 2) {
if (telObject.get("status") == "0") {
JSONObject o = telObject.getObject("result",JSONObject.class);
// 拼接内容
remarks = o.get("province").toString() + o.get("company").toString() + "充值" + outRechargeOrder.getOrderPrice() + "元";
} else {
log.error("orderToPay error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR);
}
} else if (outRechargeOrder.getRechargeModel() == 3 ) {
// 中石油需要姓名和身份证号
if (StringUtils.isBlank(outRechargeOrder.getRechargeName()) ||
StringUtils.isBlank(outRechargeOrder.getIdCard())
@ -103,18 +111,24 @@ public class OutRechargeOrderController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
remarks = "中石化充值" + outRechargeOrder.getOrderPrice() + "元";
} else if (outRechargeOrder.getRechargeModel() == 3) {
} else if (outRechargeOrder.getRechargeModel() == 2) {
remarks = "中石油充值" + outRechargeOrder.getOrderPrice() + "元";
} else {
log.error("orderToPay error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
outRechargeOrder.setRemarks(remarks);
outRechargeOrder.setOrderNo("CZ" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5));
outRechargeOrder.setUserId(userInfoModel.getHighUser().getId());
outRechargeOrder.setUserName(userInfoModel.getHighUser().getName());
outRechargeOrder.setUserPhone(userInfoModel.getHighUser().getPhone());
// outRechargeOrder.setUserId(userInfoModel.getHighUser().getId());
// outRechargeOrder.setUserName(userInfoModel.getHighUser().getName());
// outRechargeOrder.setUserPhone(userInfoModel.getHighUser().getPhone());
outRechargeOrder.setUserId(2L);
outRechargeOrder.setUserName("袁野");
outRechargeOrder.setUserPhone("18090580471");
outRechargeOrder.setCreateTimed(new Date());
outRechargeOrder.setStatus(1);
outRechargeOrderService.insertOrder(outRechargeOrder);
return ResponseMsgUtil.success(outRechargeOrder.getId());
return ResponseMsgUtil.success(outRechargeOrder);
} catch (Exception e) {
log.error("HighOrderController -> addOrder() error!",e);
@ -143,7 +157,16 @@ public class OutRechargeOrderController {
public ResponseData cancelOrder(@RequestParam(name = "orderId", required = true) Long orderId) {
try {
outRechargeOrderService.cancelOrder(orderId);
OutRechargeOrder outRechargeOrder = outRechargeOrderService.findByOrderId(orderId);
if (outRechargeOrder.getStatus() == 1) {
outRechargeOrderService.cancelOrder(orderId);
} else {
log.error("orderToPay error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.STATUS_ERROR, "");
}
return ResponseMsgUtil.success("操作成功");
@ -165,13 +188,18 @@ public class OutRechargeOrderController {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
// SessionObject sessionObject = userCenter.getSessionObject(request);
// HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
Map<String,String> map = new HashMap<>();
map.put("userId", userInfoModel.getHighUser().getId().toString());
map.put("status", status.toString());
map.put("orderNo", orderNo);
// map.put("userId", userInfoModel.getHighUser().getId().toString());
map.put("userId", "2");
if (status != null) {
map.put("status", status.toString());
}
if (StringUtils.isNotBlank(orderNo)) {
map.put("orderNo", orderNo);
}
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(outRechargeOrderService.getListRechargeOrder(map)));

@ -48,19 +48,18 @@ public class OutRechargePriceController {
@ResponseBody
@ApiOperation(value = "查询充值金额列表")
public ResponseData getListOutRechargePrice(
@RequestParam(value = "type", required = false) String type
@RequestParam(value = "type", required = false) Integer type
) {
try {
Map<String, String> map = new HashMap<>();
if (StringUtils.isNotBlank(type)) {
map.put("type", type);
if (type != null ) {
map.put("type", String.valueOf(type));
}
return ResponseMsgUtil.success(outRechargePriceService.getListRechargePrice(map));
return ResponseMsgUtil.success( outRechargePriceService.getListRechargePrice(map));
} catch (Exception e) {
log.error("HighAgentController --> getListUser() error!", e);
log.error("OutRechargePriceController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}

@ -9,8 +9,8 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.159.177.244:3306/hfkj?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
username: hfkj
url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver

@ -48,7 +48,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"recharge_name, id_card, ",
"create_timed, pay_time, ",
"cancel_time, finish_time, ",
"remarks)",
"remarks, out_refund_no, ",
"refund_fee)",
"values (#{orderNo,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ",
"#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, ",
"#{rechargeModel,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER}, ",
@ -58,7 +59,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"#{rechargeName,jdbcType=VARCHAR}, #{idCard,jdbcType=VARCHAR}, ",
"#{createTimed,jdbcType=TIMESTAMP}, #{payTime,jdbcType=TIMESTAMP}, ",
"#{cancelTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{remarks,jdbcType=VARCHAR})"
"#{remarks,jdbcType=VARCHAR}, #{outRefundNo,jdbcType=VARCHAR}, ",
"#{refundFee,jdbcType=DECIMAL})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(OutRechargeOrder record);
@ -88,7 +90,9 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR)
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="out_refund_no", property="outRefundNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL)
})
List<OutRechargeOrder> selectByExample(OutRechargeOrderExample example);
@ -96,7 +100,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"select",
"id, order_no, user_id, user_name, user_phone, recharge_model, pay_type, pay_price, ",
"order_price, pay_real_price, pay_serial_no, `status`, recharge_content, recharge_name, ",
"id_card, create_timed, pay_time, cancel_time, finish_time, remarks",
"id_card, create_timed, pay_time, cancel_time, finish_time, remarks, out_refund_no, ",
"refund_fee",
"from out_recharge_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -120,7 +125,9 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR)
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="out_refund_no", property="outRefundNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL)
})
OutRechargeOrder selectByPrimaryKey(Long id);
@ -153,7 +160,9 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"pay_time = #{payTime,jdbcType=TIMESTAMP},",
"cancel_time = #{cancelTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"remarks = #{remarks,jdbcType=VARCHAR}",
"remarks = #{remarks,jdbcType=VARCHAR},",
"out_refund_no = #{outRefundNo,jdbcType=VARCHAR},",
"refund_fee = #{refundFee,jdbcType=DECIMAL}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(OutRechargeOrder record);

@ -104,6 +104,14 @@ public class OutRechargeOrderSqlProvider {
sql.VALUES("remarks", "#{remarks,jdbcType=VARCHAR}");
}
if (record.getOutRefundNo() != null) {
sql.VALUES("out_refund_no", "#{outRefundNo,jdbcType=VARCHAR}");
}
if (record.getRefundFee() != null) {
sql.VALUES("refund_fee", "#{refundFee,jdbcType=DECIMAL}");
}
return sql.toString();
}
@ -133,6 +141,8 @@ public class OutRechargeOrderSqlProvider {
sql.SELECT("cancel_time");
sql.SELECT("finish_time");
sql.SELECT("remarks");
sql.SELECT("out_refund_no");
sql.SELECT("refund_fee");
sql.FROM("out_recharge_order");
applyWhere(sql, example, false);
@ -230,6 +240,14 @@ public class OutRechargeOrderSqlProvider {
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
}
if (record.getOutRefundNo() != null) {
sql.SET("out_refund_no = #{record.outRefundNo,jdbcType=VARCHAR}");
}
if (record.getRefundFee() != null) {
sql.SET("refund_fee = #{record.refundFee,jdbcType=DECIMAL}");
}
applyWhere(sql, example, true);
return sql.toString();
}
@ -258,6 +276,8 @@ public class OutRechargeOrderSqlProvider {
sql.SET("cancel_time = #{record.cancelTime,jdbcType=TIMESTAMP}");
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
sql.SET("out_refund_no = #{record.outRefundNo,jdbcType=VARCHAR}");
sql.SET("refund_fee = #{record.refundFee,jdbcType=DECIMAL}");
OutRechargeOrderExample example = (OutRechargeOrderExample) parameter.get("example");
applyWhere(sql, example, true);
@ -344,6 +364,14 @@ public class OutRechargeOrderSqlProvider {
sql.SET("remarks = #{remarks,jdbcType=VARCHAR}");
}
if (record.getOutRefundNo() != null) {
sql.SET("out_refund_no = #{outRefundNo,jdbcType=VARCHAR}");
}
if (record.getRefundFee() != null) {
sql.SET("refund_fee = #{refundFee,jdbcType=DECIMAL}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();

@ -108,8 +108,21 @@ public class OutRechargeOrder extends HighOrder implements Serializable {
*/
private Date finishTime;
/**
* 备注
*/
private String remarks;
/**
* 退款订单号
*/
private String outRefundNo;
/**
* 退款金额
*/
private Long refundFee;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -272,6 +285,22 @@ public class OutRechargeOrder extends HighOrder implements Serializable {
this.remarks = remarks;
}
public String getOutRefundNo() {
return outRefundNo;
}
public void setOutRefundNo(String outRefundNo) {
this.outRefundNo = outRefundNo;
}
public Long getRefundFee() {
return refundFee;
}
public void setRefundFee(Long refundFee) {
this.refundFee = refundFee;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -303,7 +332,9 @@ public class OutRechargeOrder extends HighOrder implements Serializable {
&& (this.getPayTime() == null ? other.getPayTime() == null : this.getPayTime().equals(other.getPayTime()))
&& (this.getCancelTime() == null ? other.getCancelTime() == null : this.getCancelTime().equals(other.getCancelTime()))
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()));
&& (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
&& (this.getOutRefundNo() == null ? other.getOutRefundNo() == null : this.getOutRefundNo().equals(other.getOutRefundNo()))
&& (this.getRefundFee() == null ? other.getRefundFee() == null : this.getRefundFee().equals(other.getRefundFee()));
}
@Override
@ -330,6 +361,8 @@ public class OutRechargeOrder extends HighOrder implements Serializable {
result = prime * result + ((getCancelTime() == null) ? 0 : getCancelTime().hashCode());
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
result = prime * result + ((getOutRefundNo() == null) ? 0 : getOutRefundNo().hashCode());
result = prime * result + ((getRefundFee() == null) ? 0 : getRefundFee().hashCode());
return result;
}
@ -359,6 +392,8 @@ public class OutRechargeOrder extends HighOrder implements Serializable {
sb.append(", cancelTime=").append(cancelTime);
sb.append(", finishTime=").append(finishTime);
sb.append(", remarks=").append(remarks);
sb.append(", outRefundNo=").append(outRefundNo);
sb.append(", refundFee=").append(refundFee);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -1404,6 +1404,136 @@ public class OutRechargeOrderExample {
addCriterion("remarks not between", value1, value2, "remarks");
return (Criteria) this;
}
public Criteria andOutRefundNoIsNull() {
addCriterion("out_refund_no is null");
return (Criteria) this;
}
public Criteria andOutRefundNoIsNotNull() {
addCriterion("out_refund_no is not null");
return (Criteria) this;
}
public Criteria andOutRefundNoEqualTo(String value) {
addCriterion("out_refund_no =", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoNotEqualTo(String value) {
addCriterion("out_refund_no <>", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoGreaterThan(String value) {
addCriterion("out_refund_no >", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoGreaterThanOrEqualTo(String value) {
addCriterion("out_refund_no >=", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoLessThan(String value) {
addCriterion("out_refund_no <", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoLessThanOrEqualTo(String value) {
addCriterion("out_refund_no <=", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoLike(String value) {
addCriterion("out_refund_no like", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoNotLike(String value) {
addCriterion("out_refund_no not like", value, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoIn(List<String> values) {
addCriterion("out_refund_no in", values, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoNotIn(List<String> values) {
addCriterion("out_refund_no not in", values, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoBetween(String value1, String value2) {
addCriterion("out_refund_no between", value1, value2, "outRefundNo");
return (Criteria) this;
}
public Criteria andOutRefundNoNotBetween(String value1, String value2) {
addCriterion("out_refund_no not between", value1, value2, "outRefundNo");
return (Criteria) this;
}
public Criteria andRefundFeeIsNull() {
addCriterion("refund_fee is null");
return (Criteria) this;
}
public Criteria andRefundFeeIsNotNull() {
addCriterion("refund_fee is not null");
return (Criteria) this;
}
public Criteria andRefundFeeEqualTo(Long value) {
addCriterion("refund_fee =", value, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeNotEqualTo(Long value) {
addCriterion("refund_fee <>", value, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeGreaterThan(Long value) {
addCriterion("refund_fee >", value, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeGreaterThanOrEqualTo(Long value) {
addCriterion("refund_fee >=", value, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeLessThan(Long value) {
addCriterion("refund_fee <", value, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeLessThanOrEqualTo(Long value) {
addCriterion("refund_fee <=", value, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeIn(List<Long> values) {
addCriterion("refund_fee in", values, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeNotIn(List<Long> values) {
addCriterion("refund_fee not in", values, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeBetween(Long value1, Long value2) {
addCriterion("refund_fee between", value1, value2, "refundFee");
return (Criteria) this;
}
public Criteria andRefundFeeNotBetween(Long value1, Long value2) {
addCriterion("refund_fee not between", value1, value2, "refundFee");
return (Criteria) this;
}
}
/**

@ -26,7 +26,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
OutRechargeOrderExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getLong(map, "memId"));
criteria.andUserIdEqualTo(MapUtils.getLong(map, "userId"));
}
if (MapUtils.getInteger(map, "status") != null) {
@ -41,7 +41,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
criteria.andUserPhoneEqualTo(MapUtils.getString(map, "phone"));
}
example.setOrderByClause("create_time desc");
example.setOrderByClause("create_timed desc");
return outRechargeOrderMapper.selectByExample(example);
}

@ -1,11 +1,9 @@
package com.hai.service.impl;
import com.hai.dao.OutRechargePriceMapper;
import com.hai.entity.OutRechargePrice;
import com.hai.entity.OutRechargePriceExample;
import com.hai.entity.OutRechargeUser;
import com.hai.entity.OutRechargeUserExample;
import com.hai.entity.*;
import com.hai.service.OutRechargePriceService;
import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
@ -20,9 +18,14 @@ public class OutRechargePriceServiceImpl implements OutRechargePriceService {
private OutRechargePriceMapper outRechargePriceMapper;
@Override
public List<OutRechargePrice> getListRechargePrice(Map<String, String> map) {
public List<OutRechargePrice> getListRechargePrice(Map<String , String> map) {
OutRechargePriceExample example = new OutRechargePriceExample();
example.createCriteria().andTypeEqualTo(Integer.valueOf(map.get("Type")));
OutRechargePriceExample.Criteria criteria = example.createCriteria();
if (StringUtils.isNotBlank(map.get("type"))) {
criteria.andTypeEqualTo(Integer.valueOf(map.get("type")));
}
return outRechargePriceMapper.selectByExample(example);
}

Loading…
Cancel
Save