Merge remote-tracking branch 'origin/2.0-dev' into 2.0-dev

new-dev
袁野 12 months ago
parent 8aee4f8fe5
commit b975a83f84
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  2. 10
      hai-cweb/src/main/java/com/cweb/controller/CommonController.java
  3. 6
      hai-order/src/main/java/com/web/controller/OrderPayController.java
  4. 103
      hai-order/src/main/java/com/web/controller/notify/GzNotifyController.java
  5. 13
      hai-schedule/src/main/java/com/hai/schedule/HighGasSchedule.java
  6. 49
      hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java
  7. 54
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  8. 9
      hai-service/src/main/java/com/hai/model/UserModel.java
  9. 11
      hai-service/src/main/java/com/hai/service/HighGasOilGunNoService.java
  10. 3
      hai-service/src/main/java/com/hai/service/HighGasOilPriceService.java
  11. 2
      hai-service/src/main/java/com/hai/service/HighGasService.java
  12. 2
      hai-service/src/main/java/com/hai/service/HighMerchantStoreService.java
  13. 6
      hai-service/src/main/java/com/hai/service/impl/BsDistributionUserRelServiceImpl.java
  14. 20
      hai-service/src/main/java/com/hai/service/impl/BsOrderRebateServiceImpl.java
  15. 14
      hai-service/src/main/java/com/hai/service/impl/HighGasOilGunNoServiceImpl.java
  16. 13
      hai-service/src/main/java/com/hai/service/impl/HighGasOilPriceServiceImpl.java
  17. 24
      hai-service/src/main/java/com/hai/service/impl/HighGasServiceImpl.java
  18. 5
      hai-service/src/main/java/com/hai/service/impl/HighMerchantStoreServiceImpl.java
  19. 5
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  20. 3
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  21. 6
      hai-service/src/main/resources/prod-9401/commonConfig.properties
  22. 6
      hai-service/src/main/resources/prod/commonConfig.properties

File diff suppressed because one or more lines are too long

@ -25,10 +25,8 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap; import java.util.stream.Collectors;
import java.util.List;
import java.util.Map;
@RestController @RestController
@ -142,7 +140,9 @@ public class CommonController {
public ResponseData getDictionaryByCodeType(@RequestParam(name = "codeType", required = true) String codeType) { public ResponseData getDictionaryByCodeType(@RequestParam(name = "codeType", required = true) String codeType) {
try { try {
return ResponseMsgUtil.success(commonService.getDictionarys(codeType)); List<SecDictionary> list = commonService.getDictionarys(codeType);
list = list.stream().sorted(Comparator.comparingDouble(entry -> entry.getSortId())).collect(Collectors.toList());
return ResponseMsgUtil.success(list);
} catch (Exception e) { } catch (Exception e) {
log.error("CommonController --> getDictionaryByCodeType() error!", e); log.error("CommonController --> getDictionaryByCodeType() error!", e);

@ -661,9 +661,15 @@ public class OrderPayController {
return ResponseMsgUtil.success(orderPayService.hltCardPay(order, userCard)); return ResponseMsgUtil.success(orderPayService.hltCardPay(order, userCard));
} else if (userCard.getType().equals(UserCardType.type2.getType())) { } else if (userCard.getType().equals(UserCardType.type2.getType())) {
if (order.getMemDiscountId() != null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "个人油卡不支持优惠券折扣!");
}
return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard)); return ResponseMsgUtil.success(orderPayService.oilCardPay(order, userCard));
} else if (userCard.getType().equals(UserCardType.type3.getType())) { } else if (userCard.getType().equals(UserCardType.type3.getType())) {
if (order.getMemDiscountId() != null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "车队油卡不支持优惠券折扣!");
}
return ResponseMsgUtil.success(orderPayService.oilCardFleetPay(order, userCard, body.getString("carLicensePlate") , body.getString("phone"))); return ResponseMsgUtil.success(orderPayService.oilCardFleetPay(order, userCard, body.getString("carLicensePlate") , body.getString("phone")));
} else { } else {

@ -0,0 +1,103 @@
package com.web.controller.notify;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.utils.AESTool;
import com.hai.common.utils.MD5Util;
import com.hai.config.ChongQingCNPCService;
import com.hai.config.CommonSysConst;
import com.hai.dao.HighGasOrderPushMapper;
import com.hai.entity.HighGasOrderPush;
import com.hai.enum_type.OrderPushType;
import com.hai.service.HighCouponCodeOtherService;
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.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value = "/gzNotify")
@Api(value = "贵州业务通知")
public class GzNotifyController {
private static final Logger log = LoggerFactory.getLogger(ScNotifyController.class);
@Resource
private HighCouponCodeOtherService couponCodeOtherService;
@Resource
private HighGasOrderPushMapper highGasOrderPushMapper;
@RequestMapping(value = "/gzPetroNotify", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "贵州中石油通知")
public Object scPetroNotify(@RequestBody String paramsStr) {
System.out.println(paramsStr);
log.info("贵州中石油核销通知");
log.info("通知参数:" + paramsStr);
try {
if (StringUtils.isNotBlank(paramsStr)) {
JSONObject sendMessage = JSONObject.parseObject(paramsStr).getJSONObject("sendMessage");
JSONObject body = ChongQingCNPCService.decryptBody(sendMessage.getString("body"));
HighGasOrderPush highGasOrderPush = new HighGasOrderPush();
highGasOrderPush.setType(OrderPushType.type10.getType());
highGasOrderPush.setOrderNo(body.getString("tradeId"));
highGasOrderPush.setCreateTime(new Date());
highGasOrderPush.setRequestContent("核销回调");
highGasOrderPush.setReturnContent(paramsStr);
highGasOrderPushMapper.insert(highGasOrderPush);
couponCodeOtherService.cqCnpcUseNotify(body);
Map<String, Object> param = new HashMap<>();
param.put("status", 1);
param.put("msg", "成功");
String verifyCode = AESTool.Encrypt(JSONObject.toJSONString(param), CommonSysConst.getSysConfig().getChongQingCnpcMerKey());
Map<String, Object> returnContent = new HashMap<>();
Map<String, Object> returnPostMessage = new HashMap<>();
Map<String, Object> returnHead = new HashMap<>();
returnHead.put("verifyCode", MD5Util.encode((verifyCode + CommonSysConst.getSysConfig().getChongQingCnpcMerKey()).getBytes()).toLowerCase());
returnHead.put("requestType", "couponNotice");
returnPostMessage.put("head", returnHead);
returnPostMessage.put("body", verifyCode);
returnContent.put("postMessage", returnPostMessage);
return returnContent;
} else {
Map<String, Object> param = new HashMap<>();
param.put("status", 0);
param.put("msg", "解析参数错误");
String verifyCode = AESTool.Encrypt(JSONObject.toJSONString(param), CommonSysConst.getSysConfig().getChongQingCnpcMerKey());
Map<String, Object> returnContent = new HashMap<>();
Map<String, Object> returnPostMessage = new HashMap<>();
Map<String, Object> returnHead = new HashMap<>();
returnHead.put("verifyCode", MD5Util.encode((verifyCode + CommonSysConst.getSysConfig().getChongQingCnpcMerKey()).getBytes()).toLowerCase());
returnHead.put("requestType", "couponNotice");
returnPostMessage.put("head", returnHead);
returnPostMessage.put("body", verifyCode);
returnContent.put("postMessage", returnPostMessage);
return returnContent;
}
} catch (Exception e) {
log.info("贵州中石油核销通知业务出现异常", e);
return null;
// return ResponseMsgUtil.exception(e);
}
}
}

@ -148,10 +148,10 @@ public class HighGasSchedule {
// } // }
// } // }
// @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次 @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
// public void getJiaHaoYouAllStation() throws Exception { public void getJiaHaoYouAllStation() throws Exception {
// gasService.getJiaHaoYouAllStation(); gasService.getJiaHaoYouAllStation();
// } }
// @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次 // @Scheduled(cron = "5 0 0 * * ?") // 每日凌晨00:00:5执行一次
// public void getPayloAllStation() throws Exception { // public void getPayloAllStation() throws Exception {
@ -163,5 +163,10 @@ public class HighGasSchedule {
// gasService.getDianAllStation(); // gasService.getDianAllStation();
// } // }
@Scheduled(cron = "7 0 0 * * ?") // 每日凌晨00:00:7执行一次
public void deleteOilNo() {
gasService.deleteOilNo();
}
} }

@ -74,29 +74,32 @@ public class HighOrderSchedule {
* @Param [] * @Param []
* @return void * @return void
*/ */
// @Scheduled(cron="0 0/10 * * * ?") //每 10分钟执行一次 @Scheduled(cron="0 0/10 * * * ?") //每 10分钟执行一次
// public void integralRebateOrder() { public void integralRebateOrder() {
//
// // 查询满足初步返利条件订单 // 查询满足初步返利条件订单
// List<HighOrder> order = highOrderService.integralRebateOrder(); List<HighOrder> order = highOrderService.integralRebateOrder();
// for (HighOrder highOrder : order) { for (HighOrder highOrder : order) {
//
// // 查询是否存在积分记录 // 查询是否存在积分记录
// Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
// map.put("goldType", 1); map.put("goldType", 1);
// map.put("resType", 4); map.put("resType", 4);
// map.put("userId", highOrder.getMemId()); map.put("userId", highOrder.getMemId());
// map.put("resId", highOrder.getId()); map.put("resId", highOrder.getId());
//
// List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map); List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map);
//
// // 判断是否重复赠送积分 // 判断是否重复赠送积分
// if (goldRecs.size() == 0) { if (goldRecs.size() == 0) {
// bsOrderRebateService.insertOrderRebate(highOrder); bsOrderRebateService.insertOrderRebate(highOrder);
// } }
//
// } highOrder.setWhetherRebate(true);
// } highOrderService.updateOrderDetail(highOrder);
}
}
} }

@ -1140,60 +1140,6 @@ public interface HighOrderMapperExt {
}) })
List<SelfOilStationModel> getSelfOilStationOrderList(@Param("goodsId") String goodsId); List<SelfOilStationModel> getSelfOilStationOrderList(@Param("goodsId") String goodsId);
@Select("select ho.* from high_order ho left join bs_order_rebate bor on ho.id = bor.order_id where bor.id is null and order_status = 3 and pay_type != 3 and pay_real_price > 0 and whether_rebate = false and ho.create_time > '2023-02-01 00:00:00' group by create_time desc;")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="title", property="title", jdbcType=JdbcType.VARCHAR),
@Result(column="search_title", property="searchTitle", jdbcType=JdbcType.VARCHAR),
@Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="company_name", property="companyName", jdbcType=JdbcType.VARCHAR),
@Result(column="promote_code", property="promoteCode", jdbcType=JdbcType.VARCHAR),
@Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT),
@Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR),
@Result(column="mem_id", property="memId", jdbcType=JdbcType.BIGINT),
@Result(column="mem_name", property="memName", jdbcType=JdbcType.VARCHAR),
@Result(column="mem_phone", property="memPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
@Result(column="mem_card_id", property="memCardId", jdbcType=JdbcType.BIGINT),
@Result(column="mem_card_type", property="memCardType", jdbcType=JdbcType.INTEGER),
@Result(column="mem_card_no", property="memCardNo", jdbcType=JdbcType.VARCHAR),
@Result(column="total_price", property="totalPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="total_deduction_price", property="totalDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_coupon_price", property="deductionCouponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="deduction_product_price", property="deductionProductPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_gold", property="payGold", jdbcType=JdbcType.INTEGER),
@Result(column="payable_price", property="payablePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="surplus_refund_price", property="surplusRefundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="surplus_refund_integral", property="surplusRefundIntegral", jdbcType=JdbcType.INTEGER),
@Result(column="pay_time", property="payTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_time", property="cancelTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="cancel_remarks", property="cancelRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
@Result(column="profit_sharing_status", property="profitSharingStatus", jdbcType=JdbcType.BIT),
@Result(column="profit_sharing_record_id", property="profitSharingRecordId", jdbcType=JdbcType.BIGINT),
@Result(column="whether_check", property="whetherCheck", jdbcType=JdbcType.BIT),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT),
@Result(column="exception_status", property="exceptionStatus", jdbcType=JdbcType.BIT),
@Result(column="exception_content", property="exceptionContent", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_4", property="ext4", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_5", property="ext5", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_6", property="ext6", jdbcType=JdbcType.VARCHAR)
})
List<HighOrder> integralRebateOrder();
@Select({"<script>" + @Select({"<script>" +
"SELECT" + "SELECT" +

@ -149,15 +149,6 @@ public class UserModel {
this.rechargeOrderNum = rechargeOrderNum; this.rechargeOrderNum = rechargeOrderNum;
} }
public Boolean getSetOilCard() {
return isSetOilCard;
}
public void setSetOilCard(Boolean setOilCard) {
isSetOilCard = setOilCard;
}
public Long getWhetherCheckNum() { public Long getWhetherCheckNum() {
return whetherCheckNum; return whetherCheckNum;
} }

@ -3,6 +3,7 @@ package com.hai.service;
import com.hai.entity.HighGasOilGunNo; import com.hai.entity.HighGasOilGunNo;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 油站枪号 * 油站枪号
@ -43,4 +44,14 @@ public interface HighGasOilGunNoService {
* @return * @return
*/ */
List<HighGasOilGunNo> getGunNoListByStoreId(Long storeId); List<HighGasOilGunNo> getGunNoListByStoreId(Long storeId);
/**
* @Author Sum1Dream
* @Name getGunNoList
* @Description //TODO
* @Date 18:06 2023/12/4
* @Param map
* @return java.util.List<com.hai.entity.HighGasOilGunNo>
*/
List<HighGasOilGunNo> getGunNoList(Map<String , Object> map);
} }

@ -60,5 +60,8 @@ public interface HighGasOilPriceService {
Map<String,Object> recentGasStation(String longitude,String latitude); Map<String,Object> recentGasStation(String longitude,String latitude);
List<HighGasOilPrice> getGasOilPriceList(Map<String , Object> map);
} }

@ -40,4 +40,6 @@ public interface HighGasService {
*/ */
BigDecimal getMerPriceByMerId(Long merId); BigDecimal getMerPriceByMerId(Long merId);
void deleteOilNo();
} }

@ -42,7 +42,7 @@ public interface HighMerchantStoreService {
* @param highMerchantStore * @param highMerchantStore
* @throws Exception * @throws Exception
*/ */
void updateMerchantStoreDetail(HighMerchantStore highMerchantStore) throws Exception; void updateMerchantStoreDetail(HighMerchantStore highMerchantStore);
/** /**
* @Author 胡锐 * @Author 胡锐

@ -186,11 +186,13 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
distributionRebate.setExt1(object.getString("logoImg")); distributionRebate.setExt1(object.getString("logoImg"));
if (distributionUserRel.getPopularizeUserId() != null) { if (distributionUserRel.getPopularizeUserId() != null) {
if (object.getInteger("integralNumFirst") != null) {
bsDistributionRebateMapper.insert(distributionRebate); bsDistributionRebateMapper.insert(distributionRebate);
// 上级返利 // 上级返利
highUserService.goldHandle(distributionUserRel.getPopularizeUserId(), object.getInteger("integralNumFirst"), highUserService.goldHandle(distributionUserRel.getPopularizeUserId(), object.getInteger("integralNumFirst"),
1, 4, object.getLong("userId") , 1, 4, object.getLong("userId") ,
user.getName() + "下单:获得返利" + object.getInteger("integralNumFirst") , ""); user.getName() + "下单:获得返利" + object.getInteger("integralNumFirst") , "");
}
// 查询下单用户顶级推广员 // 查询下单用户顶级推广员
Map<String , Object> mapTop = new HashMap<>(); Map<String , Object> mapTop = new HashMap<>();
@ -202,6 +204,8 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
distributionRebate.setIntegralNum(object.getBigDecimal("integralNumSecond")); distributionRebate.setIntegralNum(object.getBigDecimal("integralNumSecond"));
distributionRebate.setPopularizeUserId(distributionUserRelTop.getPopularizeUserId()); distributionRebate.setPopularizeUserId(distributionUserRelTop.getPopularizeUserId());
distributionRebate.setType(2); distributionRebate.setType(2);
if (object.getInteger("integralNumSecond") != null) {
bsDistributionRebateMapper.insert(distributionRebate); bsDistributionRebateMapper.insert(distributionRebate);
// 顶级返利 // 顶级返利
highUserService.goldHandle(distributionUserRelTop.getPopularizeUserId(), object.getInteger("integralNumSecond"), 1, 4, object.getLong("userId") , user.getName() + "下单:获得返利" + object.getInteger("integralNumSecond") , ""); highUserService.goldHandle(distributionUserRelTop.getPopularizeUserId(), object.getInteger("integralNumSecond"), 1, 4, object.getLong("userId") , user.getName() + "下单:获得返利" + object.getInteger("integralNumSecond") , "");
@ -209,6 +213,8 @@ public class BsDistributionUserRelServiceImpl implements BsDistributionUserRelSe
} }
} }
}
} }
} }

@ -73,18 +73,30 @@ public class BsOrderRebateServiceImpl implements BsOrderRebateService {
BsIntegralRebate bsIntegralRebate = bsIntegralRebateService.findIntegralRebateByMap(map); BsIntegralRebate bsIntegralRebate = bsIntegralRebateService.findIntegralRebateByMap(map);
// 判断是否配置返利内容 // 判断是否配置返利内容
if (bsIntegralRebate != null) { if (bsIntegralRebate != null) {
// 判断是否在返利条件 // 判断是否在返利条件
if (DateUtil.isEffectiveDate(highOrder.getCreateTime(), bsIntegralRebate.getStartTime() , bsIntegralRebate.getEndTime())) { if (DateUtil.isEffectiveDate(highOrder.getCreateTime(), bsIntegralRebate.getStartTime() , bsIntegralRebate.getEndTime())) {
BigDecimal integralNum = null;
BigDecimal integralNumFirst = null;
BigDecimal integralNumSecond = null;
if (bsIntegralRebate.getPercentage() != null) {
// 积分返利积分 // 积分返利积分
BigDecimal integralNum = highOrder.getPayRealPrice().multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP ); integralNum = highOrder.getPayRealPrice().multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP );
}
if (bsIntegralRebate.getFirstDistribution() != null) {
// 1级分销 // 1级分销
BigDecimal integralNumFirst = highOrder.getPayRealPrice().multiply(bsIntegralRebate.getFirstDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP ); integralNumFirst = highOrder.getPayRealPrice().multiply(bsIntegralRebate.getFirstDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP );
}
if (bsIntegralRebate.getSecondDistribution() != null) {
// 2级分销 // 2级分销
BigDecimal integralNumSecond = highOrder.getPayRealPrice().multiply(bsIntegralRebate.getSecondDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP ); integralNumSecond = highOrder.getPayRealPrice().multiply(bsIntegralRebate.getSecondDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP );
}
// 定义请求对象 // 定义请求对象
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
@ -98,6 +110,7 @@ public class BsOrderRebateServiceImpl implements BsOrderRebateService {
object.put("name" , "下单" + OrderProductType.getDataByType(highOrder.getProductType()).getName() + ":" + highOrder.getTitle()); object.put("name" , "下单" + OrderProductType.getDataByType(highOrder.getProductType()).getName() + ":" + highOrder.getTitle());
object.put("logoImg" , OrderProductType.getDataByType(highOrder.getProductType()).getImgUrl()); object.put("logoImg" , OrderProductType.getDataByType(highOrder.getProductType()).getImgUrl());
bsDistributionUserRelService.distributionRebate(object); bsDistributionUserRelService.distributionRebate(object);
highUserService.goldHandle(highOrder.getMemId(), integralNum.intValue(), 1, 4, highOrder.getId(), object.getString("remark") + integralNum , highOrder.getOrderNo()); highUserService.goldHandle(highOrder.getMemId(), integralNum.intValue(), 1, 4, highOrder.getId(), object.getString("remark") + integralNum , highOrder.getOrderNo());
@ -112,6 +125,7 @@ public class BsOrderRebateServiceImpl implements BsOrderRebateService {
orderRebate.setUserId(highOrder.getMemId()); orderRebate.setUserId(highOrder.getMemId());
orderRebate.setUserName(highOrder.getMemName()); orderRebate.setUserName(highOrder.getMemName());
bsOrderRebateMapper.insert(orderRebate); bsOrderRebateMapper.insert(orderRebate);
} }
} }

@ -4,11 +4,13 @@ import com.hai.dao.HighGasOilGunNoMapper;
import com.hai.entity.HighGasOilGunNo; import com.hai.entity.HighGasOilGunNo;
import com.hai.entity.HighGasOilGunNoExample; import com.hai.entity.HighGasOilGunNoExample;
import com.hai.service.HighGasOilGunNoService; import com.hai.service.HighGasOilGunNoService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
@Service("gasOilGunNoService") @Service("gasOilGunNoService")
public class HighGasOilGunNoServiceImpl implements HighGasOilGunNoService { public class HighGasOilGunNoServiceImpl implements HighGasOilGunNoService {
@ -56,4 +58,16 @@ public class HighGasOilGunNoServiceImpl implements HighGasOilGunNoService {
example.createCriteria().andStoreIdEqualTo(storeId).andStatusNotEqualTo(0); example.createCriteria().andStoreIdEqualTo(storeId).andStatusNotEqualTo(0);
return gasOilGunNoMapper.selectByExample(example); return gasOilGunNoMapper.selectByExample(example);
} }
@Override
public List<HighGasOilGunNo> getGunNoList(Map<String, Object> map) {
HighGasOilGunNoExample example = new HighGasOilGunNoExample();
HighGasOilGunNoExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "oilType") != null) {
criteria.andOilTypeEqualTo(MapUtils.getInteger(map, "oilType"));
}
criteria.andStatusEqualTo(1);
return gasOilGunNoMapper.selectByExample(example);
}
} }

@ -1,10 +1,12 @@
package com.hai.service.impl; package com.hai.service.impl;
import com.hai.dao.HighGasOilPriceMapper; import com.hai.dao.HighGasOilPriceMapper;
import com.hai.entity.HighGasOilGunNoExample;
import com.hai.entity.HighGasOilPrice; import com.hai.entity.HighGasOilPrice;
import com.hai.entity.HighGasOilPriceExample; import com.hai.entity.HighGasOilPriceExample;
import com.hai.enum_type.GasOilPriceStatusEnum; import com.hai.enum_type.GasOilPriceStatusEnum;
import com.hai.service.HighGasOilPriceService; import com.hai.service.HighGasOilPriceService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -65,5 +67,16 @@ public class HighGasOilPriceServiceImpl implements HighGasOilPriceService {
return highGasOilPriceMapper.recentGasStation(longitude, latitude); return highGasOilPriceMapper.recentGasStation(longitude, latitude);
} }
@Override
public List<HighGasOilPrice> getGasOilPriceList(Map<String, Object> map) {
HighGasOilPriceExample example = new HighGasOilPriceExample();
HighGasOilPriceExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "oilType") != null) {
criteria.andOilTypeEqualTo(MapUtils.getInteger(map, "oilType"));
}
criteria.andStatusEqualTo(1);
return highGasOilPriceMapper.selectByExample(example);
}
} }

@ -16,12 +16,16 @@ import com.hai.model.HighMerchantModel;
import com.hai.model.HighMerchantStoreModel; import com.hai.model.HighMerchantStoreModel;
import com.hai.service.*; import com.hai.service.*;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.bouncycastle.crypto.tls.MACAlgorithm;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service("gasService") @Service("gasService")
public class HighGasServiceImpl implements HighGasService { public class HighGasServiceImpl implements HighGasService {
@ -756,4 +760,24 @@ public class HighGasServiceImpl implements HighGasService {
} }
return account; return account;
} }
@Override
public void deleteOilNo() {
Map<String , Object> map = new HashMap<>();
map.put("oilType" , 2);
List<HighGasOilGunNo> list = gasOilGunNoService.getGunNoList(map);
for (HighGasOilGunNo gasOilGunNo : list) {
gasOilGunNo.setStatus(0);
gasOilGunNoService.editGunNo(gasOilGunNo);
}
List<HighGasOilPrice> gasOilPriceList = highGasOilPriceService.getGasOilPriceList(map);
for (HighGasOilPrice gasOilPrice : gasOilPriceList) {
gasOilPrice.setStatus(0);
highGasOilPriceService.editGasOilPrice(gasOilPrice);
}
}
} }

@ -109,7 +109,7 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
} }
@Override @Override
public void updateMerchantStoreDetail(HighMerchantStore highMerchantStore) throws Exception { public void updateMerchantStoreDetail(HighMerchantStore highMerchantStore) {
highMerchantStoreMapper.updateByPrimaryKey(highMerchantStore); highMerchantStoreMapper.updateByPrimaryKey(highMerchantStore);
} }
@ -214,6 +214,9 @@ public class HighMerchantStoreServiceImpl implements HighMerchantStoreService {
if (MapUtils.getLong(map, "companyId") != null) { if (MapUtils.getLong(map, "companyId") != null) {
criteria.andCompanyIdEqualTo(MapUtils.getLong(map, "companyId")); criteria.andCompanyIdEqualTo(MapUtils.getLong(map, "companyId"));
} }
if (MapUtils.getLong(map, "regionId") != null) {
criteria.andRegionIdEqualTo(MapUtils.getLong(map, "regionId"));
}
if (MapUtils.getLong(map, "merchantId") != null) { if (MapUtils.getLong(map, "merchantId") != null) {
criteria.andMerchantIdEqualTo(MapUtils.getLong(map, "merchantId")); criteria.andMerchantIdEqualTo(MapUtils.getLong(map, "merchantId"));

@ -2253,7 +2253,10 @@ public class HighOrderServiceImpl implements HighOrderService {
@Override @Override
public List<HighOrder> integralRebateOrder() { public List<HighOrder> integralRebateOrder() {
return highOrderMapper.integralRebateOrder(); HighOrderExample example = new HighOrderExample();
HighOrderExample.Criteria criteria = example.createCriteria();
criteria.andOrderStatusEqualTo(3).andWhetherRebateEqualTo(false).andPayRealPriceGreaterThan(new BigDecimal(0)).andPayTypeNotEqualTo(3);
return highOrderMapper.selectByExample(example);
} }
// todo 废弃代码 // todo 废弃代码

@ -304,7 +304,7 @@ public class HighUserServiceImpl implements HighUserService {
@Override @Override
@Transactional(propagation= Propagation.REQUIRES_NEW) @Transactional(propagation= Propagation.REQUIRES_NEW)
public HighUser bindUserPhone(String phone, HttpServletRequest request) throws Exception { public HighUser bindUserPhone(String phone, HttpServletRequest request) {
// 用户 // 用户
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
@ -371,6 +371,7 @@ public class HighUserServiceImpl implements HighUserService {
@Override @Override
@Transactional(propagation= Propagation.REQUIRED) @Transactional(propagation= Propagation.REQUIRED)
public void goldHandle(Long userId, Integer goldNum, Integer goldType, Integer resType, Long resId , String remark , String orderNo) { public void goldHandle(Long userId, Integer goldNum, Integer goldType, Integer resType, Long resId , String remark , String orderNo) {
System.out.println("--------------------" + goldNum);
// 查询用户信息 // 查询用户信息
HighUser user = highUserMapper.selectByPrimaryKey(userId); HighUser user = highUserMapper.selectByPrimaryKey(userId);
if (user == null) { if (user == null) {

@ -139,3 +139,9 @@ ScPetroUrl = http://43.136.176.177:8081/hd-api/out/
ScPetroAppid = 510000313181602615 ScPetroAppid = 510000313181602615
ScPetroAppKey = 510000kA5kxtaDnx3V6HE ScPetroAppKey = 510000kA5kxtaDnx3V6HE
ScPetroAesKey = AptFsUgpgAij3evH7rm4ubTKu5viSx9U ScPetroAesKey = AptFsUgpgAij3evH7rm4ubTKu5viSx9U
GzPetroUrl = http://43.136.176.177:8080/hd-api/out/
GzPetroAppid = 520000325108579843
GzPetroAppKey = 520000A3CVdd4vmcjtkDR
GzPetroAesKey = A39Yu3YcxtpM2UdiSMef6e7pcjmbkFi7

@ -147,6 +147,6 @@ ScPetroAesKey = AueRgSEVwPg87ebYhbYvfxMM3XAkvimu
#ScPetroAesKey = AptFsUgpgAij3evH7rm4ubTKu5viSx9U #ScPetroAesKey = AptFsUgpgAij3evH7rm4ubTKu5viSx9U
GzPetroUrl = http://43.136.176.177:8080/hd-api/out/ GzPetroUrl = http://43.136.176.177:8080/hd-api/out/
GzPetroAppid = 520000087256385445 GzPetroAppid = 520000325108579843
GzPetroAppKey = 520000eEMUAwVr88FpWWV GzPetroAppKey = 520000A3CVdd4vmcjtkDR
GzPetroAesKey = AWppsMKHmj9hd4vtdiR9vdnr5sgv7c8W GzPetroAesKey = A39Yu3YcxtpM2UdiSMef6e7pcjmbkFi7

Loading…
Cancel
Save