袁野 1 year ago
parent 8b93147cf6
commit 38dd67f618
  1. 193
      hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageAgentController.java
  2. 51
      hai-bweb/src/main/java/com/bweb/controller/HighDiscountPackageController.java
  3. 28
      hai-cweb/src/main/java/com/cweb/controller/Blx/BlxCarController.java
  4. 41
      hai-service/src/main/java/com/hai/dao/ApiBlxOrderMapper.java
  5. 42
      hai-service/src/main/java/com/hai/dao/ApiBlxOrderSqlProvider.java
  6. 142
      hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapper.java
  7. 7
      hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordMapperExt.java
  8. 388
      hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRecordSqlProvider.java
  9. 137
      hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapper.java
  10. 7
      hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelMapperExt.java
  11. 374
      hai-service/src/main/java/com/hai/dao/HighDiscountPackageAgentRelSqlProvider.java
  12. 48
      hai-service/src/main/java/com/hai/entity/ApiBlxOrder.java
  13. 190
      hai-service/src/main/java/com/hai/entity/ApiBlxOrderExample.java
  14. 305
      hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecord.java
  15. 1243
      hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRecordExample.java
  16. 289
      hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRel.java
  17. 1183
      hai-service/src/main/java/com/hai/entity/HighDiscountPackageAgentRelExample.java
  18. 10
      hai-service/src/main/java/com/hai/openApi/service/ApiBlxCouponService.java
  19. 28
      hai-service/src/main/java/com/hai/openApi/service/impl/ApiBlxCouponServiceImpl.java
  20. 2
      hai-service/src/main/java/com/hai/order/service/impl/OrderCreateHandleServiceImpl.java
  21. 6
      hai-service/src/main/java/com/hai/order/service/impl/OrderPaySuccessServiceImpl.java
  22. 120
      hai-service/src/main/java/com/hai/service/HighDiscountPackageAgentService.java
  23. 108
      hai-service/src/main/java/com/hai/service/impl/HighDiscountPackageAgentServiceImpl.java

@ -0,0 +1,193 @@
package com.bweb.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.ResponseMsgUtil;
import com.hai.entity.*;
import com.hai.model.ResponseData;
import com.hai.model.UserInfoModel;
import com.hai.service.HighAgentService;
import com.hai.service.HighDiscountPackageAgentService;
import com.hai.service.HighDiscountPackageService;
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.util.*;
@Controller
@RequestMapping(value = "/discountPackageAgent")
@Api(value = "优惠券包代理商接口")
public class HighDiscountPackageAgentController {
private static Logger log = LoggerFactory.getLogger(HighDiscountPackageAgentController.class);
@Resource
private HighDiscountPackageAgentService discountPackageAgentService;
@Resource
private HighDiscountPackageService discountPackageService;
@Resource
private HighAgentService highAgentService;
@Autowired
private UserCenter userCenter;
@RequestMapping(value="/distribute",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "分发优惠券")
public ResponseData distribute(@RequestBody JSONObject object, HttpServletRequest request) {
try {
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (object.getLong("agentId") == null ||
object.getInteger("discountPackageId") == null ||
object.getInteger("num") == null) {
log.error("discountPackageAgent -> distribute() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
HighDiscountPackage discountPackage = discountPackageService.findDiscountPackageById(object.getInteger("discountPackageId"));
HighAgent agent = highAgentService.findByAgentMsgId(object.getLong("agentId"));
if (object.getLong("parentAgentId") != null) {
Map<String , Object> mapParent = new HashMap<>();
mapParent.put("agentId" , object.getLong("parentAgentId"));
mapParent.put("discountPackageId" , object.getLong("discountPackageId"));
HighDiscountPackageAgentRel discountPackageAgentRelParent = discountPackageAgentService.getDetailRelByMap(mapParent);
if (discountPackageAgentRelParent != null && discountPackageAgentRelParent.getStockCount() < object.getInteger("num") ) {
log.error("discountPackageAgent -> distribute() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "库存数量不足");
}
discountPackageAgentRelParent.setStockCount(discountPackageAgentRelParent.getStockCount()-object.getInteger("num"));
discountPackageAgentService.updateDiscountPackageAgentRel(discountPackageAgentRelParent);
}
if (discountPackage == null) {
log.error("discountPackageAgent -> distribute() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "优惠券包不存在");
}
if (agent == null) {
log.error("discountPackageAgent -> distribute() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "代理商不存在");
}
Map<String , Object> map = new HashMap<>();
map.put("agentId" , object.getLong("agentId"));
map.put("discountPackageId" , object.getLong("discountPackageId"));
HighDiscountPackageAgentRel discountPackageAgentRel = discountPackageAgentService.getDetailRelByMap(map);
HighDiscountPackageAgentRecord discountPackageAgentRecord = new HighDiscountPackageAgentRecord();
if (discountPackageAgentRel == null) {
discountPackageAgentRel = new HighDiscountPackageAgentRel();
discountPackageAgentRel.setStatus(1);
discountPackageAgentRel.setOpId(userInfoModel.getSecUser().getId());
discountPackageAgentRel.setOpName(userInfoModel.getSecUser().getLoginName());
discountPackageAgentRel.setAgentId(object.getLong("agentId"));
discountPackageAgentRel.setAgentName(agent.getAgentName());
discountPackageAgentRel.setDiscountPackageId(object.getLong("discountPackageId"));
discountPackageAgentRel.setDiscountPackageTitle(discountPackage.getTitle());
discountPackageAgentRel.setSalesCount(0);
discountPackageAgentRel.setStockCount(0);
discountPackageAgentRel.setCreateTime(new Date());
discountPackageAgentRel.setUpdateTime(new Date());
}
discountPackageAgentRel.setStockCount(object.getInteger("num") + discountPackageAgentRel.getStockCount());
if (discountPackageAgentRel.getId() == null) {
discountPackageAgentService.insertDiscountPackageAgentRel(discountPackageAgentRel);
} else {
discountPackageAgentRel.setUpdateTime(new Date());
discountPackageAgentService.updateDiscountPackageAgentRel(discountPackageAgentRel);
}
discountPackageAgentRecord.setAgentId(object.getLong("agentId"));
discountPackageAgentRecord.setAgentName(agent.getAgentName());
discountPackageAgentRecord.setDiscountPackageId(object.getLong("discountPackageId"));
discountPackageAgentRecord.setDiscountPackageTitle(discountPackage.getTitle());
discountPackageAgentRecord.setCreateTime(new Date());
discountPackageAgentRecord.setUpdateTime(new Date());
discountPackageAgentRecord.setStatus(1);
discountPackageAgentRecord.setOpId(userInfoModel.getSecUser().getId());
discountPackageAgentRecord.setOpName(userInfoModel.getSecUser().getLoginName());
discountPackageAgentRecord.setCount(object.getInteger("num"));
discountPackageAgentRecord.setAfterCount(discountPackageAgentRel.getStockCount());
discountPackageAgentRecord.setFrontCount(discountPackageAgentRel.getStockCount() - object.getInteger("num"));
discountPackageAgentService.insertDiscountPackageAgentRecord(discountPackageAgentRecord);
return ResponseMsgUtil.success("操作成功");
} catch (Exception e) {
log.error("HighDiscountCouponRelController -> insertDiscountCoupon() error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getDiscountPackageAgentRelList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取优惠券包代理商关联列表")
public ResponseData getDiscountPackageAgentRelList(@RequestParam(name = "agentId", required = false) Long agentId) {
try {
Map<String,Object> map = new HashMap<>();
map.put("agentId",agentId);
List<HighDiscountPackageAgentRel> list = discountPackageAgentService.getListRel(map);
return ResponseMsgUtil.success(list);
} catch (Exception e) {
log.error("HighOrderController --> getUserOrderList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value = "/getDiscountPackageAgentRecord", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取优惠券包代理商分发记录列表")
public ResponseData getDiscountPackageAgentRecord(@RequestParam(name = "agentId", required = false) Long agentId,@RequestParam(name = "discountPackageId", required = false) Long discountPackageId) {
try {
Map<String,Object> map = new HashMap<>();
map.put("agentId",agentId);
map.put("discountPackageId",discountPackageId);
List<HighDiscountPackageAgentRecord> list = discountPackageAgentService.getListRecord(map);
return ResponseMsgUtil.success(list);
} catch (Exception e) {
log.error("HighOrderController --> getUserOrderList() error!", e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -80,6 +80,9 @@ public class HighDiscountPackageController {
@Resource @Resource
private HighDiscountPackageActualService discountPackageActualService; private HighDiscountPackageActualService discountPackageActualService;
@Resource
private HighDiscountPackageAgentService discountPackageAgentService;
@RequestMapping(value = "/getDiscountPackageList", method = RequestMethod.GET) @RequestMapping(value = "/getDiscountPackageList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "获取优惠券包列表") @ApiOperation(value = "获取优惠券包列表")
@ -711,7 +714,7 @@ public class HighDiscountPackageController {
try { try {
//发布人员 //发布人员
UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class); UserInfoModel userInfoModel = userCenter.getSessionModel(UserInfoModel.class);
if (userInfoModel == null || userInfoModel.getBsCompany() == null) { if (userInfoModel == null) {
log.error("HighDiscountPackageController -> giveAway() error!","该主角色没有权限"); log.error("HighDiscountPackageController -> giveAway() error!","该主角色没有权限");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, ""); throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, "");
} }
@ -741,4 +744,50 @@ public class HighDiscountPackageController {
} }
} }
@RequestMapping(value = "/giveAwayAgent", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "代理商赠送")
public ResponseData giveAwayAgent(@RequestBody JSONObject body) {
try {
if (body == null ||
body.getLong("agentId") == null ||
body.getLong("discountPackageId") == null ||
body.getString("phone") == null ||
body.getInteger("num") == null
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
Map<String , Object> mapParent = new HashMap<>();
mapParent.put("agentId" , body.getLong("agentId"));
mapParent.put("discountPackageId" , body.getLong("discountPackageId"));
HighDiscountPackageAgentRel discountPackageAgentRelParent = discountPackageAgentService.getDetailRelByMap(mapParent);
if (discountPackageAgentRelParent != null && discountPackageAgentRelParent.getStockCount() < body.getInteger("num") ) {
log.error("discountPackageAgent -> distribute() error!","参数错误");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "库存数量不足");
}
discountPackageAgentRelParent.setStockCount(discountPackageAgentRelParent.getStockCount()-body.getInteger("num"));
discountPackageAgentRelParent.setSalesCount(discountPackageAgentRelParent.getSalesCount() + body.getInteger("num"));
discountPackageAgentService.updateDiscountPackageAgentRel(discountPackageAgentRelParent);
List<String> phoneList = new ArrayList<>();
phoneList.add(body.getString("phone"));
for (int i = 0; i < body.getInteger("num"); i++) {
highDiscountPackageService.giveAway(body.getLong("discountPackageId"), phoneList);
}
return ResponseMsgUtil.success("赠送成功!");
} catch (Exception e) {
log.error("HighDiscountPackageController --> giveAway() error!", e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -11,11 +11,13 @@ import com.hai.common.exception.SysCode;
import com.hai.common.security.SessionObject; import com.hai.common.security.SessionObject;
import com.hai.common.security.UserCenter; import com.hai.common.security.UserCenter;
import com.hai.common.utils.ResponseMsgUtil; import com.hai.common.utils.ResponseMsgUtil;
import com.hai.entity.ApiBlxOrder;
import com.hai.entity.BlxCarInfo; import com.hai.entity.BlxCarInfo;
import com.hai.model.HighUserModel; import com.hai.model.HighUserModel;
import com.hai.model.ResponseData; import com.hai.model.ResponseData;
import com.hai.openApi.config.BlxConfig; import com.hai.openApi.config.BlxConfig;
import com.hai.openApi.service.ApiBlxCouponService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
@ -49,6 +51,9 @@ public class BlxCarController {
@Resource @Resource
private BlxCarService blxCarService; private BlxCarService blxCarService;
@Resource
private ApiBlxCouponService apiBlxCouponService;
@RequestMapping(value = "/queryJsParking", method = RequestMethod.GET) @RequestMapping(value = "/queryJsParking", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询附近停车场") @ApiOperation(value = "查询附近停车场")
@ -262,4 +267,27 @@ public class BlxCarController {
} }
} }
@RequestMapping(value = "/getCarOrderUserList", method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询用户车辆订单")
public ResponseData getCarOrderUserList(HttpServletRequest request) {
try {
// 用户
SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
Map<String , Object> map = new HashMap<>();
map.put("userId" , userInfoModel.getHighUser().getId());
map.put("status" , 5);
return ResponseMsgUtil.success(apiBlxCouponService.getOrderByList(map));
} catch (Exception e) {
log.error("GoodsDetailController --> getListUser() error!", e);
return ResponseMsgUtil.exception(e);
}
}
} }

@ -40,27 +40,31 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Insert({ @Insert({
"insert into api_blx_order (mer_id, order_no, ", "insert into api_blx_order (mer_id, order_no, ",
"user_id, user_phone, ",
"mer_order_id, park_order_id, ", "mer_order_id, park_order_id, ",
"in_time, out_time, ", "in_time, out_time, ",
"over_time, car_no, ", "over_time, car_no, ",
"park_time, park_name, ", "park_time, park_name, ",
"park_id, car_seat_id, ", "park_id, car_seat_id, ",
"park_price, coupon_price, ", "park_price, pay_price, ",
"order_type, order_status, ", "coupon_price, order_type, ",
"create_time, update_time, ", "order_status, create_time, ",
"ext_1, ext_2, ext_3, ", "update_time, ext_1, ",
"ext_4, ext_5, ext_6)", "ext_2, ext_3, ext_4, ",
"ext_5, ext_6)",
"values (#{merId,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, ", "values (#{merId,jdbcType=VARCHAR}, #{orderNo,jdbcType=VARCHAR}, ",
"#{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ",
"#{merOrderId,jdbcType=VARCHAR}, #{parkOrderId,jdbcType=VARCHAR}, ", "#{merOrderId,jdbcType=VARCHAR}, #{parkOrderId,jdbcType=VARCHAR}, ",
"#{inTime,jdbcType=TIMESTAMP}, #{outTime,jdbcType=TIMESTAMP}, ", "#{inTime,jdbcType=TIMESTAMP}, #{outTime,jdbcType=TIMESTAMP}, ",
"#{overTime,jdbcType=INTEGER}, #{carNo,jdbcType=VARCHAR}, ", "#{overTime,jdbcType=INTEGER}, #{carNo,jdbcType=VARCHAR}, ",
"#{parkTime,jdbcType=INTEGER}, #{parkName,jdbcType=VARCHAR}, ", "#{parkTime,jdbcType=INTEGER}, #{parkName,jdbcType=VARCHAR}, ",
"#{parkId,jdbcType=BIGINT}, #{carSeatId,jdbcType=VARCHAR}, ", "#{parkId,jdbcType=BIGINT}, #{carSeatId,jdbcType=VARCHAR}, ",
"#{parkPrice,jdbcType=DECIMAL}, #{couponPrice,jdbcType=DECIMAL}, ", "#{parkPrice,jdbcType=DECIMAL}, #{payPrice,jdbcType=DECIMAL}, ",
"#{orderType,jdbcType=INTEGER}, #{orderStatus,jdbcType=INTEGER}, ", "#{couponPrice,jdbcType=DECIMAL}, #{orderType,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ", "#{orderStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, ", "#{updateTime,jdbcType=TIMESTAMP}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext4,jdbcType=VARCHAR}, #{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})" "#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR}, #{ext4,jdbcType=VARCHAR}, ",
"#{ext5,jdbcType=VARCHAR}, #{ext6,jdbcType=VARCHAR})"
}) })
@Options(useGeneratedKeys=true,keyProperty="id") @Options(useGeneratedKeys=true,keyProperty="id")
int insert(ApiBlxOrder record); int insert(ApiBlxOrder record);
@ -74,6 +78,8 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_order_id", property="merOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="mer_order_id", property="merOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP),
@ -85,6 +91,7 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT), @Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT),
@Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.VARCHAR), @Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.VARCHAR),
@Result(column="park_price", property="parkPrice", jdbcType=JdbcType.DECIMAL), @Result(column="park_price", property="parkPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL), @Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER), @Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER),
@Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER),
@ -101,10 +108,10 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Select({ @Select({
"select", "select",
"id, mer_id, order_no, mer_order_id, park_order_id, in_time, out_time, over_time, ", "id, mer_id, order_no, user_id, user_phone, mer_order_id, park_order_id, in_time, ",
"car_no, park_time, park_name, park_id, car_seat_id, park_price, coupon_price, ", "out_time, over_time, car_no, park_time, park_name, park_id, car_seat_id, park_price, ",
"order_type, order_status, create_time, update_time, ext_1, ext_2, ext_3, ext_4, ", "pay_price, coupon_price, order_type, order_status, create_time, update_time, ",
"ext_5, ext_6", "ext_1, ext_2, ext_3, ext_4, ext_5, ext_6",
"from api_blx_order", "from api_blx_order",
"where id = #{id,jdbcType=BIGINT}" "where id = #{id,jdbcType=BIGINT}"
}) })
@ -112,6 +119,8 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true), @Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.VARCHAR), @Result(column="mer_id", property="merId", jdbcType=JdbcType.VARCHAR),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR), @Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_order_id", property="merOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="mer_order_id", property="merOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR), @Result(column="park_order_id", property="parkOrderId", jdbcType=JdbcType.VARCHAR),
@Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP), @Result(column="in_time", property="inTime", jdbcType=JdbcType.TIMESTAMP),
@ -123,6 +132,7 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
@Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT), @Result(column="park_id", property="parkId", jdbcType=JdbcType.BIGINT),
@Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.VARCHAR), @Result(column="car_seat_id", property="carSeatId", jdbcType=JdbcType.VARCHAR),
@Result(column="park_price", property="parkPrice", jdbcType=JdbcType.DECIMAL), @Result(column="park_price", property="parkPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="pay_price", property="payPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL), @Result(column="coupon_price", property="couponPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER), @Result(column="order_type", property="orderType", jdbcType=JdbcType.INTEGER),
@Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER), @Result(column="order_status", property="orderStatus", jdbcType=JdbcType.INTEGER),
@ -150,6 +160,8 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
"update api_blx_order", "update api_blx_order",
"set mer_id = #{merId,jdbcType=VARCHAR},", "set mer_id = #{merId,jdbcType=VARCHAR},",
"order_no = #{orderNo,jdbcType=VARCHAR},", "order_no = #{orderNo,jdbcType=VARCHAR},",
"user_id = #{userId,jdbcType=BIGINT},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"mer_order_id = #{merOrderId,jdbcType=VARCHAR},", "mer_order_id = #{merOrderId,jdbcType=VARCHAR},",
"park_order_id = #{parkOrderId,jdbcType=VARCHAR},", "park_order_id = #{parkOrderId,jdbcType=VARCHAR},",
"in_time = #{inTime,jdbcType=TIMESTAMP},", "in_time = #{inTime,jdbcType=TIMESTAMP},",
@ -161,6 +173,7 @@ public interface ApiBlxOrderMapper extends ApiBlxOrderMapperExt {
"park_id = #{parkId,jdbcType=BIGINT},", "park_id = #{parkId,jdbcType=BIGINT},",
"car_seat_id = #{carSeatId,jdbcType=VARCHAR},", "car_seat_id = #{carSeatId,jdbcType=VARCHAR},",
"park_price = #{parkPrice,jdbcType=DECIMAL},", "park_price = #{parkPrice,jdbcType=DECIMAL},",
"pay_price = #{payPrice,jdbcType=DECIMAL},",
"coupon_price = #{couponPrice,jdbcType=DECIMAL},", "coupon_price = #{couponPrice,jdbcType=DECIMAL},",
"order_type = #{orderType,jdbcType=INTEGER},", "order_type = #{orderType,jdbcType=INTEGER},",
"order_status = #{orderStatus,jdbcType=INTEGER},", "order_status = #{orderStatus,jdbcType=INTEGER},",

@ -36,6 +36,14 @@ public class ApiBlxOrderSqlProvider {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}"); sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
} }
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}");
}
if (record.getMerOrderId() != null) { if (record.getMerOrderId() != null) {
sql.VALUES("mer_order_id", "#{merOrderId,jdbcType=VARCHAR}"); sql.VALUES("mer_order_id", "#{merOrderId,jdbcType=VARCHAR}");
} }
@ -80,6 +88,10 @@ public class ApiBlxOrderSqlProvider {
sql.VALUES("park_price", "#{parkPrice,jdbcType=DECIMAL}"); sql.VALUES("park_price", "#{parkPrice,jdbcType=DECIMAL}");
} }
if (record.getPayPrice() != null) {
sql.VALUES("pay_price", "#{payPrice,jdbcType=DECIMAL}");
}
if (record.getCouponPrice() != null) { if (record.getCouponPrice() != null) {
sql.VALUES("coupon_price", "#{couponPrice,jdbcType=DECIMAL}"); sql.VALUES("coupon_price", "#{couponPrice,jdbcType=DECIMAL}");
} }
@ -136,6 +148,8 @@ public class ApiBlxOrderSqlProvider {
} }
sql.SELECT("mer_id"); sql.SELECT("mer_id");
sql.SELECT("order_no"); sql.SELECT("order_no");
sql.SELECT("user_id");
sql.SELECT("user_phone");
sql.SELECT("mer_order_id"); sql.SELECT("mer_order_id");
sql.SELECT("park_order_id"); sql.SELECT("park_order_id");
sql.SELECT("in_time"); sql.SELECT("in_time");
@ -147,6 +161,7 @@ public class ApiBlxOrderSqlProvider {
sql.SELECT("park_id"); sql.SELECT("park_id");
sql.SELECT("car_seat_id"); sql.SELECT("car_seat_id");
sql.SELECT("park_price"); sql.SELECT("park_price");
sql.SELECT("pay_price");
sql.SELECT("coupon_price"); sql.SELECT("coupon_price");
sql.SELECT("order_type"); sql.SELECT("order_type");
sql.SELECT("order_status"); sql.SELECT("order_status");
@ -187,6 +202,14 @@ public class ApiBlxOrderSqlProvider {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
} }
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
}
if (record.getMerOrderId() != null) { if (record.getMerOrderId() != null) {
sql.SET("mer_order_id = #{record.merOrderId,jdbcType=VARCHAR}"); sql.SET("mer_order_id = #{record.merOrderId,jdbcType=VARCHAR}");
} }
@ -231,6 +254,10 @@ public class ApiBlxOrderSqlProvider {
sql.SET("park_price = #{record.parkPrice,jdbcType=DECIMAL}"); sql.SET("park_price = #{record.parkPrice,jdbcType=DECIMAL}");
} }
if (record.getPayPrice() != null) {
sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}");
}
if (record.getCouponPrice() != null) { if (record.getCouponPrice() != null) {
sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}"); sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}");
} }
@ -286,6 +313,8 @@ public class ApiBlxOrderSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}"); sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=VARCHAR}"); sql.SET("mer_id = #{record.merId,jdbcType=VARCHAR}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}"); sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
sql.SET("mer_order_id = #{record.merOrderId,jdbcType=VARCHAR}"); sql.SET("mer_order_id = #{record.merOrderId,jdbcType=VARCHAR}");
sql.SET("park_order_id = #{record.parkOrderId,jdbcType=VARCHAR}"); sql.SET("park_order_id = #{record.parkOrderId,jdbcType=VARCHAR}");
sql.SET("in_time = #{record.inTime,jdbcType=TIMESTAMP}"); sql.SET("in_time = #{record.inTime,jdbcType=TIMESTAMP}");
@ -297,6 +326,7 @@ public class ApiBlxOrderSqlProvider {
sql.SET("park_id = #{record.parkId,jdbcType=BIGINT}"); sql.SET("park_id = #{record.parkId,jdbcType=BIGINT}");
sql.SET("car_seat_id = #{record.carSeatId,jdbcType=VARCHAR}"); sql.SET("car_seat_id = #{record.carSeatId,jdbcType=VARCHAR}");
sql.SET("park_price = #{record.parkPrice,jdbcType=DECIMAL}"); sql.SET("park_price = #{record.parkPrice,jdbcType=DECIMAL}");
sql.SET("pay_price = #{record.payPrice,jdbcType=DECIMAL}");
sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}"); sql.SET("coupon_price = #{record.couponPrice,jdbcType=DECIMAL}");
sql.SET("order_type = #{record.orderType,jdbcType=INTEGER}"); sql.SET("order_type = #{record.orderType,jdbcType=INTEGER}");
sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}"); sql.SET("order_status = #{record.orderStatus,jdbcType=INTEGER}");
@ -326,6 +356,14 @@ public class ApiBlxOrderSqlProvider {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}"); sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
} }
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}");
}
if (record.getMerOrderId() != null) { if (record.getMerOrderId() != null) {
sql.SET("mer_order_id = #{merOrderId,jdbcType=VARCHAR}"); sql.SET("mer_order_id = #{merOrderId,jdbcType=VARCHAR}");
} }
@ -370,6 +408,10 @@ public class ApiBlxOrderSqlProvider {
sql.SET("park_price = #{parkPrice,jdbcType=DECIMAL}"); sql.SET("park_price = #{parkPrice,jdbcType=DECIMAL}");
} }
if (record.getPayPrice() != null) {
sql.SET("pay_price = #{payPrice,jdbcType=DECIMAL}");
}
if (record.getCouponPrice() != null) { if (record.getCouponPrice() != null) {
sql.SET("coupon_price = #{couponPrice,jdbcType=DECIMAL}"); sql.SET("coupon_price = #{couponPrice,jdbcType=DECIMAL}");
} }

@ -0,0 +1,142 @@
package com.hai.dao;
import com.hai.entity.HighDiscountPackageAgentRecord;
import com.hai.entity.HighDiscountPackageAgentRecordExample;
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 HighDiscountPackageAgentRecordMapper extends HighDiscountPackageAgentRecordMapperExt {
@SelectProvider(type=HighDiscountPackageAgentRecordSqlProvider.class, method="countByExample")
long countByExample(HighDiscountPackageAgentRecordExample example);
@DeleteProvider(type=HighDiscountPackageAgentRecordSqlProvider.class, method="deleteByExample")
int deleteByExample(HighDiscountPackageAgentRecordExample example);
@Delete({
"delete from high_discount_package_agent_record",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_discount_package_agent_record (discount_package_title, discount_package_id, ",
"agent_name, agent_id, ",
"`count`, front_count, ",
"after_count, create_time, ",
"update_time, `status`, ",
"op_id, op_name, ext_1, ",
"ext_2, ext_3)",
"values (#{discountPackageTitle,jdbcType=VARCHAR}, #{discountPackageId,jdbcType=BIGINT}, ",
"#{agentName,jdbcType=VARCHAR}, #{agentId,jdbcType=BIGINT}, ",
"#{count,jdbcType=INTEGER}, #{frontCount,jdbcType=INTEGER}, ",
"#{afterCount,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{updateTime,jdbcType=TIMESTAMP}, #{status,jdbcType=INTEGER}, ",
"#{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, #{ext1,jdbcType=VARCHAR}, ",
"#{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighDiscountPackageAgentRecord record);
@InsertProvider(type=HighDiscountPackageAgentRecordSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighDiscountPackageAgentRecord record);
@SelectProvider(type=HighDiscountPackageAgentRecordSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR),
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="count", property="count", jdbcType=JdbcType.INTEGER),
@Result(column="front_count", property="frontCount", jdbcType=JdbcType.INTEGER),
@Result(column="after_count", property="afterCount", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<HighDiscountPackageAgentRecord> selectByExample(HighDiscountPackageAgentRecordExample example);
@Select({
"select",
"id, discount_package_title, discount_package_id, agent_name, agent_id, `count`, ",
"front_count, after_count, create_time, update_time, `status`, op_id, op_name, ",
"ext_1, ext_2, ext_3",
"from high_discount_package_agent_record",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR),
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="count", property="count", jdbcType=JdbcType.INTEGER),
@Result(column="front_count", property="frontCount", jdbcType=JdbcType.INTEGER),
@Result(column="after_count", property="afterCount", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
HighDiscountPackageAgentRecord selectByPrimaryKey(Long id);
@UpdateProvider(type=HighDiscountPackageAgentRecordSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighDiscountPackageAgentRecord record, @Param("example") HighDiscountPackageAgentRecordExample example);
@UpdateProvider(type=HighDiscountPackageAgentRecordSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighDiscountPackageAgentRecord record, @Param("example") HighDiscountPackageAgentRecordExample example);
@UpdateProvider(type=HighDiscountPackageAgentRecordSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighDiscountPackageAgentRecord record);
@Update({
"update high_discount_package_agent_record",
"set discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR},",
"discount_package_id = #{discountPackageId,jdbcType=BIGINT},",
"agent_name = #{agentName,jdbcType=VARCHAR},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"`count` = #{count,jdbcType=INTEGER},",
"front_count = #{frontCount,jdbcType=INTEGER},",
"after_count = #{afterCount,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"op_id = #{opId,jdbcType=BIGINT},",
"op_name = #{opName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighDiscountPackageAgentRecord record);
}

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

@ -0,0 +1,388 @@
package com.hai.dao;
import com.hai.entity.HighDiscountPackageAgentRecord;
import com.hai.entity.HighDiscountPackageAgentRecordExample.Criteria;
import com.hai.entity.HighDiscountPackageAgentRecordExample.Criterion;
import com.hai.entity.HighDiscountPackageAgentRecordExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighDiscountPackageAgentRecordSqlProvider {
public String countByExample(HighDiscountPackageAgentRecordExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_discount_package_agent_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighDiscountPackageAgentRecordExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_discount_package_agent_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighDiscountPackageAgentRecord record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_discount_package_agent_record");
if (record.getDiscountPackageTitle() != null) {
sql.VALUES("discount_package_title", "#{discountPackageTitle,jdbcType=VARCHAR}");
}
if (record.getDiscountPackageId() != null) {
sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.VALUES("agent_name", "#{agentName,jdbcType=VARCHAR}");
}
if (record.getAgentId() != null) {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
if (record.getCount() != null) {
sql.VALUES("`count`", "#{count,jdbcType=INTEGER}");
}
if (record.getFrontCount() != null) {
sql.VALUES("front_count", "#{frontCount,jdbcType=INTEGER}");
}
if (record.getAfterCount() != null) {
sql.VALUES("after_count", "#{afterCount,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}");
}
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(HighDiscountPackageAgentRecordExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("discount_package_title");
sql.SELECT("discount_package_id");
sql.SELECT("agent_name");
sql.SELECT("agent_id");
sql.SELECT("`count`");
sql.SELECT("front_count");
sql.SELECT("after_count");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("`status`");
sql.SELECT("op_id");
sql.SELECT("op_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_discount_package_agent_record");
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) {
HighDiscountPackageAgentRecord record = (HighDiscountPackageAgentRecord) parameter.get("record");
HighDiscountPackageAgentRecordExample example = (HighDiscountPackageAgentRecordExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_discount_package_agent_record");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getDiscountPackageTitle() != null) {
sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}");
}
if (record.getDiscountPackageId() != null) {
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
if (record.getCount() != null) {
sql.SET("`count` = #{record.count,jdbcType=INTEGER}");
}
if (record.getFrontCount() != null) {
sql.SET("front_count = #{record.frontCount,jdbcType=INTEGER}");
}
if (record.getAfterCount() != null) {
sql.SET("after_count = #{record.afterCount,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}");
}
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_discount_package_agent_record");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}");
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=BIGINT}");
sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("`count` = #{record.count,jdbcType=INTEGER}");
sql.SET("front_count = #{record.frontCount,jdbcType=INTEGER}");
sql.SET("after_count = #{record.afterCount,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
HighDiscountPackageAgentRecordExample example = (HighDiscountPackageAgentRecordExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighDiscountPackageAgentRecord record) {
SQL sql = new SQL();
sql.UPDATE("high_discount_package_agent_record");
if (record.getDiscountPackageTitle() != null) {
sql.SET("discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR}");
}
if (record.getDiscountPackageId() != null) {
sql.SET("discount_package_id = #{discountPackageId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.SET("agent_name = #{agentName,jdbcType=VARCHAR}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}
if (record.getCount() != null) {
sql.SET("`count` = #{count,jdbcType=INTEGER}");
}
if (record.getFrontCount() != null) {
sql.SET("front_count = #{frontCount,jdbcType=INTEGER}");
}
if (record.getAfterCount() != null) {
sql.SET("after_count = #{afterCount,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{opName,jdbcType=VARCHAR}");
}
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=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighDiscountPackageAgentRecordExample 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());
}
}
}

@ -0,0 +1,137 @@
package com.hai.dao;
import com.hai.entity.HighDiscountPackageAgentRel;
import com.hai.entity.HighDiscountPackageAgentRelExample;
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 HighDiscountPackageAgentRelMapper extends HighDiscountPackageAgentRelMapperExt {
@SelectProvider(type=HighDiscountPackageAgentRelSqlProvider.class, method="countByExample")
long countByExample(HighDiscountPackageAgentRelExample example);
@DeleteProvider(type=HighDiscountPackageAgentRelSqlProvider.class, method="deleteByExample")
int deleteByExample(HighDiscountPackageAgentRelExample example);
@Delete({
"delete from high_discount_package_agent_rel",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into high_discount_package_agent_rel (discount_package_title, discount_package_id, ",
"agent_name, agent_id, ",
"stock_count, sales_count, ",
"create_time, update_time, ",
"`status`, op_id, op_name, ",
"ext_1, ext_2, ext_3)",
"values (#{discountPackageTitle,jdbcType=VARCHAR}, #{discountPackageId,jdbcType=BIGINT}, ",
"#{agentName,jdbcType=VARCHAR}, #{agentId,jdbcType=BIGINT}, ",
"#{stockCount,jdbcType=INTEGER}, #{salesCount,jdbcType=INTEGER}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{status,jdbcType=INTEGER}, #{opId,jdbcType=BIGINT}, #{opName,jdbcType=VARCHAR}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(HighDiscountPackageAgentRel record);
@InsertProvider(type=HighDiscountPackageAgentRelSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(HighDiscountPackageAgentRel record);
@SelectProvider(type=HighDiscountPackageAgentRelSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR),
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="stock_count", property="stockCount", jdbcType=JdbcType.INTEGER),
@Result(column="sales_count", property="salesCount", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<HighDiscountPackageAgentRel> selectByExample(HighDiscountPackageAgentRelExample example);
@Select({
"select",
"id, discount_package_title, discount_package_id, agent_name, agent_id, stock_count, ",
"sales_count, create_time, update_time, `status`, op_id, op_name, ext_1, ext_2, ",
"ext_3",
"from high_discount_package_agent_rel",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="discount_package_title", property="discountPackageTitle", jdbcType=JdbcType.VARCHAR),
@Result(column="discount_package_id", property="discountPackageId", jdbcType=JdbcType.BIGINT),
@Result(column="agent_name", property="agentName", jdbcType=JdbcType.VARCHAR),
@Result(column="agent_id", property="agentId", jdbcType=JdbcType.BIGINT),
@Result(column="stock_count", property="stockCount", jdbcType=JdbcType.INTEGER),
@Result(column="sales_count", property="salesCount", jdbcType=JdbcType.INTEGER),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="op_id", property="opId", jdbcType=JdbcType.BIGINT),
@Result(column="op_name", property="opName", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
HighDiscountPackageAgentRel selectByPrimaryKey(Long id);
@UpdateProvider(type=HighDiscountPackageAgentRelSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") HighDiscountPackageAgentRel record, @Param("example") HighDiscountPackageAgentRelExample example);
@UpdateProvider(type=HighDiscountPackageAgentRelSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") HighDiscountPackageAgentRel record, @Param("example") HighDiscountPackageAgentRelExample example);
@UpdateProvider(type=HighDiscountPackageAgentRelSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(HighDiscountPackageAgentRel record);
@Update({
"update high_discount_package_agent_rel",
"set discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR},",
"discount_package_id = #{discountPackageId,jdbcType=BIGINT},",
"agent_name = #{agentName,jdbcType=VARCHAR},",
"agent_id = #{agentId,jdbcType=BIGINT},",
"stock_count = #{stockCount,jdbcType=INTEGER},",
"sales_count = #{salesCount,jdbcType=INTEGER},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"`status` = #{status,jdbcType=INTEGER},",
"op_id = #{opId,jdbcType=BIGINT},",
"op_name = #{opName,jdbcType=VARCHAR},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(HighDiscountPackageAgentRel record);
}

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

@ -0,0 +1,374 @@
package com.hai.dao;
import com.hai.entity.HighDiscountPackageAgentRel;
import com.hai.entity.HighDiscountPackageAgentRelExample.Criteria;
import com.hai.entity.HighDiscountPackageAgentRelExample.Criterion;
import com.hai.entity.HighDiscountPackageAgentRelExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class HighDiscountPackageAgentRelSqlProvider {
public String countByExample(HighDiscountPackageAgentRelExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("high_discount_package_agent_rel");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(HighDiscountPackageAgentRelExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("high_discount_package_agent_rel");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(HighDiscountPackageAgentRel record) {
SQL sql = new SQL();
sql.INSERT_INTO("high_discount_package_agent_rel");
if (record.getDiscountPackageTitle() != null) {
sql.VALUES("discount_package_title", "#{discountPackageTitle,jdbcType=VARCHAR}");
}
if (record.getDiscountPackageId() != null) {
sql.VALUES("discount_package_id", "#{discountPackageId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.VALUES("agent_name", "#{agentName,jdbcType=VARCHAR}");
}
if (record.getAgentId() != null) {
sql.VALUES("agent_id", "#{agentId,jdbcType=BIGINT}");
}
if (record.getStockCount() != null) {
sql.VALUES("stock_count", "#{stockCount,jdbcType=INTEGER}");
}
if (record.getSalesCount() != null) {
sql.VALUES("sales_count", "#{salesCount,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.VALUES("op_id", "#{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.VALUES("op_name", "#{opName,jdbcType=VARCHAR}");
}
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(HighDiscountPackageAgentRelExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("discount_package_title");
sql.SELECT("discount_package_id");
sql.SELECT("agent_name");
sql.SELECT("agent_id");
sql.SELECT("stock_count");
sql.SELECT("sales_count");
sql.SELECT("create_time");
sql.SELECT("update_time");
sql.SELECT("`status`");
sql.SELECT("op_id");
sql.SELECT("op_name");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("high_discount_package_agent_rel");
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) {
HighDiscountPackageAgentRel record = (HighDiscountPackageAgentRel) parameter.get("record");
HighDiscountPackageAgentRelExample example = (HighDiscountPackageAgentRelExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("high_discount_package_agent_rel");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getDiscountPackageTitle() != null) {
sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}");
}
if (record.getDiscountPackageId() != null) {
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
}
if (record.getStockCount() != null) {
sql.SET("stock_count = #{record.stockCount,jdbcType=INTEGER}");
}
if (record.getSalesCount() != null) {
sql.SET("sales_count = #{record.salesCount,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}");
}
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_discount_package_agent_rel");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("discount_package_title = #{record.discountPackageTitle,jdbcType=VARCHAR}");
sql.SET("discount_package_id = #{record.discountPackageId,jdbcType=BIGINT}");
sql.SET("agent_name = #{record.agentName,jdbcType=VARCHAR}");
sql.SET("agent_id = #{record.agentId,jdbcType=BIGINT}");
sql.SET("stock_count = #{record.stockCount,jdbcType=INTEGER}");
sql.SET("sales_count = #{record.salesCount,jdbcType=INTEGER}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("op_id = #{record.opId,jdbcType=BIGINT}");
sql.SET("op_name = #{record.opName,jdbcType=VARCHAR}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
HighDiscountPackageAgentRelExample example = (HighDiscountPackageAgentRelExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(HighDiscountPackageAgentRel record) {
SQL sql = new SQL();
sql.UPDATE("high_discount_package_agent_rel");
if (record.getDiscountPackageTitle() != null) {
sql.SET("discount_package_title = #{discountPackageTitle,jdbcType=VARCHAR}");
}
if (record.getDiscountPackageId() != null) {
sql.SET("discount_package_id = #{discountPackageId,jdbcType=BIGINT}");
}
if (record.getAgentName() != null) {
sql.SET("agent_name = #{agentName,jdbcType=VARCHAR}");
}
if (record.getAgentId() != null) {
sql.SET("agent_id = #{agentId,jdbcType=BIGINT}");
}
if (record.getStockCount() != null) {
sql.SET("stock_count = #{stockCount,jdbcType=INTEGER}");
}
if (record.getSalesCount() != null) {
sql.SET("sales_count = #{salesCount,jdbcType=INTEGER}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getOpId() != null) {
sql.SET("op_id = #{opId,jdbcType=BIGINT}");
}
if (record.getOpName() != null) {
sql.SET("op_name = #{opName,jdbcType=VARCHAR}");
}
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=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, HighDiscountPackageAgentRelExample 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());
}
}
}

@ -29,6 +29,16 @@ public class ApiBlxOrder implements Serializable {
*/ */
private String orderNo; private String orderNo;
/**
* 用户id
*/
private Long userId;
/**
* 用户手机号
*/
private String userPhone;
/** /**
* 商户订单ID * 商户订单ID
*/ */
@ -84,6 +94,11 @@ public class ApiBlxOrder implements Serializable {
*/ */
private BigDecimal parkPrice; private BigDecimal parkPrice;
/**
* 支付金额
*/
private BigDecimal payPrice;
/** /**
* 停车券金额 * 停车券金额
*/ */
@ -165,6 +180,22 @@ public class ApiBlxOrder implements Serializable {
this.orderNo = orderNo; this.orderNo = orderNo;
} }
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone;
}
public String getMerOrderId() { public String getMerOrderId() {
return merOrderId; return merOrderId;
} }
@ -253,6 +284,14 @@ public class ApiBlxOrder implements Serializable {
this.parkPrice = parkPrice; this.parkPrice = parkPrice;
} }
public BigDecimal getPayPrice() {
return payPrice;
}
public void setPayPrice(BigDecimal payPrice) {
this.payPrice = payPrice;
}
public BigDecimal getCouponPrice() { public BigDecimal getCouponPrice() {
return couponPrice; return couponPrice;
} }
@ -356,6 +395,8 @@ public class ApiBlxOrder implements Serializable {
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId())) return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId())) && (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo())) && (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
&& (this.getMerOrderId() == null ? other.getMerOrderId() == null : this.getMerOrderId().equals(other.getMerOrderId())) && (this.getMerOrderId() == null ? other.getMerOrderId() == null : this.getMerOrderId().equals(other.getMerOrderId()))
&& (this.getParkOrderId() == null ? other.getParkOrderId() == null : this.getParkOrderId().equals(other.getParkOrderId())) && (this.getParkOrderId() == null ? other.getParkOrderId() == null : this.getParkOrderId().equals(other.getParkOrderId()))
&& (this.getInTime() == null ? other.getInTime() == null : this.getInTime().equals(other.getInTime())) && (this.getInTime() == null ? other.getInTime() == null : this.getInTime().equals(other.getInTime()))
@ -367,6 +408,7 @@ public class ApiBlxOrder implements Serializable {
&& (this.getParkId() == null ? other.getParkId() == null : this.getParkId().equals(other.getParkId())) && (this.getParkId() == null ? other.getParkId() == null : this.getParkId().equals(other.getParkId()))
&& (this.getCarSeatId() == null ? other.getCarSeatId() == null : this.getCarSeatId().equals(other.getCarSeatId())) && (this.getCarSeatId() == null ? other.getCarSeatId() == null : this.getCarSeatId().equals(other.getCarSeatId()))
&& (this.getParkPrice() == null ? other.getParkPrice() == null : this.getParkPrice().equals(other.getParkPrice())) && (this.getParkPrice() == null ? other.getParkPrice() == null : this.getParkPrice().equals(other.getParkPrice()))
&& (this.getPayPrice() == null ? other.getPayPrice() == null : this.getPayPrice().equals(other.getPayPrice()))
&& (this.getCouponPrice() == null ? other.getCouponPrice() == null : this.getCouponPrice().equals(other.getCouponPrice())) && (this.getCouponPrice() == null ? other.getCouponPrice() == null : this.getCouponPrice().equals(other.getCouponPrice()))
&& (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType())) && (this.getOrderType() == null ? other.getOrderType() == null : this.getOrderType().equals(other.getOrderType()))
&& (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus())) && (this.getOrderStatus() == null ? other.getOrderStatus() == null : this.getOrderStatus().equals(other.getOrderStatus()))
@ -387,6 +429,8 @@ public class ApiBlxOrder implements Serializable {
result = prime * result + ((getId() == null) ? 0 : getId().hashCode()); result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode()); result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode()); result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
result = prime * result + ((getMerOrderId() == null) ? 0 : getMerOrderId().hashCode()); result = prime * result + ((getMerOrderId() == null) ? 0 : getMerOrderId().hashCode());
result = prime * result + ((getParkOrderId() == null) ? 0 : getParkOrderId().hashCode()); result = prime * result + ((getParkOrderId() == null) ? 0 : getParkOrderId().hashCode());
result = prime * result + ((getInTime() == null) ? 0 : getInTime().hashCode()); result = prime * result + ((getInTime() == null) ? 0 : getInTime().hashCode());
@ -398,6 +442,7 @@ public class ApiBlxOrder implements Serializable {
result = prime * result + ((getParkId() == null) ? 0 : getParkId().hashCode()); result = prime * result + ((getParkId() == null) ? 0 : getParkId().hashCode());
result = prime * result + ((getCarSeatId() == null) ? 0 : getCarSeatId().hashCode()); result = prime * result + ((getCarSeatId() == null) ? 0 : getCarSeatId().hashCode());
result = prime * result + ((getParkPrice() == null) ? 0 : getParkPrice().hashCode()); result = prime * result + ((getParkPrice() == null) ? 0 : getParkPrice().hashCode());
result = prime * result + ((getPayPrice() == null) ? 0 : getPayPrice().hashCode());
result = prime * result + ((getCouponPrice() == null) ? 0 : getCouponPrice().hashCode()); result = prime * result + ((getCouponPrice() == null) ? 0 : getCouponPrice().hashCode());
result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode()); result = prime * result + ((getOrderType() == null) ? 0 : getOrderType().hashCode());
result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode()); result = prime * result + ((getOrderStatus() == null) ? 0 : getOrderStatus().hashCode());
@ -421,6 +466,8 @@ public class ApiBlxOrder implements Serializable {
sb.append(", id=").append(id); sb.append(", id=").append(id);
sb.append(", merId=").append(merId); sb.append(", merId=").append(merId);
sb.append(", orderNo=").append(orderNo); sb.append(", orderNo=").append(orderNo);
sb.append(", userId=").append(userId);
sb.append(", userPhone=").append(userPhone);
sb.append(", merOrderId=").append(merOrderId); sb.append(", merOrderId=").append(merOrderId);
sb.append(", parkOrderId=").append(parkOrderId); sb.append(", parkOrderId=").append(parkOrderId);
sb.append(", inTime=").append(inTime); sb.append(", inTime=").append(inTime);
@ -432,6 +479,7 @@ public class ApiBlxOrder implements Serializable {
sb.append(", parkId=").append(parkId); sb.append(", parkId=").append(parkId);
sb.append(", carSeatId=").append(carSeatId); sb.append(", carSeatId=").append(carSeatId);
sb.append(", parkPrice=").append(parkPrice); sb.append(", parkPrice=").append(parkPrice);
sb.append(", payPrice=").append(payPrice);
sb.append(", couponPrice=").append(couponPrice); sb.append(", couponPrice=").append(couponPrice);
sb.append(", orderType=").append(orderType); sb.append(", orderType=").append(orderType);
sb.append(", orderStatus=").append(orderStatus); sb.append(", orderStatus=").append(orderStatus);

@ -326,6 +326,136 @@ public class ApiBlxOrderExample {
return (Criteria) this; 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 andUserPhoneIsNull() {
addCriterion("user_phone is null");
return (Criteria) this;
}
public Criteria andUserPhoneIsNotNull() {
addCriterion("user_phone is not null");
return (Criteria) this;
}
public Criteria andUserPhoneEqualTo(String value) {
addCriterion("user_phone =", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotEqualTo(String value) {
addCriterion("user_phone <>", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneGreaterThan(String value) {
addCriterion("user_phone >", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneGreaterThanOrEqualTo(String value) {
addCriterion("user_phone >=", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLessThan(String value) {
addCriterion("user_phone <", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLessThanOrEqualTo(String value) {
addCriterion("user_phone <=", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneLike(String value) {
addCriterion("user_phone like", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotLike(String value) {
addCriterion("user_phone not like", value, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneIn(List<String> values) {
addCriterion("user_phone in", values, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotIn(List<String> values) {
addCriterion("user_phone not in", values, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneBetween(String value1, String value2) {
addCriterion("user_phone between", value1, value2, "userPhone");
return (Criteria) this;
}
public Criteria andUserPhoneNotBetween(String value1, String value2) {
addCriterion("user_phone not between", value1, value2, "userPhone");
return (Criteria) this;
}
public Criteria andMerOrderIdIsNull() { public Criteria andMerOrderIdIsNull() {
addCriterion("mer_order_id is null"); addCriterion("mer_order_id is null");
return (Criteria) this; return (Criteria) this;
@ -1036,6 +1166,66 @@ public class ApiBlxOrderExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andPayPriceIsNull() {
addCriterion("pay_price is null");
return (Criteria) this;
}
public Criteria andPayPriceIsNotNull() {
addCriterion("pay_price is not null");
return (Criteria) this;
}
public Criteria andPayPriceEqualTo(BigDecimal value) {
addCriterion("pay_price =", value, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceNotEqualTo(BigDecimal value) {
addCriterion("pay_price <>", value, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceGreaterThan(BigDecimal value) {
addCriterion("pay_price >", value, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("pay_price >=", value, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceLessThan(BigDecimal value) {
addCriterion("pay_price <", value, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceLessThanOrEqualTo(BigDecimal value) {
addCriterion("pay_price <=", value, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceIn(List<BigDecimal> values) {
addCriterion("pay_price in", values, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceNotIn(List<BigDecimal> values) {
addCriterion("pay_price not in", values, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("pay_price between", value1, value2, "payPrice");
return (Criteria) this;
}
public Criteria andPayPriceNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("pay_price not between", value1, value2, "payPrice");
return (Criteria) this;
}
public Criteria andCouponPriceIsNull() { public Criteria andCouponPriceIsNull() {
addCriterion("coupon_price is null"); addCriterion("coupon_price is null");
return (Criteria) this; return (Criteria) this;

@ -0,0 +1,305 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* high_discount_package_agent_record
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighDiscountPackageAgentRecord implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 优惠券包名称
*/
private String discountPackageTitle;
/**
* 优惠券包id
*/
private Long discountPackageId;
/**
* 代理商名称
*/
private String agentName;
/**
* 代理商id
*/
private Long agentId;
/**
* 分发数量
*/
private Integer count;
/**
* 分发前数量
*/
private Integer frontCount;
/**
* 分发后数量
*/
private Integer afterCount;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 状态
*/
private Integer status;
/**
* 操作人
*/
private Long opId;
/**
* 操作人名称
*/
private String opName;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDiscountPackageTitle() {
return discountPackageTitle;
}
public void setDiscountPackageTitle(String discountPackageTitle) {
this.discountPackageTitle = discountPackageTitle;
}
public Long getDiscountPackageId() {
return discountPackageId;
}
public void setDiscountPackageId(Long discountPackageId) {
this.discountPackageId = discountPackageId;
}
public String getAgentName() {
return agentName;
}
public void setAgentName(String agentName) {
this.agentName = agentName;
}
public Long getAgentId() {
return agentId;
}
public void setAgentId(Long agentId) {
this.agentId = agentId;
}
public Integer getCount() {
return count;
}
public void setCount(Integer count) {
this.count = count;
}
public Integer getFrontCount() {
return frontCount;
}
public void setFrontCount(Integer frontCount) {
this.frontCount = frontCount;
}
public Integer getAfterCount() {
return afterCount;
}
public void setAfterCount(Integer afterCount) {
this.afterCount = afterCount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getOpId() {
return opId;
}
public void setOpId(Long opId) {
this.opId = opId;
}
public String getOpName() {
return opName;
}
public void setOpName(String opName) {
this.opName = opName;
}
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;
}
HighDiscountPackageAgentRecord other = (HighDiscountPackageAgentRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getDiscountPackageTitle() == null ? other.getDiscountPackageTitle() == null : this.getDiscountPackageTitle().equals(other.getDiscountPackageTitle()))
&& (this.getDiscountPackageId() == null ? other.getDiscountPackageId() == null : this.getDiscountPackageId().equals(other.getDiscountPackageId()))
&& (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getCount() == null ? other.getCount() == null : this.getCount().equals(other.getCount()))
&& (this.getFrontCount() == null ? other.getFrontCount() == null : this.getFrontCount().equals(other.getFrontCount()))
&& (this.getAfterCount() == null ? other.getAfterCount() == null : this.getAfterCount().equals(other.getAfterCount()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId()))
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName()))
&& (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 + ((getDiscountPackageTitle() == null) ? 0 : getDiscountPackageTitle().hashCode());
result = prime * result + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode());
result = prime * result + ((getAgentName() == null) ? 0 : getAgentName().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getCount() == null) ? 0 : getCount().hashCode());
result = prime * result + ((getFrontCount() == null) ? 0 : getFrontCount().hashCode());
result = prime * result + ((getAfterCount() == null) ? 0 : getAfterCount().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode());
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", discountPackageTitle=").append(discountPackageTitle);
sb.append(", discountPackageId=").append(discountPackageId);
sb.append(", agentName=").append(agentName);
sb.append(", agentId=").append(agentId);
sb.append(", count=").append(count);
sb.append(", frontCount=").append(frontCount);
sb.append(", afterCount=").append(afterCount);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", opId=").append(opId);
sb.append(", opName=").append(opName);
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,289 @@
package com.hai.entity;
import java.io.Serializable;
import java.util.Date;
/**
* high_discount_package_agent_rel
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class HighDiscountPackageAgentRel implements Serializable {
/**
* 主键
*/
private Long id;
/**
* 优惠券包名称
*/
private String discountPackageTitle;
/**
* 优惠券包id
*/
private Long discountPackageId;
/**
* 代理商名称
*/
private String agentName;
/**
* 代理商id
*/
private Long agentId;
/**
* 库存数量
*/
private Integer stockCount;
/**
* 销售数量
*/
private Integer salesCount;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 状态
*/
private Integer status;
/**
* 操作人
*/
private Long opId;
/**
* 操作人名称
*/
private String opName;
/**
* ext_1
*/
private String ext1;
/**
* ext_2
*/
private String ext2;
/**
* ext_3
*/
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getDiscountPackageTitle() {
return discountPackageTitle;
}
public void setDiscountPackageTitle(String discountPackageTitle) {
this.discountPackageTitle = discountPackageTitle;
}
public Long getDiscountPackageId() {
return discountPackageId;
}
public void setDiscountPackageId(Long discountPackageId) {
this.discountPackageId = discountPackageId;
}
public String getAgentName() {
return agentName;
}
public void setAgentName(String agentName) {
this.agentName = agentName;
}
public Long getAgentId() {
return agentId;
}
public void setAgentId(Long agentId) {
this.agentId = agentId;
}
public Integer getStockCount() {
return stockCount;
}
public void setStockCount(Integer stockCount) {
this.stockCount = stockCount;
}
public Integer getSalesCount() {
return salesCount;
}
public void setSalesCount(Integer salesCount) {
this.salesCount = salesCount;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Long getOpId() {
return opId;
}
public void setOpId(Long opId) {
this.opId = opId;
}
public String getOpName() {
return opName;
}
public void setOpName(String opName) {
this.opName = opName;
}
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;
}
HighDiscountPackageAgentRel other = (HighDiscountPackageAgentRel) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getDiscountPackageTitle() == null ? other.getDiscountPackageTitle() == null : this.getDiscountPackageTitle().equals(other.getDiscountPackageTitle()))
&& (this.getDiscountPackageId() == null ? other.getDiscountPackageId() == null : this.getDiscountPackageId().equals(other.getDiscountPackageId()))
&& (this.getAgentName() == null ? other.getAgentName() == null : this.getAgentName().equals(other.getAgentName()))
&& (this.getAgentId() == null ? other.getAgentId() == null : this.getAgentId().equals(other.getAgentId()))
&& (this.getStockCount() == null ? other.getStockCount() == null : this.getStockCount().equals(other.getStockCount()))
&& (this.getSalesCount() == null ? other.getSalesCount() == null : this.getSalesCount().equals(other.getSalesCount()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getOpId() == null ? other.getOpId() == null : this.getOpId().equals(other.getOpId()))
&& (this.getOpName() == null ? other.getOpName() == null : this.getOpName().equals(other.getOpName()))
&& (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 + ((getDiscountPackageTitle() == null) ? 0 : getDiscountPackageTitle().hashCode());
result = prime * result + ((getDiscountPackageId() == null) ? 0 : getDiscountPackageId().hashCode());
result = prime * result + ((getAgentName() == null) ? 0 : getAgentName().hashCode());
result = prime * result + ((getAgentId() == null) ? 0 : getAgentId().hashCode());
result = prime * result + ((getStockCount() == null) ? 0 : getStockCount().hashCode());
result = prime * result + ((getSalesCount() == null) ? 0 : getSalesCount().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getOpId() == null) ? 0 : getOpId().hashCode());
result = prime * result + ((getOpName() == null) ? 0 : getOpName().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(", discountPackageTitle=").append(discountPackageTitle);
sb.append(", discountPackageId=").append(discountPackageId);
sb.append(", agentName=").append(agentName);
sb.append(", agentId=").append(agentId);
sb.append(", stockCount=").append(stockCount);
sb.append(", salesCount=").append(salesCount);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", status=").append(status);
sb.append(", opId=").append(opId);
sb.append(", opName=").append(opName);
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();
}
}

@ -77,4 +77,14 @@ public interface ApiBlxCouponService {
* @return com.hai.entity.ApiBlxOrder * @return com.hai.entity.ApiBlxOrder
*/ */
ApiBlxOrder findOrderByMap(Map<String , Object> map); ApiBlxOrder findOrderByMap(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name findOrderByMap
* @Description // 根据条件查询停车订单
* @Date 15:10 2023/9/1
* @Param map
* @return com.hai.entity.ApiBlxOrder
*/
List<ApiBlxOrder> getOrderByList(Map<String , Object> map);
} }

@ -89,6 +89,9 @@ public class ApiBlxCouponServiceImpl implements ApiBlxCouponService {
if (MapUtils.getString(map , "parkOrderId") != null) { if (MapUtils.getString(map , "parkOrderId") != null) {
criteria.andParkOrderIdEqualTo(MapUtils.getString(map , "parkOrderId")); criteria.andParkOrderIdEqualTo(MapUtils.getString(map , "parkOrderId"));
} }
if (MapUtils.getInteger(map , "status") != null) {
criteria.andOrderStatusEqualTo(MapUtils.getInteger(map , "status"));
}
List<ApiBlxOrder> list = apiBlxOrderMapper.selectByExample(example); List<ApiBlxOrder> list = apiBlxOrderMapper.selectByExample(example);
@ -99,5 +102,30 @@ public class ApiBlxCouponServiceImpl implements ApiBlxCouponService {
return null; return null;
} }
@Override
public List<ApiBlxOrder> getOrderByList(Map<String, Object> map) {
ApiBlxOrderExample example = new ApiBlxOrderExample();
ApiBlxOrderExample.Criteria criteria = example.createCriteria();
if (MapUtils.getString(map , "merId") != null) {
criteria.andMerIdEqualTo(MapUtils.getString(map , "merId"));
}
if (MapUtils.getLong(map , "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getLong(map , "userId"));
}
if (MapUtils.getString(map , "orderNo") != null) {
criteria.andOrderNoEqualTo(MapUtils.getString(map , "orderNo"));
}
if (MapUtils.getString(map , "merOrderId") != null) {
criteria.andMerOrderIdEqualTo(MapUtils.getString(map , "merOrderId"));
}
if (MapUtils.getString(map , "parkOrderId") != null) {
criteria.andParkOrderIdEqualTo(MapUtils.getString(map , "parkOrderId"));
}
if (MapUtils.getInteger(map , "status") != null) {
criteria.andOrderStatusEqualTo(MapUtils.getInteger(map , "status"));
}
return apiBlxOrderMapper.selectByExample(example);
}
} }

@ -1058,6 +1058,8 @@ public class OrderCreateHandleServiceImpl implements OrderCreateHandleService {
apiBlxOrder.setCarNo(createOrderChildModel.getCarNo()); apiBlxOrder.setCarNo(createOrderChildModel.getCarNo());
apiBlxOrder.setCarSeatId(createOrderChildModel.getCarSeatId()); apiBlxOrder.setCarSeatId(createOrderChildModel.getCarSeatId());
apiBlxOrder.setOrderNo(order.getOrderNo()); apiBlxOrder.setOrderNo(order.getOrderNo());
apiBlxOrder.setUserId(order.getMemId());
apiBlxOrder.setUserPhone(order.getMemPhone());
apiBlxOrder.setOrderStatus(4); apiBlxOrder.setOrderStatus(4);
apiBlxCouponService.insertBlxOrder(apiBlxOrder); apiBlxCouponService.insertBlxOrder(apiBlxOrder);

@ -573,6 +573,12 @@ public class OrderPaySuccessServiceImpl implements OrderPaySuccessService {
for (HighChildOrder childOrder : order.getHighChildOrderList()) { for (HighChildOrder childOrder : order.getHighChildOrderList()) {
childOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber()); childOrder.setChildOrderStatus(OrderChildStatus.STATUS3.getNumber());
} }
apiBlxOrder.setOrderStatus(5);
apiBlxOrder.setPayPrice(order.getPayPrice());
apiBlxOrder.setUpdateTime(new Date());
apiBlxCouponService.editBlxOrder(apiBlxOrder);
orderService.updateOrderData(order); orderService.updateOrderData(order);
} }
} }

@ -0,0 +1,120 @@
package com.hai.service;
import com.hai.entity.HighActivityInfo;
import com.hai.entity.HighActivityPartakeRule;
import com.hai.entity.HighDiscountPackageAgentRecord;
import com.hai.entity.HighDiscountPackageAgentRel;
import java.util.List;
import java.util.Map;
/**
* @serviceName .java
* @author Sum1Dream
* @version 1.0.0
* @Description // 优惠券包代理商业务
* @createTime 10:50 2023/9/20
**/
public interface HighDiscountPackageAgentService {
/**
* @Author Sum1Dream
* @Name insertDiscountPackageAgent
* @Description // 新增优惠券包代理商关联
* @Date 10:52 2023/9/20
* @Param discountPackageAgentRel
* @return void
*/
void insertDiscountPackageAgentRel(HighDiscountPackageAgentRel discountPackageAgentRel);
/**
* @Author Sum1Dream
* @Name updateDiscountPackageAgentRel
* @Description // 更新优惠券包代理商关联
* @Date 10:53 2023/9/20
* @Param discountPackageAgentRel
* @return void
*/
void updateDiscountPackageAgentRel(HighDiscountPackageAgentRel discountPackageAgentRel);
/**
* @Author Sum1Dream
* @Name getDetailRelById
* @Description // 根据id查询优惠券包代理商关联详情
* @Date 10:53 2023/9/20
* @Param id
* @return com.hai.entity.HighDiscountPackageAgentRel
*/
HighDiscountPackageAgentRel getDetailRelById(Long id);
/**
* @Author Sum1Dream
* @Name getDetailRelByMap
* @Description //根据map查询优惠券包代理商关联详情
* @Date 15:13 2023/9/20
* @Param map
* @return com.hai.entity.HighDiscountPackageAgentRel
*/
HighDiscountPackageAgentRel getDetailRelByMap(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name getListRel
* @Description // 查询列表
* @Date 11:27 2023/9/20
* @Param param
* @return java.util.List<com.hai.entity.HighDiscountPackageAgentRel>
*/
List<HighDiscountPackageAgentRel> getListRel(Map<String, Object> param);
/**
* @Author Sum1Dream
* @Name insertDiscountPackageAgentRecord
* @Description // 插入优惠券包代理商分发记录
* @Date 13:53 2023/9/20
* @Param discountPackageAgentRecord
* @return void
*/
void insertDiscountPackageAgentRecord(HighDiscountPackageAgentRecord discountPackageAgentRecord);
/**
* @Author Sum1Dream
* @Name updateDiscountPackageAgentRecord
* @Description //更新优惠券包代理商分发记录
* @Date 13:55 2023/9/20
* @Param discountPackageAgentRecord
* @return void
*/
void updateDiscountPackageAgentRecord(HighDiscountPackageAgentRecord discountPackageAgentRecord);
/**
* @Author Sum1Dream
* @Name getDetailRecordById
* @Description // 根据id 查询优惠券包代理商分发记录
* @Date 13:55 2023/9/20
* @Param id
* @return com.hai.entity.HighDiscountPackageAgentRecord
*/
HighDiscountPackageAgentRecord getDetailRecordById(Long id);
/**
* @Author Sum1Dream
* @Name getDetailRecordByMap
* @Description // 根据map 查询优惠券包代理商分发记录
* @Date 15:13 2023/9/20
* @Param map
* @return com.hai.entity.HighDiscountPackageAgentRecord
*/
HighDiscountPackageAgentRecord getDetailRecordByMap(Map<String , Object> map);
/**
* @Author Sum1Dream
* @Name getListRecord
* @Description // 查询列表
* @Date 13:59 2023/9/20
* @Param param
* @return java.util.List<com.hai.entity.HighDiscountPackageAgentRecord>
*/
List<HighDiscountPackageAgentRecord> getListRecord(Map<String, Object> param);
}

@ -0,0 +1,108 @@
package com.hai.service.impl;
import com.hai.dao.HighDiscountPackageAgentRecordMapper;
import com.hai.dao.HighDiscountPackageAgentRelMapper;
import com.hai.entity.*;
import com.hai.service.HighDiscountPackageAgentService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
@Service("highDiscountPackageAgentService")
public class HighDiscountPackageAgentServiceImpl implements HighDiscountPackageAgentService {
@Resource
private HighDiscountPackageAgentRecordMapper discountPackageAgentRecordMapper;
@Resource
private HighDiscountPackageAgentRelMapper discountPackageAgentRelMapper;
@Override
public void insertDiscountPackageAgentRel(HighDiscountPackageAgentRel discountPackageAgentRel) {
discountPackageAgentRelMapper.insert(discountPackageAgentRel);
}
@Override
public void updateDiscountPackageAgentRel(HighDiscountPackageAgentRel discountPackageAgentRel) {
discountPackageAgentRelMapper.updateByPrimaryKey(discountPackageAgentRel);
}
@Override
public HighDiscountPackageAgentRel getDetailRelById(Long id) {
return discountPackageAgentRelMapper.selectByPrimaryKey(id);
}
@Override
public HighDiscountPackageAgentRel getDetailRelByMap(Map<String, Object> map) {
HighDiscountPackageAgentRelExample example = new HighDiscountPackageAgentRelExample();
HighDiscountPackageAgentRelExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "agentId") != null) {
criteria.andAgentIdEqualTo(MapUtils.getLong(map, "agentId"));
}
if (MapUtils.getLong(map, "discountPackageId") != null) {
criteria.andDiscountPackageIdEqualTo(MapUtils.getLong(map, "discountPackageId"));
}
List<HighDiscountPackageAgentRel> list = discountPackageAgentRelMapper.selectByExample(example);
if (list.size() > 0) {
return list.get(0);
}
return null;
}
@Override
public List<HighDiscountPackageAgentRel> getListRel(Map<String, Object> param) {
HighDiscountPackageAgentRelExample example = new HighDiscountPackageAgentRelExample();
HighDiscountPackageAgentRelExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(param, "agentId") != null) {
criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId"));
}
return discountPackageAgentRelMapper.selectByExample(example);
}
@Override
public void insertDiscountPackageAgentRecord(HighDiscountPackageAgentRecord discountPackageAgentRecord) {
discountPackageAgentRecordMapper.insert(discountPackageAgentRecord);
}
@Override
public void updateDiscountPackageAgentRecord(HighDiscountPackageAgentRecord discountPackageAgentRecord) {
discountPackageAgentRecordMapper.updateByPrimaryKey(discountPackageAgentRecord);
}
@Override
public HighDiscountPackageAgentRecord getDetailRecordById(Long id) {
return discountPackageAgentRecordMapper.selectByPrimaryKey(id);
}
@Override
public HighDiscountPackageAgentRecord getDetailRecordByMap(Map<String, Object> map) {
return null;
}
@Override
public List<HighDiscountPackageAgentRecord> getListRecord(Map<String, Object> param) {
HighDiscountPackageAgentRecordExample example = new HighDiscountPackageAgentRecordExample();
HighDiscountPackageAgentRecordExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(param, "agentId") != null) {
criteria.andAgentIdEqualTo(MapUtils.getLong(param, "agentId"));
}
if (MapUtils.getLong(param, "discountPackageId") != null) {
criteria.andDiscountPackageIdEqualTo(MapUtils.getLong(param, "discountPackageId"));
}
return discountPackageAgentRecordMapper.selectByExample(example);
}
}
Loading…
Cancel
Save