'提交代码'

dev-discount
= 3 years ago
parent 7392f65055
commit eb4796c488
  1. 6
      hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java
  2. 33
      hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java
  3. 2
      hai-bweb/src/main/resources/dev/application.yml
  4. 15
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java
  5. 23
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
  6. 14
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java
  7. 18
      hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java
  8. 70
      hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java
  9. 15
      hai-service/src/main/java/com/hai/model/OutRechargeOrderModel.java
  10. 2
      hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java
  11. 19
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java

@ -171,14 +171,14 @@ public class HighAgentController {
HighAgent highAgent = highAgentService.findByAgentMsgId(agentId);
// 代理商类型 1:卡券代理商 2:充值代理商
if (highAgent == null && highAgent.getType() != 2) {
if (highAgent == null || highAgent.getType() != 2) {
log.error("HighAgentController --> generateRechargeAgentQrCode() error!", "此代理商暂无法生成二维码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此代理商暂无法生成二维码");
}
// 生成二维码
String url = "https://hsgcs.dctpay.com/phone-recharge-H5/index.html?codeValue=";
String qrCodeImg = highAgent.getAgentKey()+".png";
String qrCodeUrl = "/home/project/hsg/filesystem/rechargeAgentQrCode/" + qrCodeImg;
String qrCodeImg = "rechargeAgentQrCode/" + highAgent.getAgentKey()+".png";
String qrCodeUrl = "/home/project/hsg/filesystem/" + qrCodeImg;
QRCodeGenerator.generateQRCodeImage(url+highAgent.getAgentKey(), 350, 350, qrCodeUrl);
highAgent.setExt1(qrCodeImg);
highAgentService.updateAgentDetail(highAgent);

@ -18,12 +18,9 @@ import com.hai.common.utils.IDGenerator;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.common.utils.WxUtils;
import com.hai.entity.OutRechargeOrder;
<<<<<<< HEAD
import com.hai.model.HighOrderModel;
import com.hai.model.OutRechargeOrderModel;
=======
import com.hai.model.OrderRefundModel;
>>>>>>> 4d1958377a2ed60952b3280c17eec28e48b6b0c6
import com.hai.model.ResponseData;
import com.hai.service.OutRechargeOrderService;
import com.hai.service.TelApiService;
@ -45,6 +42,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
@ -182,27 +180,43 @@ public class OutRechargeOrderController {
}
}
<<<<<<< HEAD
@RequestMapping(value = "/exportOrderList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "导出订单")
public ResponseData exportOrderList() {
public ResponseData exportOrderList(@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "orderNo", required = false) String orderNo,
@RequestParam(name = "rechargeModel", required = false) String rechargeModel,
@RequestParam(name = "rechargeContent", required = false) String rechargeContent,
@RequestParam(name = "userPhone", required = false) String userPhone,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "payTimeS", required = false) Long payTimeS,
@RequestParam(name = "payTimeE", required = false) Long payTimeE) {
try {
String name = "/outRechargeOrder/充值订单" + System.currentTimeMillis() + ".xlsx";
Map<String,Object> map = new HashMap<>();
map.put("status", status);
map.put("orderNo", orderNo);
map.put("rechargeModel", rechargeModel);
map.put("rechargeContent", rechargeContent);
map.put("userPhone", userPhone);
map.put("createTimeS", createTimeS);
map.put("createTimeE", createTimeE);
map.put("payTimeS", payTimeS);
map.put("payTimeE", payTimeE);
List<OutRechargeOrderModel> list = outRechargeOrderService.getOrderCount(map);
String name = "/outRechargeOrder/充值订单" + System.currentTimeMillis() + ".xlsx";
String fileName = SysConst.getSysConfig().getFileUrl() + name;
EasyExcel.write(fileName, ExportOutRechargeOrder.class).sheet("商品订单").doWrite(list);
EasyExcel.write(fileName, ExportOutRechargeOrder.class).sheet("充值订单").doWrite(list);
return ResponseMsgUtil.success(name);
} catch (Exception e) {
log.error("HighOrderController --> exportOrderList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
=======
@RequestMapping(value = "/orderToRefund", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "订单退款")
@ -284,5 +298,4 @@ public class OutRechargeOrderController {
httpClient.close();
}
}
>>>>>>> 4d1958377a2ed60952b3280c17eec28e48b6b0c6
}

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

@ -50,7 +50,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"cancel_time, finish_time, ",
"remarks, out_refund_no, ",
"refund_time, refund_id, ",
"refund_fee)",
"refund_fee, agent_key)",
"values (#{orderNo,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ",
"#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, ",
"#{rechargeModel,jdbcType=INTEGER}, #{payType,jdbcType=INTEGER}, ",
@ -62,7 +62,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"#{cancelTime,jdbcType=TIMESTAMP}, #{finishTime,jdbcType=TIMESTAMP}, ",
"#{remarks,jdbcType=VARCHAR}, #{outRefundNo,jdbcType=VARCHAR}, ",
"#{refundTime,jdbcType=TIMESTAMP}, #{refundId,jdbcType=VARCHAR}, ",
"#{refundFee,jdbcType=DECIMAL})"
"#{refundFee,jdbcType=DECIMAL}, #{agentKey,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(OutRechargeOrder record);
@ -96,7 +96,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="out_refund_no", property="outRefundNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_id", property="refundId", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL)
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL),
@Result(column="agent_key", property="agentKey", jdbcType=JdbcType.VARCHAR)
})
List<OutRechargeOrder> selectByExample(OutRechargeOrderExample example);
@ -105,7 +106,7 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"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, out_refund_no, ",
"refund_time, refund_id, refund_fee",
"refund_time, refund_id, refund_fee, agent_key",
"from out_recharge_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -133,7 +134,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="out_refund_no", property="outRefundNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="refund_id", property="refundId", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL)
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL),
@Result(column="agent_key", property="agentKey", jdbcType=JdbcType.VARCHAR)
})
OutRechargeOrder selectByPrimaryKey(Long id);
@ -170,7 +172,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"out_refund_no = #{outRefundNo,jdbcType=VARCHAR},",
"refund_time = #{refundTime,jdbcType=TIMESTAMP},",
"refund_id = #{refundId,jdbcType=VARCHAR},",
"refund_fee = #{refundFee,jdbcType=DECIMAL}",
"refund_fee = #{refundFee,jdbcType=DECIMAL},",
"agent_key = #{agentKey,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(OutRechargeOrder record);

@ -1,6 +1,7 @@
package com.hai.dao;
import com.hai.model.OutRechargeOrderModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
@ -11,8 +12,8 @@ import java.util.Map;
*/
public interface OutRechargeOrderMapperExt {
@Select({
"SELECT" +
@Select({"<script>" +
"SELECT" +
" a.order_no orderNo," +
" a.user_name userName," +
" a.user_phone userPhone," +
@ -21,7 +22,7 @@ public interface OutRechargeOrderMapperExt {
" a.recharge_name rechargeName," +
" a.id_card rechargeIdCard," +
" a.remarks remarks," +
" case a.pay_type when 1 then '支付方式' end payTypeName," +
" case a.pay_type when 1 then '微信' end payTypeName," +
" a.order_price orderPrice," +
" a.pay_price payPrice," +
" a.pay_real_price payRealPrice," +
@ -35,9 +36,19 @@ public interface OutRechargeOrderMapperExt {
" a.out_refund_no outRefundNo," +
" a.refund_id refundId" +
" FROM" +
" out_recharge_order a " +
" out_recharge_order a where 1 = 1 " +
"<if test='map.status != null'> and a.`status` = #{map.status} </if>",
"<if test='map.orderNo != null'> and a.`order_no` = #{map.orderNo} </if>",
"<if test='map.rechargeModel != null'> and a.`recharge_model` = #{map.rechargeModel} </if>",
"<if test='map.rechargeContent != null'> and a.`recharge_content` LIKE '%${map.rechargeContent}%' </if>",
"<if test='map.userPhone != null'> and a.`user_phone` = #{map.userPhone} </if>",
"<if test='map.createTimeS != null'> <![CDATA[ and a.create_timed >= #{map.createTimeS} ]]> </if>",
"<if test='map.createTimeE != null'> <![CDATA[ and a.create_timed <= #{map.createTimeE} ]]> </if>",
"<if test='map.payTimeS != null'> <![CDATA[ and a.pay_time >= #{map.payTimeS} ]]> </if>",
"<if test='map.payTimeE != null'> <![CDATA[ and a.pay_time <= #{map.payTimeE} ]]> </if>",
" ORDER BY" +
" a.create_timed DESC"
" a.create_timed DESC" +
"</script>"
})
List<OutRechargeOrderModel> selectOrderCount(Map<String,Object> map);
List<OutRechargeOrderModel> selectOrderCount(@Param("map") Map<String,Object> map);
}

@ -120,6 +120,10 @@ public class OutRechargeOrderSqlProvider {
sql.VALUES("refund_fee", "#{refundFee,jdbcType=DECIMAL}");
}
if (record.getAgentKey() != null) {
sql.VALUES("agent_key", "#{agentKey,jdbcType=VARCHAR}");
}
return sql.toString();
}
@ -153,6 +157,7 @@ public class OutRechargeOrderSqlProvider {
sql.SELECT("refund_time");
sql.SELECT("refund_id");
sql.SELECT("refund_fee");
sql.SELECT("agent_key");
sql.FROM("out_recharge_order");
applyWhere(sql, example, false);
@ -266,6 +271,10 @@ public class OutRechargeOrderSqlProvider {
sql.SET("refund_fee = #{record.refundFee,jdbcType=DECIMAL}");
}
if (record.getAgentKey() != null) {
sql.SET("agent_key = #{record.agentKey,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
@ -298,6 +307,7 @@ public class OutRechargeOrderSqlProvider {
sql.SET("refund_time = #{record.refundTime,jdbcType=TIMESTAMP}");
sql.SET("refund_id = #{record.refundId,jdbcType=VARCHAR}");
sql.SET("refund_fee = #{record.refundFee,jdbcType=DECIMAL}");
sql.SET("agent_key = #{record.agentKey,jdbcType=VARCHAR}");
OutRechargeOrderExample example = (OutRechargeOrderExample) parameter.get("example");
applyWhere(sql, example, true);
@ -400,6 +410,10 @@ public class OutRechargeOrderSqlProvider {
sql.SET("refund_fee = #{refundFee,jdbcType=DECIMAL}");
}
if (record.getAgentKey() != null) {
sql.SET("agent_key = #{agentKey,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();

@ -134,6 +134,11 @@ public class OutRechargeOrder implements Serializable {
*/
private BigDecimal refundFee;
/**
* 代理商编号
*/
private String agentKey;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -328,6 +333,14 @@ public class OutRechargeOrder implements Serializable {
this.refundFee = refundFee;
}
public String getAgentKey() {
return agentKey;
}
public void setAgentKey(String agentKey) {
this.agentKey = agentKey;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -363,7 +376,8 @@ public class OutRechargeOrder implements Serializable {
&& (this.getOutRefundNo() == null ? other.getOutRefundNo() == null : this.getOutRefundNo().equals(other.getOutRefundNo()))
&& (this.getRefundTime() == null ? other.getRefundTime() == null : this.getRefundTime().equals(other.getRefundTime()))
&& (this.getRefundId() == null ? other.getRefundId() == null : this.getRefundId().equals(other.getRefundId()))
&& (this.getRefundFee() == null ? other.getRefundFee() == null : this.getRefundFee().equals(other.getRefundFee()));
&& (this.getRefundFee() == null ? other.getRefundFee() == null : this.getRefundFee().equals(other.getRefundFee()))
&& (this.getAgentKey() == null ? other.getAgentKey() == null : this.getAgentKey().equals(other.getAgentKey()));
}
@Override
@ -394,6 +408,7 @@ public class OutRechargeOrder implements Serializable {
result = prime * result + ((getRefundTime() == null) ? 0 : getRefundTime().hashCode());
result = prime * result + ((getRefundId() == null) ? 0 : getRefundId().hashCode());
result = prime * result + ((getRefundFee() == null) ? 0 : getRefundFee().hashCode());
result = prime * result + ((getAgentKey() == null) ? 0 : getAgentKey().hashCode());
return result;
}
@ -427,6 +442,7 @@ public class OutRechargeOrder implements Serializable {
sb.append(", refundTime=").append(refundTime);
sb.append(", refundId=").append(refundId);
sb.append(", refundFee=").append(refundFee);
sb.append(", agentKey=").append(agentKey);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -1665,6 +1665,76 @@ public class OutRechargeOrderExample {
addCriterion("refund_fee not between", value1, value2, "refundFee");
return (Criteria) this;
}
public Criteria andAgentKeyIsNull() {
addCriterion("agent_key is null");
return (Criteria) this;
}
public Criteria andAgentKeyIsNotNull() {
addCriterion("agent_key is not null");
return (Criteria) this;
}
public Criteria andAgentKeyEqualTo(String value) {
addCriterion("agent_key =", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyNotEqualTo(String value) {
addCriterion("agent_key <>", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyGreaterThan(String value) {
addCriterion("agent_key >", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyGreaterThanOrEqualTo(String value) {
addCriterion("agent_key >=", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyLessThan(String value) {
addCriterion("agent_key <", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyLessThanOrEqualTo(String value) {
addCriterion("agent_key <=", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyLike(String value) {
addCriterion("agent_key like", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyNotLike(String value) {
addCriterion("agent_key not like", value, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyIn(List<String> values) {
addCriterion("agent_key in", values, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyNotIn(List<String> values) {
addCriterion("agent_key not in", values, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyBetween(String value1, String value2) {
addCriterion("agent_key between", value1, value2, "agentKey");
return (Criteria) this;
}
public Criteria andAgentKeyNotBetween(String value1, String value2) {
addCriterion("agent_key not between", value1, value2, "agentKey");
return (Criteria) this;
}
}
/**

@ -11,10 +11,9 @@ public class OutRechargeOrderModel {
private String rechargeModelName;
private String rechargeContent;
private String rechargeName;
private String rechargeIdCard;
private String remarks;
private String payTypeName;
private String orderPrice;
private BigDecimal orderPrice;
private BigDecimal payPrice;
private BigDecimal payRealPrice;
private String statusName;
@ -75,14 +74,6 @@ public class OutRechargeOrderModel {
this.rechargeName = rechargeName;
}
public String getRechargeIdCard() {
return rechargeIdCard;
}
public void setRechargeIdCard(String rechargeIdCard) {
this.rechargeIdCard = rechargeIdCard;
}
public String getRemarks() {
return remarks;
}
@ -99,11 +90,11 @@ public class OutRechargeOrderModel {
this.payTypeName = payTypeName;
}
public String getOrderPrice() {
public BigDecimal getOrderPrice() {
return orderPrice;
}
public void setOrderPrice(String orderPrice) {
public void setOrderPrice(BigDecimal orderPrice) {
this.orderPrice = orderPrice;
}

@ -77,7 +77,7 @@ public interface OutRechargeOrderService {
* @param map
* @return
*/
List<OutRechargeOrderModel> getOrderCount(Map<String,Object> map);
List<OutRechargeOrderModel> getOrderCount(Map<String,Object> map) throws Exception;
/**
* @Author Sum1Dream

@ -1,5 +1,6 @@
package com.hai.service.impl;
import com.hai.common.utils.DateUtil;
import com.hai.dao.OutRechargeOrderMapper;
import com.hai.entity.*;
import com.hai.model.OutRechargeOrderModel;
@ -105,7 +106,23 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
}
@Override
public List<OutRechargeOrderModel> getOrderCount(Map<String, Object> map) {
public List<OutRechargeOrderModel> getOrderCount(Map<String, Object> map) throws Exception {
if(MapUtils.getLong(map, "createTimeS") != null) {
map.put("createTimeS", DateUtil.date2String(new Date(MapUtils.getLong(map, "createTimeS")), "yyyy-MM-dd HH:mm:ss"));
}
if(MapUtils.getLong(map, "createTimeE") != null) {
map.put("createTimeE", DateUtil.date2String(new Date(MapUtils.getLong(map, "createTimeE")), "yyyy-MM-dd HH:mm:ss"));
}
if(MapUtils.getLong(map, "payTimeS") != null) {
map.put("payTimeS", DateUtil.date2String(new Date(MapUtils.getLong(map, "payTimeS")), "yyyy-MM-dd HH:mm:ss"));
}
if(MapUtils.getLong(map, "payTimeE") != null) {
map.put("payTimeE", DateUtil.date2String(new Date(MapUtils.getLong(map, "payTimeE")), "yyyy-MM-dd HH:mm:ss"));
}
return outRechargeOrderMapper.selectOrderCount(map);
}

Loading…
Cancel
Save