解决冲突

dev-discount
胡锐 3 years ago
commit a9e9e1b83c
  1. 10
      hai-bweb/src/main/java/com/bweb/controller/HighCouponAgentController.java
  2. 4
      hai-bweb/src/main/java/com/bweb/controller/HighCouponController.java
  3. 2
      hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java
  4. 2
      hai-bweb/src/main/java/com/bweb/controller/HighTestController.java
  5. 23
      hai-bweb/src/main/java/com/bweb/controller/OutRechargePriceController.java
  6. 4
      hai-bweb/src/main/resources/dev/application.yml
  7. 2
      hai-bweb/src/main/resources/pre/application.yml
  8. 2
      hai-cweb/src/main/java/com/cweb/config/AuthConfig.java
  9. 2
      hai-cweb/src/main/java/com/cweb/controller/CmsContentController.java
  10. 77
      hai-cweb/src/main/java/com/cweb/controller/HighCouponAgentController.java
  11. 3
      hai-cweb/src/main/java/com/cweb/controller/HighCouponController.java
  12. 1
      hai-cweb/src/main/java/com/cweb/controller/HighOrderController.java
  13. 2
      hai-cweb/src/main/java/com/cweb/controller/HighTestController.java
  14. 19
      hai-cweb/src/main/java/com/cweb/controller/OutRechargeOrderController.java
  15. 24
      hai-cweb/src/main/java/com/cweb/controller/OutRechargePriceController.java
  16. 19
      hai-cweb/src/main/java/com/cweb/controller/pay/UnionPayController.java
  17. 2
      hai-cweb/src/main/resources/pre/application.yml
  18. 2
      hai-cweb/src/main/resources/prod-9401/config.properties
  19. 2
      hai-cweb/src/main/resources/prod/config.properties
  20. 4
      hai-cweb/src/test/common/test.java
  21. 25
      hai-service/src/main/java/com/hai/common/GenerateCode.java
  22. 70
      hai-service/src/main/java/com/hai/config/UnionStagingPayConfig.java
  23. 65
      hai-service/src/main/java/com/hai/dao/CmsContentMapperExt.java
  24. 34
      hai-service/src/main/java/com/hai/dao/HighCouponAgentCodeMapper.java
  25. 56
      hai-service/src/main/java/com/hai/dao/HighCouponAgentCodeSqlProvider.java
  26. 33
      hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapper.java
  27. 4
      hai-service/src/main/java/com/hai/dao/HighCouponAgentRelMapperExt.java
  28. 14
      hai-service/src/main/java/com/hai/dao/HighCouponAgentRelSqlProvider.java
  29. 122
      hai-service/src/main/java/com/hai/dao/HighUserEtcMapper.java
  30. 7
      hai-service/src/main/java/com/hai/dao/HighUserEtcMapperExt.java
  31. 318
      hai-service/src/main/java/com/hai/dao/HighUserEtcSqlProvider.java
  32. 15
      hai-service/src/main/java/com/hai/dao/OutRechargePriceMapper.java
  33. 28
      hai-service/src/main/java/com/hai/dao/OutRechargePriceSqlProvider.java
  34. 62
      hai-service/src/main/java/com/hai/entity/HighCouponAgentCode.java
  35. 226
      hai-service/src/main/java/com/hai/entity/HighCouponAgentCodeExample.java
  36. 16
      hai-service/src/main/java/com/hai/entity/HighCouponAgentRel.java
  37. 60
      hai-service/src/main/java/com/hai/entity/HighCouponAgentRelExample.java
  38. 216
      hai-service/src/main/java/com/hai/entity/HighUserEtc.java
  39. 953
      hai-service/src/main/java/com/hai/entity/HighUserEtcExample.java
  40. 32
      hai-service/src/main/java/com/hai/entity/OutRechargePrice.java
  41. 120
      hai-service/src/main/java/com/hai/entity/OutRechargePriceExample.java
  42. 13
      hai-service/src/main/java/com/hai/service/CmsContentService.java
  43. 25
      hai-service/src/main/java/com/hai/service/HighCouponAgentService.java
  44. 10
      hai-service/src/main/java/com/hai/service/HighDiscountPackageService.java
  45. 1
      hai-service/src/main/java/com/hai/service/HighDiscountService.java
  46. 33
      hai-service/src/main/java/com/hai/service/HighTestService.java
  47. 5
      hai-service/src/main/java/com/hai/service/impl/CmsContentServiceImpl.java
  48. 157
      hai-service/src/main/java/com/hai/service/impl/HighCouponAgentServiceImpl.java
  49. 97
      hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageServiceImpl.java
  50. 136
      hai-service/src/main/java/com/hai/service/impl/HighTestServiceImpl.java
  51. 3
      hai-service/src/main/java/com/hai/service/impl/HighUserServiceImpl.java
  52. 2
      hai-service/src/main/java/com/hai/service/impl/HltUnionCardVipServiceImpl.java
  53. 14
      hai-service/src/main/java/com/hai/service/impl/OutRechargePriceServiceImpl.java
  54. 2
      hai-service/src/main/resources/dev/commonConfig.properties
  55. 7
      hai-service/src/main/resources/pre/commonConfig.properties
  56. 7
      hai-service/src/main/resources/prod-9401/commonConfig.properties
  57. 7
      hai-service/src/main/resources/prod/commonConfig.properties

@ -61,7 +61,8 @@ public class HighCouponAgentController {
@RequestMapping(value = "/getAgentCount", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "代理商统计")
public ResponseData getAgentCount(HttpServletRequest request) {
public ResponseData getAgentCount(HttpServletRequest request,
@RequestParam(name = "type", required = true) Integer type) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
@ -71,7 +72,7 @@ public class HighCouponAgentController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, "");
}
return ResponseMsgUtil.success(highCouponAgentService.getSalesCountByAgent(userInfoModel.getHighAgent().getId()));
return ResponseMsgUtil.success(highCouponAgentService.getSalesCountByAgent(userInfoModel.getHighAgent().getId(), type));
} catch (Exception e) {
log.error("HighCouponAgentController --> getCodeById() error!", e);
@ -187,6 +188,7 @@ public class HighCouponAgentController {
if(highCouponAgentRel.getCouponId() == null
|| highCouponAgentRel.getAgentId() == null
|| highCouponAgentRel.getType() == null
|| highCouponAgentRel.getStockCount() == null) {
log.error("HighCouponAgentController -> assignCouponAgent() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
@ -207,7 +209,7 @@ public class HighCouponAgentController {
}
// 校验是否分配过
HighCouponAgentRel couponAgent = highCouponAgentService.getRelByCouponAgent(highCouponAgentRel.getCouponId(), highCouponAgentRel.getAgentId());
HighCouponAgentRel couponAgent = highCouponAgentService.getRelByCouponAgent(highCouponAgentRel.getCouponId(), highCouponAgentRel.getAgentId(), highCouponAgentRel.getType());
if (couponAgent != null) {
couponAgent.setStockCount(couponAgent.getStockCount() + highCouponAgentRel.getStockCount());
couponAgent.setOperatorId(userInfoModel.getSecUser().getId());
@ -290,6 +292,7 @@ public class HighCouponAgentController {
@ResponseBody
@ApiOperation(value = "根据代理商和卡券 查询分配的销售码")
public ResponseData getCodeListByAgentCoupon(@RequestParam(name = "couponId", required = true) Long couponId,
@RequestParam(name = "type", required = true) Integer type,
@RequestParam(name = "status", required = false) String status,
@RequestParam(name = "createTimeS", required = false) Long createTimeS,
@RequestParam(name = "createTimeE", required = false) Long createTimeE,
@ -307,6 +310,7 @@ public class HighCouponAgentController {
Map<String,Object> map = new HashMap<>();
map.put("agentId", userInfoModel.getHighAgent().getId());
map.put("type", type);
map.put("couponId", couponId);
map.put("status", status);
map.put("createTimeS", createTimeS);

@ -12,7 +12,7 @@ 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.generateCode;
import com.hai.common.GenerateCode;
import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter;
import com.hai.common.utils.DateUtil;
@ -620,7 +620,7 @@ public class HighCouponController {
highCouponCode = new HighCouponCode();
highCouponCode.setCouponId(couponId);
highCouponCode.setMerchantId(coupon.getMerchantId());
highCouponCode.setSalesCode(generateCode.couponSalesCode(coupon.getMerchantId(), couponId));
highCouponCode.setSalesCode(GenerateCode.couponSalesCode(coupon.getMerchantId(), couponId));
highCouponCode.setSalesEndTime(salesEndTimeC.getTime());
highCouponCode.setUseEndTime(useEndTimeC.getTime());
highCouponCode.setStatus(1); // 状态:1.待销售 2.未使用 3.已使用 99.预支付

@ -252,7 +252,7 @@ public class HighDiscountPackageController {
highDiscountPackage.setCompanyId(highDiscountPackages.getCompanyId());
highDiscountPackage.setCreatedUserId(highDiscountPackages.getCreatedUserId());
highDiscountPackage.setCreatedTime(highDiscountPackages.getCreatedTime());
highDiscountPackage.setTotalStock(highDiscountPackage.getTotalStock());
highDiscountPackage.setTotalStock(highDiscountPackages.getTotalStock());
highDiscountPackageService.updateDiscountPackage(highDiscountPackage);

File diff suppressed because one or more lines are too long

@ -5,10 +5,12 @@ 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.OutRechargePrice;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.OutRechargePriceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -43,16 +45,27 @@ public class OutRechargePriceController {
@ApiOperation(value = "查询充值金额列表")
public ResponseData getListOutRechargePrice(
@RequestParam(value = "type", required = false) Integer type ,
@RequestParam(value = "showType", required = false) Integer showType ,
@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, String> map = new HashMap<>();
if (type != null ) {
map.put("type", String.valueOf(type));
}
if (showType != null ) {
map.put("showType", String.valueOf(showType));
}
map.put("companyId" , String.valueOf(userInfoModel.getBsCompany().getId()));
PageHelper.startPage(pageNum, pageSize);
List<OutRechargePrice> outRechargePrices = outRechargePriceService.getListRechargePrice(map);
@ -69,10 +82,14 @@ public class OutRechargePriceController {
@ApiOperation(value = "新增金额")
public ResponseData insertAgent(@RequestBody OutRechargePrice outRechargePrice, HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (outRechargePrice.getType() == null
|| outRechargePrice.getPrice() == null
|| outRechargePrice.getRealPrice() == null
// || outRechargePrice.getGoodsId() == null
|| outRechargePrice.getShowType() == null
|| outRechargePrice.getSort() == null
) {
log.error("SecOrganizationController -> insertPrice() error!");
@ -80,6 +97,7 @@ public class OutRechargePriceController {
}
outRechargePrice.setCompanyId(userInfoModel.getBsCompany().getId());
outRechargePrice.setCreateTime(new Date());
outRechargePrice.setStatus(0);
@ -102,7 +120,7 @@ public class OutRechargePriceController {
|| outRechargePrice.getId() == null
|| outRechargePrice.getPrice() == null
|| outRechargePrice.getRealPrice() == null
// || outRechargePrice.getGoodsId() == null
|| outRechargePrice.getShowType() == null
|| outRechargePrice.getSort() == null
) {
log.error("SecOrganizationController -> updatePrice() error!");
@ -116,6 +134,7 @@ public class OutRechargePriceController {
throw ErrorHelp.genException(SysCode.System, ErrorCode.UPDATE_DATA_ERROR, "");
}
outRechargePrice.setCompanyId(outRechargePrice1.getCompanyId());
outRechargePrice.setStatus(0);
outRechargePrice.setCreateTime(outRechargePrice1.getCreateTime());

@ -28,11 +28,11 @@ spring:
poolPreparedStatements: true
maxOpenPreparedStatements: 20
redis:
database: 0
database: 5
host: 139.159.177.244
port: 36379
password: HF123456.Redis
timeout: 1000
timeout: 36000000
jedis:
pool:
max-active: 20

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -93,6 +93,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/order/*")
.excludePathPatterns("/coupon/getCouponList")
.excludePathPatterns("/wechatpay/*")
.excludePathPatterns("/couponAgent/useConvertCode")
.excludePathPatterns("/coupon/getCouponById")
.excludePathPatterns("/discount/getDiscountByQrCode")
.excludePathPatterns("/discount/getDiscountById")
@ -129,7 +130,6 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/highBrand/*")
.excludePathPatterns("/highGoodsType/*")
.excludePathPatterns("/sendSms/*")
.excludePathPatterns("/test/*")
.excludePathPatterns("/sms/*")
;
}

@ -55,7 +55,7 @@ public class CmsContentController {
map.put("companyId", bsCompany.getId().toString());
map.put("status", "2");
map.put("categoryCode", categoryCode);
return ResponseMsgUtil.success(cmsContentService.getListContent(map));
return ResponseMsgUtil.success(cmsContentService.getListContentByCrest(map));
}
}
return ResponseMsgUtil.success(new ArrayList<>());

@ -0,0 +1,77 @@
package com.cweb.controller;
import com.alibaba.fastjson.JSONObject;
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.DateUtil;
import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.*;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.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.math.BigDecimal;
import java.util.*;
/**
* @Auther: 胡锐
* @Description:
* @Date: 2021/4/20 23:47
*/
@Controller
@RequestMapping(value = "/couponAgent")
@Api(value = "代理商接口")
public class HighCouponAgentController {
private static Logger log = LoggerFactory.getLogger(HighCouponAgentController.class);
@Resource
private HighCouponAgentService highCouponAgentService;
@RequestMapping(value = "/useConvertCode", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "兑换码使用")
public ResponseData useConvertCode(@RequestBody JSONObject body) {
try {
if (body == null || StringUtils.isBlank(body.getString("code"))) {
log.error("HighCouponAgentController -> queryConvertCode() error!","");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 查询兑换码
HighCouponAgentCode convertCode = highCouponAgentService.getConvertCode(body.getString("code"));
if (convertCode == null) {
log.error("HighCouponAgentController -> queryConvertCode() error!","无效的兑换码");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无效的兑换码");
}
if (convertCode.getStatus() == 3) {
log.error("HighCouponAgentController -> queryConvertCode() error!","兑换码已被使用");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "兑换码已被使用");
}
return ResponseMsgUtil.success(highCouponAgentService.useConvertCode(body.getString("code")));
} catch (Exception e) {
log.error("HighCouponAgentController --> useConvertCode() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -53,9 +53,6 @@ public class HighCouponController {
@Resource
private HighCouponCodeService highCouponCodeService;
@Resource
private HighOrderService highOrderService;
@Resource
private HighUserCouponService highUserCouponService;

@ -345,6 +345,7 @@ public class HighOrderController {
// 卡卷类型 1:满减 2:抵扣 3:折扣
if (highDiscountUserRel.getHighDiscount().getDiscountType() == 3) {
// 折扣除100
BigDecimal discountPrice = highDiscountUserRel.getHighDiscount().getDiscountPrice();
// 订单总额 * 折扣
BigDecimal payPrice = highOrder.getTotalPrice().multiply(discountPrice);

File diff suppressed because one or more lines are too long

@ -122,15 +122,16 @@ public class OutRechargeOrderController {
// 支付类型 1.微信支付
outRechargeOrder.setPayType(1);
// 判断充值模式:1 电信 2. 移动 3. 联通
JSONObject telObject = telApiService.outApiTel(outRechargeOrder.getRechargeContent());
if (telObject.get("status").equals(0)) {
JSONObject o = telObject.getObject("result",JSONObject.class);
// 拼接内容
remarks = o.get("province").toString() + o.get("company").toString() + "充值" + outRechargeOrder.getOrderPrice() + "元";
} else {
log.error("orderToPay error!");
throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR);
}
// 拼接内容
remarks = outRechargeOrder.getRechargeContent() + "充值" + outRechargeOrder.getOrderPrice() + "元";
// JSONObject telObject = telApiService.outApiTel(outRechargeOrder.getRechargeContent());
// if (telObject.get("status").equals(0)) {
// JSONObject o = telObject.getObject("result",JSONObject.class);
//
// } else {
// log.error("orderToPay error!");
// throw ErrorHelp.genException(SysCode.System, ErrorCode.PHONE_NUM_IS_ERROR);
// }
HighDiscountUserRel highDiscountUserRel = null;
if (outRechargeOrder.getMemDiscountId() != null) {

@ -8,10 +8,14 @@ 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.BsCompany;
import com.hai.entity.HighAgent;
import com.hai.entity.OutRechargePrice;
import com.hai.entity.SecRegion;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.BsCompanyService;
import com.hai.service.CommonService;
import com.hai.service.OutRechargePriceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -44,15 +48,33 @@ public class OutRechargePriceController {
@Resource
private OutRechargePriceService outRechargePriceService;
@Resource
private BsCompanyService bsCompanyService;
@Resource
private CommonService commonService;
@RequestMapping(value = "/getListOutRechargePrice", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询充值金额列表")
public ResponseData getListOutRechargePrice(
@RequestParam(value = "type", required = false) Integer type
@RequestParam(value = "type", required = false) Integer type,
@RequestParam(name = "regionId", required = true) String regionId,
@RequestParam(name = "showType", required = true) Integer showType
) {
try {
Map<String, String> map = new HashMap<>();
SecRegion region = commonService.getParentByRegion(Long.parseLong(regionId));
if (region != null) {
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString());
map.put("companyId", String.valueOf(bsCompany.getId()));
}
if (type != null ) {
map.put("showType", String.valueOf(showType));
}
if (type != null ) {
map.put("type", String.valueOf(type));
}

@ -404,4 +404,23 @@ public class UnionPayController {
}
}
@RequestMapping(value = "/stagingNotify", method = RequestMethod.POST)
@ApiOperation(value = "银联分期支付 -> 异步回调")
public void stagingNotify(@RequestBody String params,HttpServletRequest request, HttpServletResponse response) {
try {
System.out.println(params);
log.info(params);
BufferedOutputStream out = new BufferedOutputStream(response.getOutputStream());
JSONObject result = new JSONObject();
result.put("tradeRetCode", "000000");
out.write(result.toJSONString().getBytes());
out.flush();
out.close();
} catch (Exception e) {
log.error("UnionPayController --> stagingNotify() error!", e);
}
}
}

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.159.177.244:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://122.9.135.148:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -1,4 +1,4 @@
# ΢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
# ???????
wxAppId=wx8d49e2f83025229d
wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df

@ -1,4 +1,4 @@
# ΢<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
# ???????
wxAppId=wx8d49e2f83025229d
wxAppSecret=d8d6dcaef77d3b659258a01b5ddba5df

@ -46,7 +46,7 @@ public class test {
@Test
public void test(){
/* List<HighDiscountAgentCode> codeList = highDiscountAgentCodeService.getDiscountCodeByDiscountAgentId(55L);
List<HighDiscountAgentCode> codeList = highDiscountAgentCodeService.getDiscountCodeByDiscountAgentId(55L);
List<HighUser> userList = highUserService.getUserList();
@ -55,7 +55,7 @@ public class test {
// 领取优惠券
highDiscountUserRelService.receiveDiscount(user.getId(), codeList.get(num).getId());
num++;
}*/
}
}

@ -1,5 +1,6 @@
package com.hai.common;
import java.security.SecureRandom;
import java.util.Calendar;
import java.util.Random;
@ -8,8 +9,11 @@ import java.util.Random;
* @Description:
* @Date: 2021/3/18 21:07
*/
public class generateCode {
public class GenerateCode {
private static final Random RANDOM = new SecureRandom();
private static final String SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
/**
* @Author 胡锐
@ -33,4 +37,23 @@ public class generateCode {
}
return val;
}
/**
* 生成兑换码
* @param couponAgentRelId
* @return
*/
public static String convertCode(Long couponAgentRelId) {
// 兑换码总长度
int countLength = 20;
// 需要生成的长度
int generateLength = countLength - couponAgentRelId.toString().length();
char[] nonceChars = new char[generateLength];
for (int index = 0; index < nonceChars.length; ++index) {
nonceChars[index] = SYMBOLS.charAt(RANDOM.nextInt(SYMBOLS.length()));
}
return new String(nonceChars) + couponAgentRelId;
}
}

@ -1,6 +1,7 @@
package com.hai.config;
import com.alibaba.fastjson.JSONObject;
import com.hai.common.utils.DateUtil;
import com.wechat.pay.contrib.apache.httpclient.util.PemUtil;
import org.apache.commons.codec.binary.Base64;
import com.hai.common.pay.util.sdk.WXPayConstants;
@ -24,15 +25,16 @@ public class UnionStagingPayConfig {
/**
* 银联分期支付H5预下单-标准
* 文档地址 https://doc.eycard.cn/web/#/42?page_id=1516
* 文档地址 https://doc.eycard.cn/web/#/222?page_id=3183
* @param orderNo 订单号
* @param orgTrace 订单号
* @param appId 支付宝微信云闪付商户应用ID一般情况下与获取openId时的应用一致
* @param openId 支付宝微信云闪付用户授权唯一标识(如果没有:-)
* @param payPrice 支付金额 单位
* @return 响应信息
* @throws Exception
*/
public static JSONObject advancePay(String orderNo, String orgTrace, BigDecimal payPrice, String openId, String notifyUrl) throws Exception {
public static JSONObject advancePay(String orderNo, String orgTrace, BigDecimal payPrice, String appId,String openId, String notifyUrl) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
paramMap.put("orgMerCode", CommonSysConst.getSysConfig().getUnionStagingPayOrgMerCode());
@ -44,6 +46,7 @@ public class UnionStagingPayConfig {
Map<String, Object> bizDataMap = new HashMap<>();
bizDataMap.put("transAmt", payPrice.multiply(new BigDecimal("100")).intValue());
bizDataMap.put("appId", appId);
bizDataMap.put("openId", openId);
bizDataMap.put("notifyUrl", notifyUrl);
paramMap.put("bizData", bizDataMap);
@ -53,7 +56,7 @@ public class UnionStagingPayConfig {
return responseParam;
}
public static JSONObject query(String orderNo, String orgTrace, BigDecimal payPrice, String openId, String notifyUrl) throws Exception {
public static JSONObject query(String orgTrace, String oriOrgTrace,String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
paramMap.put("orgMerCode", CommonSysConst.getSysConfig().getUnionStagingPayOrgMerCode());
@ -63,9 +66,8 @@ public class UnionStagingPayConfig {
paramMap.put("signType", "RSA");
Map<String, Object> bizDataMap = new HashMap<>();
bizDataMap.put("transAmt", payPrice.multiply(new BigDecimal("100")).intValue());
bizDataMap.put("openId", openId);
bizDataMap.put("notifyUrl", notifyUrl);
bizDataMap.put("oriOrgTrace", oriOrgTrace);
bizDataMap.put("oriBizDate", DateUtil.date2String(oriBizDate, "yyyyMMdd"));
paramMap.put("bizData", bizDataMap);
paramMap.put("sign", generateSign(bizDataMap));
@ -73,6 +75,62 @@ public class UnionStagingPayConfig {
return responseParam;
}
public static JSONObject queryStaging(String orgTrace, String oriOrgTrace, String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
paramMap.put("orgMerCode", CommonSysConst.getSysConfig().getUnionStagingPayOrgMerCode());
paramMap.put("orgTermNo", CommonSysConst.getSysConfig().getUnionStagingPayOrgTermNo());
paramMap.put("orgTrace", orgTrace);
paramMap.put("prodCode", "ISYH");
paramMap.put("signType", "RSA");
Map<String, Object> bizDataMap = new HashMap<>();
bizDataMap.put("oriOrgTrace", oriOrgTrace);
bizDataMap.put("oriBizDate", DateUtil.date2String(oriBizDate, "yyyyMMdd"));
paramMap.put("bizData", bizDataMap);
paramMap.put("sign", generateSign(bizDataMap));
JSONObject responseParam = HttpsUtils.doPost(CommonSysConst.getSysConfig().getUnionStagingPayUrl()+"cashier/trade/queryStaging", paramMap, new HashMap<>());
return responseParam;
}
public static JSONObject mposrefund(String orgTrace, String oriOrgTrace, BigDecimal transAmt,String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
paramMap.put("orgMerCode", CommonSysConst.getSysConfig().getUnionStagingPayOrgMerCode());
paramMap.put("orgTermNo", CommonSysConst.getSysConfig().getUnionStagingPayOrgTermNo());
paramMap.put("orgTrace", orgTrace);
paramMap.put("prodCode", "ISYH");
paramMap.put("signType", "RSA");
Map<String, Object> bizDataMap = new HashMap<>();
bizDataMap.put("oriOrgTrace", oriOrgTrace);
bizDataMap.put("oriBizDate", DateUtil.date2String(oriBizDate, "yyyyMMdd"));
bizDataMap.put("transAmt", transAmt.multiply(new BigDecimal("100")).intValue());
paramMap.put("bizData", bizDataMap);
paramMap.put("sign", generateSign(bizDataMap));
JSONObject responseParam = HttpsUtils.doPost(CommonSysConst.getSysConfig().getUnionStagingPayUrl()+"ledger/mposrefund", paramMap, new HashMap<>());
return responseParam;
}
public static JSONObject mposfindrefund(String orgTrace, String oriOrgTrace,String prodCode,Date oriBizDate) throws Exception {
Map<String,Object> paramMap = new HashMap<>();
paramMap.put("orgId", CommonSysConst.getSysConfig().getUnionStagingPayOrgId());
paramMap.put("orgMerCode", CommonSysConst.getSysConfig().getUnionStagingPayOrgMerCode());
paramMap.put("orgTermNo", CommonSysConst.getSysConfig().getUnionStagingPayOrgTermNo());
paramMap.put("orgTrace", orgTrace);
paramMap.put("prodCode", "ISYH");
paramMap.put("signType", "RSA");
Map<String, Object> bizDataMap = new HashMap<>();
bizDataMap.put("oriOrgTrace", oriOrgTrace);
paramMap.put("bizData", bizDataMap);
paramMap.put("sign", generateSign(bizDataMap));
JSONObject responseParam = HttpsUtils.doPost(CommonSysConst.getSysConfig().getUnionStagingPayUrl()+"ledger/mposfindrefund", paramMap, new HashMap<>());
return responseParam;
}
/**
* 参数排序
* @param param

@ -44,7 +44,7 @@ public interface CmsContentMapperExt {
" AND cc.status = #{status}",
" </when>",
"</choose>",
"ORDER BY cc.category_code",
"ORDER BY cc.category_code and cc.sort_id",
"</script>"
})
@Results({
@ -76,4 +76,67 @@ public interface CmsContentMapperExt {
})
List<CmsContentModel> getListContent(Map<String, String> paramsMap) throws Exception;
@Select(value = {
"<script>",
"SELECT",
"cc.*",
", cca.name AS category_name",
"FROM cms_content AS cc",
", cms_category AS cca",
"WHERE cc.category_id = cca.id",
"<if test=\"title != null\">",
" AND cc.title REGEXP #{title}",
"</if>",
"<if test=\"category != null\">",
" AND cc.category_id = #{category}",
"</if>",
"<if test=\"categoryCode != null\">",
" AND cc.category_code = #{categoryCode}",
"</if>",
"<if test=\"companyId != null\">",
" AND cc.company_id = #{companyId}",
"</if>",
"<if test=\"tag != null\">",
" AND cc.tag = #{tag}",
"</if>",
"<choose>",
" <when test=\"status == null\">",
" AND cc.status != 0",
" </when>",
" <when test=\"status != null\">",
" AND cc.status = #{status}",
" </when>",
"</choose>",
"ORDER BY cc.sort_id",
"</script>"
})
@Results({
@Result(column="id", property="id", jdbcType= JdbcType.BIGINT, id=true),
@Result(column="title", property="title", jdbcType= JdbcType.VARCHAR),
@Result(column="category_id", property="categoryId", jdbcType= JdbcType.BIGINT),
@Result(column="category_code", property="categoryCode", jdbcType= JdbcType.VARCHAR),
@Result(column="description", property="description", jdbcType= JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType= JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType= JdbcType.INTEGER),
@Result(column="has_patch", property="hasPatch", jdbcType= JdbcType.TINYINT),
@Result(column="visit_count", property="visitCount", jdbcType= JdbcType.INTEGER),
@Result(column="tag", property="tag", jdbcType= JdbcType.VARCHAR),
@Result(column="img_source", property="imgSource", jdbcType= JdbcType.TINYINT),
@Result(column="img_data", property="imgData", jdbcType= JdbcType.VARCHAR),
@Result(column="jump_type", property="jumpType", jdbcType= JdbcType.INTEGER),
@Result(column="jump_name", property="jumpName", jdbcType= JdbcType.VARCHAR),
@Result(column="jump_url", property="jumpUrl", jdbcType= JdbcType.VARCHAR),
@Result(column="sort_id", property="sortId", jdbcType= JdbcType.INTEGER),
@Result(column="update_time", property="updateTime", jdbcType= JdbcType.TIMESTAMP),
@Result(column="recommend", property="recommend", jdbcType= JdbcType.BIT),
@Result(column="company_id", property="companyId", jdbcType= JdbcType.BIGINT),
@Result(column="op_id", property="opId", jdbcType= JdbcType.BIGINT),
@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="content", property="content", jdbcType= JdbcType.LONGVARCHAR),
@Result(column="category_name", property="categoryName", jdbcType= JdbcType.VARCHAR),
})
List<CmsContentModel> getListContentByCrest(Map<String, String> paramsMap) throws Exception;
}

@ -39,16 +39,18 @@ public interface HighCouponAgentCodeMapper extends HighCouponAgentCodeMapperExt
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_coupon_agent_code (coupon_agent_id, coupon_id, ",
"agent_id, coupon_code_id, ",
"coupon_agent_record_id, coupon_code, ",
"insert into high_coupon_agent_code (`type`, coupon_agent_id, ",
"coupon_id, agent_id, ",
"coupon_agent_record_id, convert_code, ",
"coupon_code_id, coupon_code, ",
"qr_code, `status`, ",
"remark, create_time, ",
"operator_id, operator_name, ",
"ext_1, ext_2, ext_3)",
"values (#{couponAgentId,jdbcType=BIGINT}, #{couponId,jdbcType=BIGINT}, ",
"#{agentId,jdbcType=BIGINT}, #{couponCodeId,jdbcType=BIGINT}, ",
"#{couponAgentRecordId,jdbcType=BIGINT}, #{couponCode,jdbcType=VARCHAR}, ",
"values (#{type,jdbcType=INTEGER}, #{couponAgentId,jdbcType=BIGINT}, ",
"#{couponId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{couponAgentRecordId,jdbcType=BIGINT}, #{convertCode,jdbcType=VARCHAR}, ",
"#{couponCodeId,jdbcType=BIGINT}, #{couponCode,jdbcType=VARCHAR}, ",
"#{qrCode,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
@ -64,11 +66,13 @@ public interface HighCouponAgentCodeMapper extends HighCouponAgentCodeMapperExt
@SelectProvider(type=HighCouponAgentCodeSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="coupon_agent_id", property="couponAgentId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_agent_record_id", property="couponAgentRecordId", jdbcType=JdbcType.BIGINT),
@Result(column="convert_code", property="convertCode", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code", property="couponCode", jdbcType=JdbcType.VARCHAR),
@Result(column="qr_code", property="qrCode", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@ -84,19 +88,21 @@ public interface HighCouponAgentCodeMapper extends HighCouponAgentCodeMapperExt
@Select({
"select",
"id, coupon_agent_id, coupon_id, agent_id, coupon_code_id, coupon_agent_record_id, ",
"coupon_code, qr_code, `status`, remark, create_time, operator_id, operator_name, ",
"ext_1, ext_2, ext_3",
"id, `type`, coupon_agent_id, coupon_id, agent_id, coupon_agent_record_id, convert_code, ",
"coupon_code_id, coupon_code, qr_code, `status`, remark, create_time, operator_id, ",
"operator_name, ext_1, ext_2, ext_3",
"from high_coupon_agent_code",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="coupon_agent_id", property="couponAgentId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_agent_record_id", property="couponAgentRecordId", jdbcType=JdbcType.BIGINT),
@Result(column="convert_code", property="convertCode", jdbcType=JdbcType.VARCHAR),
@Result(column="coupon_code_id", property="couponCodeId", jdbcType=JdbcType.BIGINT),
@Result(column="coupon_code", property="couponCode", jdbcType=JdbcType.VARCHAR),
@Result(column="qr_code", property="qrCode", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@ -121,11 +127,13 @@ public interface HighCouponAgentCodeMapper extends HighCouponAgentCodeMapperExt
@Update({
"update high_coupon_agent_code",
"set coupon_agent_id = #{couponAgentId,jdbcType=BIGINT},",
"set `type` = #{type,jdbcType=INTEGER},",
"coupon_agent_id = #{couponAgentId,jdbcType=BIGINT},",
"coupon_id = #{couponId,jdbcType=BIGINT},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"coupon_code_id = #{couponCodeId,jdbcType=BIGINT},",
"coupon_agent_record_id = #{couponAgentRecordId,jdbcType=BIGINT},",
"convert_code = #{convertCode,jdbcType=VARCHAR},",
"coupon_code_id = #{couponCodeId,jdbcType=BIGINT},",
"coupon_code = #{couponCode,jdbcType=VARCHAR},",
"qr_code = #{qrCode,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",

@ -28,6 +28,10 @@ public class HighCouponAgentCodeSqlProvider {
SQL sql = new SQL();
sql.INSERT_INTO("high_coupon_agent_code");
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getCouponAgentId() != null) {
sql.VALUES("coupon_agent_id", "#{couponAgentId,jdbcType=BIGINT}");
}
@ -40,14 +44,18 @@ public class HighCouponAgentCodeSqlProvider {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
if (record.getCouponCodeId() != null) {
sql.VALUES("coupon_code_id", "#{couponCodeId,jdbcType=BIGINT}");
}
if (record.getCouponAgentRecordId() != null) {
sql.VALUES("coupon_agent_record_id", "#{couponAgentRecordId,jdbcType=BIGINT}");
}
if (record.getConvertCode() != null) {
sql.VALUES("convert_code", "#{convertCode,jdbcType=VARCHAR}");
}
if (record.getCouponCodeId() != null) {
sql.VALUES("coupon_code_id", "#{couponCodeId,jdbcType=BIGINT}");
}
if (record.getCouponCode() != null) {
sql.VALUES("coupon_code", "#{couponCode,jdbcType=VARCHAR}");
}
@ -98,11 +106,13 @@ public class HighCouponAgentCodeSqlProvider {
} else {
sql.SELECT("id");
}
sql.SELECT("`type`");
sql.SELECT("coupon_agent_id");
sql.SELECT("coupon_id");
sql.SELECT("agent_id");
sql.SELECT("coupon_code_id");
sql.SELECT("coupon_agent_record_id");
sql.SELECT("convert_code");
sql.SELECT("coupon_code_id");
sql.SELECT("coupon_code");
sql.SELECT("qr_code");
sql.SELECT("`status`");
@ -134,6 +144,10 @@ public class HighCouponAgentCodeSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getCouponAgentId() != null) {
sql.SET("coupon_agent_id = #{record.couponAgentId,jdbcType=BIGINT}");
}
@ -146,14 +160,18 @@ public class HighCouponAgentCodeSqlProvider {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
if (record.getCouponCodeId() != null) {
sql.SET("coupon_code_id = #{record.couponCodeId,jdbcType=BIGINT}");
}
if (record.getCouponAgentRecordId() != null) {
sql.SET("coupon_agent_record_id = #{record.couponAgentRecordId,jdbcType=BIGINT}");
}
if (record.getConvertCode() != null) {
sql.SET("convert_code = #{record.convertCode,jdbcType=VARCHAR}");
}
if (record.getCouponCodeId() != null) {
sql.SET("coupon_code_id = #{record.couponCodeId,jdbcType=BIGINT}");
}
if (record.getCouponCode() != null) {
sql.SET("coupon_code = #{record.couponCode,jdbcType=VARCHAR}");
}
@ -203,11 +221,13 @@ public class HighCouponAgentCodeSqlProvider {
sql.UPDATE("high_coupon_agent_code");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("coupon_agent_id = #{record.couponAgentId,jdbcType=BIGINT}");
sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("coupon_code_id = #{record.couponCodeId,jdbcType=BIGINT}");
sql.SET("coupon_agent_record_id = #{record.couponAgentRecordId,jdbcType=BIGINT}");
sql.SET("convert_code = #{record.convertCode,jdbcType=VARCHAR}");
sql.SET("coupon_code_id = #{record.couponCodeId,jdbcType=BIGINT}");
sql.SET("coupon_code = #{record.couponCode,jdbcType=VARCHAR}");
sql.SET("qr_code = #{record.qrCode,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
@ -228,6 +248,10 @@ public class HighCouponAgentCodeSqlProvider {
SQL sql = new SQL();
sql.UPDATE("high_coupon_agent_code");
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getCouponAgentId() != null) {
sql.SET("coupon_agent_id = #{couponAgentId,jdbcType=BIGINT}");
}
@ -240,14 +264,18 @@ public class HighCouponAgentCodeSqlProvider {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}
if (record.getCouponCodeId() != null) {
sql.SET("coupon_code_id = #{couponCodeId,jdbcType=BIGINT}");
}
if (record.getCouponAgentRecordId() != null) {
sql.SET("coupon_agent_record_id = #{couponAgentRecordId,jdbcType=BIGINT}");
}
if (record.getConvertCode() != null) {
sql.SET("convert_code = #{convertCode,jdbcType=VARCHAR}");
}
if (record.getCouponCodeId() != null) {
sql.SET("coupon_code_id = #{couponCodeId,jdbcType=BIGINT}");
}
if (record.getCouponCode() != null) {
sql.SET("coupon_code = #{couponCode,jdbcType=VARCHAR}");
}

@ -39,18 +39,20 @@ public interface HighCouponAgentRelMapper extends HighCouponAgentRelMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_coupon_agent_rel (coupon_name, sales_price, ",
"coupon_id, agent_id, ",
"stock_count, sales_count, ",
"create_time, `status`, ",
"operator_id, operator_name, ",
"ext_1, ext_2, ext_3)",
"values (#{couponName,jdbcType=VARCHAR}, #{salesPrice,jdbcType=DECIMAL}, ",
"#{couponId,jdbcType=BIGINT}, #{agentId,jdbcType=BIGINT}, ",
"#{stockCount,jdbcType=INTEGER}, #{salesCount,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{operatorId,jdbcType=BIGINT}, #{operatorName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
"insert into high_coupon_agent_rel (`type`, coupon_name, ",
"sales_price, coupon_id, ",
"agent_id, stock_count, ",
"sales_count, create_time, ",
"`status`, operator_id, ",
"operator_name, ext_1, ",
"ext_2, ext_3)",
"values (#{type,jdbcType=INTEGER}, #{couponName,jdbcType=VARCHAR}, ",
"#{salesPrice,jdbcType=DECIMAL}, #{couponId,jdbcType=BIGINT}, ",
"#{agentId,jdbcType=BIGINT}, #{stockCount,jdbcType=INTEGER}, ",
"#{salesCount,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{operatorId,jdbcType=BIGINT}, ",
"#{operatorName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighCouponAgentRel record);
@ -62,6 +64,7 @@ public interface HighCouponAgentRelMapper extends HighCouponAgentRelMapperExt {
@SelectProvider(type=HighCouponAgentRelSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR),
@Result(column="sales_price", property="salesPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@ -80,13 +83,14 @@ public interface HighCouponAgentRelMapper extends HighCouponAgentRelMapperExt {
@Select({
"select",
"id, coupon_name, sales_price, coupon_id, agent_id, stock_count, sales_count, ",
"id, `type`, coupon_name, sales_price, coupon_id, agent_id, stock_count, sales_count, ",
"create_time, `status`, operator_id, operator_name, ext_1, ext_2, ext_3",
"from high_coupon_agent_rel",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="coupon_name", property="couponName", jdbcType=JdbcType.VARCHAR),
@Result(column="sales_price", property="salesPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_id", property="couponId", jdbcType=JdbcType.BIGINT),
@ -114,7 +118,8 @@ public interface HighCouponAgentRelMapper extends HighCouponAgentRelMapperExt {
@Update({
"update high_coupon_agent_rel",
"set coupon_name = #{couponName,jdbcType=VARCHAR},",
"set `type` = #{type,jdbcType=INTEGER},",
"coupon_name = #{couponName,jdbcType=VARCHAR},",
"sales_price = #{salesPrice,jdbcType=DECIMAL},",
"coupon_id = #{couponId,jdbcType=BIGINT},",
"agent_id = #{agentId,jdbcType=BIGINT},",

@ -47,6 +47,6 @@ public interface HighCouponAgentRelMapperExt {
})
List<HighCouponAgentCode> getAgentSalesCodeList(@Param("agentId") Long agentId, @Param("consumeTimeS")String consumeTimeS, @Param("consumeTimeE")String consumeTimeE);
@Select(" select count(1) from high_coupon_agent_code a where a.agent_id = #{agentId} and a.`status` in (#{status}) ")
Integer getAgentCodeCount(@Param("agentId") Long agentId,@Param("status") String status);
@Select(" select count(1) from high_coupon_agent_code a where a.agent_id = #{agentId} and a.`status` in (#{status}) and a.type = #{type} ")
Integer getAgentCodeCount(@Param("agentId") Long agentId,@Param("status") String status,@Param("type") Integer type);
}

@ -28,6 +28,10 @@ public class HighCouponAgentRelSqlProvider {
SQL sql = new SQL();
sql.INSERT_INTO("high_coupon_agent_rel");
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getCouponName() != null) {
sql.VALUES("coupon_name", "#{couponName,jdbcType=VARCHAR}");
}
@ -90,6 +94,7 @@ public class HighCouponAgentRelSqlProvider {
} else {
sql.SELECT("id");
}
sql.SELECT("`type`");
sql.SELECT("coupon_name");
sql.SELECT("sales_price");
sql.SELECT("coupon_id");
@ -124,6 +129,10 @@ public class HighCouponAgentRelSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getCouponName() != null) {
sql.SET("coupon_name = #{record.couponName,jdbcType=VARCHAR}");
}
@ -185,6 +194,7 @@ public class HighCouponAgentRelSqlProvider {
sql.UPDATE("high_coupon_agent_rel");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("coupon_name = #{record.couponName,jdbcType=VARCHAR}");
sql.SET("sales_price = #{record.salesPrice,jdbcType=DECIMAL}");
sql.SET("coupon_id = #{record.couponId,jdbcType=BIGINT}");
@ -208,6 +218,10 @@ public class HighCouponAgentRelSqlProvider {
SQL sql = new SQL();
sql.UPDATE("high_coupon_agent_rel");
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getCouponName() != null) {
sql.SET("coupon_name = #{couponName,jdbcType=VARCHAR}");
}

@ -0,0 +1,122 @@
package com.hai.dao;
import com.hai.entity.HighUserEtc;
import com.hai.entity.HighUserEtcExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface HighUserEtcMapper extends HighUserEtcMapperExt {
@SelectProvider(type=HighUserEtcSqlProvider.class, method="countByExample")
long countByExample(HighUserEtcExample example);
@DeleteProvider(type=HighUserEtcSqlProvider.class, method="deleteByExample")
int deleteByExample(HighUserEtcExample example);
@Delete({
"delete from high_user_etc",
"where id = #{id,jdbcType=INTEGER}"
})
int deleteByPrimaryKey(Integer id);
@Insert({
"insert into high_user_etc (user_id, vehicle_id, ",
"vehicle_plate, customer_name, ",
"customer_tel, create_time, ",
"`status`, ext_1, ext_2, ",
"ext_3)",
"values (#{userId,jdbcType=BIGINT}, #{vehicleId,jdbcType=VARCHAR}, ",
"#{vehiclePlate,jdbcType=VARCHAR}, #{customerName,jdbcType=VARCHAR}, ",
"#{customerTel,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, ",
"#{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighUserEtc record);
@InsertProvider(type=HighUserEtcSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighUserEtc record);
@SelectProvider(type=HighUserEtcSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="vehicle_id", property="vehicleId", jdbcType=JdbcType.VARCHAR),
@Result(column="vehicle_plate", property="vehiclePlate", jdbcType=JdbcType.VARCHAR),
@Result(column="customer_name", property="customerName", jdbcType=JdbcType.VARCHAR),
@Result(column="customer_tel", property="customerTel", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", 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)
})
List<HighUserEtc> selectByExample(HighUserEtcExample example);
@Select({
"select",
"id, user_id, vehicle_id, vehicle_plate, customer_name, customer_tel, create_time, ",
"`status`, ext_1, ext_2, ext_3",
"from high_user_etc",
"where id = #{id,jdbcType=INTEGER}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="vehicle_id", property="vehicleId", jdbcType=JdbcType.VARCHAR),
@Result(column="vehicle_plate", property="vehiclePlate", jdbcType=JdbcType.VARCHAR),
@Result(column="customer_name", property="customerName", jdbcType=JdbcType.VARCHAR),
@Result(column="customer_tel", property="customerTel", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", 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)
})
HighUserEtc selectByPrimaryKey(Integer id);
@UpdateProvider(type=HighUserEtcSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighUserEtc record, @Param("example") HighUserEtcExample example);
@UpdateProvider(type=HighUserEtcSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighUserEtc record, @Param("example") HighUserEtcExample example);
@UpdateProvider(type=HighUserEtcSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighUserEtc record);
@Update({
"update high_user_etc",
"set user_id = #{userId,jdbcType=BIGINT},",
"vehicle_id = #{vehicleId,jdbcType=VARCHAR},",
"vehicle_plate = #{vehiclePlate,jdbcType=VARCHAR},",
"customer_name = #{customerName,jdbcType=VARCHAR},",
"customer_tel = #{customerTel,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=INTEGER}"
})
int updateByPrimaryKey(HighUserEtc record);
}

@ -0,0 +1,7 @@
package com.hai.dao;
/**
* mapper扩展类
*/
public interface HighUserEtcMapperExt {
}

@ -0,0 +1,318 @@
package com.hai.dao;
import com.hai.entity.HighUserEtc;
import com.hai.entity.HighUserEtcExample.Criteria;
import com.hai.entity.HighUserEtcExample.Criterion;
import com.hai.entity.HighUserEtcExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighUserEtcSqlProvider {
public String countByExample(HighUserEtcExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_user_etc");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighUserEtcExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_user_etc");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighUserEtc record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_user_etc");
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getVehicleId() != null) {
sql.VALUES("vehicle_id", "#{vehicleId,jdbcType=VARCHAR}");
}
if (record.getVehiclePlate() != null) {
sql.VALUES("vehicle_plate", "#{vehiclePlate,jdbcType=VARCHAR}");
}
if (record.getCustomerName() != null) {
sql.VALUES("customer_name", "#{customerName,jdbcType=VARCHAR}");
}
if (record.getCustomerTel() != null) {
sql.VALUES("customer_tel", "#{customerTel,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(HighUserEtcExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("user_id");
sql.SELECT("vehicle_id");
sql.SELECT("vehicle_plate");
sql.SELECT("customer_name");
sql.SELECT("customer_tel");
sql.SELECT("create_time");
sql.SELECT("`status`");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_user_etc");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
HighUserEtc record = (HighUserEtc) parameter.get("record");
HighUserEtcExample example = (HighUserEtcExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_user_etc");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=INTEGER}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
if (record.getVehicleId() != null) {
sql.SET("vehicle_id = #{record.vehicleId,jdbcType=VARCHAR}");
}
if (record.getVehiclePlate() != null) {
sql.SET("vehicle_plate = #{record.vehiclePlate,jdbcType=VARCHAR}");
}
if (record.getCustomerName() != null) {
sql.SET("customer_name = #{record.customerName,jdbcType=VARCHAR}");
}
if (record.getCustomerTel() != null) {
sql.SET("customer_tel = #{record.customerTel,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("high_user_etc");
sql.SET("id = #{record.id,jdbcType=INTEGER}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("vehicle_id = #{record.vehicleId,jdbcType=VARCHAR}");
sql.SET("vehicle_plate = #{record.vehiclePlate,jdbcType=VARCHAR}");
sql.SET("customer_name = #{record.customerName,jdbcType=VARCHAR}");
sql.SET("customer_tel = #{record.customerTel,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
HighUserEtcExample example = (HighUserEtcExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighUserEtc record) {
SQL sql = new SQL();
sql.UPDATE("high_user_etc");
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getVehicleId() != null) {
sql.SET("vehicle_id = #{vehicleId,jdbcType=VARCHAR}");
}
if (record.getVehiclePlate() != null) {
sql.SET("vehicle_plate = #{vehiclePlate,jdbcType=VARCHAR}");
}
if (record.getCustomerName() != null) {
sql.SET("customer_name = #{customerName,jdbcType=VARCHAR}");
}
if (record.getCustomerTel() != null) {
sql.SET("customer_tel = #{customerTel,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=INTEGER}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighUserEtcExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -39,11 +39,13 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
"insert into out_recharge_price (`type`, price, ",
"insert into out_recharge_price (`type`, show_type, ",
"company_id, price, ",
"real_price, create_time, ",
"goods_id, discount, sort, ",
"`status`)",
"values (#{type,jdbcType=INTEGER}, #{price,jdbcType=DECIMAL}, ",
"values (#{type,jdbcType=INTEGER}, #{showType,jdbcType=INTEGER}, ",
"#{companyId,jdbcType=BIGINT}, #{price,jdbcType=DECIMAL}, ",
"#{realPrice,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{goodsId,jdbcType=BIGINT}, #{discount,jdbcType=REAL}, #{sort,jdbcType=INTEGER}, ",
"#{status,jdbcType=INTEGER})"
@ -59,6 +61,8 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="real_price", property="realPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -71,13 +75,16 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Select({
"select",
"id, `type`, price, real_price, create_time, goods_id, discount, sort, `status`",
"id, `type`, show_type, company_id, price, real_price, create_time, goods_id, ",
"discount, sort, `status`",
"from out_recharge_price",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="show_type", property="showType", jdbcType=JdbcType.INTEGER),
@Result(column="company_id", property="companyId", jdbcType=JdbcType.BIGINT),
@Result(column="price", property="price", jdbcType=JdbcType.DECIMAL),
@Result(column="real_price", property="realPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@ -100,6 +107,8 @@ public interface OutRechargePriceMapper extends OutRechargePriceMapperExt {
@Update({
"update out_recharge_price",
"set `type` = #{type,jdbcType=INTEGER},",
"show_type = #{showType,jdbcType=INTEGER},",
"company_id = #{companyId,jdbcType=BIGINT},",
"price = #{price,jdbcType=DECIMAL},",
"real_price = #{realPrice,jdbcType=DECIMAL},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",

@ -32,6 +32,14 @@ public class OutRechargePriceSqlProvider {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getShowType() != null) {
sql.VALUES("show_type", "#{showType,jdbcType=INTEGER}");
}
if (record.getCompanyId() != null) {
sql.VALUES("company_id", "#{companyId,jdbcType=BIGINT}");
}
if (record.getPrice() != null) {
sql.VALUES("price", "#{price,jdbcType=DECIMAL}");
}
@ -71,6 +79,8 @@ public class OutRechargePriceSqlProvider {
sql.SELECT("id");
}
sql.SELECT("`type`");
sql.SELECT("show_type");
sql.SELECT("company_id");
sql.SELECT("price");
sql.SELECT("real_price");
sql.SELECT("create_time");
@ -103,6 +113,14 @@ public class OutRechargePriceSqlProvider {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getShowType() != null) {
sql.SET("show_type = #{record.showType,jdbcType=INTEGER}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
}
if (record.getPrice() != null) {
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
}
@ -141,6 +159,8 @@ public class OutRechargePriceSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("show_type = #{record.showType,jdbcType=INTEGER}");
sql.SET("company_id = #{record.companyId,jdbcType=BIGINT}");
sql.SET("price = #{record.price,jdbcType=DECIMAL}");
sql.SET("real_price = #{record.realPrice,jdbcType=DECIMAL}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
@ -162,6 +182,14 @@ public class OutRechargePriceSqlProvider {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getShowType() != null) {
sql.SET("show_type = #{showType,jdbcType=INTEGER}");
}
if (record.getCompanyId() != null) {
sql.SET("company_id = #{companyId,jdbcType=BIGINT}");
}
if (record.getPrice() != null) {
sql.SET("price = #{price,jdbcType=DECIMAL}");
}

@ -20,6 +20,11 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
*/
private Long id;
/**
* 类型 1销售码 2兑换码
*/
private Integer type;
/**
* 卡券和代理商的id
*/
@ -36,14 +41,19 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
private Long agentId;
/**
* 销售码id
* 卡券分配给代理商库存记录id
*/
private Long couponCodeId;
private Long couponAgentRecordId;
/**
* 卡券分配给代理商库存记录id
* 兑换码
*/
private Long couponAgentRecordId;
private String convertCode;
/**
* 销售码id
*/
private Long couponCodeId;
/**
* 销售码
@ -96,6 +106,14 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public Long getCouponAgentId() {
return couponAgentId;
}
@ -120,14 +138,6 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
this.agentId = agentId;
}
public Long getCouponCodeId() {
return couponCodeId;
}
public void setCouponCodeId(Long couponCodeId) {
this.couponCodeId = couponCodeId;
}
public Long getCouponAgentRecordId() {
return couponAgentRecordId;
}
@ -136,6 +146,22 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
this.couponAgentRecordId = couponAgentRecordId;
}
public String getConvertCode() {
return convertCode;
}
public void setConvertCode(String convertCode) {
this.convertCode = convertCode;
}
public Long getCouponCodeId() {
return couponCodeId;
}
public void setCouponCodeId(Long couponCodeId) {
this.couponCodeId = couponCodeId;
}
public String getCouponCode() {
return couponCode;
}
@ -229,11 +255,13 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
}
HighCouponAgentCode other = (HighCouponAgentCode) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getCouponAgentId() == null ? other.getCouponAgentId() == null : this.getCouponAgentId().equals(other.getCouponAgentId()))
&& (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getCouponCodeId() == null ? other.getCouponCodeId() == null : this.getCouponCodeId().equals(other.getCouponCodeId()))
&& (this.getCouponAgentRecordId() == null ? other.getCouponAgentRecordId() == null : this.getCouponAgentRecordId().equals(other.getCouponAgentRecordId()))
&& (this.getConvertCode() == null ? other.getConvertCode() == null : this.getConvertCode().equals(other.getConvertCode()))
&& (this.getCouponCodeId() == null ? other.getCouponCodeId() == null : this.getCouponCodeId().equals(other.getCouponCodeId()))
&& (this.getCouponCode() == null ? other.getCouponCode() == null : this.getCouponCode().equals(other.getCouponCode()))
&& (this.getQrCode() == null ? other.getQrCode() == null : this.getQrCode().equals(other.getQrCode()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
@ -251,11 +279,13 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getCouponAgentId() == null) ? 0 : getCouponAgentId().hashCode());
result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getCouponCodeId() == null) ? 0 : getCouponCodeId().hashCode());
result = prime * result + ((getCouponAgentRecordId() == null) ? 0 : getCouponAgentRecordId().hashCode());
result = prime * result + ((getConvertCode() == null) ? 0 : getConvertCode().hashCode());
result = prime * result + ((getCouponCodeId() == null) ? 0 : getCouponCodeId().hashCode());
result = prime * result + ((getCouponCode() == null) ? 0 : getCouponCode().hashCode());
result = prime * result + ((getQrCode() == null) ? 0 : getQrCode().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
@ -276,11 +306,13 @@ public class HighCouponAgentCode extends HighCouponAgentCodeModel implements Ser
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", type=").append(type);
sb.append(", couponAgentId=").append(couponAgentId);
sb.append(", couponId=").append(couponId);
sb.append(", agentId=").append(agentId);
sb.append(", couponCodeId=").append(couponCodeId);
sb.append(", couponAgentRecordId=").append(couponAgentRecordId);
sb.append(", convertCode=").append(convertCode);
sb.append(", couponCodeId=").append(couponCodeId);
sb.append(", couponCode=").append(couponCode);
sb.append(", qrCode=").append(qrCode);
sb.append(", status=").append(status);

@ -185,6 +185,66 @@ public class HighCouponAgentCodeExample {
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andCouponAgentIdIsNull() {
addCriterion("coupon_agent_id is null");
return (Criteria) this;
@ -365,123 +425,193 @@ public class HighCouponAgentCodeExample {
return (Criteria) this;
}
public Criteria andCouponCodeIdIsNull() {
addCriterion("coupon_code_id is null");
public Criteria andCouponAgentRecordIdIsNull() {
addCriterion("coupon_agent_record_id is null");
return (Criteria) this;
}
public Criteria andCouponCodeIdIsNotNull() {
addCriterion("coupon_code_id is not null");
public Criteria andCouponAgentRecordIdIsNotNull() {
addCriterion("coupon_agent_record_id is not null");
return (Criteria) this;
}
public Criteria andCouponCodeIdEqualTo(Long value) {
addCriterion("coupon_code_id =", value, "couponCodeId");
public Criteria andCouponAgentRecordIdEqualTo(Long value) {
addCriterion("coupon_agent_record_id =", value, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdNotEqualTo(Long value) {
addCriterion("coupon_code_id <>", value, "couponCodeId");
public Criteria andCouponAgentRecordIdNotEqualTo(Long value) {
addCriterion("coupon_agent_record_id <>", value, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdGreaterThan(Long value) {
addCriterion("coupon_code_id >", value, "couponCodeId");
public Criteria andCouponAgentRecordIdGreaterThan(Long value) {
addCriterion("coupon_agent_record_id >", value, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdGreaterThanOrEqualTo(Long value) {
addCriterion("coupon_code_id >=", value, "couponCodeId");
public Criteria andCouponAgentRecordIdGreaterThanOrEqualTo(Long value) {
addCriterion("coupon_agent_record_id >=", value, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdLessThan(Long value) {
addCriterion("coupon_code_id <", value, "couponCodeId");
public Criteria andCouponAgentRecordIdLessThan(Long value) {
addCriterion("coupon_agent_record_id <", value, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdLessThanOrEqualTo(Long value) {
addCriterion("coupon_code_id <=", value, "couponCodeId");
public Criteria andCouponAgentRecordIdLessThanOrEqualTo(Long value) {
addCriterion("coupon_agent_record_id <=", value, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdIn(List<Long> values) {
addCriterion("coupon_code_id in", values, "couponCodeId");
public Criteria andCouponAgentRecordIdIn(List<Long> values) {
addCriterion("coupon_agent_record_id in", values, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdNotIn(List<Long> values) {
addCriterion("coupon_code_id not in", values, "couponCodeId");
public Criteria andCouponAgentRecordIdNotIn(List<Long> values) {
addCriterion("coupon_agent_record_id not in", values, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdBetween(Long value1, Long value2) {
addCriterion("coupon_code_id between", value1, value2, "couponCodeId");
public Criteria andCouponAgentRecordIdBetween(Long value1, Long value2) {
addCriterion("coupon_agent_record_id between", value1, value2, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponCodeIdNotBetween(Long value1, Long value2) {
addCriterion("coupon_code_id not between", value1, value2, "couponCodeId");
public Criteria andCouponAgentRecordIdNotBetween(Long value1, Long value2) {
addCriterion("coupon_agent_record_id not between", value1, value2, "couponAgentRecordId");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdIsNull() {
addCriterion("coupon_agent_record_id is null");
public Criteria andConvertCodeIsNull() {
addCriterion("convert_code is null");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdIsNotNull() {
addCriterion("coupon_agent_record_id is not null");
public Criteria andConvertCodeIsNotNull() {
addCriterion("convert_code is not null");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdEqualTo(Long value) {
addCriterion("coupon_agent_record_id =", value, "couponAgentRecordId");
public Criteria andConvertCodeEqualTo(String value) {
addCriterion("convert_code =", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdNotEqualTo(Long value) {
addCriterion("coupon_agent_record_id <>", value, "couponAgentRecordId");
public Criteria andConvertCodeNotEqualTo(String value) {
addCriterion("convert_code <>", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdGreaterThan(Long value) {
addCriterion("coupon_agent_record_id >", value, "couponAgentRecordId");
public Criteria andConvertCodeGreaterThan(String value) {
addCriterion("convert_code >", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdGreaterThanOrEqualTo(Long value) {
addCriterion("coupon_agent_record_id >=", value, "couponAgentRecordId");
public Criteria andConvertCodeGreaterThanOrEqualTo(String value) {
addCriterion("convert_code >=", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdLessThan(Long value) {
addCriterion("coupon_agent_record_id <", value, "couponAgentRecordId");
public Criteria andConvertCodeLessThan(String value) {
addCriterion("convert_code <", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdLessThanOrEqualTo(Long value) {
addCriterion("coupon_agent_record_id <=", value, "couponAgentRecordId");
public Criteria andConvertCodeLessThanOrEqualTo(String value) {
addCriterion("convert_code <=", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdIn(List<Long> values) {
addCriterion("coupon_agent_record_id in", values, "couponAgentRecordId");
public Criteria andConvertCodeLike(String value) {
addCriterion("convert_code like", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdNotIn(List<Long> values) {
addCriterion("coupon_agent_record_id not in", values, "couponAgentRecordId");
public Criteria andConvertCodeNotLike(String value) {
addCriterion("convert_code not like", value, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdBetween(Long value1, Long value2) {
addCriterion("coupon_agent_record_id between", value1, value2, "couponAgentRecordId");
public Criteria andConvertCodeIn(List<String> values) {
addCriterion("convert_code in", values, "convertCode");
return (Criteria) this;
}
public Criteria andCouponAgentRecordIdNotBetween(Long value1, Long value2) {
addCriterion("coupon_agent_record_id not between", value1, value2, "couponAgentRecordId");
public Criteria andConvertCodeNotIn(List<String> values) {
addCriterion("convert_code not in", values, "convertCode");
return (Criteria) this;
}
public Criteria andConvertCodeBetween(String value1, String value2) {
addCriterion("convert_code between", value1, value2, "convertCode");
return (Criteria) this;
}
public Criteria andConvertCodeNotBetween(String value1, String value2) {
addCriterion("convert_code not between", value1, value2, "convertCode");
return (Criteria) this;
}
public Criteria andCouponCodeIdIsNull() {
addCriterion("coupon_code_id is null");
return (Criteria) this;
}
public Criteria andCouponCodeIdIsNotNull() {
addCriterion("coupon_code_id is not null");
return (Criteria) this;
}
public Criteria andCouponCodeIdEqualTo(Long value) {
addCriterion("coupon_code_id =", value, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdNotEqualTo(Long value) {
addCriterion("coupon_code_id <>", value, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdGreaterThan(Long value) {
addCriterion("coupon_code_id >", value, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdGreaterThanOrEqualTo(Long value) {
addCriterion("coupon_code_id >=", value, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdLessThan(Long value) {
addCriterion("coupon_code_id <", value, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdLessThanOrEqualTo(Long value) {
addCriterion("coupon_code_id <=", value, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdIn(List<Long> values) {
addCriterion("coupon_code_id in", values, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdNotIn(List<Long> values) {
addCriterion("coupon_code_id not in", values, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdBetween(Long value1, Long value2) {
addCriterion("coupon_code_id between", value1, value2, "couponCodeId");
return (Criteria) this;
}
public Criteria andCouponCodeIdNotBetween(Long value1, Long value2) {
addCriterion("coupon_code_id not between", value1, value2, "couponCodeId");
return (Criteria) this;
}

@ -21,6 +21,11 @@ public class HighCouponAgentRel extends HighCouponAgentRelModel implements Seria
*/
private Long id;
/**
* 类型 1销售码 2兑换码
*/
private Integer type;
/**
* 卡券名称
*/
@ -87,6 +92,14 @@ public class HighCouponAgentRel extends HighCouponAgentRelModel implements Seria
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getCouponName() {
return couponName;
}
@ -204,6 +217,7 @@ public class HighCouponAgentRel extends HighCouponAgentRelModel implements Seria
}
HighCouponAgentRel other = (HighCouponAgentRel) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getCouponName() == null ? other.getCouponName() == null : this.getCouponName().equals(other.getCouponName()))
&& (this.getSalesPrice() == null ? other.getSalesPrice() == null : this.getSalesPrice().equals(other.getSalesPrice()))
&& (this.getCouponId() == null ? other.getCouponId() == null : this.getCouponId().equals(other.getCouponId()))
@ -224,6 +238,7 @@ public class HighCouponAgentRel extends HighCouponAgentRelModel implements Seria
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getCouponName() == null) ? 0 : getCouponName().hashCode());
result = prime * result + ((getSalesPrice() == null) ? 0 : getSalesPrice().hashCode());
result = prime * result + ((getCouponId() == null) ? 0 : getCouponId().hashCode());
@ -247,6 +262,7 @@ public class HighCouponAgentRel extends HighCouponAgentRelModel implements Seria
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", type=").append(type);
sb.append(", couponName=").append(couponName);
sb.append(", salesPrice=").append(salesPrice);
sb.append(", couponId=").append(couponId);

@ -186,6 +186,66 @@ public class HighCouponAgentRelExample {
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
}
public Criteria andTypeIsNotNull() {
addCriterion("`type` is not null");
return (Criteria) this;
}
public Criteria andTypeEqualTo(Integer value) {
addCriterion("`type` =", value, "type");
return (Criteria) this;
}
public Criteria andTypeNotEqualTo(Integer value) {
addCriterion("`type` <>", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThan(Integer value) {
addCriterion("`type` >", value, "type");
return (Criteria) this;
}
public Criteria andTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("`type` >=", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThan(Integer value) {
addCriterion("`type` <", value, "type");
return (Criteria) this;
}
public Criteria andTypeLessThanOrEqualTo(Integer value) {
addCriterion("`type` <=", value, "type");
return (Criteria) this;
}
public Criteria andTypeIn(List<Integer> values) {
addCriterion("`type` in", values, "type");
return (Criteria) this;
}
public Criteria andTypeNotIn(List<Integer> values) {
addCriterion("`type` not in", values, "type");
return (Criteria) this;
}
public Criteria andTypeBetween(Integer value1, Integer value2) {
addCriterion("`type` between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andTypeNotBetween(Integer value1, Integer value2) {
addCriterion("`type` not between", value1, value2, "type");
return (Criteria) this;
}
public Criteria andCouponNameIsNull() {
addCriterion("coupon_name is null");
return (Criteria) this;

@ -0,0 +1,216 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* high_user_etc
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighUserEtc implements Serializable {
/**
* 主键
*/
private Integer id;
/**
* 用户id
*/
private Long userId;
/**
* 车辆id
*/
private String vehicleId;
/**
* 车牌号
*/
private String vehiclePlate;
/**
* 用户名称
*/
private String customerName;
/**
* 用户电话
*/
private String customerTel;
/**
* 创建时间
*/
private Date createTime;
/**
* 状态 1:正常 0删除
*/
private Integer status;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getVehicleId() {
return vehicleId;
}
public void setVehicleId(String vehicleId) {
this.vehicleId = vehicleId;
}
public String getVehiclePlate() {
return vehiclePlate;
}
public void setVehiclePlate(String vehiclePlate) {
this.vehiclePlate = vehiclePlate;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerTel() {
return customerTel;
}
public void setCustomerTel(String customerTel) {
this.customerTel = customerTel;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
HighUserEtc other = (HighUserEtc) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getVehicleId() == null ? other.getVehicleId() == null : this.getVehicleId().equals(other.getVehicleId()))
&& (this.getVehiclePlate() == null ? other.getVehiclePlate() == null : this.getVehiclePlate().equals(other.getVehiclePlate()))
&& (this.getCustomerName() == null ? other.getCustomerName() == null : this.getCustomerName().equals(other.getCustomerName()))
&& (this.getCustomerTel() == null ? other.getCustomerTel() == null : this.getCustomerTel().equals(other.getCustomerTel()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (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()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getVehicleId() == null) ? 0 : getVehicleId().hashCode());
result = prime * result + ((getVehiclePlate() == null) ? 0 : getVehiclePlate().hashCode());
result = prime * result + ((getCustomerName() == null) ? 0 : getCustomerName().hashCode());
result = prime * result + ((getCustomerTel() == null) ? 0 : getCustomerTel().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", vehicleId=").append(vehicleId);
sb.append(", vehiclePlate=").append(vehiclePlate);
sb.append(", customerName=").append(customerName);
sb.append(", customerTel=").append(customerTel);
sb.append(", createTime=").append(createTime);
sb.append(", status=").append(status);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,953 @@
package com.hai.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class HighUserEtcExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
private Integer limit;
private Long offset;
public HighUserEtcExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
public void setLimit(Integer limit) {
this.limit = limit;
}
public Integer getLimit() {
return limit;
}
public void setOffset(Long offset) {
this.offset = offset;
}
public Long getOffset() {
return offset;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Integer value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Integer value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Integer value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Integer value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Integer value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Integer value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Integer> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Integer> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Integer value1, Integer value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Integer value1, Integer value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andUserIdIsNull() {
addCriterion("user_id is null");
return (Criteria) this;
}
public Criteria andUserIdIsNotNull() {
addCriterion("user_id is not null");
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andVehicleIdIsNull() {
addCriterion("vehicle_id is null");
return (Criteria) this;
}
public Criteria andVehicleIdIsNotNull() {
addCriterion("vehicle_id is not null");
return (Criteria) this;
}
public Criteria andVehicleIdEqualTo(String value) {
addCriterion("vehicle_id =", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdNotEqualTo(String value) {
addCriterion("vehicle_id <>", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdGreaterThan(String value) {
addCriterion("vehicle_id >", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdGreaterThanOrEqualTo(String value) {
addCriterion("vehicle_id >=", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdLessThan(String value) {
addCriterion("vehicle_id <", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdLessThanOrEqualTo(String value) {
addCriterion("vehicle_id <=", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdLike(String value) {
addCriterion("vehicle_id like", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdNotLike(String value) {
addCriterion("vehicle_id not like", value, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdIn(List<String> values) {
addCriterion("vehicle_id in", values, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdNotIn(List<String> values) {
addCriterion("vehicle_id not in", values, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdBetween(String value1, String value2) {
addCriterion("vehicle_id between", value1, value2, "vehicleId");
return (Criteria) this;
}
public Criteria andVehicleIdNotBetween(String value1, String value2) {
addCriterion("vehicle_id not between", value1, value2, "vehicleId");
return (Criteria) this;
}
public Criteria andVehiclePlateIsNull() {
addCriterion("vehicle_plate is null");
return (Criteria) this;
}
public Criteria andVehiclePlateIsNotNull() {
addCriterion("vehicle_plate is not null");
return (Criteria) this;
}
public Criteria andVehiclePlateEqualTo(String value) {
addCriterion("vehicle_plate =", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateNotEqualTo(String value) {
addCriterion("vehicle_plate <>", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateGreaterThan(String value) {
addCriterion("vehicle_plate >", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateGreaterThanOrEqualTo(String value) {
addCriterion("vehicle_plate >=", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateLessThan(String value) {
addCriterion("vehicle_plate <", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateLessThanOrEqualTo(String value) {
addCriterion("vehicle_plate <=", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateLike(String value) {
addCriterion("vehicle_plate like", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateNotLike(String value) {
addCriterion("vehicle_plate not like", value, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateIn(List<String> values) {
addCriterion("vehicle_plate in", values, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateNotIn(List<String> values) {
addCriterion("vehicle_plate not in", values, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateBetween(String value1, String value2) {
addCriterion("vehicle_plate between", value1, value2, "vehiclePlate");
return (Criteria) this;
}
public Criteria andVehiclePlateNotBetween(String value1, String value2) {
addCriterion("vehicle_plate not between", value1, value2, "vehiclePlate");
return (Criteria) this;
}
public Criteria andCustomerNameIsNull() {
addCriterion("customer_name is null");
return (Criteria) this;
}
public Criteria andCustomerNameIsNotNull() {
addCriterion("customer_name is not null");
return (Criteria) this;
}
public Criteria andCustomerNameEqualTo(String value) {
addCriterion("customer_name =", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameNotEqualTo(String value) {
addCriterion("customer_name <>", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameGreaterThan(String value) {
addCriterion("customer_name >", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameGreaterThanOrEqualTo(String value) {
addCriterion("customer_name >=", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameLessThan(String value) {
addCriterion("customer_name <", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameLessThanOrEqualTo(String value) {
addCriterion("customer_name <=", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameLike(String value) {
addCriterion("customer_name like", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameNotLike(String value) {
addCriterion("customer_name not like", value, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameIn(List<String> values) {
addCriterion("customer_name in", values, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameNotIn(List<String> values) {
addCriterion("customer_name not in", values, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameBetween(String value1, String value2) {
addCriterion("customer_name between", value1, value2, "customerName");
return (Criteria) this;
}
public Criteria andCustomerNameNotBetween(String value1, String value2) {
addCriterion("customer_name not between", value1, value2, "customerName");
return (Criteria) this;
}
public Criteria andCustomerTelIsNull() {
addCriterion("customer_tel is null");
return (Criteria) this;
}
public Criteria andCustomerTelIsNotNull() {
addCriterion("customer_tel is not null");
return (Criteria) this;
}
public Criteria andCustomerTelEqualTo(String value) {
addCriterion("customer_tel =", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelNotEqualTo(String value) {
addCriterion("customer_tel <>", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelGreaterThan(String value) {
addCriterion("customer_tel >", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelGreaterThanOrEqualTo(String value) {
addCriterion("customer_tel >=", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelLessThan(String value) {
addCriterion("customer_tel <", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelLessThanOrEqualTo(String value) {
addCriterion("customer_tel <=", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelLike(String value) {
addCriterion("customer_tel like", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelNotLike(String value) {
addCriterion("customer_tel not like", value, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelIn(List<String> values) {
addCriterion("customer_tel in", values, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelNotIn(List<String> values) {
addCriterion("customer_tel not in", values, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelBetween(String value1, String value2) {
addCriterion("customer_tel between", value1, value2, "customerTel");
return (Criteria) this;
}
public Criteria andCustomerTelNotBetween(String value1, String value2) {
addCriterion("customer_tel not between", value1, value2, "customerTel");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andStatusIsNull() {
addCriterion("`status` is null");
return (Criteria) this;
}
public Criteria andStatusIsNotNull() {
addCriterion("`status` is not null");
return (Criteria) this;
}
public Criteria andStatusEqualTo(Integer value) {
addCriterion("`status` =", value, "status");
return (Criteria) this;
}
public Criteria andStatusNotEqualTo(Integer value) {
addCriterion("`status` <>", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThan(Integer value) {
addCriterion("`status` >", value, "status");
return (Criteria) this;
}
public Criteria andStatusGreaterThanOrEqualTo(Integer value) {
addCriterion("`status` >=", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThan(Integer value) {
addCriterion("`status` <", value, "status");
return (Criteria) this;
}
public Criteria andStatusLessThanOrEqualTo(Integer value) {
addCriterion("`status` <=", value, "status");
return (Criteria) this;
}
public Criteria andStatusIn(List<Integer> values) {
addCriterion("`status` in", values, "status");
return (Criteria) this;
}
public Criteria andStatusNotIn(List<Integer> values) {
addCriterion("`status` not in", values, "status");
return (Criteria) this;
}
public Criteria andStatusBetween(Integer value1, Integer value2) {
addCriterion("`status` between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andStatusNotBetween(Integer value1, Integer value2) {
addCriterion("`status` not between", value1, value2, "status");
return (Criteria) this;
}
public Criteria andExt1IsNull() {
addCriterion("ext_1 is null");
return (Criteria) this;
}
public Criteria andExt1IsNotNull() {
addCriterion("ext_1 is not null");
return (Criteria) this;
}
public Criteria andExt1EqualTo(String value) {
addCriterion("ext_1 =", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotEqualTo(String value) {
addCriterion("ext_1 <>", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThan(String value) {
addCriterion("ext_1 >", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1GreaterThanOrEqualTo(String value) {
addCriterion("ext_1 >=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThan(String value) {
addCriterion("ext_1 <", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1LessThanOrEqualTo(String value) {
addCriterion("ext_1 <=", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1Like(String value) {
addCriterion("ext_1 like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotLike(String value) {
addCriterion("ext_1 not like", value, "ext1");
return (Criteria) this;
}
public Criteria andExt1In(List<String> values) {
addCriterion("ext_1 in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotIn(List<String> values) {
addCriterion("ext_1 not in", values, "ext1");
return (Criteria) this;
}
public Criteria andExt1Between(String value1, String value2) {
addCriterion("ext_1 between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt1NotBetween(String value1, String value2) {
addCriterion("ext_1 not between", value1, value2, "ext1");
return (Criteria) this;
}
public Criteria andExt2IsNull() {
addCriterion("ext_2 is null");
return (Criteria) this;
}
public Criteria andExt2IsNotNull() {
addCriterion("ext_2 is not null");
return (Criteria) this;
}
public Criteria andExt2EqualTo(String value) {
addCriterion("ext_2 =", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotEqualTo(String value) {
addCriterion("ext_2 <>", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThan(String value) {
addCriterion("ext_2 >", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2GreaterThanOrEqualTo(String value) {
addCriterion("ext_2 >=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThan(String value) {
addCriterion("ext_2 <", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2LessThanOrEqualTo(String value) {
addCriterion("ext_2 <=", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2Like(String value) {
addCriterion("ext_2 like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotLike(String value) {
addCriterion("ext_2 not like", value, "ext2");
return (Criteria) this;
}
public Criteria andExt2In(List<String> values) {
addCriterion("ext_2 in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotIn(List<String> values) {
addCriterion("ext_2 not in", values, "ext2");
return (Criteria) this;
}
public Criteria andExt2Between(String value1, String value2) {
addCriterion("ext_2 between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt2NotBetween(String value1, String value2) {
addCriterion("ext_2 not between", value1, value2, "ext2");
return (Criteria) this;
}
public Criteria andExt3IsNull() {
addCriterion("ext_3 is null");
return (Criteria) this;
}
public Criteria andExt3IsNotNull() {
addCriterion("ext_3 is not null");
return (Criteria) this;
}
public Criteria andExt3EqualTo(String value) {
addCriterion("ext_3 =", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotEqualTo(String value) {
addCriterion("ext_3 <>", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThan(String value) {
addCriterion("ext_3 >", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3GreaterThanOrEqualTo(String value) {
addCriterion("ext_3 >=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThan(String value) {
addCriterion("ext_3 <", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3LessThanOrEqualTo(String value) {
addCriterion("ext_3 <=", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3Like(String value) {
addCriterion("ext_3 like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotLike(String value) {
addCriterion("ext_3 not like", value, "ext3");
return (Criteria) this;
}
public Criteria andExt3In(List<String> values) {
addCriterion("ext_3 in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotIn(List<String> values) {
addCriterion("ext_3 not in", values, "ext3");
return (Criteria) this;
}
public Criteria andExt3Between(String value1, String value2) {
addCriterion("ext_3 between", value1, value2, "ext3");
return (Criteria) this;
}
public Criteria andExt3NotBetween(String value1, String value2) {
addCriterion("ext_3 not between", value1, value2, "ext3");
return (Criteria) this;
}
}
/**
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

@ -24,6 +24,16 @@ public class OutRechargePrice implements Serializable {
*/
private Integer type;
/**
* 展示类型 1 小程序 2H5 3:银联
*/
private Integer showType;
/**
* 公司id
*/
private Long companyId;
/**
* 金额
*/
@ -77,6 +87,22 @@ public class OutRechargePrice implements Serializable {
this.type = type;
}
public Integer getShowType() {
return showType;
}
public void setShowType(Integer showType) {
this.showType = showType;
}
public Long getCompanyId() {
return companyId;
}
public void setCompanyId(Long companyId) {
this.companyId = companyId;
}
public BigDecimal getPrice() {
return price;
}
@ -147,6 +173,8 @@ public class OutRechargePrice implements Serializable {
OutRechargePrice other = (OutRechargePrice) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getShowType() == null ? other.getShowType() == null : this.getShowType().equals(other.getShowType()))
&& (this.getCompanyId() == null ? other.getCompanyId() == null : this.getCompanyId().equals(other.getCompanyId()))
&& (this.getPrice() == null ? other.getPrice() == null : this.getPrice().equals(other.getPrice()))
&& (this.getRealPrice() == null ? other.getRealPrice() == null : this.getRealPrice().equals(other.getRealPrice()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
@ -162,6 +190,8 @@ public class OutRechargePrice implements Serializable {
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getShowType() == null) ? 0 : getShowType().hashCode());
result = prime * result + ((getCompanyId() == null) ? 0 : getCompanyId().hashCode());
result = prime * result + ((getPrice() == null) ? 0 : getPrice().hashCode());
result = prime * result + ((getRealPrice() == null) ? 0 : getRealPrice().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
@ -180,6 +210,8 @@ public class OutRechargePrice implements Serializable {
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", type=").append(type);
sb.append(", showType=").append(showType);
sb.append(", companyId=").append(companyId);
sb.append(", price=").append(price);
sb.append(", realPrice=").append(realPrice);
sb.append(", createTime=").append(createTime);

@ -246,6 +246,126 @@ public class OutRechargePriceExample {
return (Criteria) this;
}
public Criteria andShowTypeIsNull() {
addCriterion("show_type is null");
return (Criteria) this;
}
public Criteria andShowTypeIsNotNull() {
addCriterion("show_type is not null");
return (Criteria) this;
}
public Criteria andShowTypeEqualTo(Integer value) {
addCriterion("show_type =", value, "showType");
return (Criteria) this;
}
public Criteria andShowTypeNotEqualTo(Integer value) {
addCriterion("show_type <>", value, "showType");
return (Criteria) this;
}
public Criteria andShowTypeGreaterThan(Integer value) {
addCriterion("show_type >", value, "showType");
return (Criteria) this;
}
public Criteria andShowTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("show_type >=", value, "showType");
return (Criteria) this;
}
public Criteria andShowTypeLessThan(Integer value) {
addCriterion("show_type <", value, "showType");
return (Criteria) this;
}
public Criteria andShowTypeLessThanOrEqualTo(Integer value) {
addCriterion("show_type <=", value, "showType");
return (Criteria) this;
}
public Criteria andShowTypeIn(List<Integer> values) {
addCriterion("show_type in", values, "showType");
return (Criteria) this;
}
public Criteria andShowTypeNotIn(List<Integer> values) {
addCriterion("show_type not in", values, "showType");
return (Criteria) this;
}
public Criteria andShowTypeBetween(Integer value1, Integer value2) {
addCriterion("show_type between", value1, value2, "showType");
return (Criteria) this;
}
public Criteria andShowTypeNotBetween(Integer value1, Integer value2) {
addCriterion("show_type not between", value1, value2, "showType");
return (Criteria) this;
}
public Criteria andCompanyIdIsNull() {
addCriterion("company_id is null");
return (Criteria) this;
}
public Criteria andCompanyIdIsNotNull() {
addCriterion("company_id is not null");
return (Criteria) this;
}
public Criteria andCompanyIdEqualTo(Long value) {
addCriterion("company_id =", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotEqualTo(Long value) {
addCriterion("company_id <>", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThan(Long value) {
addCriterion("company_id >", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) {
addCriterion("company_id >=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThan(Long value) {
addCriterion("company_id <", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdLessThanOrEqualTo(Long value) {
addCriterion("company_id <=", value, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdIn(List<Long> values) {
addCriterion("company_id in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotIn(List<Long> values) {
addCriterion("company_id not in", values, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdBetween(Long value1, Long value2) {
addCriterion("company_id between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andCompanyIdNotBetween(Long value1, Long value2) {
addCriterion("company_id not between", value1, value2, "companyId");
return (Criteria) this;
}
public Criteria andPriceIsNull() {
addCriterion("price is null");
return (Criteria) this;

@ -85,6 +85,19 @@ public interface CmsContentService {
*/
List<CmsContentModel> getListContent(Map<String, String> paramsMap) throws Exception;
/**
*
* @Title: getListContent
* @Description: 查询内容列表
* @author: gongjia
* @param: [paramsMap]
* @return: java.util.List<com.ncsmesc.entity.CmsContent>
* @throws
*/
List<CmsContentModel> getListContentByCrest(Map<String, String> paramsMap) throws Exception;
/**
*
* @Title: getCorporateAdvertising

@ -35,7 +35,7 @@ public interface HighCouponAgentService {
* @Description 根据卡券id和代理商id 查询
* @Date 2021/4/20 23:52
**/
HighCouponAgentRel getRelByCouponAgent(Long couponId,Long agentId);
HighCouponAgentRel getRelByCouponAgent(Long couponId,Long agentId, Integer type);
/**
* @Author 胡锐
@ -78,7 +78,7 @@ public interface HighCouponAgentService {
* @Description 根据代理商 查询销售统计
* @Date 2021/4/22 22:26
**/
Map<String, Object> getSalesCountByAgent(Long agentId) throws Exception;
Map<String, Object> getSalesCountByAgent(Long agentId, Integer type) throws Exception;
/**
*
@ -104,4 +104,25 @@ public interface HighCouponAgentService {
*/
List<HighCouponAgentCode> getAgentSalesCodeList(Long agentId,String consumeTimeS,String consumeTimeE);
/**
* 生成兑换码
* @param couponAgentRelId
* @return
*/
String generateConvertCode(Long couponAgentRelId);
/**
* 查询兑换码
* @param convertCode
* @return
*/
HighCouponAgentCode getConvertCode(String convertCode);
/**
* 使用兑换码
* @param code
* @return
*/
String useConvertCode(String code);
}

@ -89,4 +89,14 @@ public interface HighDiscountPackageService {
*/
void addDiscountPackageStock(HighDiscountPackage highDiscountPackage, UserInfoModel userInfoModel , Integer num);
/**
* @Author Sum1Dream
* @name freeUserDiscountPackage.java
* @Description // 赠送用户优惠券包内容
* @Date 3:09 下午 2021/12/24
* @Param [java.lang.Long]
* @return void
*/
void freeUserDiscountPackage(Map<String , Object> map) throws Exception;
}

@ -39,5 +39,6 @@ public interface HighDiscountService {
* @Date 2021/4/3 21:39
**/
List<HighDiscount> getDiscount(Map<String,Object> map);
}

@ -0,0 +1,33 @@
package com.hai.service;
/**
* @serviceName HltMerchantService.java
* @author Sum1Dream
* @version 1.0.0
* @Description // 测试接口
* @createTime 11:46 上午 2021/12/15
**/
public interface HighTestService {
/**
* @Author Sum1Dream
* @name getReadFile.java
* @Description //读取文件
* @Date 5:31 下午 2021/12/16
* @Param []
* @return void
*/
void getReadFile() throws Exception;
/**
* @Author Sum1Dream
* @name getUserDiscount.java
* @Description // 赠送用户卡券
* @Date 7:14 下午 2021/12/24
* @Param []
* @return void
*/
void getUserDiscount(Long id) throws Exception;
}

@ -178,6 +178,11 @@ public class CmsContentServiceImpl implements CmsContentService {
return cmsContentMapper.getListContent(paramsMap);
}
@Override
public List<CmsContentModel> getListContentByCrest(Map<String, String> paramsMap) throws Exception {
return cmsContentMapper.getListContentByCrest(paramsMap);
}
@Override
public List<CmsContent> getCorporateAdvertising() {
CmsContentExample example = new CmsContentExample();

@ -1,6 +1,7 @@
package com.hai.service.impl;
import com.github.pagehelper.PageInfo;
import com.hai.common.GenerateCode;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
@ -15,6 +16,7 @@ import com.hai.service.*;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
@ -54,13 +56,9 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
private HighAgentService highAgentService;
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void assignCouponAgent(HighCouponAgentRel highCouponAgentRel,Integer stockCount) {
// 查询未销售的卡券
List<HighCouponCode> codeList = highCouponCodeService.getNoSaleCode(highCouponAgentRel.getCouponId());
if (stockCount > codeList.size()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法分配,分配数量超过库存数量");
}
if (highCouponAgentRel.getId() != null) {
highCouponAgentRelMapper.updateByPrimaryKey(highCouponAgentRel);
} else {
@ -87,26 +85,52 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
record.setCreateTime(new Date());
highCouponAgentRecordMapper.insert(record);
List<HighCouponCode> assignCouponCodeList = codeList.stream().limit(stockCount).collect(Collectors.toList());
HighCouponAgentCode highCouponAgentCode;
for (HighCouponCode code : assignCouponCodeList) {
code.setAgentId(highCouponAgentRel.getAgentId());
code.setIsAssignAgent(true);
highCouponCodeService.updateCouponCode(code);
highCouponAgentCode = new HighCouponAgentCode();
highCouponAgentCode.setCouponAgentId(highCouponAgentRel.getId());
highCouponAgentCode.setCouponAgentRecordId(record.getId());
highCouponAgentCode.setCouponId(code.getCouponId());
highCouponAgentCode.setAgentId(highCouponAgentRel.getAgentId());
highCouponAgentCode.setCouponCodeId(code.getId());
highCouponAgentCode.setCouponCode(code.getSalesCode());
highCouponAgentCode.setQrCode(code.getExt1());
highCouponAgentCode.setStatus(1);
highCouponAgentCode.setCreateTime(new Date());
highCouponAgentCode.setOperatorId(highCouponAgentRel.getOperatorId());
highCouponAgentCode.setOperatorName(highCouponAgentRel.getOperatorName());
highCouponAgentCodeMapper.insert(highCouponAgentCode);
if (highCouponAgentRel.getType() == 1) {
// 查询未销售的卡券
List<HighCouponCode> codeList = highCouponCodeService.getNoSaleCode(highCouponAgentRel.getCouponId());
if (stockCount > codeList.size()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无法分配,分配数量超过库存数量");
}
List<HighCouponCode> assignCouponCodeList = codeList.stream().limit(stockCount).collect(Collectors.toList());
HighCouponAgentCode highCouponAgentCode;
for (HighCouponCode code : assignCouponCodeList) {
code.setAgentId(highCouponAgentRel.getAgentId());
code.setIsAssignAgent(true);
highCouponCodeService.updateCouponCode(code);
highCouponAgentCode = new HighCouponAgentCode();
highCouponAgentCode.setType(highCouponAgentRel.getType());
highCouponAgentCode.setCouponAgentId(highCouponAgentRel.getId());
highCouponAgentCode.setCouponAgentRecordId(record.getId());
highCouponAgentCode.setCouponId(code.getCouponId());
highCouponAgentCode.setAgentId(highCouponAgentRel.getAgentId());
highCouponAgentCode.setCouponCodeId(code.getId());
highCouponAgentCode.setCouponCode(code.getSalesCode());
highCouponAgentCode.setQrCode(code.getExt1());
highCouponAgentCode.setStatus(1);
highCouponAgentCode.setCreateTime(new Date());
highCouponAgentCode.setOperatorId(highCouponAgentRel.getOperatorId());
highCouponAgentCode.setOperatorName(highCouponAgentRel.getOperatorName());
highCouponAgentCodeMapper.insert(highCouponAgentCode);
}
}
if (highCouponAgentRel.getType() == 2) {
HighCouponAgentCode highCouponAgentCode;
for (int i = 0; i < stockCount; i++) {
highCouponAgentCode = new HighCouponAgentCode();
highCouponAgentCode.setType(highCouponAgentRel.getType());
highCouponAgentCode.setCouponAgentId(highCouponAgentRel.getId());
highCouponAgentCode.setCouponAgentRecordId(record.getId());
highCouponAgentCode.setCouponId(highCoupon.getId());
highCouponAgentCode.setAgentId(highCouponAgentRel.getAgentId());
highCouponAgentCode.setConvertCode(generateConvertCode(highCouponAgentRel.getId()));
highCouponAgentCode.setStatus(1);
highCouponAgentCode.setCreateTime(new Date());
highCouponAgentCode.setOperatorId(highCouponAgentRel.getOperatorId());
highCouponAgentCode.setOperatorName(highCouponAgentRel.getOperatorName());
highCouponAgentCodeMapper.insert(highCouponAgentCode);
}
}
}
@ -116,9 +140,9 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
}
@Override
public HighCouponAgentRel getRelByCouponAgent(Long couponId, Long agentId) {
public HighCouponAgentRel getRelByCouponAgent(Long couponId, Long agentId,Integer type) {
HighCouponAgentRelExample example = new HighCouponAgentRelExample();
example.createCriteria().andCouponIdEqualTo(couponId).andAgentIdEqualTo(agentId);
example.createCriteria().andCouponIdEqualTo(couponId).andAgentIdEqualTo(agentId).andTypeEqualTo(type);
List<HighCouponAgentRel> list = highCouponAgentRelMapper.selectByExample(example);
if (list != null && list.size() > 0) {
return list.get(0);
@ -131,6 +155,10 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
HighCouponAgentRelExample example = new HighCouponAgentRelExample();
HighCouponAgentRelExample.Criteria criteria = example.createCriteria();
if (MapUtils.getInteger(map, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type"));
}
if (MapUtils.getLong(map, "couponId") != null) {
criteria.andCouponIdEqualTo(MapUtils.getLong(map, "couponId"));
}
@ -153,6 +181,10 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
criteria.andCouponAgentIdEqualTo(MapUtils.getLong(map, "couponAgentId"));
}
if (MapUtils.getInteger(map, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(map, "type"));
}
if (MapUtils.getLong(map, "couponId") != null) {
criteria.andCouponIdEqualTo(MapUtils.getLong(map, "couponId"));
}
@ -213,15 +245,19 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
couponAgentCode.setRemark(remark);
highCouponAgentCodeMapper.updateByPrimaryKey(couponAgentCode);
HighCouponAgentRel couponAgent = getRelByCouponAgent(couponAgentCode.getCouponId(), couponAgentCode.getAgentId());
HighCouponAgentRel couponAgent = getRelByCouponAgent(couponAgentCode.getCouponId(), couponAgentCode.getAgentId(), couponAgentCode.getType());
couponAgent.setStockCount(couponAgent.getStockCount() - 1);
couponAgent.setSalesCount(couponAgent.getSalesCount() + 1);
highCouponAgentRelMapper.updateByPrimaryKey(couponAgent);
HighCouponCode couponCode = highCouponCodeService.getCouponCodeById(couponAgentCode.getCouponCodeId());
couponCode.setStatus(2);
couponCode.setReceiveTime(new Date());
highCouponCodeService.updateCouponCode(couponCode);
HighCouponCode couponCode = null;
if (couponAgentCode.getType() == 1) {
couponCode = highCouponCodeService.getCouponCodeById(couponAgentCode.getCouponCodeId());
couponCode.setStatus(2);
couponCode.setReceiveTime(new Date());
highCouponCodeService.updateCouponCode(couponCode);
}
Map<String, Object> map = new HashMap<>();
map.put("couponInfo", highCouponService.getCouponById(couponAgentCode.getCouponId()));
@ -231,12 +267,13 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
}
@Override
public Map<String, Object> getSalesCountByAgent(Long agentId) throws Exception {
public Map<String, Object> getSalesCountByAgent(Long agentId, Integer type) throws Exception {
BigDecimal surplusCountPrice = new BigDecimal("0");
BigDecimal salesCountPrice = new BigDecimal("0");
Map<String,Object> listMap = new HashMap<>();
listMap.put("agentId", agentId);
listMap.put("type", type);
List<HighCouponAgentRel> list = getCouponAgentList(listMap).stream().sorted(Comparator.comparing(HighCouponAgentRel::getSalesPrice)).collect(Collectors.toList());
for (HighCouponAgentRel highCouponAgentRel : list) {
BigDecimal surplusPrice = new BigDecimal(highCouponAgentRel.getStockCount()).multiply((highCouponAgentRel.getSalesPrice()));
@ -246,7 +283,7 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
salesCountPrice = salesCountPrice.add(salesPrice);
}
// 计算使用有效期
// 当前日时间
Calendar consumeTimeS = Calendar.getInstance();
consumeTimeS.setTime(new Date());
consumeTimeS.set(Calendar.HOUR_OF_DAY, 00);
@ -265,8 +302,8 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
returnMap.put("orderCount", agentSales.getCount());
returnMap.put("turnoverPrice", agentSales.getSalesCountPrice());
returnMap.put("laveStockCount", highCouponAgentRelMapper.getAgentCodeCount(agentId, "1")); // 库存数量
returnMap.put("soldCount", highCouponAgentRelMapper.getAgentCodeCount(agentId, "2,3")); // 销售数量
returnMap.put("laveStockCount", highCouponAgentRelMapper.getAgentCodeCount(agentId, "1", type)); // 库存数量
returnMap.put("soldCount", highCouponAgentRelMapper.getAgentCodeCount(agentId, "2,3", type)); // 销售数量
returnMap.put("surplusCountPrice", surplusCountPrice); // 剩余总额
returnMap.put("salesCountPrice", salesCountPrice); // 销售总额
@ -312,4 +349,52 @@ public class HighCouponAgentServiceImpl implements HighCouponAgentService {
}
return new ArrayList<>();
}
@Override
public String generateConvertCode(Long couponAgentRelId) {
// 生成兑换码
String code = GenerateCode.convertCode(couponAgentRelId);
if (getConvertCode(code) != null){
return generateConvertCode(couponAgentRelId);
}
return code;
}
@Override
public HighCouponAgentCode getConvertCode(String convertCode) {
HighCouponAgentCodeExample example = new HighCouponAgentCodeExample();
example.createCriteria().andConvertCodeEqualTo(convertCode);
List<HighCouponAgentCode> list = highCouponAgentCodeMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW,isolation= Isolation.SERIALIZABLE)
public String useConvertCode(String code) {
// 查询兑换码
HighCouponAgentCode convertCode = getConvertCode(code);
if (convertCode == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "无效的兑换码");
}
if (convertCode.getStatus() == 3) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "兑换码已被使用");
}
// 查询未销售的卡券
List<HighCouponCode> codeList = highCouponCodeService.getNoSaleCode(convertCode.getCouponId());
if (codeList.size() == 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂时无法使用兑换码");
}
HighCouponCode couponCode = codeList.get(0);
convertCode.setCouponCodeId(couponCode.getId());
convertCode.setCouponCode(couponCode.getSalesCode());
convertCode.setQrCode(couponCode.getExt1());
convertCode.setStatus(2);
highCouponAgentCodeMapper.updateByPrimaryKey(convertCode);
return "/couponCode/"+couponCode.getExt1();
}
}

@ -3,12 +3,16 @@ package com.hai.service.impl;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.DateUtil;
import com.hai.common.utils.IDGenerator;
import com.hai.common.utils.RedisUtil;
import com.hai.dao.*;
import com.hai.entity.*;
import com.hai.model.UserInfoModel;
import com.hai.service.*;
import com.hai.service.HighDiscountPackageService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
@ -52,6 +56,28 @@ public class HighDiscountPackageServiceImpl implements HighDiscountPackageServic
@Resource
private HighDiscountInventoryRecordMapper discountInventoryRecordMapper;
@Resource
private HighUserService highUserService;
@Resource
private HighDiscountPackageService highDiscountPackageService;
@Resource
private HighDiscountUserRelMapper highDiscountUserRelMapper;
@Resource
private HighDiscountService highDiscountService;
@Resource
private HighDiscountPackageActualService discountPackageActualService;
@Resource
private HighDiscountPackageDiscountActualService discountPackageDiscountActualService;
@Autowired
private RedisUtil redisUtil;
@Override
public List<HighDiscountPackage> getDiscountPackageList(Map<String, Object> map) {
@ -223,4 +249,75 @@ public class HighDiscountPackageServiceImpl implements HighDiscountPackageServic
highDiscountPackageMapper.updateByPrimaryKey(highDiscountPackage);
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW)
public void freeUserDiscountPackage(Map<String , Object> map) throws Exception {
HighDiscountPackage highDiscountPackage = highDiscountPackageService.findDiscountPackageById(MapUtils.getInteger(map , "discountPackageId"));
// 查询优惠券包实际库存
HighDiscountPackageActual discountPackageActual = discountPackageActualService.getHighDiscountPackageActualList(highDiscountPackage.getId()).get(0);
// 修改优惠券包实际库存为已使用
discountPackageActual.setStatus(0);
discountPackageActual.setUserId(MapUtils.getInteger(map , "userId"));
discountPackageActual.setAllocationTime(new Date());
discountPackageActualService.updateHighDiscountPackageActual(discountPackageActual);
// 查询优惠券包实际库存中实际优惠券数量
List<HighDiscountPackageDiscountActual> discountPackageDiscountActual = discountPackageDiscountActualService.getHighDiscountPackageDiscountActualList(discountPackageActual.getId());
// 循环赠送优惠券
for (HighDiscountPackageDiscountActual actualList: discountPackageDiscountActual) {
HighDiscountUserRel highDiscountUserRel = new HighDiscountUserRel();
highDiscountUserRel.setDiscountId(actualList.getDiscountId());
highDiscountUserRel.setUserId(MapUtils.getLong(map , "userId"));
highDiscountUserRel.setAgentId(actualList.getAgentId());
highDiscountUserRel.setDiscountAgentCodeId(actualList.getAgentDiscountCodeId());
highDiscountUserRel.setStatus(1);
highDiscountUserRel.setCreateTime(new Date());
HighDiscount highDiscount = highDiscountService.getDiscountById(actualList.getDiscountId());
// 计算使用有效期
Calendar userEndTime = Calendar.getInstance();
userEndTime.setTime(new Date());
userEndTime.set(Calendar.HOUR_OF_DAY, 23);
userEndTime.set(Calendar.MINUTE, 59);
userEndTime.set(Calendar.SECOND, 59);
userEndTime.add(Calendar.DATE, highDiscount.getEffectiveDay());
highDiscountUserRel.setUseEndTime(userEndTime.getTime());
HighDiscountAgentCode discountAgentCode = highDiscountAgentCodeService.getCodeById(actualList.getAgentDiscountCodeId());
// 修改优惠券二维码状态
discountAgentCode.setStatus(2);
highDiscountAgentCodeService.updateCode(discountAgentCode);
// 新增优惠券与用户的绑定关系
highDiscountUserRelMapper.insert(highDiscountUserRel);
// 修改优惠券包实际库存实际优惠券状态
actualList.setStatus(0);
discountPackageDiscountActualService.updateHighDiscountPackageDiscountActual(actualList);
}
// 增加赠送记录
HighDiscountPackageRecord discountPackageRecord = new HighDiscountPackageRecord();
discountPackageRecord.setDiscountPackageId(highDiscountPackage.getId());
discountPackageRecord.setDiscountPackageTitle(highDiscountPackage.getTitle());
discountPackageRecord.setCompanyId(highDiscountPackage.getCompanyId());
discountPackageRecord.setStatus(1);
discountPackageRecord.setUsingAttribution(1);
discountPackageRecord.setRecordNo("DP" + DateUtil.date2String(new Date(),"yyyyMMddHHmmss") + IDGenerator.nextId(5) );
discountPackageRecord.setSalesType(2);
discountPackageRecord.setUserId(MapUtils.getInteger(map , "userId"));
discountPackageRecord.setExt1(MapUtils.getString(map , "userPhone"));
discountPackageRecord.setCreatedTime(new Date());
highDiscountPackageRecordMapper.insert(discountPackageRecord);
}
}

@ -0,0 +1,136 @@
package com.hai.service.impl;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.common.utils.RedisUtil;
import com.hai.dao.HighUserEtcMapper;
import com.hai.entity.HighDiscountAgentCode;
import com.hai.entity.HighUser;
import com.hai.entity.HighUserEtc;
import com.hai.service.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service("highTestService")
public class HighTestServiceImpl implements HighTestService {
private static Logger log = LoggerFactory.getLogger(HighTestService.class);
@Resource
private HighUserService highUserService;
@Resource
private HighUserEtcMapper highUserEtcMapper;
@Resource
private HighDiscountAgentCodeService highDiscountAgentCodeService;
@Resource
private HighDiscountUserRelService highDiscountUserRelService;
@Autowired
private RedisUtil redisUtil;
@Override
@Transactional(rollbackFor=Exception.class,propagation= Propagation.REQUIRES_NEW)
public void getReadFile() throws Exception {
// BufferedReader bufferedReader = null;
//
// Map<String , String> mapUser = new HashMap<>();
//
// //cookie过期时间为7天
// int EXPIRE = 3600*24*7;
//
// List<HighUser> highUsers = highUserService.getListUser(mapUser);
//
// for (HighUser user: highUsers) {
// redisUtil.set(user.getPhone(), user.getPhone(), EXPIRE);
// }
//
// FileReader fileReader = new FileReader("/home/project/hsg/readFile/etccq.txt");
// if (fileReader == null) {
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "读取空数据");
// }
//
// bufferedReader = new BufferedReader(fileReader);
// String temp = bufferedReader.readLine();
// int i = 0;
// while (temp != null) {
// i++;
// String[] arr = temp.split(";");
//
// String phone = (String) redisUtil.get(arr[3]);
//
// if (phone == null || highUsers.size() == 0) {
// HighUser user = new HighUser();
//
// user.setStatus(1);
// user.setInfoCompleteStatus(1);
// user.setGold(0);
// user.setRegTime(new Date());
// user.setName(arr[2]);
// user.setPhone(arr[3]);
// user.setExt4("1");
//
// highUserService.insertUser(user);
//
// HighUserEtc userEtc = new HighUserEtc();
//
// userEtc.setCreateTime(new Date());
// userEtc.setStatus(1);
// userEtc.setUserId(user.getId());
// userEtc.setCustomerName(arr[2]);
// userEtc.setCustomerTel(arr[3]);
// userEtc.setVehicleId(arr[0]);
// userEtc.setVehiclePlate(arr[1]);
//
// highUserEtcMapper.insert(userEtc);
//
//// Map<String , Object> map = new HashMap<>();
//// map.put("userId" , user.getId());
//// map.put("userPhone" , user.getPhone());
//// map.put("discountPackageId" , 48);
//
//// highDiscountPackageService.freeUserDiscountPackage(map);
// }
//
// temp = bufferedReader.readLine();
// }
}
@Override
@Transactional(rollbackFor=Exception.class,propagation= Propagation.REQUIRES_NEW)
public void getUserDiscount(Long id) throws Exception{
List<HighDiscountAgentCode> codeList = highDiscountAgentCodeService.getDiscountCodeByStatus(id , 1);
Map<String , String> map = new HashMap<>();
map.put("ext4" , "1");
List<HighUser> userList = highUserService.getListUser(map);
int num = 0;
for (HighUser user : userList) {
// 领取优惠券
highDiscountUserRelService.receiveDiscount(user.getId(), codeList.get(num).getId());
num++;
}
}
}

@ -65,6 +65,9 @@ public class HighUserServiceImpl implements HighUserService {
if (StringUtils.isNotBlank(map.get("status"))) {
criteria.andStatusEqualTo(Integer.valueOf(map.get("status")));
}
if (StringUtils.isNotBlank(map.get("ext4"))) {
criteria.andExt4EqualTo(String.valueOf(map.get("ext4")));
}
if (StringUtils.isNotBlank(map.get("regTimeStart")) && StringUtils.isNotBlank(map.get("regTimeEnd"))) {
criteria.andRegTimeBetween(
DateUtil.format(map.get("regTimeStart") , "yyyy-MM-dd HH:mm:ss") ,

@ -116,8 +116,6 @@ public class HltUnionCardVipServiceImpl implements HltUnionCardVipService {
HighDiscountPackage highDiscountPackage = highDiscountPackages.get(0);
highDiscountPackageService.updateDiscountPackage(highDiscountPackage);
// 查询优惠券包实际库存
HighDiscountPackageActual discountPackageActual = discountPackageActualService.getHighDiscountPackageActualList(highDiscountPackage.getId()).get(0);

@ -25,6 +25,13 @@ public class OutRechargePriceServiceImpl implements OutRechargePriceService {
if (StringUtils.isNotBlank(map.get("type"))) {
criteria.andTypeEqualTo(Integer.valueOf(map.get("type")));
}
if (StringUtils.isNotBlank(map.get("showType"))) {
criteria.andShowTypeEqualTo(Integer.valueOf(map.get("showType")));
}
if (StringUtils.isNotBlank(map.get("companyId"))) {
criteria.andCompanyIdEqualTo(Long.valueOf(map.get("companyId")));
}
example.setOrderByClause("type asc");
return outRechargePriceMapper.selectByExample(example);
@ -39,7 +46,12 @@ public class OutRechargePriceServiceImpl implements OutRechargePriceService {
if (StringUtils.isNotBlank(map.get("type"))) {
criteria.andTypeEqualTo(Integer.valueOf(map.get("type")));
}
if (StringUtils.isNotBlank(map.get("showType"))) {
criteria.andShowTypeEqualTo(Integer.valueOf(map.get("showType")));
}
if (StringUtils.isNotBlank(map.get("companyId"))) {
criteria.andCompanyIdEqualTo(Long.valueOf(map.get("companyId")));
}
example.setOrderByClause("sort asc");
return outRechargePriceMapper.selectByExample(example);
}

@ -42,7 +42,7 @@ unionStagingPayOrgId=ORG000000000001
unionStagingPayOrgMerCode=890000000123679
unionStagingPayOrgTermNo=W0616228
unionStagingPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
unionStagingPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/notify
unionStagingPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/stagingNotify
# ??????
wx_cert=/home/project/wx_cert/

@ -30,6 +30,13 @@ unionPaySignKey=sa72ivadl84273dlj2kdaia2idiadik5
unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify
unionPayTelNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notifyTel
unionStagingPayUrl=https://mtest.eycard.cn/
unionStagingPayOrgId=ORG000000000001
unionStagingPayOrgMerCode=890000000123679
unionStagingPayOrgTermNo=W0616228
unionStagingPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
unionStagingPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/stagingNotify
wx_cert=/home/project/wx_cert/
TelApiKey=2d01f6b520254b1a80f6b167832cea18

@ -30,6 +30,13 @@ unionPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify
unionPayTelNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notifyTel
unionStagingPayUrl=https://mtest.eycard.cn/
unionStagingPayOrgId=ORG000000000001
unionStagingPayOrgMerCode=890000000123679
unionStagingPayOrgTermNo=W0616228
unionStagingPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
unionStagingPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/stagingNotify
wx_cert=/home/project/wx_cert/
TelApiKey=2d01f6b520254b1a80f6b167832cea18

@ -30,6 +30,13 @@ unionPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
unionPayNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notify
unionPayTelNotifyUrl=https://hsg.dctpay.com/crest/unionPay/notifyTel
unionStagingPayUrl=https://mtest.eycard.cn/
unionStagingPayOrgId=ORG000000000001
unionStagingPayOrgMerCode=890000000123679
unionStagingPayOrgTermNo=W0616228
unionStagingPaySignKey=1dfk0i0fl7ild07l2k5oj8dddikkivd0
unionStagingPayNotifyUrl=https://hsgcs.dctpay.com/crest/unionPay/stagingNotify
wx_cert=/home/project/wx_cert/
TelApiKey=2d01f6b520254b1a80f6b167832cea18

Loading…
Cancel
Save