Merge branch 'dev_yy' into order_yy

* dev_yy: (24 commits)
  提交代码修改
  修改话费查询bug
  修改星巴克下架问题
  1
  修改区域公司
  修改区域公司
  提交代码
  提交代码
  1
  提交代码
  修改区域公司
  修改区域公司
  1
  1
  1.提交代码
  修改区域公司
  修改区域公司
  修改区域公司
  修改区域公司
  提交代码
  ...

# Conflicts:
#	hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java
#	hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
dev-discount
袁野 2 years ago
commit f6b80b4fa0
  1. 2
      hai-bweb/src/main/java/com/bweb/controller/BsDistributionUserRelController.java
  2. 34
      hai-bweb/src/main/java/com/bweb/controller/HighApproveController.java
  3. 23
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java
  4. 12
      hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java
  5. 2
      hai-bweb/src/main/java/com/bweb/controller/OutRechargeOrderController.java
  6. 124
      hai-cweb/src/main/java/com/cweb/controller/CommonController.java
  7. 5
      hai-cweb/src/main/java/com/cweb/controller/HighGasController.java
  8. 35
      hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java
  9. 8
      hai-cweb/src/main/java/com/cweb/controller/HighUserCommonController.java
  10. 2
      hai-cweb/src/main/java/com/cweb/controller/HighUserController.java
  11. 39
      hai-cweb/src/main/java/com/cweb/controller/WechatController.java
  12. 47
      hai-cweb/src/main/java/com/cweb/controller/pay/CzOrderController.java
  13. 2
      hai-cweb/src/main/resources/dev/logback.xml
  14. 11
      hai-schedule/src/main/java/com/hai/schedule/HighCouponSchedule.java
  15. 39
      hai-schedule/src/main/java/com/hai/schedule/HighOrderSchedule.java
  16. 2
      hai-schedule/src/main/java/com/hai/schedule/HighTestController.java
  17. 2
      hai-schedule/src/main/resources/prod/logback.xml
  18. 10
      hai-service/src/main/java/com/hai/common/utils/CommonUtil.java
  19. 54
      hai-service/src/main/java/com/hai/common/utils/WxUtils.java
  20. 1
      hai-service/src/main/java/com/hai/config/UnionUserConfig.java
  21. 66
      hai-service/src/main/java/com/hai/dao/HighApproveMapper.java
  22. 80
      hai-service/src/main/java/com/hai/dao/HighApproveSqlProvider.java
  23. 2
      hai-service/src/main/java/com/hai/dao/HighOrderMapperExt.java
  24. 37
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapper.java
  25. 50
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderMapperExt.java
  26. 84
      hai-service/src/main/java/com/hai/dao/OutRechargeOrderSqlProvider.java
  27. 20
      hai-service/src/main/java/com/hai/entity/ApiStarbucksProducts.java
  28. 20
      hai-service/src/main/java/com/hai/entity/HighApprove.java
  29. 47
      hai-service/src/main/java/com/hai/entity/HighApproveExample.java
  30. 85
      hai-service/src/main/java/com/hai/entity/OutRechargeOrder.java
  31. 400
      hai-service/src/main/java/com/hai/entity/OutRechargeOrderExample.java
  32. 3
      hai-service/src/main/java/com/hai/enum_type/ApproveType.java
  33. 18
      hai-service/src/main/java/com/hai/service/BsIntegralRebateService.java
  34. 14
      hai-service/src/main/java/com/hai/service/CommonService.java
  35. 17
      hai-service/src/main/java/com/hai/service/HighCouponService.java
  36. 2
      hai-service/src/main/java/com/hai/service/HighOrderService.java
  37. 10
      hai-service/src/main/java/com/hai/service/HighUserService.java
  38. 9
      hai-service/src/main/java/com/hai/service/OutRechargeOrderService.java
  39. 54
      hai-service/src/main/java/com/hai/service/impl/BsIntegralRebateServiceImpl.java
  40. 44
      hai-service/src/main/java/com/hai/service/impl/CommonServiceImpl.java
  41. 23
      hai-service/src/main/java/com/hai/service/impl/HighApproveServiceImpl.java
  42. 2
      hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java
  43. 117
      hai-service/src/main/java/com/hai/service/impl/HighCouponServiceImpl.java
  44. 41
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java
  45. 11
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  46. 46
      hai-service/src/main/java/com/hai/service/impl/OutRechargeOrderServiceImpl.java
  47. 3
      hai-service/src/main/resources/prod-9401/commonConfig.properties
  48. 3
      hai-service/src/main/resources/prod/commonConfig.properties
  49. 220
      v1/hai-v1.iml
  50. 1
      v1/src/main/java/com/v1/config/AuthConfig.java
  51. 17
      v1/src/main/java/com/v1/config/SysConfig.java
  52. 121
      v1/src/main/java/com/v1/config/WeChatQrcodeUtils.java
  53. 51
      v1/src/main/java/com/v1/config/WxConfig.java
  54. 140
      v1/src/main/java/com/v1/controller/WxMsgController.java
  55. 2
      v1/src/main/resources/dev/config.properties
  56. 3
      v1/src/main/resources/dev/logback.xml

@ -141,12 +141,14 @@ public class BsDistributionUserRelController {
@ResponseBody
@ApiOperation(value = "B端查询代理商订单")
public ResponseData orderListByAgentId(@RequestParam(name = "agentId", required = false) Long agentId,
@RequestParam(name = "code", required = false) Long code,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize) {
try {
Map<String , Object> map = new HashMap<>();
map.put("agentId" , agentId);
map.put("code" , code);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highOrderService.orderListByAgentId(map)));

@ -8,6 +8,7 @@ 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.DateUtil;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighApprove;
import com.hai.enum_type.ApproveType;
@ -145,4 +146,37 @@ public class HighApproveController {
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/addApprove",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "添加审批")
public ResponseData addApprove(@RequestBody JSONObject object ,HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
HighApprove approve = new HighApprove();
approve.setObjectId(99L);
approve.setObjectName("卡券分发审批");
approve.setApproveSerialNo(DateUtil.date2String(new Date(), "yyyyMMddHHmmss"));
approve.setStatus(1);
approve.setCreateTime(new Date());
approve.setUpdateTime(new Date());
approve.setSubmitOperatorId(userInfoModel.getSecUser().getId());
approve.setSubmitOperatorName(userInfoModel.getSecUser().getUserName());
approve.setObjectType(object.getInteger("objectType"));
approve.setApproveObject(object.getJSONObject("approveObject").toJSONString());
highApproveService.insertApprove(approve);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighCouponController -> approveProcessed() error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -773,4 +773,27 @@ public class HighCouponController {
}
}
@RequestMapping(value="/getCouponListByAll",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询所有卡卷列表")
public ResponseData getCouponListByAll(HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (userInfoModel.getBsCompany() == null) {
log.error("HighCouponController -> getCouponList() error!","权限不足");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMPETENCE_INSUFFICIENT, "");
}
Map<String, Object> map = new HashMap<>(3);
map.put("companyId", userInfoModel.getBsCompany().getId());
map.put("status", 2);
return ResponseMsgUtil.success(highCouponService.getCouponListByAll(map));
} catch (Exception e) {
log.error("HighCouponController -> getCouponList() error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -164,9 +164,9 @@ public class HighDiscountPackageController {
if (StringUtils.isBlank(highDiscountPackage.getTitle())
|| highDiscountPackage.getSalesType() == null
// || StringUtils.isBlank(highDiscountPackage.getBannerImg())
// || StringUtils.isBlank(highDiscountPackage.getListImg())
// || StringUtils.isBlank(highDiscountPackage.getDetailsImg())
|| StringUtils.isBlank(highDiscountPackage.getBannerImg())
|| StringUtils.isBlank(highDiscountPackage.getListImg())
|| StringUtils.isBlank(highDiscountPackage.getDetailsImg())
) {
log.error("HighAgentController -> insertCouponPackageInfo() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
@ -225,9 +225,9 @@ public class HighDiscountPackageController {
if (StringUtils.isBlank(highDiscountPackage.getTitle())
|| highDiscountPackage.getSalesType() == null
|| highDiscountPackage.getId() == null
// || StringUtils.isBlank(highDiscountPackage.getBannerImg())
// || StringUtils.isBlank(highDiscountPackage.getListImg())
// || StringUtils.isBlank(highDiscountPackage.getDetailsImg())
|| StringUtils.isBlank(highDiscountPackage.getBannerImg())
|| StringUtils.isBlank(highDiscountPackage.getListImg())
|| StringUtils.isBlank(highDiscountPackage.getDetailsImg())
) {
log.error("HighAgentController -> updateCouponPackageInfo() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");

@ -144,6 +144,7 @@ public class OutRechargeOrderController {
@RequestParam(name = "payType", required = false) Integer payType,
@RequestParam(name = "payTimeS", required = false) Long payTimeS,
@RequestParam(name = "payTimeE", required = false) Long payTimeE,
@RequestParam(name = "whetherTimeOut", required = false) Boolean whetherTimeOut,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@ -169,6 +170,7 @@ public class OutRechargeOrderController {
map.put("rechargeStatus", rechargeStatus);
map.put("payStatus", payStatus);
map.put("orderNo", orderNo);
map.put("whetherTimeOut", whetherTimeOut);
map.put("operatorType", operatorType);
map.put("laborUnionCard", laborUnionCard);
map.put("rechargeContent", rechargeContent);

@ -8,13 +8,9 @@ import com.hai.common.exception.SysCode;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.common.utils.WxUtils;
import com.hai.entity.BsCompany;
import com.hai.entity.SecConfig;
import com.hai.entity.SecRegion;
import com.hai.entity.*;
import com.hai.model.ResponseData;
import com.hai.service.BsCompanyService;
import com.hai.service.CommonService;
import com.hai.service.SecConfigService;
import com.hai.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.chanjar.weixin.common.util.crypto.SHA1;
@ -24,6 +20,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@ -46,6 +43,11 @@ public class CommonController {
@Resource
private BsCompanyService bsCompanyService;
@Resource
private HighOrderService highOrderService;
@Resource
private BsIntegralRebateService bsIntegralRebateService;
@RequestMapping(value="/getDredgeProvince",method= RequestMethod.GET)
@ResponseBody
@ -285,7 +287,115 @@ public class CommonController {
) {
try {
return ResponseMsgUtil.success(commonService.findByLatAndLng(lng , lat));
JSONObject jsonObjectR = commonService.findByLatAndLng(lng , lat);
if (!jsonObjectR.getString("status").equals("0")) {
log.error("findByLatAndLng error!", "定位错误,请重新定位" );
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "定位错误,请重新定位");
}
JSONObject object = commonService.findByLatAndLng(lng , lat).getJSONObject("result").getJSONObject("addressComponent");
ApiCity apiCity = commonService.findCityByName(object.getString("city"));
if (apiCity == null) {
log.error("findByLatAndLng error!", "当前城市暂未开通任何服务" );
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前城市暂未开通任何服务,请选择其他城市");
}
BsCompany company = bsCompanyService.selectCompanyByRegion(apiCity.getProvinceCode());
if (company == null) {
log.error("findByLatAndLng error!", "当前城市暂未开通任何服务" );
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前城市暂未开通任何服务,请选择其他城市");
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("cityName" , apiCity.getCityName());
jsonObject.put("provinceName" , apiCity.getProvinceName());
jsonObject.put("regionId" , company.getRegionId());
jsonObject.put("companyName" , company.getName());
jsonObject.put("companyId" , company.getId());
return ResponseMsgUtil.success(jsonObject);
} catch (Exception e) {
log.error("HighOrderController --> unionStagingPay() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/findCompanyByCityName", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取定位信息")
public ResponseData findCompanyByCityName(
@RequestParam(name = "cityName", required = true) String cityName
) {
try {
ApiCity apiCity = commonService.findCityByName(cityName);
if (apiCity == null) {
log.error("findByLatAndLng error!", "当前城市暂未开通任何服务" );
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前城市暂未开通任何服务,请选择其他城市");
}
BsCompany company = bsCompanyService.selectCompanyByRegion(apiCity.getProvinceCode());
if (company == null) {
log.error("findByLatAndLng error!", "当前城市暂未开通任何服务" );
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前城市暂未开通任何服务,请选择其他城市");
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("cityName" , apiCity.getCityName());
jsonObject.put("provinceName" , apiCity.getProvinceName());
jsonObject.put("regionId" , company.getRegionId());
jsonObject.put("companyName" , company.getName());
jsonObject.put("companyId" , company.getId());
return ResponseMsgUtil.success(jsonObject);
} catch (Exception e) {
log.error("HighOrderController --> unionStagingPay() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getRebateIntegral", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "查询可获取返利积分")
public ResponseData getRebateIntegral(@RequestBody JSONObject object) {
try {
if (object.getInteger("type") == null ||
object.getLong("companyId") == null ||
object.getLong("productId") == null ||
object.getBigDecimal("price") == null
) {
log.error("CommonController -> getRebateIntegral() error!","请求参数校验失败");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR);
}
// 查询订单来源
Map<String, Object> map = new HashMap<>();
map.put("type" , object.getInteger("type"));
map.put("productId" , object.getLong("productId"));
map.put("companyId" , object.getLong("companyId"));
BsIntegralRebate bsIntegralRebate = bsIntegralRebateService.findIntegralRebateByMap(map);
if (bsIntegralRebate == null) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "暂无积分返利活动");
}
BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP );
return ResponseMsgUtil.success(integralNum);
} catch (Exception e) {
log.error("HighOrderController --> unionStagingPay() error!", e);

@ -126,8 +126,9 @@ public class HighGasController {
for (Map<String, Object> map : mapPageInfo.getList()) {
if (StringUtils.isNotBlank(MapUtils.getString(map, "oil_no"))) {
if (MapUtils.getInteger(map, "source_type").equals(1)) {
if (MapUtils.getInteger(map, "source_type").equals(1)
|| MapUtils.getInteger(map, "source_type").equals(3)
|| MapUtils.getInteger(map, "source_type").equals(4)) {
// 查询是否配置了【油站的】优惠比例
HighTyAgentPrice tyAgentPrice = tyAgentPriceService.getDetail(1, MapUtils.getLong(map, "id"), MapUtils.getString(map, "oil_no"));
if (tyAgentPrice != null) {

@ -35,6 +35,7 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.sql.Array;
import java.util.*;
import java.util.stream.Collectors;
@ -118,20 +119,45 @@ public class HighThirdPartyController {
BigDecimal salesTallPrice = apiStarbucksProducts.getSalesTallPrice().add(apiStarbucksProducts.getMarketTallPrice().multiply(productDiscount.divide(new BigDecimal(100)))).setScale(2, RoundingMode.HALF_UP);
BigDecimal salesGrandePrice = apiStarbucksProducts.getSalesGrandePrice().add(apiStarbucksProducts.getMarketGrandePrice().multiply(productDiscount.divide(new BigDecimal(100)))).setScale(2, RoundingMode.HALF_UP);
if (salesVentiPrice.compareTo(apiStarbucksProducts.getMarketVentiPrice()) > 0) {
salesVentiPrice = apiStarbucksProducts.getMarketVentiPrice();
}
// 判断当前价格是否大雨原价 如果大于显示原价
if (salesTallPrice.compareTo(apiStarbucksProducts.getMarketTallPrice()) > 0) {
salesTallPrice = apiStarbucksProducts.getMarketTallPrice();
}
if (salesGrandePrice.compareTo(apiStarbucksProducts.getMarketGrandePrice()) > 0) {
salesGrandePrice = apiStarbucksProducts.getMarketGrandePrice();
}
if (salesVentiPrice.compareTo(apiStarbucksProducts.getMarketVentiPrice()) > 0) {
salesVentiPrice = apiStarbucksProducts.getMarketVentiPrice();
}
String[] strings = apiStarbucksProducts.getCupSize().split(",");
for (String string : strings) {
if ("中杯".equals(string)) {
apiStarbucksProducts.setShowPrice(salesTallPrice);
break;
}
if ("大杯".equals(string)) {
apiStarbucksProducts.setShowPrice(salesGrandePrice);
break;
}
if ("超大杯".equals(string)) {
apiStarbucksProducts.setShowPrice(salesVentiPrice);
break;
}
}
apiStarbucksProducts.setSalesVentiPrice(salesVentiPrice);
apiStarbucksProducts.setSalesTallPrice(salesTallPrice);
apiStarbucksProducts.setCount(0);
apiStarbucksProducts.setSalesGrandePrice(salesGrandePrice);
if (apiStarbucksProducts.getShowPrice() != null) {
starbucksProductsList.add(apiStarbucksProducts);
}
}
starbucksProducts.setName(s);
starbucksProducts.setExt2(SysConst.getSysConfig().getImgUrl() + ProductImgEnum.getNameByImgUrl(s));
starbucksProducts.setId((long) i);
@ -241,6 +267,7 @@ public class HighThirdPartyController {
salePriceF = productsObject.getBigDecimal("originalPrice");
}
productsObject.put("salePrice", salePriceF);
productsObject.put("count" , 0);
if (productsObject.getJSONArray("specGroups") != null) {
for (Object specGroups : productsObject.getJSONArray("specGroups")) {
@ -306,8 +333,6 @@ public class HighThirdPartyController {
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
System.out.println("======================================================" + object);
if (StringUtils.isBlank(object.getString("customerMobile")) ||
StringUtils.isBlank(object.getString("regionId")) ||
object.getInteger("productType") == null ||

@ -55,6 +55,7 @@ public class HighUserCommonController {
@ApiOperation(value = "登录接口【用户不存在会自动注册】")
public ResponseData login(@RequestParam(value = "phone", required = true) String phone,
@RequestParam(value = "code", required = true) String code,
@RequestParam(value = "openId", required = false) String openId,
@RequestParam(value = "popularizeUserId", required = false) Long popularizeUserId,
@RequestParam(value = "regionId", required = false) String regionId,
HttpServletRequest request, HttpServletResponse response) {
@ -70,12 +71,16 @@ public class HighUserCommonController {
redisUtil.del("SMS_"+phone);
HighUser user = highUserService.findByPhone(phone);
if(user == null) {
user = new HighUser();
user.setName("用户" + IDGenerator.nextId(5));
user.setPhone(phone);
user.setRegTime(new Date());
user.setGold(0);
user.setOpenIdH5(openId);
user.setStatus(1);
// 用户信息完整状态
// 0:完整
@ -84,6 +89,9 @@ public class HighUserCommonController {
user.setInfoCompleteStatus(1);
highUserService.insertUser(user , popularizeUserId , regionId);
} else {
user.setOpenIdH5(openId);
highUserService.updateUser(user);
}
HighUserModel highUserModel = new HighUserModel();

@ -148,7 +148,7 @@ public class HighUserController {
if (StringUtils.isBlank(body.getString("password"))
|| body.getString("password").length() != 6){
log.error("HighUserController --> setUserPayPwd() error!", "请设置6位支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请设置6支付密码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请设置6支付密码");
}
// 查询用户密码

@ -332,4 +332,43 @@ public class WechatController {
}
}
@RequestMapping(value = "/getH5AccessByOpenId", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "【H5】通过openId查询")
public ResponseData getH5AccessByOpenId(@RequestParam(value = "openId", required = true) String openId,
HttpServletRequest request, HttpServletResponse response) {
try {
HighUser user = highUserService.findByOpenIdH5(openId);
if (user == null) {
user = new HighUser();
user.setName("临时游客");
user.setRegTime(new Date());
user.setGold(0);
user.setOpenId(openId);
user.setStatus(1);
// 用户信息完整状态
// 0:完整
// 1:需要填写用户信息
// 2:需要填写手机号
user.setInfoCompleteStatus(1);
return ResponseMsgUtil.success(user);
} else {
// 定义个人所有数据
HighUserModel highUserModel = new HighUserModel();
HighUser detailData = highUserService.getDetailDataByUser(user.getId());
detailData.setPassword(null);
highUserModel.setHighUser(detailData);
SessionObject so = new SessionObject(user.getPhone(), 1, highUserModel);
userCenter.save(request, response, so);
return ResponseMsgUtil.success(so);
}
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
}

@ -122,29 +122,6 @@ public class CzOrderController {
// 判断是否充值成功
if (dataObject.getInteger("status") == 3) {
new Thread(() -> {
JSONObject object = new JSONObject();
object.put("type" , 3);
object.put("productId" , rechargeOrder.getOperatorType());
object.put("companyId" , rechargeOrder.getCompanyId());
object.put("price" , rechargeOrder.getPayRealPrice());
object.put("userId" , rechargeOrder.getUserId());
object.put("orderId" , rechargeOrder.getId());
object.put("remark" , "话费订单" + rechargeOrder.getOrderNo() + "积分返利:");
Map<String, Object> map = new HashMap<>();
map.put("goldType", 1);
map.put("resType", 4);
map.put("userId", rechargeOrder.getUserId());
map.put("resId", rechargeOrder.getId());
List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map);
if (goldRecs.size() == 0) {
bsIntegralRebateService.integralRebate(object);
}
HighUser highUser = highUserService.findByUserId(rechargeOrder.getUserId());
WxMsgConfig.rechargedSuccess(
rechargeOrder.getRechargeContent() + "充值成功",
@ -212,29 +189,6 @@ public class CzOrderController {
// 判断是否充值成功
if (state == 1) {
new Thread(() -> {
JSONObject object = new JSONObject();
object.put("type" , 3);
object.put("productId" , rechargeOrder.getOperatorType());
object.put("companyId" , rechargeOrder.getCompanyId());
object.put("price" , rechargeOrder.getPayRealPrice());
object.put("userId" , rechargeOrder.getUserId());
object.put("orderId" , rechargeOrder.getId());
object.put("remark" , "话费订单" + rechargeOrder.getOrderNo() + "积分返利:");
Map<String, Object> map = new HashMap<>();
map.put("goldType", 1);
map.put("resType", 4);
map.put("userId", rechargeOrder.getUserId());
map.put("resId", rechargeOrder.getId());
List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map);
if (goldRecs.size() == 0) {
bsIntegralRebateService.integralRebate(object);
}
HighUser highUser = highUserService.findByUserId(rechargeOrder.getUserId());
WxMsgConfig.rechargedSuccess(
rechargeOrder.getRechargeContent() + "充值成功",
@ -247,6 +201,7 @@ public class CzOrderController {
childOrder.setStatus(101);
rechargeOrder.setRechargeStatus(202);
rechargeOrder.setPayStatus(100);
rechargeOrder.setFinishTime(new Date());
outRechargeOrderService.updateOrder(rechargeOrder);
outRechargeChildOrderService.updateOrder(childOrder);

@ -60,7 +60,7 @@
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
<logger name="com.hai" level="DEBUG">
<logger name="com.hai" level="INFO">
<appender-ref ref="baselog" />
</logger>
<logger name="com.hai.dao" level="DEBUG">

@ -84,9 +84,10 @@ public class HighCouponSchedule {
if (jsonObject.getString("respCode").equals("0000")) {
JSONObject data = HuiLianTongUnionCardConfig.resolveResponse(jsonObject.getString("data"));
if (data.getString("respCode").equals("0000") && data.getJSONObject("data").getInteger("state") != 20) {
couponCodeOther.setStatus(data.getJSONObject("data").getInteger("state"));
if (data.getString("respCode").equals("0000")) {
JSONObject responseObject = JSONObject.parseObject(data.getString("data"));
if (responseObject.getInteger("state") != 20) {
couponCodeOther.setStatus(responseObject.getInteger("state"));
highCouponCodeOtherMapper.updateByPrimaryKey(couponCodeOther);
if (couponCodeOther.getCouponAgentCodeId() != null) {
@ -103,7 +104,7 @@ public class HighCouponSchedule {
List<HighUserCoupon> list = highUserCouponMapper.selectByExample(userCouponExample);
if (list.size() > 0) {
HighUserCoupon userCoupon = list.get(0);
if (data.getJSONObject("data").getInteger("state") == 40) {
if (responseObject.getInteger("state") == 40) {
userCoupon.setStatus(2);
userCoupon.setConsumeTime(new Date());
} else {
@ -118,7 +119,7 @@ public class HighCouponSchedule {
highOrderService.childOrderComplete(couponCodeOther.getChildOrderId());
}
}
}
}
}
}

@ -439,7 +439,7 @@ public class HighOrderSchedule {
* @Param []
* @return void
*/
@Scheduled(cron="0 0/1 * * * ?") //每1分钟执行一次
@Scheduled(cron="0 0/5 * * * ?") //每1分钟执行一次
public void integralRebateOrder() {
List<HighOrder> order = highOrderService.integralRebateOrder();
for (HighOrder highOrder : order) {
@ -455,7 +455,7 @@ public class HighOrderSchedule {
List<HighChildOrder> childOrderList = highOrderService.getChildOrderByOrder(highOrder.getId());
// 查询订单来源
JSONObject object = highOrderService.orderSource(childOrderList.get(0).getGoodsType() , childOrderList.get(0).getGoodsId(),highOrder.getOrderNo() , highOrder.getCompanyId());
JSONObject object = highOrderService.orderSource(childOrderList.get(0).getGoodsType() , childOrderList.get(0).getGoodsId(),highOrder.getOrderNo() , highOrder.getCompanyId() , 0);
object.put("price" , highOrder.getPayRealPrice());
object.put("userId" , highOrder.getMemId());
@ -469,5 +469,40 @@ public class HighOrderSchedule {
}
}
/**
* @Author Sum1Dream
* @name integralRebateOrder.java
* @Description // 执行返利操作
* @Date 15:13 2022/8/22
* @Param []
* @return void
*/
@Scheduled(cron="0 0/5 * * * ?") //每1分钟执行一次
public void integralRebateRechargeOrder() {
List<OutRechargeOrder> order = outRechargeOrderService.integralRebateRechargeOrder();
for (OutRechargeOrder outRechargeOrder : order) {
Map<String, Object> map = new HashMap<>();
map.put("goldType", 1);
map.put("resType", 4);
map.put("userId", outRechargeOrder.getUserId());
map.put("resId", outRechargeOrder.getId());
List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map);
if (goldRecs.size() == 0) {
// 查询订单来源
JSONObject object = highOrderService.orderSource(20 , outRechargeOrder.getGoodsId(),outRechargeOrder.getOrderNo() , outRechargeOrder.getCompanyId() , outRechargeOrder.getOperatorType());
object.put("price" , outRechargeOrder.getPayRealPrice());
object.put("userId" , outRechargeOrder.getUserId());
object.put("orderId" , outRechargeOrder.getId());
object.put("companyId" , outRechargeOrder.getCompanyId());
object.put("createTime" , outRechargeOrder.getCreateTimed());
bsIntegralRebateService.integralRechargeRebate(object);
}
}
}
}

File diff suppressed because one or more lines are too long

@ -60,7 +60,7 @@
<root level="DEBUG">
<appender-ref ref="STDOUT" />
</root>
<logger name="com.hai" level="DEBUG">
<logger name="com.hai" level="INFO">
<appender-ref ref="baselog" />
</logger>
<logger name="com.hai.dao" level="DEBUG">

@ -0,0 +1,10 @@
package com.hai.common.utils;
/**
* @author sum1dream
*/
public class CommonUtil {
}

@ -7,25 +7,21 @@ import com.hai.common.pay.util.sdk.WXPayXmlUtil;
import com.thoughtworks.xstream.XStream;
import com.thoughtworks.xstream.io.naming.NoNameCoder;
import com.thoughtworks.xstream.io.xml.XppDriver;
import net.sf.cglib.beans.BeanMap;
import org.apache.commons.lang3.StringUtils;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.SSLContexts;
import javax.crypto.Mac;
import javax.crypto.spec.SecretKeySpec;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import java.io.File;
import java.io.FileInputStream;
import java.io.StringWriter;
import java.security.KeyStore;
import java.security.MessageDigest;
import java.security.SecureRandom;
import java.util.*;
@ -488,8 +484,10 @@ public class WxUtils {
continue;
}
if (data.get(k) != null) // 参数值为空,则不参与签名
{
sb.append(k).append("=").append(data.get(k)).append("&");
}
}
sb.append("apiKey=").append(key);
if (WXPayConstants.SignType.MD5.equals(signType)) {
return MD5(sb.toString() , true);
@ -502,4 +500,44 @@ public class WxUtils {
}
}
/**
* 用SHA1算法生成安全签名
* @param token 票据
* @param timestamp 时间戳
* @param nonce 随机字符串
* @return 安全签名
* @throws Exception
*/
public static String getSHA1(String token, String timestamp, String nonce) throws Exception
{
try {
String[] array = new String[] { token, timestamp, nonce};
StringBuffer sb = new StringBuffer();
// 字符串排序
Arrays.sort(array);
for (int i = 0; i < 3; i++) {
sb.append(array[i]);
}
String str = sb.toString();
// SHA1签名生成
MessageDigest md = MessageDigest.getInstance("SHA-1");
md.update(str.getBytes());
byte[] digest = md.digest();
StringBuffer hexstr = new StringBuffer();
String shaHex = "";
for (int i = 0; i < digest.length; i++) {
shaHex = Integer.toHexString(digest[i] & 0xFF);
if (shaHex.length() < 2) {
hexstr.append(0);
}
hexstr.append(shaHex);
}
return hexstr.toString();
} catch (Exception e) {
e.printStackTrace();
throw new Exception(String.format("Invalid sign_type: %s"));
}
}
}

@ -50,6 +50,7 @@ public class UnionUserConfig {
paramMap.remove("secret");
JSONObject jsonObject = JSONObject.parseObject(UnionUtils.sendPostGson(requestUrl+"backendToken", paramMap));
String backendToken = jsonObject.getJSONObject("params").getString("backendToken");
System.out.println(jsonObject + "=================================================");
redisUtil.set("UNION_BACKEND_TOKEN", backendToken,jsonObject.getJSONObject("params").getLong("expiresIn"));
return backendToken;
}

@ -45,14 +45,16 @@ public interface HighApproveMapper extends HighApproveMapperExt {
"create_time, update_time, ",
"submit_operator_id, submit_operator_name, ",
"approve_operator_id, approve_operator_name, ",
"ext_1, ext_2, ext_3)",
"ext_1, ext_2, ext_3, ",
"approve_object)",
"values (#{objectType,jdbcType=INTEGER}, #{objectId,jdbcType=BIGINT}, ",
"#{objectName,jdbcType=VARCHAR}, #{approveSerialNo,jdbcType=VARCHAR}, ",
"#{remarks,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=DATE}, ",
"#{submitOperatorId,jdbcType=BIGINT}, #{submitOperatorName,jdbcType=VARCHAR}, ",
"#{approveOperatorId,jdbcType=BIGINT}, #{approveOperatorName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ",
"#{approveObject,jdbcType=LONGVARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighApprove record);
@ -61,6 +63,28 @@ public interface HighApproveMapper extends HighApproveMapperExt {
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighApprove record);
@SelectProvider(type=HighApproveSqlProvider.class, method="selectByExampleWithBLOBs")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="object_type", property="objectType", jdbcType=JdbcType.INTEGER),
@Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT),
@Result(column="object_name", property="objectName", jdbcType=JdbcType.VARCHAR),
@Result(column="approve_serial_no", property="approveSerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.DATE),
@Result(column="submit_operator_id", property="submitOperatorId", jdbcType=JdbcType.BIGINT),
@Result(column="submit_operator_name", property="submitOperatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="approve_operator_id", property="approveOperatorId", jdbcType=JdbcType.BIGINT),
@Result(column="approve_operator_name", property="approveOperatorName", 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="approve_object", property="approveObject", jdbcType=JdbcType.LONGVARCHAR)
})
List<HighApprove> selectByExampleWithBLOBs(HighApproveExample example);
@SelectProvider(type=HighApproveSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@ -71,7 +95,7 @@ public interface HighApproveMapper extends HighApproveMapperExt {
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.DATE),
@Result(column="submit_operator_id", property="submitOperatorId", jdbcType=JdbcType.BIGINT),
@Result(column="submit_operator_name", property="submitOperatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="approve_operator_id", property="approveOperatorId", jdbcType=JdbcType.BIGINT),
@ -86,7 +110,7 @@ public interface HighApproveMapper extends HighApproveMapperExt {
"select",
"id, object_type, object_id, object_name, approve_serial_no, remarks, `status`, ",
"create_time, update_time, submit_operator_id, submit_operator_name, approve_operator_id, ",
"approve_operator_name, ext_1, ext_2, ext_3",
"approve_operator_name, ext_1, ext_2, ext_3, approve_object",
"from high_approve",
"where id = #{id,jdbcType=BIGINT}"
})
@ -99,20 +123,24 @@ public interface HighApproveMapper extends HighApproveMapperExt {
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.DATE),
@Result(column="submit_operator_id", property="submitOperatorId", jdbcType=JdbcType.BIGINT),
@Result(column="submit_operator_name", property="submitOperatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="approve_operator_id", property="approveOperatorId", jdbcType=JdbcType.BIGINT),
@Result(column="approve_operator_name", property="approveOperatorName", 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_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="approve_object", property="approveObject", jdbcType=JdbcType.LONGVARCHAR)
})
HighApprove selectByPrimaryKey(Long id);
@UpdateProvider(type=HighApproveSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighApprove record, @Param("example") HighApproveExample example);
@UpdateProvider(type=HighApproveSqlProvider.class, method="updateByExampleWithBLOBs")
int updateByExampleWithBLOBs(@Param("record") HighApprove record, @Param("example") HighApproveExample example);
@UpdateProvider(type=HighApproveSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighApprove record, @Param("example") HighApproveExample example);
@ -128,7 +156,29 @@ public interface HighApproveMapper extends HighApproveMapperExt {
"remarks = #{remarks,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=DATE},",
"submit_operator_id = #{submitOperatorId,jdbcType=BIGINT},",
"submit_operator_name = #{submitOperatorName,jdbcType=VARCHAR},",
"approve_operator_id = #{approveOperatorId,jdbcType=BIGINT},",
"approve_operator_name = #{approveOperatorName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"approve_object = #{approveObject,jdbcType=LONGVARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKeyWithBLOBs(HighApprove record);
@Update({
"update high_approve",
"set object_type = #{objectType,jdbcType=INTEGER},",
"object_id = #{objectId,jdbcType=BIGINT},",
"object_name = #{objectName,jdbcType=VARCHAR},",
"approve_serial_no = #{approveSerialNo,jdbcType=VARCHAR},",
"remarks = #{remarks,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=DATE},",
"submit_operator_id = #{submitOperatorId,jdbcType=BIGINT},",
"submit_operator_name = #{submitOperatorName,jdbcType=VARCHAR},",
"approve_operator_id = #{approveOperatorId,jdbcType=BIGINT},",

@ -57,7 +57,7 @@ public class HighApproveSqlProvider {
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
sql.VALUES("update_time", "#{updateTime,jdbcType=DATE}");
}
if (record.getSubmitOperatorId() != null) {
@ -88,6 +88,43 @@ public class HighApproveSqlProvider {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
if (record.getApproveObject() != null) {
sql.VALUES("approve_object", "#{approveObject,jdbcType=LONGVARCHAR}");
}
return sql.toString();
}
public String selectByExampleWithBLOBs(HighApproveExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("object_type");
sql.SELECT("object_id");
sql.SELECT("object_name");
sql.SELECT("approve_serial_no");
sql.SELECT("remarks");
sql.SELECT("`status`");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("submit_operator_id");
sql.SELECT("submit_operator_name");
sql.SELECT("approve_operator_id");
sql.SELECT("approve_operator_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.SELECT("approve_object");
sql.FROM("high_approve");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
@ -163,7 +200,7 @@ public class HighApproveSqlProvider {
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=DATE}");
}
if (record.getSubmitOperatorId() != null) {
@ -194,6 +231,37 @@ public class HighApproveSqlProvider {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
if (record.getApproveObject() != null) {
sql.SET("approve_object = #{record.approveObject,jdbcType=LONGVARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExampleWithBLOBs(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_approve");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("object_type = #{record.objectType,jdbcType=INTEGER}");
sql.SET("object_id = #{record.objectId,jdbcType=BIGINT}");
sql.SET("object_name = #{record.objectName,jdbcType=VARCHAR}");
sql.SET("approve_serial_no = #{record.approveSerialNo,jdbcType=VARCHAR}");
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=DATE}");
sql.SET("submit_operator_id = #{record.submitOperatorId,jdbcType=BIGINT}");
sql.SET("submit_operator_name = #{record.submitOperatorName,jdbcType=VARCHAR}");
sql.SET("approve_operator_id = #{record.approveOperatorId,jdbcType=BIGINT}");
sql.SET("approve_operator_name = #{record.approveOperatorName,jdbcType=VARCHAR}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
sql.SET("approve_object = #{record.approveObject,jdbcType=LONGVARCHAR}");
HighApproveExample example = (HighApproveExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
@ -210,7 +278,7 @@ public class HighApproveSqlProvider {
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=DATE}");
sql.SET("submit_operator_id = #{record.submitOperatorId,jdbcType=BIGINT}");
sql.SET("submit_operator_name = #{record.submitOperatorName,jdbcType=VARCHAR}");
sql.SET("approve_operator_id = #{record.approveOperatorId,jdbcType=BIGINT}");
@ -257,7 +325,7 @@ public class HighApproveSqlProvider {
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{updateTime,jdbcType=DATE}");
}
if (record.getSubmitOperatorId() != null) {
@ -288,6 +356,10 @@ public class HighApproveSqlProvider {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
if (record.getApproveObject() != null) {
sql.SET("approve_object = #{approveObject,jdbcType=LONGVARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();

@ -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 and whether_rebate = false ")
@Select("select * from high_order where order_status = 3 and pay_type != 3 and pay_real_price > 0 and whether_rebate = false group by create_time desc;")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),

@ -57,7 +57,10 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"refund_fee, company_id, ",
"pay_status, merch_id, ",
"recharge_status, ext_1, ",
"ext_2, ext_3)",
"ext_2, ext_3, recharge_name, ",
"remarks, agent_key, ",
"object_id, abnormal_msg, ",
"whether_rebate)",
"values (#{rechargePrice,jdbcType=DECIMAL}, #{type,jdbcType=INTEGER}, ",
"#{operatorName,jdbcType=VARCHAR}, #{operatorType,jdbcType=INTEGER}, ",
"#{orderNo,jdbcType=VARCHAR}, #{rechargeType,jdbcType=INTEGER}, ",
@ -76,7 +79,10 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"#{refundFee,jdbcType=DECIMAL}, #{companyId,jdbcType=BIGINT}, ",
"#{payStatus,jdbcType=INTEGER}, #{merchId,jdbcType=VARCHAR}, ",
"#{rechargeStatus,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{rechargeName,jdbcType=VARCHAR}, ",
"#{remarks,jdbcType=VARCHAR}, #{agentKey,jdbcType=VARCHAR}, ",
"#{objectId,jdbcType=BIGINT}, #{abnormalMsg,jdbcType=VARCHAR}, ",
"#{whetherRebate,jdbcType=BIT})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(OutRechargeOrder record);
@ -125,7 +131,13 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="recharge_status", property="rechargeStatus", jdbcType=JdbcType.INTEGER),
@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_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_key", property="agentKey", jdbcType=JdbcType.VARCHAR),
@Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT),
@Result(column="abnormal_msg", property="abnormalMsg", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT)
})
List<OutRechargeOrder> selectByExample(OutRechargeOrderExample example);
@ -137,7 +149,8 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"integral_deduction_price, pay_price, pay_real_price, pay_serial_no, create_timed, ",
"pay_time, cancel_time, finish_time, out_refund_no, order_price, refund_time, ",
"tp_refund_order_no, refund_id, refund_fee, company_id, pay_status, merch_id, ",
"recharge_status, ext_1, ext_2, ext_3",
"recharge_status, ext_1, ext_2, ext_3, recharge_name, remarks, agent_key, object_id, ",
"abnormal_msg, whether_rebate",
"from out_recharge_order",
"where id = #{id,jdbcType=BIGINT}"
})
@ -180,7 +193,13 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
@Result(column="recharge_status", property="rechargeStatus", jdbcType=JdbcType.INTEGER),
@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_3", property="ext3", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_key", property="agentKey", jdbcType=JdbcType.VARCHAR),
@Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT),
@Result(column="abnormal_msg", property="abnormalMsg", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT)
})
OutRechargeOrder selectByPrimaryKey(Long id);
@ -232,7 +251,13 @@ public interface OutRechargeOrderMapper extends OutRechargeOrderMapperExt {
"recharge_status = #{rechargeStatus,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"ext_3 = #{ext3,jdbcType=VARCHAR},",
"recharge_name = #{rechargeName,jdbcType=VARCHAR},",
"remarks = #{remarks,jdbcType=VARCHAR},",
"agent_key = #{agentKey,jdbcType=VARCHAR},",
"object_id = #{objectId,jdbcType=BIGINT},",
"abnormal_msg = #{abnormalMsg,jdbcType=VARCHAR},",
"whether_rebate = #{whetherRebate,jdbcType=BIT}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(OutRechargeOrder record);

@ -146,4 +146,54 @@ public interface OutRechargeOrderMapperExt {
@Result(column="count", property="count", jdbcType=JdbcType.BIGINT),
})
OrderCountModel rechargeOrderByIndex(Integer code);
@Select("select * from out_recharge_order where recharge_status = 202 and pay_status = 100 and pay_type != 3 and pay_real_price > 0 and whether_rebate = false group by create_timed desc ; ")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="recharge_price", property="rechargePrice", jdbcType=JdbcType.DECIMAL),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="operator_name", property="operatorName", jdbcType=JdbcType.VARCHAR),
@Result(column="operator_type", property="operatorType", jdbcType=JdbcType.INTEGER),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_type", property="rechargeType", jdbcType=JdbcType.INTEGER),
@Result(column="mem_discount_id", property="memDiscountId", jdbcType=JdbcType.BIGINT),
@Result(column="mem_discount_name", property="memDiscountName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="goods_id", property="goodsId", jdbcType=JdbcType.BIGINT),
@Result(column="recharge_content", property="rechargeContent", jdbcType=JdbcType.VARCHAR),
@Result(column="pay_type", property="payType", jdbcType=JdbcType.INTEGER),
@Result(column="labor_union_card", property="laborUnionCard", jdbcType=JdbcType.VARCHAR),
@Result(column="integral_num", property="integralNum", jdbcType=JdbcType.DECIMAL),
@Result(column="discount_deduction_price", property="discountDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="integral_deduction_price", property="integralDeductionPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_real_price", property="payRealPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_serial_no", property="paySerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="create_timed", property="createTimed", jdbcType=JdbcType.TIMESTAMP),
@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="out_refund_no", property="outRefundNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_price", property="orderPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_time", property="refundTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="tp_refund_order_no", property="tpRefundOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_id", property="refundId", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_fee", property="refundFee", jdbcType=JdbcType.DECIMAL),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="pay_status", property="payStatus", jdbcType=JdbcType.INTEGER),
@Result(column="merch_id", property="merchId", jdbcType=JdbcType.VARCHAR),
@Result(column="recharge_status", property="rechargeStatus", jdbcType=JdbcType.INTEGER),
@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="recharge_name", property="rechargeName", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_key", property="agentKey", jdbcType=JdbcType.VARCHAR),
@Result(column="object_id", property="objectId", jdbcType=JdbcType.BIGINT),
@Result(column="abnormal_msg", property="abnormalMsg", jdbcType=JdbcType.VARCHAR),
@Result(column="whether_rebate", property="whetherRebate", jdbcType=JdbcType.BIT)
})
List<OutRechargeOrder> integralRebateRechargeOrder();
}

@ -180,6 +180,30 @@ public class OutRechargeOrderSqlProvider {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
if (record.getRechargeName() != null) {
sql.VALUES("recharge_name", "#{rechargeName,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.VALUES("remarks", "#{remarks,jdbcType=VARCHAR}");
}
if (record.getAgentKey() != null) {
sql.VALUES("agent_key", "#{agentKey,jdbcType=VARCHAR}");
}
if (record.getObjectId() != null) {
sql.VALUES("object_id", "#{objectId,jdbcType=BIGINT}");
}
if (record.getAbnormalMsg() != null) {
sql.VALUES("abnormal_msg", "#{abnormalMsg,jdbcType=VARCHAR}");
}
if (record.getWhetherRebate() != null) {
sql.VALUES("whether_rebate", "#{whetherRebate,jdbcType=BIT}");
}
return sql.toString();
}
@ -228,6 +252,12 @@ public class OutRechargeOrderSqlProvider {
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.SELECT("recharge_name");
sql.SELECT("remarks");
sql.SELECT("agent_key");
sql.SELECT("object_id");
sql.SELECT("abnormal_msg");
sql.SELECT("whether_rebate");
sql.FROM("out_recharge_order");
applyWhere(sql, example, false);
@ -401,6 +431,30 @@ public class OutRechargeOrderSqlProvider {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
if (record.getRechargeName() != null) {
sql.SET("recharge_name = #{record.rechargeName,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
}
if (record.getAgentKey() != null) {
sql.SET("agent_key = #{record.agentKey,jdbcType=VARCHAR}");
}
if (record.getObjectId() != null) {
sql.SET("object_id = #{record.objectId,jdbcType=BIGINT}");
}
if (record.getAbnormalMsg() != null) {
sql.SET("abnormal_msg = #{record.abnormalMsg,jdbcType=VARCHAR}");
}
if (record.getWhetherRebate() != null) {
sql.SET("whether_rebate = #{record.whetherRebate,jdbcType=BIT}");
}
applyWhere(sql, example, true);
return sql.toString();
}
@ -448,6 +502,12 @@ public class OutRechargeOrderSqlProvider {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
sql.SET("recharge_name = #{record.rechargeName,jdbcType=VARCHAR}");
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
sql.SET("agent_key = #{record.agentKey,jdbcType=VARCHAR}");
sql.SET("object_id = #{record.objectId,jdbcType=BIGINT}");
sql.SET("abnormal_msg = #{record.abnormalMsg,jdbcType=VARCHAR}");
sql.SET("whether_rebate = #{record.whetherRebate,jdbcType=BIT}");
OutRechargeOrderExample example = (OutRechargeOrderExample) parameter.get("example");
applyWhere(sql, example, true);
@ -610,6 +670,30 @@ public class OutRechargeOrderSqlProvider {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
if (record.getRechargeName() != null) {
sql.SET("recharge_name = #{rechargeName,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{remarks,jdbcType=VARCHAR}");
}
if (record.getAgentKey() != null) {
sql.SET("agent_key = #{agentKey,jdbcType=VARCHAR}");
}
if (record.getObjectId() != null) {
sql.SET("object_id = #{objectId,jdbcType=BIGINT}");
}
if (record.getAbnormalMsg() != null) {
sql.SET("abnormal_msg = #{abnormalMsg,jdbcType=VARCHAR}");
}
if (record.getWhetherRebate() != null) {
sql.SET("whether_rebate = #{whetherRebate,jdbcType=BIT}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();

@ -129,6 +129,18 @@ public class ApiStarbucksProducts implements Serializable {
*/
private Integer status;
private Integer count;
private BigDecimal showPrice;
public BigDecimal getShowPrice() {
return showPrice;
}
public void setShowPrice(BigDecimal showPrice) {
this.showPrice = showPrice;
}
/**
* ext_1
*/
@ -144,6 +156,14 @@ public class ApiStarbucksProducts implements Serializable {
*/
private String ext3;
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
private static final long serialVersionUID = 1L;
public Long getId() {

@ -19,7 +19,7 @@ public class HighApprove implements Serializable {
private Long id;
/**
* 审批对象 1:卡券上架审批 2:卡卷价格审批
* 审批对象 1:卡券上架审批 2:卡卷价格审批 3:卡券分发审批
*/
private Integer objectType;
@ -84,6 +84,11 @@ public class HighApprove implements Serializable {
private String ext3;
/**
* 审批对象
*/
private String approveObject;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -214,6 +219,14 @@ public class HighApprove implements Serializable {
this.ext3 = ext3;
}
public String getApproveObject() {
return approveObject;
}
public void setApproveObject(String approveObject) {
this.approveObject = approveObject;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -241,7 +254,8 @@ public class HighApprove implements Serializable {
&& (this.getApproveOperatorName() == null ? other.getApproveOperatorName() == null : this.getApproveOperatorName().equals(other.getApproveOperatorName()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
&& (this.getApproveObject() == null ? other.getApproveObject() == null : this.getApproveObject().equals(other.getApproveObject()));
}
@Override
@ -264,6 +278,7 @@ public class HighApprove implements Serializable {
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
result = prime * result + ((getApproveObject() == null) ? 0 : getApproveObject().hashCode());
return result;
}
@ -289,6 +304,7 @@ public class HighApprove implements Serializable {
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", approveObject=").append(approveObject);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -2,6 +2,7 @@ package com.hai.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
public class HighApproveExample {
@ -125,6 +126,32 @@ public class HighApproveExample {
criteria.add(new Criterion(condition, value1, value2));
}
protected void addCriterionForJDBCDate(String condition, Date value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value.getTime()), property);
}
protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
if (values == null || values.size() == 0) {
throw new RuntimeException("Value list for " + property + " cannot be null or empty");
}
List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
Iterator<Date> iter = values.iterator();
while (iter.hasNext()) {
dateList.add(new java.sql.Date(iter.next().getTime()));
}
addCriterion(condition, dateList, property);
}
protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
@ -646,52 +673,52 @@ public class HighApproveExample {
}
public Criteria andUpdateTimeEqualTo(Date value) {
addCriterion("update_time =", value, "updateTime");
addCriterionForJDBCDate("update_time =", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotEqualTo(Date value) {
addCriterion("update_time <>", value, "updateTime");
addCriterionForJDBCDate("update_time <>", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThan(Date value) {
addCriterion("update_time >", value, "updateTime");
addCriterionForJDBCDate("update_time >", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("update_time >=", value, "updateTime");
addCriterionForJDBCDate("update_time >=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThan(Date value) {
addCriterion("update_time <", value, "updateTime");
addCriterionForJDBCDate("update_time <", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeLessThanOrEqualTo(Date value) {
addCriterion("update_time <=", value, "updateTime");
addCriterionForJDBCDate("update_time <=", value, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeIn(List<Date> values) {
addCriterion("update_time in", values, "updateTime");
addCriterionForJDBCDate("update_time in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotIn(List<Date> values) {
addCriterion("update_time not in", values, "updateTime");
addCriterionForJDBCDate("update_time not in", values, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeBetween(Date value1, Date value2) {
addCriterion("update_time between", value1, value2, "updateTime");
addCriterionForJDBCDate("update_time between", value1, value2, "updateTime");
return (Criteria) this;
}
public Criteria andUpdateTimeNotBetween(Date value1, Date value2) {
addCriterion("update_time not between", value1, value2, "updateTime");
addCriterionForJDBCDate("update_time not between", value1, value2, "updateTime");
return (Criteria) this;
}

@ -85,7 +85,7 @@ public class OutRechargeOrder implements Serializable {
private String rechargeContent;
/**
* 1支付宝 2微信 3汇联通工会卡 4银联 5银联分期 6:商户预充值
* 1支付宝 2微信 3汇联通工会卡 4银联 5银联分期
*/
private Integer payType;
@ -200,6 +200,21 @@ public class OutRechargeOrder implements Serializable {
private String ext3;
private String rechargeName;
private String remarks;
private String agentKey;
private Long objectId;
private String abnormalMsg;
/**
* 是否返利
*/
private Boolean whetherRebate;
private static final long serialVersionUID = 1L;
public Long getId() {
@ -514,6 +529,54 @@ public class OutRechargeOrder implements Serializable {
this.ext3 = ext3;
}
public String getRechargeName() {
return rechargeName;
}
public void setRechargeName(String rechargeName) {
this.rechargeName = rechargeName;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getAgentKey() {
return agentKey;
}
public void setAgentKey(String agentKey) {
this.agentKey = agentKey;
}
public Long getObjectId() {
return objectId;
}
public void setObjectId(Long objectId) {
this.objectId = objectId;
}
public String getAbnormalMsg() {
return abnormalMsg;
}
public void setAbnormalMsg(String abnormalMsg) {
this.abnormalMsg = abnormalMsg;
}
public Boolean getWhetherRebate() {
return whetherRebate;
}
public void setWhetherRebate(Boolean whetherRebate) {
this.whetherRebate = whetherRebate;
}
@Override
public boolean equals(Object that) {
if (this == that) {
@ -564,7 +627,13 @@ public class OutRechargeOrder implements Serializable {
&& (this.getRechargeStatus() == null ? other.getRechargeStatus() == null : this.getRechargeStatus().equals(other.getRechargeStatus()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()))
&& (this.getRechargeName() == null ? other.getRechargeName() == null : this.getRechargeName().equals(other.getRechargeName()))
&& (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
&& (this.getAgentKey() == null ? other.getAgentKey() == null : this.getAgentKey().equals(other.getAgentKey()))
&& (this.getObjectId() == null ? other.getObjectId() == null : this.getObjectId().equals(other.getObjectId()))
&& (this.getAbnormalMsg() == null ? other.getAbnormalMsg() == null : this.getAbnormalMsg().equals(other.getAbnormalMsg()))
&& (this.getWhetherRebate() == null ? other.getWhetherRebate() == null : this.getWhetherRebate().equals(other.getWhetherRebate()));
}
@Override
@ -610,6 +679,12 @@ public class OutRechargeOrder implements Serializable {
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
result = prime * result + ((getRechargeName() == null) ? 0 : getRechargeName().hashCode());
result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
result = prime * result + ((getAgentKey() == null) ? 0 : getAgentKey().hashCode());
result = prime * result + ((getObjectId() == null) ? 0 : getObjectId().hashCode());
result = prime * result + ((getAbnormalMsg() == null) ? 0 : getAbnormalMsg().hashCode());
result = prime * result + ((getWhetherRebate() == null) ? 0 : getWhetherRebate().hashCode());
return result;
}
@ -658,6 +733,12 @@ public class OutRechargeOrder implements Serializable {
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", rechargeName=").append(rechargeName);
sb.append(", remarks=").append(remarks);
sb.append(", agentKey=").append(agentKey);
sb.append(", objectId=").append(objectId);
sb.append(", abnormalMsg=").append(abnormalMsg);
sb.append(", whetherRebate=").append(whetherRebate);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();

@ -2615,6 +2615,406 @@ public class OutRechargeOrderExample {
addCriterion("ext_3 not between", value1, value2, "ext3");
return (Criteria) this;
}
public Criteria andRechargeNameIsNull() {
addCriterion("recharge_name is null");
return (Criteria) this;
}
public Criteria andRechargeNameIsNotNull() {
addCriterion("recharge_name is not null");
return (Criteria) this;
}
public Criteria andRechargeNameEqualTo(String value) {
addCriterion("recharge_name =", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameNotEqualTo(String value) {
addCriterion("recharge_name <>", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameGreaterThan(String value) {
addCriterion("recharge_name >", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameGreaterThanOrEqualTo(String value) {
addCriterion("recharge_name >=", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameLessThan(String value) {
addCriterion("recharge_name <", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameLessThanOrEqualTo(String value) {
addCriterion("recharge_name <=", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameLike(String value) {
addCriterion("recharge_name like", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameNotLike(String value) {
addCriterion("recharge_name not like", value, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameIn(List<String> values) {
addCriterion("recharge_name in", values, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameNotIn(List<String> values) {
addCriterion("recharge_name not in", values, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameBetween(String value1, String value2) {
addCriterion("recharge_name between", value1, value2, "rechargeName");
return (Criteria) this;
}
public Criteria andRechargeNameNotBetween(String value1, String value2) {
addCriterion("recharge_name not between", value1, value2, "rechargeName");
return (Criteria) this;
}
public Criteria andRemarksIsNull() {
addCriterion("remarks is null");
return (Criteria) this;
}
public Criteria andRemarksIsNotNull() {
addCriterion("remarks is not null");
return (Criteria) this;
}
public Criteria andRemarksEqualTo(String value) {
addCriterion("remarks =", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksNotEqualTo(String value) {
addCriterion("remarks <>", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksGreaterThan(String value) {
addCriterion("remarks >", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksGreaterThanOrEqualTo(String value) {
addCriterion("remarks >=", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksLessThan(String value) {
addCriterion("remarks <", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksLessThanOrEqualTo(String value) {
addCriterion("remarks <=", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksLike(String value) {
addCriterion("remarks like", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksNotLike(String value) {
addCriterion("remarks not like", value, "remarks");
return (Criteria) this;
}
public Criteria andRemarksIn(List<String> values) {
addCriterion("remarks in", values, "remarks");
return (Criteria) this;
}
public Criteria andRemarksNotIn(List<String> values) {
addCriterion("remarks not in", values, "remarks");
return (Criteria) this;
}
public Criteria andRemarksBetween(String value1, String value2) {
addCriterion("remarks between", value1, value2, "remarks");
return (Criteria) this;
}
public Criteria andRemarksNotBetween(String value1, String value2) {
addCriterion("remarks not between", value1, value2, "remarks");
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;
}
public Criteria andObjectIdIsNull() {
addCriterion("object_id is null");
return (Criteria) this;
}
public Criteria andObjectIdIsNotNull() {
addCriterion("object_id is not null");
return (Criteria) this;
}
public Criteria andObjectIdEqualTo(Long value) {
addCriterion("object_id =", value, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdNotEqualTo(Long value) {
addCriterion("object_id <>", value, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdGreaterThan(Long value) {
addCriterion("object_id >", value, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdGreaterThanOrEqualTo(Long value) {
addCriterion("object_id >=", value, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdLessThan(Long value) {
addCriterion("object_id <", value, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdLessThanOrEqualTo(Long value) {
addCriterion("object_id <=", value, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdIn(List<Long> values) {
addCriterion("object_id in", values, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdNotIn(List<Long> values) {
addCriterion("object_id not in", values, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdBetween(Long value1, Long value2) {
addCriterion("object_id between", value1, value2, "objectId");
return (Criteria) this;
}
public Criteria andObjectIdNotBetween(Long value1, Long value2) {
addCriterion("object_id not between", value1, value2, "objectId");
return (Criteria) this;
}
public Criteria andAbnormalMsgIsNull() {
addCriterion("abnormal_msg is null");
return (Criteria) this;
}
public Criteria andAbnormalMsgIsNotNull() {
addCriterion("abnormal_msg is not null");
return (Criteria) this;
}
public Criteria andAbnormalMsgEqualTo(String value) {
addCriterion("abnormal_msg =", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotEqualTo(String value) {
addCriterion("abnormal_msg <>", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgGreaterThan(String value) {
addCriterion("abnormal_msg >", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgGreaterThanOrEqualTo(String value) {
addCriterion("abnormal_msg >=", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgLessThan(String value) {
addCriterion("abnormal_msg <", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgLessThanOrEqualTo(String value) {
addCriterion("abnormal_msg <=", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgLike(String value) {
addCriterion("abnormal_msg like", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotLike(String value) {
addCriterion("abnormal_msg not like", value, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgIn(List<String> values) {
addCriterion("abnormal_msg in", values, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotIn(List<String> values) {
addCriterion("abnormal_msg not in", values, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgBetween(String value1, String value2) {
addCriterion("abnormal_msg between", value1, value2, "abnormalMsg");
return (Criteria) this;
}
public Criteria andAbnormalMsgNotBetween(String value1, String value2) {
addCriterion("abnormal_msg not between", value1, value2, "abnormalMsg");
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;
}
}
/**

@ -7,7 +7,8 @@ package com.hai.enum_type;
*/
public enum ApproveType {
UP_SHELF_APPROVE(1, "卡卷上架审批"),
COUPON_PRICE_APPROVE(2, "卡卷价格审批")
COUPON_PRICE_APPROVE(2, "卡卷价格审批"),
COUPON_DISTRIBUTE_APPROVE(3, "卡卷分发审批"),
;
private Integer type;

@ -77,6 +77,24 @@ public interface BsIntegralRebateService {
**/
void deleteIntegralRebate(Long id);
/**
* @Author Sum1Dream
* @Name integralRebate
* @Description // 订单积分返利
* @Date 11:32 2022/9/1
* @Param [object]
* @Return void
*/
void integralRebate(JSONObject object);
/**
* @Author Sum1Dream
* @Name integralRechargeRebate
* @Description // 话费订单返利
* @Date 11:33 2022/9/1
* @Param [object]
* @Return void
*/
void integralRechargeRebate(JSONObject object);
}

@ -8,12 +8,15 @@ package com.hai.service;
*/
import com.alibaba.fastjson.JSONObject;
import com.hai.entity.ApiCity;
import com.hai.entity.SecDictionary;
import com.hai.entity.SecRegion;
import com.hai.model.IndexCountModel;
import com.hai.model.LineCountModel;
import com.hai.model.OrderCountModel;
import com.hai.model.OrderSumModel;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.bean.result.WxMpQrCodeTicket;
import org.apache.ibatis.type.BigDecimalTypeHandler;
import java.math.BigDecimal;
@ -282,4 +285,15 @@ public interface CommonService {
*/
void configPlatform(JSONObject object);
/**
* @Author Sum1Dream
* @name findCityByName.java
* @Description // 根据名称查询城市
* @Date 15:00 2022/5/12
* @Param [String name]
* @return void
*/
ApiCity findCityByName(String name);
}

@ -73,6 +73,16 @@ public interface HighCouponService {
**/
void priceApproveResult(HighApprove highApprove);
/**
* @Author Sum1Dream
* @Name distributeApprove
* @Description // 卡券分发审批
* @Date 16:57 2022/8/31
* @Param [highApprove]
* @Return void
*/
void distributeApprove(HighApprove highApprove);
/**
* @Author 胡锐
* @Description 根据id查询卡卷基本信息赠送信息
@ -105,6 +115,13 @@ public interface HighCouponService {
**/
List<HighCoupon> getCouponList(Map<String, Object> map);
/**
* @Author 胡锐
* @Description 获取卡卷集合
* @Date 2021/3/15 23:12
**/
List<HighCoupon> getCouponListByAll(Map<String, Object> map);
/**
* @Author 胡锐
* @Description 获取数量

@ -561,7 +561,7 @@ public interface HighOrderService {
* @Param [java.lang.Integer, java.lang.Long]
* @return com.alibaba.fastjson.JSONObject
*/
JSONObject orderSource(Integer goodsType , Long goodsId , String orderNo , Long companyId);
JSONObject orderSource(Integer goodsType , Long goodsId , String orderNo , Long companyId , Integer productId);
/**
* @Author Sum1Dream

@ -57,6 +57,16 @@ public interface HighUserService {
**/
HighUser findByOpenId(String openId);
/**
* @Author Sum1Dream
* @name findByOpenIdH5.java
* @Description // 根据h5openId查询
* @Date 15:10 2022/8/23
* @Param [java.lang.String]
* @return com.hai.entity.HighUser
*/
HighUser findByOpenIdH5(String openId);
/**
*
* @param unionId

@ -176,5 +176,14 @@ public interface OutRechargeOrderService {
*/
Integer rechargeOrderNum(Long userId);
/**
* @Author Sum1Dream
* @name integralRebateRechargeOrder.java
* @Description // 查询话费未返利订单
* @Date 17:49 2022/5/30
* @Param [java.lang.Long]
* @return java.lang.Integer
*/
List<OutRechargeOrder> integralRebateRechargeOrder();
}

@ -6,10 +6,8 @@ import com.hai.dao.BsIntegralRebateMapper;
import com.hai.entity.BsIntegralRebate;
import com.hai.entity.BsIntegralRebateExample;
import com.hai.entity.HighOrder;
import com.hai.service.BsDistributionUserRelService;
import com.hai.service.BsIntegralRebateService;
import com.hai.service.HighOrderService;
import com.hai.service.HighUserService;
import com.hai.entity.OutRechargeOrder;
import com.hai.service.*;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
@ -31,6 +29,9 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
@Resource
private HighOrderService highOrderService;
@Resource
private OutRechargeOrderService outRechargeOrderService;
@Resource
private BsDistributionUserRelService bsDistributionUserRelService;
@ -140,4 +141,49 @@ public class BsIntegralRebateServiceImpl implements BsIntegralRebateService {
}
}
@Override
public void integralRechargeRebate(JSONObject object) {
Map<String, Object> map = new HashMap<>();
map.put("type" , object.getInteger("type"));
map.put("productId" , object.getLong("productId"));
map.put("companyId" , object.getLong("companyId"));
if (object.getLong("companyId") != null) {
BsIntegralRebate bsIntegralRebate = findIntegralRebateByMap(map);
if (DateUtil.isEffectiveDate(object.getDate("createTime"), bsIntegralRebate.getStartTime() , bsIntegralRebate.getEndTime())) {
JSONObject jsonObject = new JSONObject();
OutRechargeOrder order = outRechargeOrderService.findByOrderId(object.getLong("orderId"));
order.setWhetherRebate(true);
BigDecimal integralNum = object.getBigDecimal("price").multiply(bsIntegralRebate.getPercentage()).setScale( 0, BigDecimal.ROUND_HALF_UP );
if (bsIntegralRebate.getFirstDistribution() !=null) {
BigDecimal integralNumFirst = object.getBigDecimal("price").multiply(bsIntegralRebate.getFirstDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP );
jsonObject.put("integralNumFirst" , integralNumFirst);
}
if (bsIntegralRebate.getSecondDistribution() !=null) {
BigDecimal integralNumSecond = object.getBigDecimal("price").multiply(bsIntegralRebate.getSecondDistribution()).setScale( 0, BigDecimal.ROUND_HALF_UP );
jsonObject.put("integralNumSecond" , integralNumSecond);
}
order.setWhetherRebate(true);
jsonObject.put("title" , object.getString("name"));
jsonObject.put("orderNo" , order.getOrderNo());
jsonObject.put("userId" , object.getLong("userId"));
jsonObject.put("logoImg" , object.getString("logoImg"));
bsDistributionUserRelService.distributionRebate(jsonObject);
outRechargeOrderService.updateOrder(order);
highUserService.goldHandle(object.getLong("userId"), integralNum.intValue(), 1, 4, object.getLong("orderId") , object.getString("remark") + integralNum);
}
}
}
}

@ -17,7 +17,9 @@ import com.hai.service.CommonService;
import com.hai.service.HighOrderService;
import com.hai.service.HighUserService;
import com.hai.service.SecConfigService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -65,6 +67,9 @@ public class CommonServiceImpl implements CommonService {
@Resource
private BsProductPayTypeMapper bsProductPayTypeMapper;
@Resource
private ApiCityMapper apiCityMapper;
private Map<String, Map<String, SecDictionary>> dicCache = new HashMap<String, Map<String, SecDictionary>>();
private List<SecRegion> citiesCache = new ArrayList<>();
@ -529,18 +534,20 @@ public class CommonServiceImpl implements CommonService {
@Override
public JSONObject findByLatAndLng(String lng, String lat) throws Exception {
Map<String,Object> map = new HashMap<>();//参数
map.put("ak", "SfrwGH7INvjPq7BwCrYrioBQZm9XXxrR");//申请百度开放平台KEY(ak)
map.put("output", "json");// 输出Json数据
map.put("extensions_town", "true");// 行政区划返回乡镇级数据(town),仅国内召回乡镇数据
map.put("coordtype", "wgs84ll"); // GPS 经纬度类型
map.put("location", lat+","+lng+"");//百度经纬度
String url = "http://api.map.baidu.com/reverse_geocoding/v3/";
System.out.println("请求经纬度========" + map);
//参数
Map<String,Object> map = new HashMap<>();
//申请百度开放平台KEY(ak)
map.put("ak", "SfrwGH7INvjPq7BwCrYrioBQZm9XXxrR");
// 输出Json数据
map.put("output", "json");
// 行政区划返回乡镇级数据(town),仅国内召回乡镇数据
map.put("extensions_town", "true");
// GPS 经纬度类型
map.put("coordtype", "wgs84ll");
//百度经纬度
map.put("location", lat+","+lng+"");
return HttpsUtils.doGet(url , map);
return HttpsUtils.doGet("http://api.map.baidu.com/reverse_geocoding/v3/" , map);
}
@ -617,6 +624,20 @@ public class CommonServiceImpl implements CommonService {
}
}
@Override
public ApiCity findCityByName(String name) {
ApiCityExample example = new ApiCityExample();
example.createCriteria().andCityNameEqualTo(name);
List<ApiCity> list = apiCityMapper.selectByExample(example);
if (list.size()>0) {
return list.get(0);
}
return null;
}
// 清空支付方式配置
private void deletePayType(Long sourceId) {
@ -676,4 +697,5 @@ public class CommonServiceImpl implements CommonService {
}
}
}

@ -1,15 +1,16 @@
package com.hai.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.dao.HighApproveMapper;
import com.hai.entity.HighApprove;
import com.hai.entity.HighApproveExample;
import com.hai.entity.HighCoupon;
import com.hai.entity.*;
import com.hai.enum_type.ApproveType;
import com.hai.model.HighCouponModel;
import com.hai.service.HighAgentService;
import com.hai.service.HighApproveService;
import com.hai.service.HighCouponAgentService;
import com.hai.service.HighCouponService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
@ -36,8 +37,9 @@ public class HighApproveServiceImpl implements HighApproveService {
@Resource
private HighCouponService highCouponService;
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
@Transactional(propagation= Propagation.REQUIRES_NEW ,rollbackFor = Exception.class)
public void insertApprove(HighApprove highApprove) {
// 卡卷上架审批
@ -49,6 +51,11 @@ public class HighApproveServiceImpl implements HighApproveService {
if (Objects.equals(highApprove.getObjectType(), ApproveType.COUPON_PRICE_APPROVE.getType())) {
// 暂时不需要调用接口
}
// 卡卷分发审批
if (Objects.equals(highApprove.getObjectType(), ApproveType.COUPON_DISTRIBUTE_APPROVE.getType())) {
// 暂时不需要调用接口
}
highApproveMapper.insert(highApprove);
}
@ -64,14 +71,18 @@ public class HighApproveServiceImpl implements HighApproveService {
@Override
public void approveProcessed(HighApprove highApprove) {
if (highApprove.getObjectType() == ApproveType.UP_SHELF_APPROVE.getType()) {
if (highApprove.getObjectType().equals(ApproveType.UP_SHELF_APPROVE.getType())) {
highCouponService.upShelfApproveResult(highApprove);
}
if (highApprove.getObjectType() == ApproveType.COUPON_PRICE_APPROVE.getType()) {
if (highApprove.getObjectType().equals(ApproveType.COUPON_PRICE_APPROVE.getType())) {
highCouponService.priceApproveResult(highApprove);
}
if (highApprove.getObjectType().equals(ApproveType.COUPON_DISTRIBUTE_APPROVE.getType())) {
highCouponService.distributeApprove(highApprove);
}
updateApprove(highApprove);
}

@ -71,7 +71,7 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
private HighCouponCodeOtherService couponCodeOtherService;
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
@Transactional(propagation= Propagation.REQUIRES_NEW , rollbackFor = Exception.class)
public void assignCouponAgent(HighCouponAgentRel highCouponAgentRel,Integer stockCount) {
if (highCouponAgentRel.getId() != null) {
highCouponAgentRelMapper.updateByPrimaryKey(highCouponAgentRel);

@ -1,8 +1,12 @@
package com.hai.service.impl;
import com.alibaba.fastjson.JSON;
<<<<<<< HEAD
import com.alicp.jetcache.anno.CacheType;
import com.alicp.jetcache.anno.Cached;
=======
import com.alibaba.fastjson.JSONObject;
>>>>>>> dev_yy
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
@ -37,6 +41,9 @@ public class HighCouponServiceImpl implements HighCouponService {
@Resource
private HighCouponMapper highCouponMapper;
@Resource
private HighCouponService highCouponService;
@Resource
private HighCouponHandselService highCouponHandselService;
@ -55,8 +62,17 @@ public class HighCouponServiceImpl implements HighCouponService {
@Resource
private HighApproveService highApproveService;
<<<<<<< HEAD
@Autowired
private RedisTemplate redisTemplate;
=======
@Resource
private HighAgentService highAgentService;
@Resource
private HighCouponAgentService highCouponAgentService;
>>>>>>> dev_yy
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
@ -286,6 +302,53 @@ public class HighCouponServiceImpl implements HighCouponService {
highGoodsPriceReferService.updatePriceRefer(highGoodsPriceRefer);
}
@Override
public void distributeApprove(HighApprove highApprove) {
JSONObject object = JSONObject.parseObject(highApprove.getApproveObject());
if (highApprove.getStatus() == 3) {
// 查询卡券详情
HighCoupon coupon = highCouponService.getCouponById(object.getLong("couponId"));
if (coupon == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_COUPON, "");
}
// 查询代理商
HighAgent highAgent = highAgentService.findByAgentMsgId(object.getLong("agentId"));
if (highAgent == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.NOT_FOUND_AGENT, "");
}
// 校验是否分配过
HighCouponAgentRel couponAgent = highCouponAgentService.getRelByCouponAgent(object.getLong("couponId"), object.getLong("agentId"), object.getInteger("type"));
if (couponAgent != null) {
couponAgent.setStockCount(couponAgent.getStockCount() + object.getInteger("stockCount"));
couponAgent.setOperatorId(highApprove.getSubmitOperatorId());
couponAgent.setOperatorName(highApprove.getSubmitOperatorName());
highCouponAgentService.assignCouponAgent(couponAgent,object.getInteger("stockCount"));
} else {
HighCouponAgentRel highCouponAgentRel = new HighCouponAgentRel();
highCouponAgentRel.setCouponName(coupon.getCouponName());
highCouponAgentRel.setSalesPrice(coupon.getSalesPrice());
// 状态 0:删除 1:正常
highCouponAgentRel.setStatus(1);
highCouponAgentRel.setSalesCount(0);
highCouponAgentRel.setType(object.getInteger("type"));
highCouponAgentRel.setCouponId(object.getLong("couponId"));
highCouponAgentRel.setAgentId(object.getLong("agentId"));
highCouponAgentRel.setStockCount(object.getInteger("stockCount"));
highCouponAgentRel.setCreateTime(new Date());
highCouponAgentRel.setOperatorId(highApprove.getSubmitOperatorId());
highCouponAgentRel.setOperatorName(highApprove.getSubmitOperatorName());
highCouponAgentService.assignCouponAgent(highCouponAgentRel,highCouponAgentRel.getStockCount());
}
}
}
@Override
public HighCoupon getCouponById(Long id) {
HighCoupon highCoupon = highCouponMapper.selectByPrimaryKey(id);
@ -398,6 +461,60 @@ public class HighCouponServiceImpl implements HighCouponService {
return coupons;
}
@Override
public List<HighCoupon> getCouponListByAll(Map<String, Object> map) {
HighCouponExample example = new HighCouponExample();
HighCouponExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "companyId") != null) {
criteria.andCompanyIdEqualTo(MapUtils.getLong(map, "companyId"));
}
if (MapUtils.getLong(map, "merchantId") != null) {
criteria.andMerchantIdEqualTo(MapUtils.getLong(map, "merchantId"));
}
if (StringUtils.isNotBlank(MapUtils.getString(map, "couponName"))) {
criteria.andCouponNameLike("%" + MapUtils.getString(map, "couponName") + "%");
}
if (MapUtils.getInteger(map, "couponType") != null) {
criteria.andCouponTypeEqualTo(MapUtils.getInteger(map, "couponType"));
}
if (MapUtils.getInteger(map, "displayArea") != null) {
criteria.andDisplayAreaEqualTo(MapUtils.getInteger(map, "displayArea"));
}
if (MapUtils.getInteger(map, "displayArea") != null) {
criteria.andDisplayAreaEqualTo(MapUtils.getInteger(map, "displayArea"));
}
if (MapUtils.getInteger(map, "brandId") != null) {
criteria.andBrandIdEqualTo(MapUtils.getInteger(map, "brandId"));
}
if (MapUtils.getInteger(map, "goodsTypeId") != null) {
criteria.andGoodsTypeIdEqualTo(MapUtils.getInteger(map, "goodsTypeId"));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}
if (MapUtils.getInteger(map, "couponSource") != null) {
criteria.andCouponSourceEqualTo(MapUtils.getInteger(map, "status"));
}
if (MapUtils.getInteger(map, "notCouponSource") != null) {
criteria.andCouponSourceNotEqualTo(MapUtils.getInteger(map, "notCouponSource"));
}
example.setOrderByClause("create_time");
return highCouponMapper.selectByExample(example);
}
@Override
public Long getCouponByCouponName(Long companyId,String couponName) {
HighCouponExample example = new HighCouponExample();

@ -1395,6 +1395,10 @@ public class HighOrderServiceImpl implements HighOrderService {
// 扣预存款
this.redisTemplate.boundListOps(MsgTopic.MerStoreAccount.getName()).leftPush(pushParam);
}
// 打印小票
printGasOrder(highChildOrder.getGoodsId(), order, false);
} else if (store.getSourceType().equals(2)) {
// 推送团油订单
Map<String, Object> paramMap = new HashMap<>();
@ -2258,8 +2262,6 @@ public class HighOrderServiceImpl implements HighOrderService {
// 1 星巴克 2 肯德基 3 会员充值
if (object.getInteger("productType") == 1) {
List<String> List = new ArrayList<>();
JSONArray array = object.getJSONArray("orderItems");
@ -2288,7 +2290,7 @@ public class HighOrderServiceImpl implements HighOrderService {
if (!object1.getString("milkBubble").equals("")) {
contentMap.put("milkBubble", object1.getString("milkBubble"));
}
if (!object1.getString("num").equals("")) {
if (!"".equals(object1.getString("num"))) {
contentMap.put("num", object1.getString("num"));
}
List.add(JSON.toJSONString(contentMap));
@ -3006,7 +3008,7 @@ public class HighOrderServiceImpl implements HighOrderService {
}
@Override
public JSONObject orderSource(Integer goodsType, Long goodsId , String orderNo , Long companyId) {
public JSONObject orderSource(Integer goodsType, Long goodsId , String orderNo , Long companyId , Integer productId) {
JSONObject object = new JSONObject();
@ -3050,6 +3052,13 @@ public class HighOrderServiceImpl implements HighOrderService {
object.put("remark" , "会员充值订单" + orderNo + "积分返利:");
object.put("name" , "购买会员充值产品");
}
if (goodsType == 20) {
object.put("type" , 3);
object.put("productId", productId);
object.put("companyId", companyId);
object.put("remark" , "话费充值订单" + orderNo + "积分返利:");
object.put("name" , "购买话费充值产品");
}
object.put("logoImg" , OrderLogoEnum.getNameByImgUrl(goodsType));
return object;
@ -3085,6 +3094,7 @@ public class HighOrderServiceImpl implements HighOrderService {
/* if (MapUtils.getLong(map , "agentId") != null) {
criteria.andIdentificationCodeEqualTo(MapUtils.getLong(map , "agentId"));
} else {
<<<<<<< HEAD
criteria.andIdentificationCodeIsNotNull();
}*/
@ -3097,6 +3107,29 @@ public class HighOrderServiceImpl implements HighOrderService {
order.setGoodsTypeName("购买:" + GoodsType.getNameByType(childOrder.get(0).getGoodsType()));
order.setAgentName(user.getName());
}*/
=======
criteria.andIdentificationCodeIsNotNull().andIdentificationCodeNotEqualTo(60L);
}
if (MapUtils.getLong(map , "code") != null) {
criteria.andIdentificationCodeEqualTo(MapUtils.getLong(map , "code"));
}
List<HighOrder> list = highOrderMapper.selectByExample(example);
if (list.size() > 0) {
for (HighOrder order : list) {
HighUser user = highUserService.findByUserId(order.getIdentificationCode());
order.setTime(DateUtil.date2String(order.getCreateTime() , "MM月dd日 HH:mm"));
List<HighChildOrder> childOrder = getChildOrderByOrder(order.getId());
order.setGoodsTypeName("购买:" + GoodsType.getNameByType(childOrder.get(0).getGoodsType()));
if (user != null) {
order.setAgentName(user.getName());
} else {
order.setAgentName("暂无推广人");
}
}
}
>>>>>>> dev_yy
return list;
}

@ -143,6 +143,17 @@ public class HighUserServiceImpl implements HighUserService {
return null;
}
@Override
public HighUser findByOpenIdH5(String openId) {
HighUserExample example = new HighUserExample();
example.createCriteria().andOpenIdH5EqualTo(openId).andStatusEqualTo(1);
List<HighUser> list = highUserMapper.selectByExample(example);
if (list != null && list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public HighUser findByUnionId(String unionId) {
HighUserExample example = new HighUserExample();

@ -166,6 +166,19 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
DateUtil.format(MapUtils.getString(map, "createTimeE"), "yyyy-MM-dd HH:mm:ss"));
}
if (MapUtils.getBoolean(map , "whetherTimeOut") != null && MapUtils.getBoolean(map , "whetherTimeOut")) {
// 获取当前时间
Date date= new Date();
Calendar calendar = new GregorianCalendar();
calendar.setTime(date);
// 把日期往前减少三天,整数 往后推,负数往前移动
calendar.add(Calendar.DATE, -3);
// 这个时间就是日期往后推一天的结果
date = calendar.getTime();
criteria.andCreateTimedLessThan(date);
}
example.setOrderByClause("create_timed desc");
return outRechargeOrderMapper.selectByExample(example);
}
@ -322,6 +335,7 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
outRechargeOrder.setOrderNo("RCG" + DateUtil.date2String(new Date(), "yyyyMMddHHmmss") + IDGenerator.nextId(5));
outRechargeOrder.setCreateTimed(new Date());
outRechargeOrder.setGoodsId(goodsId);
outRechargeOrder.setWhetherRebate(false);
outRechargeOrder.setMerchId(object.getString("mchId"));
outRechargeOrder.setRechargePrice(outRechargePrice.getRechargePrice());
if (object.getLong("memDiscountId") != null) {
@ -435,33 +449,6 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
public void finishOrder(Long orderId) {
OutRechargeOrder order = findByOrderId(orderId);
if (order != null) {
new Thread(() -> {
JSONObject object = new JSONObject();
object.put("type" , 3);
object.put("productId" , order.getOperatorType());
object.put("companyId" , order.getCompanyId());
object.put("price" , order.getPayRealPrice());
object.put("userId" , order.getUserId());
object.put("orderId" , order.getId());
object.put("remark" , "话费订单" + order.getOrderNo() + "积分返利:");
Map<String, Object> map = new HashMap<>();
map.put("goldType", 1);
map.put("resType", 4);
map.put("userId", order.getUserId());
map.put("resId", order.getId());
List<HighGoldRec> goldRecs = highGoldRecService.getGoldRec(map);
if (goldRecs.size() == 0) {
bsIntegralRebateService.integralRebate(object);
}
}).start();
order.setRechargeStatus(202); // 订单状态:1 待支付 2 已支付 3.已完成 4. 已取消 5.已退款
order.setPayStatus(100); // 订单状态:1 待支付 2 已支付 3.已完成 4. 已取消 5.已退款
order.setFinishTime(new Date());
@ -1004,4 +991,9 @@ public class OutRechargeOrderServiceImpl implements OutRechargeOrderService {
return outRechargeOrderMapper.selectByExample(example).size();
}
@Override
public List<OutRechargeOrder> integralRebateRechargeOrder() {
return outRechargeOrderMapper.integralRebateRechargeOrder();
}
}

@ -96,4 +96,5 @@ unionSecret=a0f380bb22cd4ce2a8d35f3bf437d6fa
unionRsaKey=f2e6b6b95da445866194498c371a7c8af2e6b6b95da44586
#url
fileUrl=/home/project/hlt/filesystem/
fileUrl=/home/project/hsg/filesystem/

@ -94,4 +94,5 @@ unionSecret=a0f380bb22cd4ce2a8d35f3bf437d6fa
unionRsaKey=f2e6b6b95da445866194498c371a7c8af2e6b6b95da44586
#url
fileUrl=/home/project/hlt/filesystem/
fileUrl=/home/project/hsg/filesystem/

@ -0,0 +1,220 @@
<?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="web" name="Web">
<configuration>
<webroots />
</configuration>
</facet>
<facet type="Spring" name="Spring">
<configuration />
</facet>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="hai-service" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.10.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.10.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Maven: javax.annotation:javax.annotation-api:1.3.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.yaml:snakeyaml:1.19" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-web:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-json:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.9.6" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.6" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-parameter-names:2.9.6" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-tomcat:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-core:8.5.34" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-el:8.5.34" level="project" />
<orderEntry type="library" name="Maven: org.apache.tomcat.embed:tomcat-embed-websocket:8.5.34" level="project" />
<orderEntry type="library" name="Maven: org.hibernate.validator:hibernate-validator:6.0.12.Final" level="project" />
<orderEntry type="library" name="Maven: javax.validation:validation-api:2.0.1.Final" level="project" />
<orderEntry type="library" name="Maven: org.jboss.logging:jboss-logging:3.3.2.Final" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-web:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-webmvc:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-jdbc:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:HikariCP:2.7.9" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jdbc:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-tx:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.1" level="project" />
<orderEntry type="library" name="Maven: org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:1.3.1" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis:3.4.5" level="project" />
<orderEntry type="library" name="Maven: org.mybatis:mybatis-spring:1.3.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-data-redis:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-redis:2.0.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-keyvalue:2.0.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.data:spring-data-commons:2.0.10.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-oxm:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context-support:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.lettuce:lettuce-core:5.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: io.projectreactor:reactor-core:3.1.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.reactivestreams:reactive-streams:1.0.2" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.29.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.29.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.29.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.29.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.29.Final" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.29.Final" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-thymeleaf:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring5:3.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf.extras:thymeleaf-extras-java8time:3.0.1.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf:3.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: ognl:ognl:3.1.12" level="project" />
<orderEntry type="library" name="Maven: org.javassist:javassist:3.20.0-GA" level="project" />
<orderEntry type="library" name="Maven: org.attoparser:attoparser:2.0.4.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.unbescape:unbescape:1.1.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.thymeleaf:thymeleaf-spring4:3.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-starter:1.2.10" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper-spring-boot-autoconfigure:1.2.10" level="project" />
<orderEntry type="library" name="Maven: com.github.pagehelper:pagehelper:5.1.8" level="project" />
<orderEntry type="library" name="Maven: com.github.jsqlparser:jsqlparser:1.2" level="project" />
<orderEntry type="library" name="Maven: org.aspectj:aspectjweaver:1.8.13" level="project" />
<orderEntry type="library" name="Maven: tk.mybatis:mapper:3.3.0" level="project" />
<orderEntry type="library" name="Maven: javax.persistence:persistence-api:1.0" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpclient:4.5.6" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore:4.4.10" level="project" />
<orderEntry type="library" name="Maven: mysql:mysql-connector-java:5.1.47" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:druid:1.0.20" level="project" />
<orderEntry type="module-library">
<library name="Maven: com.alibaba:jconsole:1.8.0">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../Program Files/Java/jdk1.8.0_191/jre/../lib/jconsole.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="module-library">
<library name="Maven: com.alibaba:tools:1.8.0">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../Program Files/Java/jdk1.8.0_191/jre/../lib/tools.jar!/" />
</CLASSES>
<JAVADOC />
<SOURCES />
</library>
</orderEntry>
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger2:2.6.1" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.10" level="project" />
<orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.10" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spi:2.6.1" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-core:2.6.1" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-schema:2.6.1" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-common:2.6.1" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-spring-web:2.6.1" level="project" />
<orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml:classmate:1.3.4" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-core:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.plugin:spring-plugin-metadata:1.2.0.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.mapstruct:mapstruct:1.0.0.Final" level="project" />
<orderEntry type="library" name="Maven: io.springfox:springfox-swagger-ui:2.6.1" level="project" />
<orderEntry type="library" name="Maven: joda-time:joda-time:2.9.9" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-collections4:4.2" level="project" />
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
<orderEntry type="library" name="Maven: commons-logging:commons-logging:1.2" level="project" />
<orderEntry type="library" name="Maven: commons-fileupload:commons-fileupload:1.4" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.6" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:fastjson:1.2.7" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.6" level="project" />
<orderEntry type="library" name="Maven: com.aliyun:aliyun-java-sdk-core:4.1.0" level="project" />
<orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.3.0" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-core:2.1.14" level="project" />
<orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.1" level="project" />
<orderEntry type="library" name="Maven: javax.activation:activation:1.1.1" level="project" />
<orderEntry type="library" name="Maven: dom4j:dom4j:1.6.1" level="project" />
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.4.01" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-math3:3.6.1" level="project" />
<orderEntry type="library" name="Maven: com.zaxxer:SparseBitSet:1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.commons:commons-compress:1.19" level="project" />
<orderEntry type="library" name="Maven: com.github.virtuald:curvesapi:1.06" level="project" />
<orderEntry type="library" name="Maven: org.apache.poi:poi-ooxml-schemas:4.1.2" level="project" />
<orderEntry type="library" name="Maven: org.apache.xmlbeans:xmlbeans:3.1.0" level="project" />
<orderEntry type="library" name="Maven: com.google.zxing:core:3.3.0" level="project" />
<orderEntry type="library" name="Maven: com.google.zxing:javase:3.3.0" level="project" />
<orderEntry type="library" name="Maven: com.beust:jcommander:1.48" level="project" />
<orderEntry type="library" name="Maven: com.github.jai-imageio:jai-imageio-core:1.3.1" level="project" />
<orderEntry type="library" name="Maven: com.itextpdf:kernel:7.0.1" level="project" />
<orderEntry type="library" name="Maven: com.itextpdf:io:7.0.1" level="project" />
<orderEntry type="library" name="Maven: com.itextpdf:itextpdf:5.5.13" level="project" />
<orderEntry type="library" name="Maven: com.itextpdf.tool:xmlworker:5.5.13" level="project" />
<orderEntry type="library" name="Maven: com.itextpdf:itext-asian:5.2.0" level="project" />
<orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-pdf-itext5:9.0.3" level="project" />
<orderEntry type="library" name="Maven: org.xhtmlrenderer:flying-saucer-core:9.0.3" level="project" />
<orderEntry type="library" name="Maven: cn.jpush.api:jpush-client:3.3.7" level="project" />
<orderEntry type="library" name="Maven: cn.jpush.api:jiguang-common:1.1.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-mqtt:5.0.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.integration:spring-integration-core:5.0.8.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.retry:spring-retry:1.2.2.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0" level="project" />
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.29.Final" level="project" />
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.5" level="project" />
<orderEntry type="library" name="Maven: com.alipay.sdk:alipay-sdk-java:4.9.79.ALL" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.62" level="project" />
<orderEntry type="library" name="Maven: com.thoughtworks.xstream:xstream:1.4.11.1" level="project" />
<orderEntry type="library" name="Maven: xmlpull:xmlpull:1.1.3.1" level="project" />
<orderEntry type="library" name="Maven: xpp3:xpp3_min:1.1.4c" level="project" />
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-miniapp:3.8.0" level="project" />
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.65" level="project" />
<orderEntry type="library" name="Maven: com.alibaba:easyexcel:2.2.6" level="project" />
<orderEntry type="library" name="Maven: cglib:cglib:3.1" level="project" />
<orderEntry type="library" name="Maven: org.ow2.asm:asm:4.2" level="project" />
<orderEntry type="library" name="Maven: org.ehcache:ehcache:3.5.2" level="project" />
<orderEntry type="library" name="Maven: org.gavaghan:geodesy:1.1.3" level="project" />
<orderEntry type="library" name="Maven: com.github.wechatpay-apiv3:wechatpay-apache-httpclient:0.2.2" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.6" level="project" />
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.6" level="project" />
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-client:1.16" level="project" />
<orderEntry type="library" name="Maven: com.sun.jersey:jersey-core:1.16" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-test:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-test:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.16.22" level="project" />
<orderEntry type="library" name="Maven: commons-net:commons-net:3.6" level="project" />
<orderEntry type="library" name="Maven: net.coobird:thumbnailator:0.4.8" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: junit:junit:4.12" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-core:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-starter-test:2.0.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.springframework.boot:spring-boot-test-autoconfigure:2.0.5.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.jayway.jsonpath:json-path:2.4.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:json-smart:2.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.assertj:assertj-core:3.9.1" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.mockito:mockito-core:2.15.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy:1.7.11" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: net.bytebuddy:byte-buddy-agent:1.7.11" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.objenesis:objenesis:2.6" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.hamcrest:hamcrest-library:1.3" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.skyscreamer:jsonassert:1.5.0" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: com.vaadin.external.google:android-json:0.0.20131108.vaadin1" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.0.9.RELEASE" level="project" />
<orderEntry type="library" scope="TEST" name="Maven: org.xmlunit:xmlunit-core:2.5.1" level="project" />
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-mp:3.8.0" level="project" />
<orderEntry type="library" name="Maven: com.github.binarywang:weixin-java-common:3.8.0" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:jcl-over-slf4j:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.dom4j:dom4j:2.1.1" level="project" />
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-websocket:2.0.5.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-messaging:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-websocket:5.0.9.RELEASE" level="project" />
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.0.9.RELEASE" level="project" />
</component>
</module>

@ -95,6 +95,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/thirdParty/*")
.excludePathPatterns("/selfOilStation/*")
.excludePathPatterns("/order/*")
.excludePathPatterns("/wxMsg/*")
;
}

@ -9,5 +9,22 @@ import org.springframework.stereotype.Component;
@PropertySource("classpath:/config.properties")
public class SysConfig {
private String wxH5AppId;
private String wxH5AppSecret;
public String getWxH5AppId() {
return wxH5AppId;
}
public void setWxH5AppId(String wxH5AppId) {
this.wxH5AppId = wxH5AppId;
}
public String getWxH5AppSecret() {
return wxH5AppSecret;
}
public void setWxH5AppSecret(String wxH5AppSecret) {
this.wxH5AppSecret = wxH5AppSecret;
}
}

@ -0,0 +1,121 @@
package com.v1.config;
import lombok.extern.slf4j.Slf4j;
import me.chanjar.weixin.common.error.WxErrorException;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.bean.result.WxMpQrCodeTicket;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.File;
/**
* @serviceName WeChatQrcodeUtils.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 生成带参数的二维码
* @createTime 16:11 2022/9/2
**/
@Slf4j
@Component
public class WeChatQrcodeUtils {
@Autowired
private WxMpService wxMpService;
/**
* <pre>
* 创建临时二维码ticket
* @param sceneId 场景值ID临时二维码时为32位非0整型
* @param expireSeconds 该二维码有效时间以秒为单位 最大不超过2592000即30天此字段如果不填则默认有效期为30秒
* @auther: cao_wencao
* @date: 2019/2/18 16:58
* </pre>
*/
public WxMpQrCodeTicket qrCodeCreateTmpTicket(int sceneId, Integer expireSeconds) throws WxErrorException {
WxMpQrCodeTicket wxMpQrCodeTicket = wxMpService.getQrcodeService().qrCodeCreateTmpTicket(sceneId, expireSeconds);
return wxMpQrCodeTicket;
}
/**
* <pre>
* 创建临时二维码ticket
* @param sceneStr 场景值ID字符串形式的ID字符串类型长度限制为1到64
* @param expireSeconds 该二维码有效时间以秒为单位 最大不超过2592000即30天此字段如果不填则默认有效期为30秒
* @auther: cao_wencao
* @date: 2019/2/18 17:01
* </pre>
*/
public WxMpQrCodeTicket qrCodeCreateTmpTicket(String sceneStr, Integer expireSeconds) throws WxErrorException {
WxMpQrCodeTicket wxMpQrCodeTicket = wxMpService.getQrcodeService().qrCodeCreateTmpTicket(sceneStr, expireSeconds);
return wxMpQrCodeTicket;
}
/**
* <pre>
* 创建永久二维码ticket
* @param sceneId 场景值ID最大值为100000目前参数只支持1--100000
* @auther: cao_wencao
* @date: 2019/2/18 17:03
* </pre>
*/
public WxMpQrCodeTicket qrCodeCreateLastTicket(int sceneId) throws WxErrorException {
return wxMpService.getQrcodeService().qrCodeCreateLastTicket(sceneId);
}
/**
* <pre>
* 创建永久字符串二维码ticket
* @param sceneStr 参数字符串类型长度现在为1到64
* @auther: cao_wencao
* @date: 2019/2/18 17:05
* </pre>
*/
public WxMpQrCodeTicket qrCodeCreateLastTicket(String sceneStr) throws WxErrorException {
return wxMpService.getQrcodeService().qrCodeCreateLastTicket(sceneStr);
}
/**
* <pre>
* 换取二维码图片文件jpg格式
* @param ticket 二维码ticket
* @auther: cao_wencao
* @date: 2019/2/18 17:07
* </pre>
*/
public File qrCodePicture(WxMpQrCodeTicket ticket) throws WxErrorException {
return wxMpService.getQrcodeService().qrCodePicture(ticket);
}
/**
* <pre>
* 换取二维码图片url地址可以选择是否生成压缩的网址
* @param ticket 二维码ticket
* @param needShortUrl 是否需要压缩的二维码地址
* @auther: cao_wencao
* @date: 2019/2/18 17:10
* </pre>
*/
public String qrCodePictureUrl(String ticket, boolean needShortUrl) throws WxErrorException {
String qrCodeUrl = wxMpService.getQrcodeService().qrCodePictureUrl(ticket, needShortUrl);
return qrCodeUrl;
}
/**
* <pre>
* 换取二维码图片url地址
* @param ticket 二维码ticket
* @auther: cao_wencao
* @date: 2019/2/18 17:11
* </pre>
*/
public String qrCodePictureUrl(String ticket) throws WxErrorException {
String url = wxMpService.getQrcodeService().qrCodePictureUrl(ticket);
return url;
}
}

@ -0,0 +1,51 @@
package com.v1.config;
import com.hai.config.CommonSysConst;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl;
import me.chanjar.weixin.mp.config.WxMpConfigStorage;
import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @serviceName .java
* @author Sum1Dream
* @version 1.0.0
* @Description //TODO
* @createTime 16:24 2022/9/2
**/
@Configuration
public class WxConfig {
/**
* 微信客户端配置存储
*
* @return
*/
@Bean
public WxMpConfigStorage wxMpConfigStorage() {
WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl();
// 公众号appId
configStorage.setAppId(SysConst.getSysConfig().getWxH5AppId());
// 公众号appSecret
configStorage.setSecret(SysConst.getSysConfig().getWxH5AppSecret());
return configStorage;
}
/**
* @Author Sum1Dream
* @Name wxMpService
* @Description //TODO
* @Date 16:24 2022/9/2
* @Param []
* @Return WxMpService
*/
@Bean
public WxMpService wxMpService() {
WxMpService wxMpService = new WxMpServiceImpl();
wxMpService.setWxMpConfigStorage(wxMpConfigStorage());
return wxMpService;
}
}

@ -0,0 +1,140 @@
package com.v1.controller;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.pay.util.IOUtil;
import com.hai.common.pay.util.XmlUtil;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.common.utils.WxUtils;
import com.hai.model.ResponseData;
import com.hai.service.CommonService;
import com.v1.config.SysConst;
import com.v1.config.WeChatQrcodeUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import me.chanjar.weixin.common.error.WxErrorException;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;
import java.util.SortedMap;
/**
* @author sum1dream
*/
@Controller
@RequestMapping(value = "/wxMsg")
@Api(value = "自建站接口")
public class WxMsgController {
private static Logger log = LoggerFactory.getLogger(ThirdPartyController.class);
@Autowired
private WeChatQrcodeUtils weChatQrcodeUtils;
@RequestMapping(value = "/verifyWxToken", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "验证servlet")
public String verifyWxToken(HttpServletRequest request) {
try {
log.info("进入公众号!!!!!!!");
// 反馈给微信服务器
String resXml = "";
// 微信支付系统发送的数据(<![CDATA[product_001]]>格式)
String notifyXml;
notifyXml = IOUtil.inputStreamToString(request.getInputStream(), "UTF-8");
log.info("微信支付系统发送的数据:" + notifyXml);
SortedMap<String, String> map = XmlUtil.parseXmlToTreeMap(notifyXml, "UTF-8");
// 区分消息类型
String msgType = map.get("MsgType");
log.info("微信支付系统发送的数据:" + msgType);
return null;
} catch (Exception e) {
return null;
}
}
@RequestMapping(value = "/getWxToken", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "获取微信token")
public ResponseData getWxToken() {
try {
Map<String, Object> params = new HashMap<>();
params.put("appid", SysConst.getSysConfig().getWxH5AppId());
params.put("secret", SysConst.getSysConfig().getWxH5AppSecret());
params.put("grant_type", "client_credential");
JSONObject accessTokenObject = HttpsUtils.doGet("https://api.weixin.qq.com/cgi-bin/token", params);
if (accessTokenObject == null) {
log.error("getH5UserInfo error!", "获取微信access_token失败" );
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "获取微信access_token失败");
}
return ResponseMsgUtil.success(accessTokenObject);
} catch (Exception e) {
return ResponseMsgUtil.exception(e);
}
}
/**
* <pre>
* @desc: 创建生成二维码
* @auth: cao_wencao
* @date: 2019/4/10 14:00
* </pre>
*/
@RequestMapping(value = "/createQrcode", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "创建生成二维码")
public ResponseData createQrcode(@RequestParam(name = "sceneId", required = false) Integer sceneId) {
try {
return ResponseMsgUtil.success(weChatQrcodeUtils.qrCodeCreateLastTicket(sceneId));
} catch (WxErrorException e) {
return ResponseMsgUtil.exception(e);
}
}
/**
* <pre>
* @desc: 通过ticket获取二维码长链接URL
* @auth: cao_wencao
* @date: 2019/4/10 14:00
* </pre>
*/
@RequestMapping(value = "/getQrcodeUrl", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "创建生成二维码")
public ResponseData getQrcodeUrl(@RequestParam(name = "ticket", required = false) String ticket) {
try {
return ResponseMsgUtil.success(weChatQrcodeUtils.qrCodePictureUrl(ticket));
} catch (WxErrorException e) {
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,2 @@
wxH5AppId=wxa075e8509802f826
wxH5AppSecret=0e606fc1378d35e359fcf3f15570b2c5

@ -63,6 +63,9 @@
<logger name="com.hai" level="DEBUG">
<appender-ref ref="baselog" />
</logger>
<logger name="com.hai" level="INFO">
<appender-ref ref="baselog" />
</logger>
<logger name="com.hai.dao" level="DEBUG">
<appender-ref ref="daolog" />
</logger>

Loading…
Cancel
Save