Merge branch 'master' into 2.0-dev

* master:
  修改配置星巴克 肯德基 会员充值 话费 微信商户号
  修改配置星巴克 肯德基 会员充值 话费 微信商户号

# Conflicts:
#	hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java
#	hai-cweb/src/main/java/com/cweb/controller/pay/ThirdOrderController.java
dev-discount
袁野 2 years ago
parent 58b46af401
commit 149c503efb
  1. 64
      hai-service/src/main/java/com/hai/enum_type/OrderproductTypeEnum.java
  2. 33
      hai-service/src/main/java/com/hai/order/type/OrderProductType.java
  3. 8
      hai-service/src/main/java/com/hai/service/impl/BsOrderRebateServiceImpl.java

@ -1,64 +0,0 @@
package com.hai.enum_type;
import java.util.Objects;
public enum OrderproductTypeEnum {
type1(1 , "星巴克" , "orderLogo/starbucks.png"),
type2(2 , "肯德基" , "orderLogo/kfc.png"),
type3(3 , "会员充值" , "orderLogo/member-top-up.png"),
type4(4 , "积分充值" , "orderLogo/integral-top-up.png"),
type5(5 , "购买卡券" , "orderLogo/coupon.png"),
type6(6 , "加油服务" , "orderLogo/refuel-online.png"),
type7(7 , "优惠券包" , "orderLogo/coupon-packs.png"),
type8(8 , "汇联通充值" , "orderLogo/hlt.png"),
type9(9 , "话费充值" , "orderLogo/calls.png"),
;
private Integer type;
private String name;
private String logoImg;
public static String getTypeByImgUrl(Integer type) {
for (OrderproductTypeEnum ele : values()) {
if(Objects.equals(type,ele.getType())) return ele.getLogoImg();
}
return null;
}
public static String getTypeByName(Integer type) {
for (OrderproductTypeEnum ele : values()) {
if(Objects.equals(type,ele.getType())) return ele.getName();
}
return null;
}
OrderproductTypeEnum(int type , String name , String logoImg) {
this.type = type;
this.name = name;
this.logoImg = logoImg;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getLogoImg() {
return logoImg;
}
public void setLogoImg(String logoImg) {
this.logoImg = logoImg;
}
}

@ -9,25 +9,28 @@ import java.util.Objects;
* @date: 2022/8/25
**/
public enum OrderProductType {
PRODUCT_TYPE1(1, "星巴克"),
PRODUCT_TYPE2(2, "肯德基"),
PRODUCT_TYPE3(3, "第三方充值"),
PRODUCT_TYPE4(4, "积分充值"),
PRODUCT_TYPE5(5, "购买卡券"),
PRODUCT_TYPE6(6, "加油订单"),
PRODUCT_TYPE7(7, "优惠券包"),
PRODUCT_TYPE8(8, "汇联通工会卡充值"),
PRODUCT_TYPE9(9, "话费充值"),
PRODUCT_TYPE10(10, "电影票"),
PRODUCT_TYPE1(1, "星巴克","orderLogo/starbucks.png"),
PRODUCT_TYPE2(2, "肯德基", "orderLogo/kfc.png"),
PRODUCT_TYPE3(3, "第三方充值", "orderLogo/member-top-up.png"),
PRODUCT_TYPE4(4, "积分充值", "orderLogo/integral-top-up.png"),
PRODUCT_TYPE5(5, "购买卡券", "orderLogo/coupon.png"),
PRODUCT_TYPE6(6, "在线加油" , "orderLogo/refuel-online.png"),
PRODUCT_TYPE7(7, "优惠券包", "orderLogo/coupon-packs.png"),
PRODUCT_TYPE8(8, "汇联通工会卡充值", "orderLogo/hlt.png"),
PRODUCT_TYPE9(9, "话费充值" , "orderLogo/calls.png"),
PRODUCT_TYPE10(10, "电影票" ,""),
;
private Integer number;
private String name;
OrderProductType(int number, String name) {
private String imgUrl;
OrderProductType(int number, String name , String imgUrl) {
this.number = number;
this.name = name;
this.imgUrl = imgUrl;
}
/**
@ -57,4 +60,12 @@ public enum OrderProductType {
public void setName(String name) {
this.name = name;
}
public String getImgUrl() {
return imgUrl;
}
public void setImgUrl(String imgUrl) {
this.imgUrl = imgUrl;
}
}

@ -7,7 +7,7 @@ import com.hai.entity.BsIntegralRebate;
import com.hai.entity.BsOrderRebate;
import com.hai.entity.BsOrderRebateExample;
import com.hai.entity.HighOrder;
import com.hai.enum_type.OrderproductTypeEnum;
import com.hai.order.type.OrderProductType;
import com.hai.service.*;
import org.springframework.stereotype.Service;
@ -91,9 +91,9 @@ public class BsOrderRebateServiceImpl implements BsOrderRebateService {
object.put("integralNumFirst" , integralNumFirst);
object.put("integralNumSecond" , integralNumSecond);
object.put("companyId", highOrder.getCompanyId());
object.put("remark" , OrderproductTypeEnum.getTypeByName(highOrder.getProductType()) + "订单:"+ highOrder.getTitle() + "-" + highOrder.getOrderNo() + "积分返利:");
object.put("name" , "下单" + OrderproductTypeEnum.getTypeByName(highOrder.getProductType()) + ":" + highOrder.getTitle());
object.put("logoImg" , OrderproductTypeEnum.getTypeByImgUrl(highOrder.getProductType()));
object.put("remark" , OrderProductType.getDataByType(highOrder.getProductType()).getName() + "订单:"+ highOrder.getTitle() + "-" + highOrder.getOrderNo() + "积分返利:");
object.put("name" , "下单" + OrderProductType.getDataByType(highOrder.getProductType()).getName() + ":" + highOrder.getTitle());
object.put("logoImg" , OrderProductType.getDataByType(highOrder.getProductType()).getImgUrl());
bsDistributionUserRelService.distributionRebate(object);
highUserService.goldHandle(highOrder.getMemId(), integralNum.intValue(), 1, 4, highOrder.getId(), object.getString("remark") + integralNum);

Loading…
Cancel
Save