提及赠券修改

dev-discount
袁野 3 years ago
parent 2bb2df4b22
commit 94eb938644
  1. 2
      hai-bweb/src/main/java/com/bweb/config/AuthConfig.java
  2. 176
      hai-bweb/src/main/java/com/bweb/controller/HighCouponPackageController.java
  3. 2
      hai-bweb/src/main/java/com/bweb/controller/HighDiscountController.java
  4. 77
      hai-bweb/src/main/java/com/bweb/controller/HighOpenApiController.java
  5. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  6. 16
      hai-bweb/src/main/java/com/bweb/controller/TuanYouController.java
  7. 31
      hai-service/src/main/java/com/hai/config/HuiLianTongUnionCardConfig.java
  8. 35
      hai-service/src/main/java/com/hai/dao/HighDiscountUserRelMapperExt.java
  9. 137
      hai-service/src/main/java/com/hai/model/HighUserDiscountUnicomModel.java
  10. 58
      hai-service/src/main/java/com/hai/service/HighCouponPackageDetailsService.java
  11. 59
      hai-service/src/main/java/com/hai/service/HighCouponPackageService.java
  12. 20
      hai-service/src/main/java/com/hai/service/HighOpenApiService.java
  13. 56
      hai-service/src/main/java/com/hai/service/impl/HighCouponPackageDetailsServiceImpl.java
  14. 74
      hai-service/src/main/java/com/hai/service/impl/HighCouponPackageServiceImpl.java
  15. 29
      hai-service/src/main/java/com/hai/service/impl/HighOpenApiServiceImpl.java
  16. 4
      hai-service/src/main/resources/dev/commonConfig.properties

@ -96,6 +96,8 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/coupon/getGuizhouSinopec")
.excludePathPatterns("/cmsContent/get*")
.excludePathPatterns("/highGoldRec/*")
.excludePathPatterns("/test/*")
.excludePathPatterns("/openApi/*")
;
}

@ -0,0 +1,176 @@
package com.bweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
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.ResponseMsgUtil;
import com.hai.entity.HighCouponPackage;
import com.hai.entity.HighOrderPre;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighCouponPackageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import org.apache.commons.lang3.StringUtils;
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.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* @Author Sum1Dream
* @ClassName HighCouponPackageController
* @Description // 优惠券包接口
* @Date 2021/11/25 4:32 下午
**/
@Controller
@RequestMapping(value = "/highCouponPackage")
@Api(value = "优惠券包接口")
public class HighCouponPackageController {
private static Logger log = LoggerFactory.getLogger(HighOrderPreController.class);
@Autowired
private UserCenter userCenter;
@Resource
private HighCouponPackageService highCouponPackageService;
@RequestMapping(value = "/getCouponPackageList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取优惠券包列表")
public ResponseData getCouponPackageList(@RequestParam(name = "usingAttribution", required = false) Integer usingAttribution,
@RequestParam(name = "title", required = false) String title,
@RequestParam(name = "salesType", required = false) Integer salesType,
@RequestParam(name = "status", required = false) Integer status,
@RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize,
HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
Map<String,Object> map = new HashMap<>();
map.put("companyId", userInfoModel.getBsCompany().getId());
map.put("usingAttribution", usingAttribution);
map.put("title" , title);
map.put("salesType" , salesType);
map.put("status" , status);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(highCouponPackageService.getCouponPackageList(map)));
} catch (Exception e) {
log.error("HighOrderController --> getUserOrderList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/highCouponPackageInfo", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "新增优惠券包基本信息")
public ResponseData highCouponPackageInfo(@RequestBody HighCouponPackage highCouponPackage, HttpServletRequest request) {
try {
//发布人员
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (StringUtils.isBlank(highCouponPackage.getTitle())
|| highCouponPackage.getUsingAttribution() == null
|| highCouponPackage.getSalesType() == null
|| highCouponPackage.getEffectiveTiem() == null
|| highCouponPackage.getPurchaseNum() == null
|| highCouponPackage.getPrice() == null
|| StringUtils.isBlank(highCouponPackage.getBannerImg())
|| StringUtils.isBlank(highCouponPackage.getListImg())
|| StringUtils.isBlank(highCouponPackage.getDetailsImg())
) {
log.error("HighAgentController -> insertAgent() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
if (userInfoModel.getBsCompany() == null) {
log.error("highCouponPackage -> highCouponPackageInfo() error!","该主角色没有权限");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, "");
}
highCouponPackage.setCompanyId(userInfoModel.getBsCompany().getId().intValue());
highCouponPackage.setStatus(3);
highCouponPackage.setCreatedTime(new Date());
highCouponPackage.setCreatedUserId(userInfoModel.getSecUser().getId().intValue());
highCouponPackage.setUpdatedTime(new Date());
highCouponPackage.setUpdatedUserId(userInfoModel.getSecUser().getId().intValue());
highCouponPackageService.insertCouponPackage(highCouponPackage);
return ResponseMsgUtil.success(highCouponPackage);
} catch (Exception e) {
log.error("HighAgentController --> insertAgent() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/highCouponPackageRule", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "新增优惠券包基本信息")
public ResponseData highCouponPackageRule(@RequestBody HighCouponPackage highCouponPackage, HttpServletRequest request) {
try {
//发布人员
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (StringUtils.isBlank(highCouponPackage.getTitle())
|| highCouponPackage.getUsingAttribution() == null
|| highCouponPackage.getSalesType() == null
|| highCouponPackage.getEffectiveTiem() == null
|| highCouponPackage.getPurchaseNum() == null
|| highCouponPackage.getPrice() == null
|| StringUtils.isBlank(highCouponPackage.getBannerImg())
|| StringUtils.isBlank(highCouponPackage.getListImg())
|| StringUtils.isBlank(highCouponPackage.getDetailsImg())
) {
log.error("HighAgentController -> insertAgent() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
if (userInfoModel.getBsCompany() == null) {
log.error("highCouponPackage -> highCouponPackageInfo() error!","该主角色没有权限");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, "");
}
highCouponPackage.setCompanyId(userInfoModel.getBsCompany().getId().intValue());
highCouponPackage.setStatus(3);
highCouponPackage.setCreatedTime(new Date());
highCouponPackage.setCreatedUserId(userInfoModel.getSecUser().getId().intValue());
highCouponPackage.setUpdatedTime(new Date());
highCouponPackage.setUpdatedUserId(userInfoModel.getSecUser().getId().intValue());
highCouponPackageService.insertCouponPackage(highCouponPackage);
return ResponseMsgUtil.success(highCouponPackage);
} catch (Exception e) {
log.error("HighAgentController --> insertAgent() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -47,7 +47,6 @@ public class HighDiscountController {
@Resource
private HighDiscountService highDiscountService;
@RequestMapping(value="/insertDiscount",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "增加优惠券")
@ -64,6 +63,7 @@ public class HighDiscountController {
|| highDiscount.getDiscountType() == null
|| highDiscount.getDiscountPrice() == null
|| highDiscount.getEffectiveDay() == null
|| highDiscount.getUsingRange() == null
|| highDiscount.getSalesEndTime() == null) {
log.error("HighDiscountController -> insertDiscount() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");

@ -0,0 +1,77 @@
package com.bweb.controller;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.HighUser;
import com.hai.model.ResponseData;
import com.hai.service.HighOpenApiService;
import com.hai.service.HighUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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 java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;
/**
* @Author Sum1Dream
* @ClassName HighOpenApiController
* @Description // 开放接口
* @Date 2021/11/24 4:49 下午
**/
@Controller
@RequestMapping(value = "/openApi")
@Api(value = "开放接口")
public class HighOpenApiController {
private static Logger log = LoggerFactory.getLogger(HighOrderPreController.class);
@Resource
private HighOpenApiService highOpenApiService;
@Resource
private HighUserService highUserService;
@RequestMapping(value = "/getUserOrderPreList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取用户预约订单")
public ResponseData getUserOrderPreList(@RequestParam(name = "usingAttribution", required = false) Integer usingAttribution,
@RequestParam(name = "phone", required = true) String phone,
@RequestParam(name = "year", required = false) String year) {
try {
HighUser highUser = highUserService.findByPhone(phone);
if (highUser == null || highUser.getStatus() == 0) {
log.error("getUserOrderPreList error!", "未找到用户");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前手机号暂无用户");
}
Map<String,Object> map = new HashMap<>();
map.put("userId", highUser.getId());
map.put("usingAttribution", usingAttribution);
if (year != null) {
map.put("createTimeS", year + "-01-01 00:00:00");
map.put("createTimeE", year + "-12-31 23:59:59");
}
return ResponseMsgUtil.success(highOpenApiService.getUserCouponsList(map));
} catch (Exception e) {
log.error("HighOrderController --> getUserPreOrderList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -1 +1 @@
package com.bweb.controller; import com.alibaba.fastjson.JSONArray; 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.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.WxUtils; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; import com.hai.model.ResponseData; import com.hai.model.ResultProfitSharing; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; 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.net.ssl.SSLContext; import java.io.FileInputStream; import java.math.BigDecimal; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @Resource private HighMerchantService highMerchantService; @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private HighGasOrderPushMapper highGasOrderPushMapper; @Resource @Resource @Resource private UnionPayConfig unionPayConfig; @Resource private HighMerchantService highMerchantService; @Resource @Resource @Resource @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; @Resource private HighOrderService highOrderService; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource private HighGasOrderPushMapper highGasOrderPushMapper; return ResponseMsgUtil.exception(e); } } private HighMerchantService highMerchantService; > }
package com.bweb.controller; import com.alibaba.fastjson.JSONArray; 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.XmlUtil; import com.hai.common.pay.util.sdk.WXPayConstants; import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.WxUtils; import com.hai.config.*; import com.hai.dao.HighGasOrderPushMapper; import com.hai.entity.*; import com.hai.model.HighMerchantModel; import com.hai.model.HighMerchantStoreModel; import com.hai.model.ResponseData; import com.hai.model.ResultProfitSharing; import com.hai.service.*; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.apache.http.HttpEntity; import org.apache.http.client.methods.CloseableHttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.http.ssl.SSLContexts; import org.apache.http.util.EntityUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.BeanUtils; 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.net.ssl.SSLContext; import java.io.FileInputStream; import java.math.BigDecimal; import java.security.KeyStore; import java.util.*; /** * @Auther: 胡锐 * @Description: * @Date: 2021/3/26 23:08 */ @Controller @RequestMapping(value = "/test") @Api(value = "订单接口") public class HighTestController { private static Logger log = LoggerFactory.getLogger(HighTestController.class); @RequestMapping(value = "/getBackendToken", method = RequestMethod.GET) private HighMerchantService highMerchantService; private HighGasOilPriceService highGasOilPriceService; @ApiOperation(value = "获取访问令牌backendToken") public ResponseData getBackendToken() { try { } catch (Exception e) { log.error("HighOrderController --> getBackendToken() error!", e); @Resource } private HighOrderService highOrderService; @ResponseBody private HighProfitSharingRecordService highProfitSharingRecordService; private HighGasOrderPushMapper highGasOrderPushMapper; private HighMerchantService highMerchantService; private HighGasOrderPushMapper highGasOrderPushMapper; JSONObject consumptionRecord = HuiLianTongUnionCardConfig.TCheckEMsgUnionCardVipRights(phone); @Resource @Resource @Resource log.error("HighOrderController --> getBackendToken() error!", e); @Resource } private HighGasOilPriceService highGasOilPriceService; @Resource private HighMerchantService highMerchantService; @ResponseBody @Resource @Resource @Resource @Resource private HighMerchantStoreService highMerchantStoreService; @Resource private HighGasOilPriceService highGasOilPriceService; try { @Resource private HighOrderService highOrderService; @Resource private HighProfitSharingRecordService highProfitSharingRecordService; @Resource @Resource private HighGasOrderPushMapper highGasOrderPushMapper; return ResponseMsgUtil.exception(e); @Resource } }

@ -61,22 +61,6 @@ public class TuanYouController {
}
}
@RequestMapping(value="/resolveResponse",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "解析")
public ResponseData resolveResponse(
@RequestParam(name = "data", required = false) String data
) {
try {
JSONObject cardInfoObject = HuiLianTongUnionCardConfig.resolveResponse(data);
return ResponseMsgUtil.success(cardInfoObject);
} catch (Exception e) {
log.error("getUserByTelephone",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryCardInfo",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询")

@ -6,10 +6,12 @@ import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.pay.util.MD5Util;
import com.hai.common.pay.util.sdk.WXPayConstants;
import com.hai.common.security.DesUtil;
import com.hai.common.utils.DateUtil;
import com.hai.common.utils.HttpsUtils;
import com.hai.common.utils.WxUtils;
import org.apache.commons.collections4.MapUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -91,6 +93,34 @@ public class HuiLianTongUnionCardConfig {
}
/**
* @Author Sum1Dream
* @name TCheckEMsgUnionCardVipRights.java
* @Description // 会员体系接口
* @Date 11:29 上午 2021/11/24
* @Param [java.lang.String]
* @return com.alibaba.fastjson.JSONObject
*/
public static JSONObject TCheckEMsgUnionCardVipRights(String phone) {
try {
Map<String , String> map = new HashMap<>();
map.put("phone" , phone);
// 签名码
String signCode = CommonSysConst.getSysConfig().getHuiLianTongUnionCardSignCode();
map.put("appId", signCode);
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("phone" , phone);
dataMap.put("appId", signCode);
// Md5加密
dataMap.put("sign", WxUtils.generateSignature(map, "621=@=HSG!Business#Controller!" , WXPayConstants.SignType.MD5));
return request("tetcextra/TCheckEMsgUnionCardVipRights" , dataMap);
} catch (Exception e) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQUEST_TIMED_OUT, "");
}
}
/**
* 支付
* @param orderNo 订单号
@ -134,6 +164,7 @@ public class HuiLianTongUnionCardConfig {
return request("qtk/refund", dataMap);
}
/**
* 会员卡业务请求
* @param method 接口名称

@ -1,7 +1,40 @@
package com.hai.dao;
import com.hai.model.HighOrderPreModel;
import com.hai.model.HighUserDiscountUnicomModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.util.List;
import java.util.Map;
/**
* mapper扩展类
*/
public interface HighDiscountUserRelMapperExt {
}
@Select({"<script>" +
" SELECT" +
" hdur.id id , " +
" hdur.using_attribution usingAttribution , " +
" hdur.use_time useTime , " +
" hdur.use_end_time useEndTime , " +
" hdur.status status , " +
" hdur.create_time createTime , " +
" hd.discount_name discountName , " +
" hd.discount_condition discountCondition , " +
" hd.discount_price discountPrice , " +
" hd.discount_type discountType " +
" FROM" +
" high_discount_user_rel hdur join high_discount hd on hdur.discount_id = hd.id " +
" WHERE" +
" 1=1" +
" <if test='map.usingAttribution != null'> and hdur.using_attribution = #{map.usingAttribution} </if> " +
" <if test='map.userId != null'> and hdur.user_id = #{map.userId} </if>",
" <if test='map.createTimeS != null'> <![CDATA[ and hdur.create_time >= #{map.createTimeS} ]]> </if>",
" <if test='map.createTimeE != null'> <![CDATA[ and hdur.create_time <= #{map.createTimeE} ]]> </if>",
" ORDER BY hdur.create_time desc" +
"</script>"})
List<HighUserDiscountUnicomModel> getUserCouponsList(@Param("map") Map<String,Object> map);
}

@ -0,0 +1,137 @@
package com.hai.model;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
public class HighUserDiscountUnicomModel {
/**
* id
*/
private Integer id;
/**
* 使用归属
*/
private Integer usingAttribution;
/**
* 状态 0:已过期 1未使用 2已使用 100删除
*/
private Integer status;
/**
* 使用时间
*/
private Date useTime;
/**
* 创建时间
*/
private Date createTime;
/**
* 使用截止时间
*/
private Date useEndTime;
/**
* 优惠券名称
*/
private String discountName;
/**
* 卡卷类型 1满减 2抵扣 3折扣
*/
private Integer discountType;
/**
* 优惠券条件(满减价格)
*/
private BigDecimal discountCondition;
/**
* 优惠券价格
*/
private BigDecimal discountPrice;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUsingAttribution() {
return usingAttribution;
}
public void setUsingAttribution(Integer usingAttribution) {
this.usingAttribution = usingAttribution;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getUseTime() {
return useTime;
}
public void setUseTime(Date useTime) {
this.useTime = useTime;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUseEndTime() {
return useEndTime;
}
public void setUseEndTime(Date useEndTime) {
this.useEndTime = useEndTime;
}
public String getDiscountName() {
return discountName;
}
public void setDiscountName(String discountName) {
this.discountName = discountName;
}
public Integer getDiscountType() {
return discountType;
}
public void setDiscountType(Integer discountType) {
this.discountType = discountType;
}
public BigDecimal getDiscountCondition() {
return discountCondition;
}
public void setDiscountCondition(BigDecimal discountCondition) {
this.discountCondition = discountCondition;
}
public BigDecimal getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(BigDecimal discountPrice) {
this.discountPrice = discountPrice;
}
}

@ -0,0 +1,58 @@
package com.hai.service;
import com.hai.entity.HighCouponPackage;
import com.hai.entity.HighCouponPackageDetails;
import java.util.List;
import java.util.Map;
/**
* @serviceName HighCouponPackageDetailsService.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 优惠券包详情服务
* @createTime 3:11 下午 2021/11/25
**/
public interface HighCouponPackageDetailsService {
/**
* @Author Sum1Dream
* @name getCouponPackageDetailsList.java
* @Description // 获取优惠券包详情卢列表
* @Date 3:35 下午 2021/11/25
* @Param [java.util.Map<java.lang.String,java.lang.Object>]
* @return java.util.List<com.hai.entity.HighCouponPackageDetails>
*/
List<HighCouponPackageDetails> getCouponPackageDetailsList(Map<String , Object> map);
/**
* @Author Sum1Dream
* @name findDetailsById.java
* @Description // 获取详情
* @Date 3:36 下午 2021/11/25
* @Param [java.lang.Integer]
* @return com.hai.entity.HighCouponPackageDetails
*/
HighCouponPackageDetails findDetailsById(Integer id);
/**
* @Author Sum1Dream
* @name insertCouponPackageDetails.java
* @Description // 新增优惠券包详情信息
* @Date 12:07 下午 2021/11/25
* @Param [com.hai.entity.HighCouponPackage]
* @return void
*/
void insertCouponPackageDetails(HighCouponPackageDetails highCouponPackageDetails);
/**
* @Author Sum1Dream
* @name updateCouponPackageDetails.java
* @Description // 更新优惠券包详情信息
* @Date 12:07 下午 2021/11/25
* @Param [com.hai.entity.HighCouponPackage]
* @return void
*/
void updateCouponPackageDetails(HighCouponPackageDetails highCouponPackageDetails);
}

@ -0,0 +1,59 @@
package com.hai.service;
import com.hai.entity.HighCouponPackage;
import com.hai.entity.HighOrderPre;
import java.util.List;
import java.util.Map;
/**
* @serviceName HighCouponPackageService.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 优惠券包接口服务
* @createTime 11:31 上午 2021/11/25
**/
public interface HighCouponPackageService {
/**
* @Author Sum1Dream
* @name getCouponPackageList.java
* @Description // 获取优惠券包列表
* @Date 11:34 上午 2021/11/25
* @Param [java.util.Map<java.lang.String,java.lang.Object>]
* @return java.util.List<com.hai.entity.HighCouponPackage>
*/
List<HighCouponPackage> getCouponPackageList(Map<String , Object> map);
/**
* @Author Sum1Dream
* @name findCouponPackageById.java
* @Description //
* @Date 11:35 上午 2021/11/25
* @Param [java.lang.Integer]
* @return com.hai.entity.HighCouponPackage
*/
HighCouponPackage findCouponPackageById(Integer id);
/**
* @Author Sum1Dream
* @name insertCouponPackage.java
* @Description // 新增优惠券包信息
* @Date 12:07 下午 2021/11/25
* @Param [com.hai.entity.HighCouponPackage]
* @return void
*/
void insertCouponPackage(HighCouponPackage highCouponPackage);
/**
* @Author Sum1Dream
* @name updateCouponPackage.java
* @Description // 新增优惠券包信息
* @Date 12:07 下午 2021/11/25
* @Param [com.hai.entity.HighCouponPackage]
* @return void
*/
void updateCouponPackage(HighCouponPackage highCouponPackage);
}

@ -0,0 +1,20 @@
package com.hai.service;
import com.hai.model.HighUserDiscountUnicomModel;
import java.util.List;
import java.util.Map;
public interface HighOpenApiService {
/**
* @Author Sum1Dream
* @name getUserCouponsList.java
* @Description // 获取用户优惠券
* @Date 4:45 下午 2021/11/24
* @Param [java.util.Map<java.lang.String,java.lang.Object>]
* @return java.util.List<com.hai.model.HighUserDiscountUnicomModel>
*/
List<HighUserDiscountUnicomModel> getUserCouponsList(Map<String , Object> map);
}

@ -0,0 +1,56 @@
package com.hai.service.impl;
import com.hai.dao.HighCouponPackageDetailsMapper;
import com.hai.entity.HighCouponPackageDetails;
import com.hai.entity.HighCouponPackageDetailsExample;
import com.hai.service.HighCouponPackageDetailsService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @serviceName HighCouponPackageDetailsServiceImpl.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 优惠券详情服务
* @createTime 3:38 下午 2021/11/25
**/
@Service("highCouponPackageDetailsService")
public class HighCouponPackageDetailsServiceImpl implements HighCouponPackageDetailsService {
@Resource
private HighCouponPackageDetailsMapper highCouponPackageDetailsMapper;
@Override
public List<HighCouponPackageDetails> getCouponPackageDetailsList(Map<String, Object> map) {
HighCouponPackageDetailsExample example = new HighCouponPackageDetailsExample();
HighCouponPackageDetailsExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "couponPackageId") != null) {
criteria.andCouponPackageIdEqualTo(MapUtils.getInteger(map, "couponPackageId"));
}
criteria.andStatusEqualTo(1);
return highCouponPackageDetailsMapper.selectByExample(example);
}
@Override
public HighCouponPackageDetails findDetailsById(Integer id) {
return highCouponPackageDetailsMapper.selectByPrimaryKey(id);
}
@Override
public void insertCouponPackageDetails(HighCouponPackageDetails highCouponPackageDetails) {
highCouponPackageDetailsMapper.insert(highCouponPackageDetails);
}
@Override
public void updateCouponPackageDetails(HighCouponPackageDetails highCouponPackageDetails) {
highCouponPackageDetailsMapper.updateByPrimaryKey(highCouponPackageDetails);
}
}

@ -0,0 +1,74 @@
package com.hai.service.impl;
import com.hai.dao.HighCouponPackageMapper;
import com.hai.entity.HighCouponPackage;
import com.hai.entity.HighCouponPackageExample;
import com.hai.service.HighCouponPackageService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @serviceName HighCouponPackageServiceImpl.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 优惠券包 接口
* @createTime 12:21 下午 2021/11/25
**/
@Service("highCouponPackageService")
public class HighCouponPackageServiceImpl implements HighCouponPackageService {
@Resource
private HighCouponPackageMapper highCouponPackageMapper;
@Override
public List<HighCouponPackage> getCouponPackageList(Map<String, Object> map) {
HighCouponPackageExample example = new HighCouponPackageExample();
HighCouponPackageExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "companyId") != null) {
criteria.andCompanyIdEqualTo(MapUtils.getInteger(map, "companyId"));
}
if (MapUtils.getInteger(map, "usingAttribution") != null) {
criteria.andUsingAttributionEqualTo(MapUtils.getInteger(map, "usingAttribution"));
}
if (MapUtils.getString(map, "title") != null) {
criteria.andTitleLike("%" + MapUtils.getString(map, "title") + "%");
}
if (MapUtils.getInteger(map, "salesType") != null) {
criteria.andSalesTypeEqualTo(MapUtils.getInteger(map, "salesType"));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
} else {
criteria.andStatusNotEqualTo(0);
}
example.setOrderByClause("created_time desc");
return highCouponPackageMapper.selectByExample(example);
}
@Override
public HighCouponPackage findCouponPackageById(Integer id) {
return highCouponPackageMapper.selectByPrimaryKey(id);
}
@Override
public void insertCouponPackage(HighCouponPackage highCouponPackage) {
highCouponPackageMapper.insert(highCouponPackage);
}
@Override
public void updateCouponPackage(HighCouponPackage highCouponPackage) {
highCouponPackageMapper.updateByPrimaryKey(highCouponPackage);
}
}

@ -0,0 +1,29 @@
package com.hai.service.impl;
import com.hai.dao.HighDiscountUserRelMapper;
import com.hai.model.HighUserDiscountUnicomModel;
import com.hai.service.HighOpenApiService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
/**
* @serviceName HighOpenApiServiceImpl.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 开放接口服务
* @createTime 5:01 下午 2021/11/24
**/
@Service("OpenApiService")
public class HighOpenApiServiceImpl implements HighOpenApiService {
@Resource
private HighDiscountUserRelMapper highDiscountUserRelMapper;
@Override
public List<HighUserDiscountUnicomModel> getUserCouponsList(Map<String, Object> map) {
return highDiscountUserRelMapper.getUserCouponsList(map);
}
}

@ -20,8 +20,8 @@ huiliantongAppsecret=FA28E95ACABFA4B2B8E25857437B07F1
# ????????
HuiLianTongUnionCardUrl=http://hltgz.com:4010/api/v2/execute.json
HuiLianTongUnionCardAccessCode=6FCAE1470CEF465988351BB65ABAA8AE
HuiLianTongUnionCardSignCode=F8E91A3C
HuiLianTongUnionCardAccessCode=19741F626EE446939CE6D448B0FB0EE8
HuiLianTongUnionCardSignCode=7854B96C
# ??????
unionPayUrl=https://open.eycard.cn:8443/WorthTech_Access_AppPaySystemV2/apppayacc

Loading…
Cancel
Save