Merge branch 'dev' into pre

* dev:
  1
  修改话费定时任务问题
  1
  1
dev-discount
袁野 2 years ago
commit def8091648
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 3
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  3. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  4. 19
      hai-service/src/main/java/com/hai/dao/HighOrderMapper.java
  5. 2
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  6. 14
      hai-service/src/main/java/com/hai/dao/HighOrderSqlProvider.java
  7. 34
      hai-service/src/main/java/com/hai/entity/HighOrder.java
  8. 60
      hai-service/src/main/java/com/hai/entity/HighOrderExample.java
  9. 10
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
  10. 7
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  11. 9
      v1/src/main/java/com/v1/controller/HighOrderController.java

File diff suppressed because one or more lines are too long

@ -444,13 +444,14 @@ public class HighOrderController {
if (request.getHeader("regionId") != null) {
if (request.getHeader("regionId") != null && request.getHeader("regionId").length() != 0) {
SecRegion region = commonService.getParentByRegion(Long.valueOf(request.getHeader("regionId")));
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString());
highOrder.setCompanyId(bsCompany.getId());
}
highOrder.setMerchId(request.getHeader("mchId"));
highOrder.setWhetherRebate(false);
highOrder.setTotalPrice(totalPrice);
highOrder.setPayablePrice(totalActualPrice);

File diff suppressed because one or more lines are too long

@ -58,9 +58,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"profit_sharing_ratio, account_merchant_num, ",
"product_type, print_status, ",
"print_num, whether_check, ",
"region_id, company_id, ",
"merch_id, ext_1, ext_2, ",
"ext_3)",
"whether_rebate, region_id, ",
"company_id, merch_id, ",
"ext_1, ext_2, ext_3)",
"values (#{orderNo,jdbcType=VARCHAR}, #{memDiscountId,jdbcType=BIGINT}, ",
"#{memDiscountName,jdbcType=VARCHAR}, #{memId,jdbcType=BIGINT}, ",
"#{memName,jdbcType=VARCHAR}, #{memPhone,jdbcType=VARCHAR}, ",
@ -80,9 +80,9 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"#{profitSharingRatio,jdbcType=DECIMAL}, #{accountMerchantNum,jdbcType=VARCHAR}, ",
"#{productType,jdbcType=INTEGER}, #{printStatus,jdbcType=BIT}, ",
"#{printNum,jdbcType=INTEGER}, #{whetherCheck,jdbcType=BIT}, ",
"#{regionId,jdbcType=VARCHAR}, #{companyId,jdbcType=BIGINT}, ",
"#{merchId,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
"#{whetherRebate,jdbcType=BIT}, #{regionId,jdbcType=VARCHAR}, ",
"#{companyId,jdbcType=BIGINT}, #{merchId,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighOrder record);
@ -132,6 +132,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="print_status", property="printStatus", jdbcType=JdbcType.BIT),
@Result(column="print_num", property="printNum", jdbcType=JdbcType.INTEGER),
@Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="merch_id", property="merchId", jdbcType=JdbcType.VARCHAR),
@ -149,8 +150,8 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"total_price, create_time, pay_time, cancel_time, cancel_remarks, finish_time, ",
"remarks, refund_no, refund_time, refund_price, refund_content, refusal_refund_content, ",
"Identification_code, profit_sharing_status, profit_sharing_ratio, account_merchant_num, ",
"product_type, print_status, print_num, whether_check, region_id, company_id, ",
"merch_id, ext_1, ext_2, ext_3",
"product_type, print_status, print_num, whether_check, whether_rebate, region_id, ",
"company_id, merch_id, ext_1, ext_2, ext_3",
"from high_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -194,6 +195,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
@Result(column="print_status", property="printStatus", jdbcType=JdbcType.BIT),
@Result(column="print_num", property="printNum", jdbcType=JdbcType.INTEGER),
@Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT),
@Result(column="region_id", property="regionId", jdbcType=JdbcType.VARCHAR),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="merch_id", property="merchId", jdbcType=JdbcType.VARCHAR),
@ -252,6 +254,7 @@ public interface HighOrderMapper extends HighOrderMapperExt {
"print_status = #{printStatus,jdbcType=BIT},",
"print_num = #{printNum,jdbcType=INTEGER},",
"whether_check = #{whetherCheck,jdbcType=BIT},",
"whether_rebate = #{whetherRebate,jdbcType=BIT},",
"region_id = #{regionId,jdbcType=VARCHAR},",
"company_id = #{companyId,jdbcType=BIGINT},",
"merch_id = #{merchId,jdbcType=VARCHAR},",

@ -1250,7 +1250,7 @@ public interface HighOrderMapperExt {
})
List<SelfOilStationModel> getSelfOilStationOrderList(@Param("goodsId") String goodsId);
@Select("select * from high_order where order_status = 3 and pay_type != 3 and pay_real_price > 0 ")
@Select("select * from high_order where order_status = 3 and pay_type != 3 and pay_real_price > 0 and whether_rebate = false ")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),

@ -180,6 +180,10 @@ public class HighOrderSqlProvider {
sql.VALUES("whether_check", "#{whetherCheck,jdbcType=BIT}");
}
if (record.getWhetherRebate() != null) {
sql.VALUES("whether_rebate", "#{whetherRebate,jdbcType=BIT}");
}
if (record.getRegionId() != null) {
sql.VALUES("region_id", "#{regionId,jdbcType=VARCHAR}");
}
@ -252,6 +256,7 @@ public class HighOrderSqlProvider {
sql.SELECT("print_status");
sql.SELECT("print_num");
sql.SELECT("whether_check");
sql.SELECT("whether_rebate");
sql.SELECT("region_id");
sql.SELECT("company_id");
sql.SELECT("merch_id");
@ -431,6 +436,10 @@ public class HighOrderSqlProvider {
sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}");
}
if (record.getWhetherRebate() != null) {
sql.SET("whether_rebate = #{record.whetherRebate,jdbcType=BIT}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
}
@ -502,6 +511,7 @@ public class HighOrderSqlProvider {
sql.SET("print_status = #{record.printStatus,jdbcType=BIT}");
sql.SET("print_num = #{record.printNum,jdbcType=INTEGER}");
sql.SET("whether_check = #{record.whetherCheck,jdbcType=BIT}");
sql.SET("whether_rebate = #{record.whetherRebate,jdbcType=BIT}");
sql.SET("region_id = #{record.regionId,jdbcType=VARCHAR}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("merch_id = #{record.merchId,jdbcType=VARCHAR}");
@ -670,6 +680,10 @@ public class HighOrderSqlProvider {
sql.SET("whether_check = #{whetherCheck,jdbcType=BIT}");
}
if (record.getWhetherRebate() != null) {
sql.SET("whether_rebate = #{whetherRebate,jdbcType=BIT}");
}
if (record.getRegionId() != null) {
sql.SET("region_id = #{regionId,jdbcType=VARCHAR}");
}

@ -210,6 +210,11 @@ public class HighOrder implements Serializable {
*/
private Boolean whetherCheck;
/**
* 是否返利
*/
private Boolean whetherRebate;
/**
* 区域编码
*/
@ -228,6 +233,7 @@ public class HighOrder implements Serializable {
private String ext3;
private String payPwd;
private List<HighChildOrder> highChildOrderList;
@ -245,15 +251,8 @@ public class HighOrder implements Serializable {
*/
private Boolean buyPoints;
private static final long serialVersionUID = 1L;
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getPayPwd() {
return payPwd;
@ -295,6 +294,14 @@ public class HighOrder implements Serializable {
this.gasStaffCode = gasStaffCode;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public Boolean getBuyPoints() {
return buyPoints;
}
@ -303,6 +310,8 @@ public class HighOrder implements Serializable {
this.buyPoints = buyPoints;
}
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
@ -615,6 +624,14 @@ public class HighOrder implements Serializable {
this.whetherCheck = whetherCheck;
}
public Boolean getWhetherRebate() {
return whetherRebate;
}
public void setWhetherRebate(Boolean whetherRebate) {
this.whetherRebate = whetherRebate;
}
public String getRegionId() {
return regionId;
}
@ -714,6 +731,7 @@ public class HighOrder implements Serializable {
&& (this.getPrintStatus() == null ? other.getPrintStatus() == null : this.getPrintStatus().equals(other.getPrintStatus()))
&& (this.getPrintNum() == null ? other.getPrintNum() == null : this.getPrintNum().equals(other.getPrintNum()))
&& (this.getWhetherCheck() == null ? other.getWhetherCheck() == null : this.getWhetherCheck().equals(other.getWhetherCheck()))
&& (this.getWhetherRebate() == null ? other.getWhetherRebate() == null : this.getWhetherRebate().equals(other.getWhetherRebate()))
&& (this.getRegionId() == null ? other.getRegionId() == null : this.getRegionId().equals(other.getRegionId()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getMerchId() == null ? other.getMerchId() == null : this.getMerchId().equals(other.getMerchId()))
@ -765,6 +783,7 @@ public class HighOrder implements Serializable {
result = prime * result + ((getPrintStatus() == null) ? 0 : getPrintStatus().hashCode());
result = prime * result + ((getPrintNum() == null) ? 0 : getPrintNum().hashCode());
result = prime * result + ((getWhetherCheck() == null) ? 0 : getWhetherCheck().hashCode());
result = prime * result + ((getWhetherRebate() == null) ? 0 : getWhetherRebate().hashCode());
result = prime * result + ((getRegionId() == null) ? 0 : getRegionId().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getMerchId() == null) ? 0 : getMerchId().hashCode());
@ -819,6 +838,7 @@ public class HighOrder implements Serializable {
sb.append(", printStatus=").append(printStatus);
sb.append(", printNum=").append(printNum);
sb.append(", whetherCheck=").append(whetherCheck);
sb.append(", whetherRebate=").append(whetherRebate);
sb.append(", regionId=").append(regionId);
sb.append(", companyId=").append(companyId);
sb.append(", merchId=").append(merchId);

@ -2586,6 +2586,66 @@ public class HighOrderExample {
return (Criteria) this;
}
public Criteria andWhetherRebateIsNull() {
addCriterion("whether_rebate is null");
return (Criteria) this;
}
public Criteria andWhetherRebateIsNotNull() {
addCriterion("whether_rebate is not null");
return (Criteria) this;
}
public Criteria andWhetherRebateEqualTo(Boolean value) {
addCriterion("whether_rebate =", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateNotEqualTo(Boolean value) {
addCriterion("whether_rebate <>", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateGreaterThan(Boolean value) {
addCriterion("whether_rebate >", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateGreaterThanOrEqualTo(Boolean value) {
addCriterion("whether_rebate >=", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateLessThan(Boolean value) {
addCriterion("whether_rebate <", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateLessThanOrEqualTo(Boolean value) {
addCriterion("whether_rebate <=", value, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateIn(List<Boolean> values) {
addCriterion("whether_rebate in", values, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateNotIn(List<Boolean> values) {
addCriterion("whether_rebate not in", values, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateBetween(Boolean value1, Boolean value2) {
addCriterion("whether_rebate between", value1, value2, "whetherRebate");
return (Criteria) this;
}
public Criteria andWhetherRebateNotBetween(Boolean value1, Boolean value2) {
addCriterion("whether_rebate not between", value1, value2, "whetherRebate");
return (Criteria) this;
}
public Criteria andRegionIdIsNull() {
addCriterion("region_id is null");
return (Criteria) this;

@ -5,7 +5,9 @@ import com.hai.common.utils.DateUtil;
import com.hai.dao.BsIntegralRebateMapper;
import com.hai.entity.BsIntegralRebate;
import com.hai.entity.BsIntegralRebateExample;
import com.hai.entity.HighOrder;
import com.hai.service.BsIntegralRebateService;
import com.hai.service.HighOrderService;
import com.hai.service.HighUserService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
@ -25,6 +27,9 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
@Resource
private HighUserService highUserService;
@Resource
private HighOrderService highOrderService;
@Override
public BsIntegralRebate findIntegralRebateByMap(Map<String, Object> map) {
@ -100,6 +105,11 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
BsIntegralRebate bsIntegralRebate = findIntegralRebateByMap(map);
if (DateUtil.isEffectiveDate(object.getDate("createTime"), bsIntegralRebate.getStartTime() , bsIntegralRebate.getEndTime())) {
HighOrder order = highOrderService.getOrderById(object.getLong("orderId"));
order.setWhetherRebate(true);
BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP );
highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum);

@ -1608,6 +1608,11 @@ public class HighOrderServiceImpl implements HighOrderService {
if (MapUtils.getString(map, "merchId") != null) {
criteria.andMerchIdEqualTo(MapUtils.getString(map, "merchId"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "createTimeS")) && StringUtils.isNotBlank(MapUtils.getString(map, "createTimeE"))) {
criteria.andCreateTimeBetween(
DateUtil.format(MapUtils.getString(map, "createTimeS"), "yyyy-MM-dd HH:mm:ss"),
DateUtil.format(MapUtils.getString(map, "createTimeE"), "yyyy-MM-dd HH:mm:ss"));
}
example.setOrderByClause("create_time desc");
List<HighOrder> list = highOrderMapper.selectByExample(example);
@ -2217,6 +2222,7 @@ public class HighOrderServiceImpl implements HighOrderService {
HighOrder highOrder = new HighOrder();
highOrder.setMerchId(object.getString("mchId"));
highOrder.setWhetherRebate(false);
HighUser user = highUserService.findByUserId(object.getLong("userId"));
JSONObject jsonObject = null;
@ -2688,6 +2694,7 @@ public class HighOrderServiceImpl implements HighOrderService {
order.setOrderStatus(2);
order.setMemCardNo(userCard.getCardNo());
order.setPayType(4);
order.setPayTime(new Date()); // 支付时间
updateOrder(order);

@ -71,6 +71,9 @@ public class HighOrderController {
}
if (StringUtils.isBlank(object.getString("apiKey")) ||
StringUtils.isBlank(object.getString("merchId")) ||
StringUtils.isBlank(object.getString("createTimeS")) ||
StringUtils.isBlank(object.getString("createTimeE")) ||
StringUtils.isBlank(object.getString("merchId")) ||
StringUtils.isBlank(object.getString("timetable")) ||
StringUtils.isBlank(object.getString("sign"))
@ -90,6 +93,8 @@ public class HighOrderController {
map.put("apiKey" , object.getString("apiKey"));
map.put("timetable" , object.getString("timetable"));
map.put("merchId" , object.getString("merchId"));
map.put("createTimeS" , object.getString("createTimeS"));
map.put("createTimeE" , object.getString("createTimeE"));
if (!secConfigService.isSignVerify(map , object.getString("sign"))) {
log.error("getRechargeProduct error!", "签名校验失败!");
@ -133,6 +138,8 @@ public class HighOrderController {
if (StringUtils.isBlank(object.getString("apiKey")) ||
StringUtils.isBlank(object.getString("merchId")) ||
StringUtils.isBlank(object.getString("createTimeS")) ||
StringUtils.isBlank(object.getString("createTimeE")) ||
StringUtils.isBlank(object.getString("timetable")) ||
StringUtils.isBlank(object.getString("sign"))
) {
@ -151,6 +158,8 @@ public class HighOrderController {
map.put("apiKey" , object.getString("apiKey"));
map.put("timetable" , object.getString("timetable"));
map.put("merchId" , object.getString("merchId"));
map.put("createTimeS" , object.getString("createTimeS"));
map.put("createTimeE" , object.getString("createTimeE"));
if (!secConfigService.isSignVerify(map , object.getString("sign"))) {
log.error("getRechargeProduct error!", "签名校验失败!");

Loading…
Cancel
Save